diff options
author | Fritz Elfert <felfert@to.com> | 2003-02-05 07:59:09 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2003-02-05 07:59:09 +0000 |
commit | f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85 (patch) | |
tree | 166bf2df5ca4fc40904af30a56a0de88683baf8d /conf/m4/kde | |
parent | 27ba222abbf3137eef49e31ac521de01d39c8088 (diff) | |
download | plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.tar.gz plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.tar.bz2 plptools-f0c047e1f40ee2214fe1f73dc3bdc6b0f6de5d85.zip |
- Changes for compiling with gcc 3.2
Diffstat (limited to 'conf/m4/kde')
-rw-r--r-- | conf/m4/kde/AC_BASE_PATH_KDE.m4 | 4 | ||||
-rw-r--r-- | conf/m4/kde/AC_CHECK_RPATH.m4 | 6 | ||||
-rw-r--r-- | conf/m4/kde/AC_PATH_QT.m4 | 2 | ||||
-rw-r--r-- | conf/m4/kde/AC_PATH_QT_1_3.m4 | 149 | ||||
-rw-r--r-- | conf/m4/kde/AC_PATH_QT_MOC.m4 | 7 | ||||
-rw-r--r-- | conf/m4/kde/KDE_CHECK_EXTRA_LIBS.m4 | 2 |
6 files changed, 93 insertions, 77 deletions
diff --git a/conf/m4/kde/AC_BASE_PATH_KDE.m4 b/conf/m4/kde/AC_BASE_PATH_KDE.m4 index 1654235..36abd13 100644 --- a/conf/m4/kde/AC_BASE_PATH_KDE.m4 +++ b/conf/m4/kde/AC_BASE_PATH_KDE.m4 @@ -104,14 +104,14 @@ fi AC_SUBST(kde_libraries) AC_SUBST(kde_includes) -if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then +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" fi -if test "$kde_libraries" = "$x_libraries" || test "$kde_libraries" = "$qt_libraries" ; then +if test "$kde_libraries" = "$x_libraries" || test "$kde_libraries" = "$qt_libraries" || test "$kde_libraries" = "/usr/lib" ; then KDE_LDFLAGS="" else KDE_LDFLAGS="-L$kde_libraries" diff --git a/conf/m4/kde/AC_CHECK_RPATH.m4 b/conf/m4/kde/AC_CHECK_RPATH.m4 index a0e94d9..64c29fb 100644 --- a/conf/m4/kde/AC_CHECK_RPATH.m4 +++ b/conf/m4/kde/AC_CHECK_RPATH.m4 @@ -7,14 +7,14 @@ AC_ARG_ENABLE(rpath, if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then - KDE_RPATH="-rpath \$(kde_libraries)" + KDE_RPATH="-R \$(kde_libraries)" if test -n "$qt_libraries"; then - KDE_RPATH="$KDE_RPATH -rpath \$(qt_libraries)" + KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)" fi dnl $x_libraries is set to /usr/lib in case if test -n "$X_LDFLAGS"; then - KDE_RPATH="$KDE_RPATH -rpath \$(x_libraries)" + KDE_RPATH="$KDE_RPATH -R \$(x_libraries)" fi if test -n "$KDE_EXTRA_RPATH"; then KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" diff --git a/conf/m4/kde/AC_PATH_QT.m4 b/conf/m4/kde/AC_PATH_QT.m4 index ba2a0ab..bef8246 100644 --- a/conf/m4/kde/AC_PATH_QT.m4 +++ b/conf/m4/kde/AC_PATH_QT.m4 @@ -1,4 +1,4 @@ AC_DEFUN(AC_PATH_QT, [ -AC_PATH_QT_1_3 +AC_PATH_QT_ANY ]) diff --git a/conf/m4/kde/AC_PATH_QT_1_3.m4 b/conf/m4/kde/AC_PATH_QT_1_3.m4 index f252c9e..26c3536 100644 --- a/conf/m4/kde/AC_PATH_QT_1_3.m4 +++ b/conf/m4/kde/AC_PATH_QT_1_3.m4 @@ -5,17 +5,17 @@ dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) dnl ------------------------------------------------------------------------ dnl dnl -AC_DEFUN(AC_PATH_QT_1_3,[ +AC_DEFUN(AC_TRY_PATH_QT,[ AC_REQUIRE([K_PATH_X]) AC_REQUIRE([KDE_USE_QT]) - LIBQT="-lqt" + LIBQT="-l$1" if test $kde_qtver = 2; then AC_REQUIRE([AC_FIND_PNG]) LIBQT="$LIBQT $LIBPNG" fi - AC_MSG_CHECKING([for Qt]) + echo -n "($2) " LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSOCKET" ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO @@ -44,89 +44,100 @@ AC_DEFUN(AC_PATH_QT_1_3,[ ] ) - AC_CACHE_VAL(ac_cv_have_qt,[ - #try to guess Qt locations + #try to guess Qt locations - qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/lib/qt3/include /usr/lib/qt2/include /usr/X11R6/include/X11/qt $x_includes" - test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" - qt_incdirs="$ac_qt_includes $qt_incdirs" + qt_incdirs="$QTINC /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/lib/qt3/include /usr/lib/qt2/include /usr/X11R6/include/X11/qt $x_includes" + test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" + qt_incdirs="$ac_qt_includes $qt_incdirs" - if test "$kde_qtver" = "2"; then - kde_qt_header=qstyle.h - else - kde_qt_header=qglobal.h - fi + if test "$kde_qtver" = "2"; then + kde_qt_header=qstyle.h + else + kde_qt_header=qglobal.h + fi - AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) - ac_qt_includes="$qt_incdir" + AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) + ac_qt_includes="$qt_incdir" - qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/X11R6/lib /usr/lib /usr/local/qt/lib /usr/lib/qt /usr/lib/qt3/lib /usr/lib/qt2/lib $x_libraries" - test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" - if test ! "$ac_qt_libraries" = "NO"; then - qt_libdirs="$ac_qt_libraries $qt_libdirs" - fi + qt_libdirs="$QTLIB /usr/lib/qt/lib /usr/X11R6/lib /usr/lib /usr/local/qt/lib /usr/lib/qt /usr/lib/qt3/lib /usr/lib/qt2/lib $x_libraries" + test -n "$QTDIR" && qt_libdirs="$QTDIR/lib $QTDIR $qt_libdirs" + if test ! "$ac_qt_libraries" = "NO"; then + qt_libdirs="$ac_qt_libraries $qt_libdirs" + fi - qt_libdir=NONE - for dir in $qt_libdirs; do - try="ls -1 $dir/libqt.*so" - if eval $try >/dev/null 2>&1 ; then - qt_libdir=$dir; - break; - else - echo "tried $dir" >&AC_FD_CC - fi - done + qt_libdir=NONE + for dir in $qt_libdirs; do + try="ls -1 $dir/lib$1.*so" + if eval $try >/dev/null 2>&1 ; then + qt_libdir=$dir; + break; + else + echo "tried $dir" >&AC_FD_CC + fi + done - ac_qt_libraries="$qt_libdir" + ac_qt_libraries="$qt_libdir" - AC_LANG_SAVE - AC_LANG_CPLUSPLUS + AC_LANG_SAVE + AC_LANG_CPLUSPLUS - ac_cxxflags_safe="$CXXFLAGS" - ac_ldflags_safe="$LDFLAGS" - ac_libs_safe="$LIBS" + ac_cxxflags_safe="$CXXFLAGS" + ac_ldflags_safe="$LDFLAGS" + ac_libs_safe="$LIBS" - CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" - LDFLAGS="-L$qt_libdir $all_libraries" - LIBS="$LIBS $LIBQT" + CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" + LDFLAGS="-L$qt_libdir $all_libraries" + LIBS="$LIBS $LIBQT" - KDE_PRINT_QT_PROGRAM + KDE_PRINT_QT_PROGRAM - if 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" - fi + if AC_TRY_EVAL(ac_link) && test -s conftest; then rm -f conftest* - CXXFLAGS="$ac_cxxflags_safe" - LDFLAGS="$ac_ldflags_safe" - LIBS="$ac_libs_safe" - - AC_LANG_RESTORE - - if 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 + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC + ac_qt_libraries="NO" + fi + rm -f conftest* + CXXFLAGS="$ac_cxxflags_safe" + LDFLAGS="$ac_ldflags_safe" + LIBS="$ac_libs_safe" + + AC_LANG_RESTORE + + if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then + 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="(libraries)"; + ac_qt_notfound="(headers)"; fi - - AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! ]); else - have_qt="yes" + ac_qt_notfound="(libraries)"; + fi + else + have_qt="yes" + fi +]) + + +AC_DEFUN(AC_PATH_QT_ANY,[ + + AC_MSG_CHECKING([for Qt]) + AC_CACHE_VAL(ac_cv_have_qt,[ + AC_TRY_PATH_QT(qt, single-threaded) + if test "$have_qt" != yes; then + AC_TRY_PATH_QT(qt-mt, multi-threaded) + if test "$have_qt" != yes; then + AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! ]); + fi fi + ac_cv_have_qt="have_qt=$have_qt" ]) eval "$ac_cv_have_qt" - if test "$have_qt" != yes; then AC_MSG_RESULT([$have_qt]); else @@ -152,7 +163,7 @@ AC_DEFUN(AC_PATH_QT_1_3,[ all_includes="$QT_INCLUDES $all_includes" fi - if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then + if test "$qt_libraries" = "$x_libraries" || test "$qt_libraries" = "/usr/lib" || test -z "$qt_libraries"; then QT_LDFLAGS="" else QT_LDFLAGS="-L$qt_libraries" @@ -163,6 +174,6 @@ AC_DEFUN(AC_PATH_QT_1_3,[ AC_SUBST(QT_LDFLAGS) AC_PATH_QT_MOC - LIB_QT='-lqt $(LIBPNG) -lXext $(LIB_X11) $(X_PRE_LIBS)' + LIB_QT='$(LIBQT) $(LIBPNG) -lXext $(LIB_X11) $(X_PRE_LIBS)' AC_SUBST(LIB_QT) ]) diff --git a/conf/m4/kde/AC_PATH_QT_MOC.m4 b/conf/m4/kde/AC_PATH_QT_MOC.m4 index 7eee5d8..6635c2a 100644 --- a/conf/m4/kde/AC_PATH_QT_MOC.m4 +++ b/conf/m4/kde/AC_PATH_QT_MOC.m4 @@ -3,11 +3,16 @@ dnl Find the meta object compiler in the PATH, in $QTDIR/bin, and some dnl more usual places dnl ------------------------------------------------------------------------ dnl +AC_DEFUN(KDE_MOC_ERROR_MESSAGE, +[ + AC_MSG_ERROR([Could not find meta object compiler (moc)]) +]) + AC_DEFUN(AC_PATH_QT_MOC, [ KDE_FIND_PATH(moc, MOC, [$ac_qt_bindir $QTDIR/bin $QTDIR/src/moc \ /usr/bin /usr/X11R6/bin /usr/lib/qt/bin /usr/lib/qt2/bin \ - /usr/local/qt/bin], [KDE_MOC_ERROR_MESSAGE]) + /usr/lib/qt3/bin /usr/local/qt/bin], [KDE_MOC_ERROR_MESSAGE]) if test -z "$MOC"; then if test -n "$ac_cv_path_moc"; then diff --git a/conf/m4/kde/KDE_CHECK_EXTRA_LIBS.m4 b/conf/m4/kde/KDE_CHECK_EXTRA_LIBS.m4 index c7477bb..1a6deaa 100644 --- a/conf/m4/kde/KDE_CHECK_EXTRA_LIBS.m4 +++ b/conf/m4/kde/KDE_CHECK_EXTRA_LIBS.m4 @@ -40,7 +40,7 @@ if test -n "$kde_use_extra_libs" && \ for dir in $kde_use_extra_libs; do kde_extra_libs="$kde_extra_libs $dir" all_libraries="$all_libraries -L$dir" - KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -rpath $dir" + KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" USER_LDFLAGS="$USER_LDFLAGS -L$dir" done IFS=$ac_save_ifs |