⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acinclude.m4

📁 KDE下的西门子手机管理程序
💻 M4
📖 第 1 页 / 共 5 页
字号:
ac_x_includes=$kde_x_includesAC_PATH_X_DIRECTdnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.dnl Unfortunately, if compiling with the N32 ABI, this is not the correctdnl location. The correct location is /usr/lib32 or an undefined valuednl (the linker is smart enough to pick the correct default library).dnl Things work just fine if you use just AC_PATH_X_DIRECT.case "$host" inmips-sgi-irix6*)  ;;*)  AC_PATH_X_XMKMF  if test -z "$ac_x_includes"; then    ac_x_includes="."  fi  if test -z "$ac_x_libraries"; then    ac_x_libraries="/usr/lib"  fiesac#from now on we use our own again# when the user already gave --x-includes, we ignore# what the standard autoconf macros told us.if test "$kde_x_includes" = NO; then  kde_x_includes=$ac_x_includesfi# for --x-libraries tooif test "$kde_x_libraries" = NO; then  kde_x_libraries=$ac_x_librariesfiif test "$kde_x_includes" = NO; then  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])fiif test "$kde_x_libraries" = NO; then  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])fi# Record where we found X for the cache.kde_cv_have_x="have_x=yes \         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"])dnleval "$kde_cv_have_x"if test "$have_x" != yes; then  AC_MSG_RESULT($have_x)  no_x=yeselse  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])fiif test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then  X_INCLUDES=""  x_includes="."; dnl better than nothing :- else  x_includes=$kde_x_includes  X_INCLUDES="-I$x_includes"fiif test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then  X_LDFLAGS=""  x_libraries="/usr/lib"; dnl better than nothing :- else  x_libraries=$kde_x_libraries  X_LDFLAGS="-L$x_libraries"fiall_includes="$X_INCLUDES"all_libraries="$X_LDFLAGS"AC_SUBST(X_INCLUDES)AC_SUBST(X_LDFLAGS)AC_SUBST(x_libraries)AC_SUBST(x_includes)# Check for libraries that X11R6 Xt/Xaw programs need.ac_save_LDFLAGS="$LDFLAGS"LDFLAGS="$LDFLAGS $X_LDFLAGS"# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to# check for ICE first), but we must link in the order -lSM -lICE or# we get undefined symbols.  So assume we have SM if we have ICE.# These have to be linked with before -lX11, unlike the other# libraries we check for below, so use a different variable.#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.AC_CHECK_LIB(ICE, IceConnectionNumber,  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)AC_SUBST(LIBSM)LDFLAGS="$ac_save_LDFLAGS"AC_SUBST(X_PRE_LIBS)LIB_X11='-lX11 $(LIBSOCKET)'AC_SUBST(LIB_X11)AC_MSG_CHECKING(for libXext)AC_CACHE_VAL(kde_cv_have_libXext,[kde_ldflags_safe="$LDFLAGS"kde_libs_safe="$LIBS"LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"LIBS="-lXext -lX11 $LIBSOCKET"AC_TRY_LINK([#include <stdio.h>],[printf("hello Xext\n");],kde_cv_have_libXext=yes,kde_cv_have_libXext=no   )LDFLAGS=$kde_ldflags_safeLIBS=$kde_libs_safe ])AC_MSG_RESULT($kde_cv_have_libXext)if test "$kde_cv_have_libXext" = "no"; then  AC_MSG_ERROR([We need a working libXext to proceed. Since configurecan't find it itself, we stop here assuming that make wouldn't findthem either.])fi])AC_LANG_RESTORE])AC_DEFUN(KDE_PRINT_QT_PROGRAM,[AC_REQUIRE([KDE_USE_QT])cat > conftest.$ac_ext <<EOF#include "confdefs.h"#include <qglobal.h>#include <qapplication.h>#include <qapp.h>#include <qobjcoll.h>EOFif test "$kde_qtver" = "2"; thencat >> conftest.$ac_ext <<EOF#include <qevent.h>#include <qstring.h>#include <qstyle.h>EOFif test $kde_qtsubver -gt 0; thencat >> conftest.$ac_ext <<EOF#include <qiconview.h>EOFfifiecho "#if ! ($kde_qt_verstring)" >> conftest.$ac_extcat >> conftest.$ac_ext <<EOF#error 1#endifint main() {EOFif test "$kde_qtver" = "2"; thencat >> conftest.$ac_ext <<EOF    QStringList *t = new QStringList();EOFif test $kde_qtsubver -gt 0; thencat >> conftest.$ac_ext <<EOF    QIconView iv(0);    iv.setWordWrapIconText(false);    QString s;    s.setLatin1("Elvis is alive", 14);    int magnolia = QEvent::Speech; /* new in 2.2 beta2 */EOFfificat >> conftest.$ac_ext <<EOF    return 0;}EOF])AC_DEFUN(KDE_USE_QT,[if test -z "$1"; then  kde_qtver=2  kde_qtsubver=1else  kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`  # following is the check if subversion isn磘 found in passed argument  if test "$kde_qtsubver" = "$1"; then    kde_qtsubver=1  fi  kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`  if test "$kde_qtver" = "1"; then    kde_qtsubver=42  else   # this is the version number fallback to 2.1, unless major version is 1 or 2   if test "$kde_qtver" != "2"; then    kde_qtver=2    kde_qtsubver=1   fi  fifiif test -z "$2"; then  if test $kde_qtver = 2; then    if test $kde_qtsubver -gt 0; then      kde_qt_minversion=">= Qt 2.2.1"    else      kde_qt_minversion=">= Qt 2.0.2"    fi  else    kde_qt_minversion=">= 1.42 and < 2.0"  fielse   kde_qt_minversion=$2fiif test -z "$3"; then   if test $kde_qtver = 2; then    if test $kde_qtsubver -gt 0; then      kde_qt_verstring="QT_VERSION >= 221"    else      kde_qt_verstring="QT_VERSION >= 200"    fi   else    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"  fielse   kde_qt_verstring=$3fiif test $kde_qtver = 2; then   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"else   kde_qt_dirs="$QTDIR /usr/lib/qt"fi])AC_DEFUN(KDE_CHECK_QT_DIRECT,[AC_REQUIRE([KDE_USE_QT])AC_MSG_CHECKING([if Qt compiles without flags])AC_CACHE_VAL(kde_cv_qt_direct,[AC_LANG_SAVEAC_LANG_CPLUSPLUSac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATHac_LIBRARY_PATH="$LIBRARY_PATH"ac_cxxflags_safe="$CXXFLAGS"ac_ldflags_safe="$LDFLAGS"ac_libs_safe="$LIBS"CXXFLAGS="$CXXFLAGS -I$qt_includes"LDFLAGS="$LDFLAGS $X_LDFLAGS"LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"LD_LIBRARY_PATH=export LD_LIBRARY_PATHLIBRARY_PATH=export LIBRARY_PATHKDE_PRINT_QT_PROGRAMif AC_TRY_EVAL(ac_link) && test -s conftest; then  kde_cv_qt_direct="yes"else  kde_cv_qt_direct="no"  echo "configure: failed program was:" >&AC_FD_CC  cat conftest.$ac_ext >&AC_FD_CCfirm -f conftest*CXXFLAGS="$ac_cxxflags_safe"LDFLAGS="$ac_ldflags_safe"LIBS="$ac_libs_safe"LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"export LD_LIBRARY_PATHLIBRARY_PATH="$ac_LIBRARY_PATH"export LIBRARY_PATHAC_LANG_RESTORE])if test "$kde_cv_qt_direct" = "yes"; then  AC_MSG_RESULT(yes)  $1else  AC_MSG_RESULT(no)  $2fi])dnl ------------------------------------------------------------------------dnl Try to find the Qt headers and libraries.dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)dnl ------------------------------------------------------------------------dnlAC_DEFUN(AC_PATH_QT_1_3,[AC_REQUIRE([K_PATH_X])AC_REQUIRE([KDE_USE_QT])dnl ------------------------------------------------------------------------dnl Add configure flag to enable linking to MT version of Qt library.dnl ------------------------------------------------------------------------AC_ARG_ENABLE(  mt,  [  --enable-mt             link to threaded Qt (experimental)],  kde_use_qt_mt=$enableval,  kde_use_qt_mt=no)USING_QT_MT=""dnl ------------------------------------------------------------------------dnl If we got --enable-qt-mt then adjust some vars for the host.dnl ------------------------------------------------------------------------if test "x$kde_use_qt_mt" = "xyes"; then  case $host in  *-*-linux-*)    if test "x$GCC" = "xyes"; then      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"    else      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])    fi    ;;  *)    AC_MSG_WARN([MT not yet supported on $host - disabled.])    ;;  esacfikde_qt_was_given=yesdnl ------------------------------------------------------------------------dnl If we haven't been told how to link to Qt, we work it out for ourselves.dnl ------------------------------------------------------------------------LIBQT_GLOB="libqt.*"if test -z "$LIBQT"; then  LIBQT="-lqt"  kde_int_qt="-lqt"dnl ------------------------------------------------------------------------dnl If we got --enable-qt-mt then adjust the Qt library name for the host.dnl ------------------------------------------------------------------------  if test "x$kde_use_qt_mt" = "xyes"; then      case $host in      *-*-linux-*)        if test "x$GCC" = "xyes"; then          LIBQT="-lqt-mt"          kde_int_qt="-lqt-mt"          LIBQT_GLOB="libqt-mt.*"          USING_QT_MT="using -mt"        fi      ;;      esac  fi  kde_qt_was_given=noelse  kde_int_qt="$LIBQT"fiif test $kde_qtver = 2; then  AC_REQUIRE([AC_FIND_PNG])  AC_REQUIRE([AC_FIND_JPEG])  LIBQT="$LIBQT $LIBPNG $LIBJPEG"fiAC_MSG_CHECKING([for Qt])LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NOqt_libraries=""qt_includes=""AC_ARG_WITH(qt-dir,    [  --with-qt-dir=DIR       where the root of Qt is installed ],    [  ac_qt_includes="$withval"/include       ac_qt_libraries="$withval"/lib       ac_qt_bindir="$withval"/bin    ])AC_ARG_WITH(qt-includes,    [  --with-qt-includes=DIR  where the Qt includes are. ],    [       ac_qt_includes="$withval"    ])kde_qt_libs_given=noAC_ARG_WITH(qt-libraries,    [  --with-qt-libraries=DIR where the Qt library is installed.],    [  ac_qt_libraries="$withval"       kde_qt_libs_given=yes    ])AC_CACHE_VAL(ac_cv_have_qt,[#try to guess Qt locationsqt_incdirs=""for dir in $kde_qt_dirs; do   qt_incdirs="$qt_incdirs $dir/include $dir"doneqt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"if test ! "$ac_qt_includes" = "NO"; then   qt_incdirs="$ac_qt_includes $qt_incdirs"fiif test "$kde_qtver" = "2"; then  kde_qt_header=qstyle.helse  kde_qt_header=qglobal.hfiAC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)ac_qt_includes="$qt_incdir"qt_libdirs=""for dir in $kde_qt_dirs; do   qt_libdirs="$qt_libdirs $dir/lib $dir"doneqt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"if test ! "$ac_qt_libraries" = "NO"; then  qt_libdir=$ac_qt_librarieselse  qt_libdirs="$ac_qt_libraries $qt_libdirs"  # if the Qt was given, the chance is too big that libqt.* doesn't exist  qt_libdir=NONE  for dir in $qt_libdirs; do    try="ls -1 $dir/${LIBQT_GLOB}"    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi  donefiac_qt_libraries="$qt_libdir"AC_LANG_SAVEAC_LANG_CPLUSPLUSac_cxxflags_safe="$CXXFLAGS"ac_ldflags_safe="$LDFLAGS"ac_libs_safe="$LIBS"CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"LIBS="$LIBS $LIBQT"KDE_PRINT_QT_PROGRAMif AC_TRY_EVAL(ac_link) && test -s conftest; then  rm -f conftest*else  echo "configure: failed program was:" >&AC_FD_CC  cat conftest.$ac_ext >&AC_FD_CC  ac_qt_libraries="NO"firm -f conftest*CXXFLAGS="$ac_cxxflags_safe"LDFLAGS="$ac_ldflags_safe"LIBS="$ac_libs_safe"AC_LANG_RESTOREif test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then  ac_cv_have_qt="have_qt=no"  ac_qt_notfound=""  if test "$ac_qt_includes" = NO; then    if test "$ac_qt_libraries" = NO; then      ac_qt_notfound="(headers and libraries)";    else      ac_qt_notfound="(headers)";    fi  else    ac_qt_notfound="(libraries)";  fi  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!For more details about this problem, look at the end of config.log.])else  have_qt="yes"fi])eval "$ac_cv_have_qt"if test "$have_qt" != yes; then  AC_MSG_RESULT([$have_qt]);else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -