📄 acinclude.m4.in.svn-base
字号:
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 donefifor a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do if test -e "$a"; then LIBQT="$LIBQT ${kde_int_qt}_incremental" break fidoneac_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 $KDE_MT_LDFLAGS"LIBS="$LIBS $LIBQT $KDE_MT_LIBS"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="" missing_qt_mt="" 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 if test "x$kde_use_qt_mt" = "xyes"; then missing_qt_mt="Make sure that you have compiled Qt with thread support!" ac_qt_notfound="(library $qtlib-mt)"; else ac_qt_notfound="(library $qtlib)"; fi 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.$missing_qt_mt])else have_qt="yes"fi])eval "$ac_cv_have_qt"if test "$have_qt" != yes; then AC_MSG_RESULT([$have_qt]);else ac_cv_have_qt="have_qt=yes \ ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT]) qt_libraries="$ac_qt_libraries" qt_includes="$ac_qt_includes"fiif test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then KDE_CHECK_QT_DIRECT(qt_libraries= ,[])fiAC_SUBST(qt_libraries)AC_SUBST(qt_includes)if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then QT_INCLUDES=""else QT_INCLUDES="-I$qt_includes" all_includes="$QT_INCLUDES $all_includes"fiif test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then QT_LDFLAGS=""else QT_LDFLAGS="-L$qt_libraries" all_libraries="$QT_LDFLAGS $all_libraries"fitest -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"AC_SUBST(QT_INCLUDES)AC_SUBST(QT_LDFLAGS)AC_PATH_QT_MOC_UICKDE_CHECK_QT_JPEGif test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; thenLIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'elseLIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'fitest -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do if test -e "$a"; then LIB_QT="$LIB_QT ${kde_int_qt}_incremental" break fidoneAC_SUBST(LIB_QT)AC_SUBST(LIB_QPE)AC_SUBST(kde_qtver)])AC_DEFUN([AC_PATH_QT],[AC_PATH_QT_1_3])AC_DEFUN([KDE_CHECK_UIC_PLUGINS],[AC_REQUIRE([AC_PATH_QT_MOC_UIC])if test x$ac_uic_supports_libpath = xyes; thenAC_MSG_CHECKING([if UIC has KDE plugins available])AC_CACHE_VAL(kde_cv_uic_plugins,[cat > actest.ui << EOF<!DOCTYPE UI><UI version="3.0" stdsetdef="1"><class>NewConnectionDialog</class><widget class="QDialog"> <widget class="KLineEdit"> <property name="name"> <cstring>testInput</cstring> </property> </widget></widget></UI>EOF kde_cv_uic_plugins=nokde_line="$UIC_PATH -L $kde_widgetdir"if test x$ac_uic_supports_nounload = xyes; then kde_line="$kde_line -nounload"fikde_line="$kde_line -impl actest.h actest.ui > actest.cpp"if AC_TRY_EVAL(kde_line); then # if you're trying to debug this check and think it's incorrect, # better check your installation. The check _is_ correct - your # installation is not. if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then kde_cv_uic_plugins=yes fifirm -f actest.ui actest.cpp])AC_MSG_RESULT([$kde_cv_uic_plugins])if test "$kde_cv_uic_plugins" != yes; then AC_MSG_ERROR([you need to install kdelibs first.If you did install kdelibs, then the Qt version that is picked up bythis configure is not the same version you used to compile kdelibs. The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the _same Qt version_, compiled with the _same compiler_ and the same Qtconfiguration settings.])fifi])AC_DEFUN([KDE_CHECK_FINAL],[ AC_ARG_ENABLE(final, AC_HELP_STRING([--enable-final], [build size optimized apps (experimental - needs lots of memory)]), kde_use_final=$enableval, kde_use_final=no) if test "x$kde_use_final" = "xyes"; then KDE_USE_FINAL_TRUE="" KDE_USE_FINAL_FALSE="#" else KDE_USE_FINAL_TRUE="#" KDE_USE_FINAL_FALSE="" fi AC_SUBST(KDE_USE_FINAL_TRUE) AC_SUBST(KDE_USE_FINAL_FALSE)])AC_DEFUN([KDE_CHECK_CLOSURE],[ AC_ARG_ENABLE(closure, AC_HELP_STRING([--enable-closure],[delay template instantiation]), kde_use_closure=$enableval, kde_use_closure=no) KDE_NO_UNDEFINED="" if test "x$kde_use_closure" = "xyes"; then KDE_USE_CLOSURE_TRUE="" KDE_USE_CLOSURE_FALSE="#"# CXXFLAGS="$CXXFLAGS $REPO" else KDE_USE_CLOSURE_TRUE="#" KDE_USE_CLOSURE_FALSE="" KDE_NO_UNDEFINED="" case $host in *-*-linux-gnu) KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined], [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined], [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"], [KDE_NO_UNDEFINED=""])], [KDE_NO_UNDEFINED=""]) ;; esac fi AC_SUBST(KDE_USE_CLOSURE_TRUE) AC_SUBST(KDE_USE_CLOSURE_FALSE) AC_SUBST(KDE_NO_UNDEFINED)])dnl Check if the linker supports --enable-new-dtags and --as-neededAC_DEFUN([KDE_CHECK_NEW_LDFLAGS],[ AC_ARG_ENABLE(new_ldflags, AC_HELP_STRING([--enable-new-ldflags], [enable the new linker flags]), kde_use_new_ldflags=$enableval, kde_use_new_ldflags=no) LDFLAGS_AS_NEEDED="" LDFLAGS_NEW_DTAGS="" if test "x$kde_use_new_ldflags" = "xyes"; then LDFLAGS_NEW_DTAGS="" KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags], [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],) KDE_CHECK_COMPILER_FLAG([Wl,--as-needed], [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],) fi AC_SUBST(LDFLAGS_AS_NEEDED) AC_SUBST(LDFLAGS_NEW_DTAGS)])AC_DEFUN([KDE_CHECK_NMCHECK],[ AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]), kde_use_nmcheck=$enableval, kde_use_nmcheck=no) if test "$kde_use_nmcheck" = "yes"; then KDE_USE_NMCHECK_TRUE="" KDE_USE_NMCHECK_FALSE="#" else KDE_USE_NMCHECK_TRUE="#" KDE_USE_NMCHECK_FALSE="" fi AC_SUBST(KDE_USE_NMCHECK_TRUE) AC_SUBST(KDE_USE_NMCHECK_FALSE)])AC_DEFUN([KDE_EXPAND_MAKEVAR], [savex=$exec_prefixtest "x$exec_prefix" = xNONE && exec_prefix=$prefixtmp=$$2while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; doneexec_prefix=$savex])dnl ------------------------------------------------------------------------dnl Now, the same with KDEdnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)dnl and $(kde_includes) will be the kdehdrlocation (if needed)dnl ------------------------------------------------------------------------dnlAC_DEFUN([AC_BASE_PATH_KDE],[AC_REQUIRE([KDE_CHECK_STL])AC_REQUIRE([AC_PATH_QT])dnlAC_REQUIRE([KDE_CHECK_LIB64])AC_CHECK_RPATHAC_MSG_CHECKING([for KDE])if test "${prefix}" != NONE; then kde_includes=${includedir} KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir) kde_libraries=${libdir} KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)else ac_kde_includes= ac_kde_libraries= kde_libraries="" kde_includes=""fiAC_CACHE_VAL(ac_cv_have_kde,[#try to guess kde locationsif test "$kde_qtver" = 1; then kde_check_header="ksock.h" kde_check_lib="libkdecore.la"else kde_check_header="ksharedptr.h" kde_check_lib="libkio.la"fiif test -z "$1"; thenkde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"kde_incdirs="$ac_kde_includes $kde_incdirs"AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)ac_kde_includes="$kde_incdir"if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then AC_MSG_ERROR([in the prefix, you've chosen, are no KDE headers installed. This will fail.So, check this please and use another prefix!])fikde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)ac_kde_libraries="$kde_libdir"kde_widgetdir=NOdnl this might be somewhere elseAC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; thenAC_MSG_ERROR([in the prefix, you've chosen, are no KDE libraries installed. This will fail.So, check this please and use another prefix!])fiif test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; thenAC_MSG_ERROR([I can't find the designer plugins. These are required and should have been installedby kdelibs])fiif test -n "$kde_widgetdir"; then kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"fiif test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then ac_cv_have_kde="have_kde=no"else ac_cv_have_kde="have_kde=yes \ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"fielse dnl test -z $1, e.g. from kdelibs ac_cv_have_kde="have_kde=no"fi])dnleval "$ac_cv_have_kde"if test "$have_kde" != "yes"; then if test "${prefix}" = NONE; then ac_kde_prefix="$ac_default_prefix" else ac_kde_prefix="$prefix" fi if test "$exec_prefix" = NONE; then ac_kde_exec_prefix="$ac_kde_prefix" AC_MSG_RESULT([will be installed in $ac_kde_prefix]) else ac_kde_exec_prefix="$exec_prefix" AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) fi kde_libraries="${libdir}" kde_includes="${includedir}"else ac_cv_have_kde="have_kde=yes \ ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) kde_libraries="$ac_kde_libraries" kde_includes="$ac_kde_includes"fiAC_SUBST(kde_libraries)AC_SUBST(kde_includes)if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then KDE_INCLUDES=""else KDE_INCLUDES="-I$kde_includes" all_includes="$KDE_INCLUDES $all_includes"fiKDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION" KDE_LDFLAGS="-L$kde_libraries"if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then all_libraries="$KDE_LDFLAGS $all_libraries"fiAC_SUBST(KDE_LDFLAGS)AC_SUBST(KDE_INCLUDES)AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])all_libraries="$all_libraries $USER_LDFLAGS"all_includes="$all_includes $USER_INCLUDES"AC_SUBST(all_includes)AC_SUBST(all_libraries)if test -z "$1"; thenKDE_CHECK_UIC_PLUGINSfiac_kde_libraries="$kde_libdir"AC_SUBST(AUTODIRS)])AC_DEFUN([KDE_CHECK_EXTRA_LIBS],[AC_MSG_CHECKING(for extra includes)AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]), kde_use_extra_includes="$withval", kde_use_extra_includes=NONE)kde_extra_includes=if test -n "$kde_use_extra_includes" && \ test "$kde_use_extra_includes" != "NONE"; then ac_save_ifs=$IFS IFS=':' for dir in $kde_use_extra_includes; do kde_extra_includes="$kde_extra_includes $dir" USER_INCLUDES="$USER_INCLUDES -I$dir" done IFS=$ac_save_ifs kde_use_extra_includes="added"else kde_use_extra_includes="no"fiAC_SUBST(USER_INCLUDES)AC_MSG_RESULT($kde_use_extra_includes)kde_extra_libs=AC_MSG_CHECKING(for extra libs)AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]), kde_use_extra_libs=$withval, kde_use_extra_libs=NONE)if test -n "$kde_use_extra_libs" && \ test "$kde_use_extra_libs" != "NONE"; then ac_save_ifs=$IFS IFS=':' for dir in $kde_use_extra_libs; do kde_extra_libs="$kde_extra_libs $dir" KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" USER_LDFLAGS="$USER_LDFLAGS -L$dir" done IFS=$ac_save_ifs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -