X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fkde.m4;h=3cdc3723f494c15fed4ce38f19b22aea38c09bab;hb=98c966c64594611e469313314abd1e59524adb4a;hp=624fab18a9681871eb6a7b3c05a5cafc74b88797;hpb=6bba977f42b0cde753ac2ffd26f3f9c6b32ba0b6;p=lyx.git diff --git a/config/kde.m4 b/config/kde.m4 index 624fab18a9..3cdc3723f4 100644 --- a/config/kde.m4 +++ b/config/kde.m4 @@ -94,6 +94,7 @@ AC_DEFUN(KDE_FIND_PATH, $2=$kde_cv_path_$1 fi ]) + AC_DEFUN(KDE_MOC_ERROR_MESSAGE, [ AC_MSG_ERROR([No Qt meta object compiler (moc) found! @@ -243,7 +244,7 @@ if AC_TRY_EVAL(ac_link) && test -s conftest; then AC_MSG_RESULT(yes) else AC_MSG_ERROR([your system fails at linking a small KDE application! -Check, if your compiler is installed correctly and if you have used the +Check if your compiler is installed correctly and if you have used the same compiler to compile Qt and kdelibs as you did use now]) fi @@ -312,8 +313,6 @@ fi fi -bindir=$kde_bindir - ]) AC_DEFUN(AC_SUBST_KFSSTND, @@ -547,7 +546,7 @@ AC_CACHE_VAL(ac_cv_have_qt, [#try to guess Qt locations qt_incdirs="$ac_qt_includes /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC" -test -n "$QTDIR" && qt_incdirs="$QTDIR/include $QTDIR $qt_incdirs" +test -n "$QTDIR" && qt_incdirs="$QTDIR/include/qt $QTDIR/include $QTDIR $qt_incdirs" AC_FIND_FILE(qmovie.h, $qt_incdirs, qt_incdir) ac_qt_includes="$qt_incdir" @@ -629,6 +628,26 @@ if test ! "$kde_qt_libs_given" = "yes"; then KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) fi +dnl should check it's not Qt2, so it will fail now, rather than in KDE check + +SAVE_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS -I$qt_includes -L$qt_libraries" +dnl specify we are definitely C++ compiling first +AC_LANG_CPLUSPLUS +AC_TRY_COMPILE([ +#include +], +[ +#if (QT_VERSION >= 200) +break_me_(\\\); +#endif +], +ac_qt_ok=yes, +ac_qt_ok=no +) +test "$ac_qt_ok" = no && AC_MSG_ERROR([Found Qt 2 - you must specify the path to the Qt 1 headers and libraries]) +CXXFLAGS="$SAVE_CXXFLAGS" + AC_SUBST(qt_libraries) AC_SUBST(qt_includes) @@ -668,6 +687,10 @@ AC_REQUIRE([KDE_MISC_TESTS]) AC_REQUIRE([AC_PATH_QT])dnl AC_MSG_CHECKING([for KDE]) +AC_ARG_WITH(kde-dir, + [ --with-kde-dir where the KDE root is ], + [ export KDEDIR="$withval" ]) + if test "${prefix}" != NONE; then kde_includes=${prefix}/include ac_kde_includes=$prefix/include @@ -686,13 +709,29 @@ else kde_includes="" fi +if test ! -z "$KDEDIR"; then + ac_kde_includes="$KDEDIR/include" + kde_includes="$KDEDIR/include" + ac_kde_libraries="$KDEDIR/lib" + kde_libraries="$KDEDIR/lib" +fi + +AC_ARG_WITH(kde-includes, + [ --with-kde-includes where the KDE includes are installed. ], + [ ac_kde_includes="$withval" ]) + +AC_ARG_WITH(kde-libraries, + [ --with-kde-libraries where the KDE libraries are installed.], + [ ac_kde_libraries="$withval" ]) + AC_CACHE_VAL(ac_cv_have_kde, [#try to guess kde locations if test -z "$1"; then -kde_incdirs="$ac_kde_includes /usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes" -test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR $kde_incdirs" +kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes" +test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include/kde $KDEDIR/include $KDEDIR $kde_incdirs" +kde_incdirs="$ac_kde_includes $kde_incdirs" AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir) ac_kde_includes="$kde_incdir" @@ -702,8 +741,9 @@ in the prefix, you've chosen, are no kde headers installed. This will fail. So, check this please and use another prefix!]) fi -kde_libdirs="$ac_kde_libraries /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib" +kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib" test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs" +kde_libdirs="$ac_kde_libraries $kde_libdirs" AC_FIND_FILE(libkdecore.la, $kde_libdirs, kde_libdir) ac_kde_libraries="$kde_libdir" @@ -712,7 +752,6 @@ AC_MSG_ERROR([ in the prefix, you've chosen $ac_kde_libraries, are no kde libraries installed. This will fail. So, check this please and use another prefix!]) fi -ac_kde_libraries="$kde_libdir" if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then ac_cv_have_kde="have_kde=no" @@ -775,62 +814,11 @@ fi AC_SUBST(KDE_LDFLAGS) AC_SUBST(KDE_INCLUDES) -KDE_CHECK_EXTRA_LIBS - AC_SUBST(all_includes) AC_SUBST(all_libraries) ]) -AC_DEFUN(KDE_CHECK_EXTRA_LIBS, -[ -AC_MSG_CHECKING(for extra includes) -AC_ARG_WITH(extra-includes, [ --with-extra-includes adds non standard include paths], - kde_use_extra_includes="$withval", - kde_use_extra_includes=NONE -) -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 - all_includes="$all_includes -I$dir" - USER_INCLUDES="$USER_INCLUDES -I$dir" - done - IFS=$ac_save_ifs - kde_use_extra_includes="added" -else - kde_use_extra_includes="no" -fi - -AC_MSG_RESULT($kde_use_extra_includes) - -AC_MSG_CHECKING(for extra libs) -AC_ARG_WITH(extra-libs, [ --with-extra-libs 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 - all_libraries="$all_libraries -L$dir" - KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -rpath $dir" - USER_LDFLAGS="$USER_LDFLAGS -L$dir" - done - IFS=$ac_save_ifs - kde_use_extra_libs="added" -else - kde_use_extra_libs="no" -fi - -AC_MSG_RESULT($kde_use_extra_libs) - -]) - AC_DEFUN(KDE_CHECK_KIMGIO, [ AC_REQUIRE([AC_FIND_TIFF]) @@ -849,7 +837,7 @@ AC_DEFUN(KDE_CREATE_LIBS_ALIASES, [ AC_REQUIRE([KDE_MISC_TESTS]) - KDE_LIBS='-lqt -lkdecore -lkdeui -lkfm -lkfile' + KDE_LIBS='-lkfile -lkfm -lkdeui -lkdecore -lqt' AC_SUBST(KDE_LIBS) # LIB_X11='-lX11 $(LIBSOCKET)' # AC_SUBST(LIB_X11) @@ -868,29 +856,8 @@ AC_DEFUN(KDE_CREATE_LIBS_ALIASES, AC_DEFUN(AC_PATH_KDE, [ AC_BASE_PATH_KDE - AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install], - [ - if test "$enableval" = "no"; - then ac_use_path_checking="default" - else ac_use_path_checking="" - fi - ], [ac_use_path_checking=""] - ) - - AC_ARG_WITH(install-root, [ --with-install-root the root, where to install to [default=/]], - [ - if test "$withval" = "no"; - then kde_install_root=""; - else kde_install_root=$withval; - fi - ], [kde_install_root=""] - ) - - if test -n "$kde_install_root"; then - install_root="$kde_install_root" - else - install_root= - fi + ac_use_path_checking="" + install_root= AC_CREATE_KFSSTND($ac_use_path_checking) @@ -1222,184 +1189,6 @@ if test "$ac_cv_gnu_extensions" = "yes"; then fi ]) -AC_DEFUN(AC_CHECK_COMPILERS, -[ - dnl this is somehow a fat lie, but prevents other macros from double checking - AC_PROVIDE([AC_PROG_CC]) - AC_PROVIDE([AC_PROG_CPP]) - AC_ARG_ENABLE(debug,[ --enable-debug creates debugging code [default=no]], - [ - if test $enableval = "no"; dnl - then ac_use_debug_code="no" - else ac_use_debug_code="yes" - fi - ], [ac_use_debug_code="no"]) - - AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)], - [ - if test $enableval = "no"; then - ac_use_strict_options="no" - else - ac_use_strict_options="yes" - fi - ], [ac_use_strict_options="no"]) - -dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it - AC_MSG_CHECKING(for a C-Compiler) - dnl if there is one, print out. if not, don't matter - AC_MSG_RESULT($CC) - - if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi - if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi - if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi - test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) - - AC_PROG_CC_WORKS - AC_PROG_CC_GNU - - if test $ac_cv_prog_gcc = yes; then - GCC=yes - else - GCC= - fi - - if test -z "$CFLAGS"; then - if test "$ac_use_debug_code" = "yes"; then - AC_PROG_CC_G - if test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g" - fi - else - if test "$GCC" = "yes"; then - CFLAGS="-O2" - else - CFLAGS="" - fi - fi - - if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -Wall" - - if test "$ac_use_strict_options" = "yes"; then - CFLAGS="$CFLAGS -W -ansi -pedantic" - fi - fi - - fi - - case "$host" in - *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";; - esac - - if test -z "$LDFLAGS" && test "$ac_use_debug_code" = "no" && test "$GCC" = "yes"; then - LDFLAGS="-s" - fi - - -dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks -dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?) - - AC_MSG_CHECKING(how to run the C preprocessor) - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then - AC_CACHE_VAL(ac_cv_prog_CPP, - [ # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - dnl Use a header file that comes with gcc, so configuring glibc - dnl with a fresh cross-compiler works. - AC_TRY_CPP([#include - Syntax Error], , - CPP="${CC-cc} -E -traditional-cpp" - AC_TRY_CPP([#include - Syntax Error], , CPP=/lib/cpp)) - ac_cv_prog_CPP="$CPP"])dnl - CPP="$ac_cv_prog_CPP" - else - ac_cv_prog_CPP="$CPP" - fi - AC_MSG_RESULT($CPP) - AC_SUBST(CPP)dnl - - - AC_MSG_CHECKING(for a C++-Compiler) - dnl if there is one, print out. if not, don't matter - AC_MSG_RESULT($CXX) - - if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi - if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi - if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi - if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi - test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH]) - - AC_PROG_CXX_WORKS - AC_PROG_CXX_GNU - - if test $ac_cv_prog_gxx = yes; then - GXX=yes - else - AC_MSG_CHECKING(whether we are using SPARC CC) - GXX= - cat > conftest.C << EOF -#ifdef __SUNPRO_CC - yes; -#endif -EOF - - ac_try="$CXX -E conftest.C" - if { (eval echo configure:__online__: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_CC=yes - else - ac_cv_prog_CC=no - fi - AC_MSG_RESULT($ac_cv_prog_CC) - fi - - if test -z "$CXXFLAGS"; then - if test "$ac_use_debug_code" = "yes"; then - AC_PROG_CXX_G - if test $ac_cv_prog_cxx_g = yes; then - CXXFLAGS="-g" - fi - if test "$ac_cv_prog_CC" = "yes"; then - CXXFLAGS="$CXXFLAGS -pto" - fi - else - if test "$GXX" = "yes"; then - CXXFLAGS="-O2" - else - if test "$ac_cv_prog_CC" = "yes"; then - CXXFLAGS="-pto -O2" - else - CXXFLAGS="" - fi - fi - fi - - if test "$GXX" = "yes"; then - CXXFLAGS="$CXXFLAGS -Wall" - - if test "$ac_use_strict_options" = "yes"; then - CXXFLAGS="$CXXFLAGS -W -ansi -Wtraditional -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Woverloaded-virtual -Wbad-function-cast -Wsynth" - fi - - if test "$kde_very_strict" = "yes"; then - CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wshadow -Wredundant-decls -Wconversion" - fi - fi - fi - - case "$host" in - *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";; - esac - -]) - dnl just a wrapper to clean up configure.in AC_DEFUN(KDE_PROG_LIBTOOL, [ @@ -1418,10 +1207,9 @@ CFLAGS="$ac_save_cflags" AC_DEFUN(KDE_DO_IT_ALL, [ -AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) KDE_PROG_LIBTOOL -AM_KDE_WITH_NLS AC_PATH_KDE +AC_PATH_PROG(QTARCH, "qtarch",qtarch-notinstalled) ]) AC_DEFUN(AC_CHECK_RPATH, @@ -1450,52 +1238,6 @@ AC_SUBST(KDE_RPATH) AC_MSG_RESULT($USE_RPATH) ]) -dnl This is a merge of some macros out of the gettext aclocal.m4 -dnl since we don't need anything, I took the things we need -AC_DEFUN(AM_KDE_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - AC_LANG_CPLUSPLUS - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS) - - AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, - [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - - if test -z "`$MSGFMT --version 2>&1 | grep 'GNU gettext'`"; then - AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) - msgfmt=":" - fi - AC_SUBST(MSGFMT) - - AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - AC_SUBST(XGETTEXT) - fi - - ]) - # Search path for a program which passes the given test. # Ulrich Drepper , 1996. @@ -1586,7 +1328,6 @@ AC_DEFUN(AM_KDE_GNU_GETTEXT, AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([AM_KDE_WITH_NLS])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h alloca.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ @@ -1722,149 +1463,6 @@ AC_DEFUN(AC_HAVE_GL, dnl PAM pam dnl Should test for PAM (Pluggable Authentication Modules) - AC_DEFUN(AC_PATH_PAM_DIRECT, - [ - test -z "$pam_direct_test_library" && pam_direct_test_library=pam - test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h - - for ac_dir in \ - \ - /usr/local/include \ - /usr/include \ - /usr/unsupported/include \ - /opt/include \ - /usr/pam/include \ - /usr/local/pam/include \ - /usr/lib/pam/include \ - \ - $extra_include \ - ; \ - do - if test -r "$ac_dir/$pam_direct_test_include"; then - no_pam= ac_pam_includes=$ac_dir - break - fi - done - - # First see if replacing the include by lib works. - for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \ - \ - /lib \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /lib/security \ - /usr/security/lib \ - $extra_lib \ - ; \ - do - for ac_extension in a so sl; do - if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then - no_pam= ac_pam_libraries=$ac_dir - break 2 - fi - done - done -]) - -AC_DEFUN(AC_PATH_PAM, - [AC_REQUIRE_CPP()dnl - - AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"], [], [-lpam -ldl]) - - AC_MSG_CHECKING(for PAM) - AC_ARG_WITH(pam, -[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]], - [ - if test "x$withval" = "xyes"; then - no_pam= - default_pam=yes - elif test "x$withval" = "xno"; then - no_pam=yes - else - no_pam= - pam_service="$withval" - if test -z "$pam_service"; then - default_pam=yes - else - default_pam= - fi - fi - ], no_pam=yes - ) - - if test ! "$no_pam" = yes; then - - AC_CACHE_VAL(ac_cv_path_pam, - [ - ac_pam_includes=NONE - ac_pam_libraries=NONE - if test -z "$pam_libraries"; then - pam_libraries=NONE - fi - if test -z "$pam_includes"; then - pam_includes=NONE - fi - - AC_PATH_PAM_DIRECT - - test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes - test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries - - if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then - ac_pam_libs="-lpam $PAM_MISC_LIB -ldl" - ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\"" - else - ac_cv_path_pam="no_pam=yes" - fi - ]) - - eval "$ac_cv_path_pam" - - fi - - if test "$no_pam" = yes; then - AC_MSG_RESULT(no) - else - AC_DEFINE(HAVE_PAM) - PAMLIBS="$ac_pam_libs" - test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes - test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries - AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes]) - if test "$default_pam" = yes; then - AC_MSG_RESULT(["default pam service name will be used"]) - else - AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service") - AC_MSG_RESULT(["pam service name will be: " $pam_service]) - fi -dnl test whether struct pam_message is const (Linux) or not (Sun) - pam_appl_h="$ac_pam_includes/security/pam_appl.h" - AC_MSG_CHECKING(for const pam_message) - AC_EGREP_HEADER([struct pam_message], - $pam_appl_h, - [ AC_EGREP_HEADER([const struct pam_message], - $pam_appl_h, - [AC_MSG_RESULT(["const: Linux-type PAM"]) ], - [AC_MSG_RESULT(["nonconst: Sun-type PAM"]) - AC_DEFINE(PAM_MESSAGE_NONCONST)] - )], - [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])] - ) - fi - - if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then - PAMLIBPATHS="-L$pam_libraries" - fi - if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then - PAMINC="-I$pam_includes" - fi - - AC_SUBST(PAMINC) - AC_SUBST(PAMLIBS) - AC_SUBST(PAMLIBPATHS) - -]) - AC_DEFUN(KDE_CHECK_LIBDL, [ AC_CHECK_LIB(dl, dlopen, [ @@ -1976,117 +1574,6 @@ if test "$kde_cv_libgpp_includes" != "no"; then all_includes="-I$kde_cv_libgpp_includes $all_includes" fi ]) -]) - - -AC_DEFUN(KDE_CHECK_MICO, -[ -AC_REQUIRE([KDE_CHECK_LIBDL]) -AC_MSG_CHECKING(for MICO) -AC_ARG_WITH(micodir, - [ --with-micodir=micodir where mico is installed ], - kde_micodir=$withval, - kde_micodir=/usr/local -) -AC_MSG_RESULT($kde_micodir) -if test ! -r $kde_micodir/include/CORBA.h; then - AC_MSG_ERROR([No CORBA.h found, specify another micodir]) -fi - -MICO_INCLUDES=-I$kde_micodir/include -AC_SUBST(MICO_INCLUDES) -MICO_LDFLAGS=-L$kde_micodir/lib -AC_SUBST(MICO_LDFLAGS) - -AC_MSG_CHECKING([for MICO version]) -AC_CACHE_VAL(kde_cv_mico_version, -[ -AC_LANG_C -cat >conftest.$ac_ext < -#include -int main() { - - printf("MICO_VERSION=%s\n",MICO_VERSION); - return (0); -} -EOF -ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest' -if AC_TRY_EVAL(ac_compile); then - if eval `./conftest 2>&5`; then - kde_cv_mico_version=$MICO_VERSION - else - AC_MSG_ERROR([your system is not able to execute a small application to - find MICO version! Check $kde_micodir/include/mico/version.h]) - fi -else - AC_MSG_ERROR([your system is not able to compile a small application to - find MICO version! Check $kde_micodir/include/mico/version.h]) -fi -]) - -dnl installed MICO version -mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` -mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` -mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` - -dnl required MICO version -req_v_maj=`echo $1 | sed -e 's/^\(.*\)\..*\..*$/\1/'` -req_v_mid=`echo $1 | sed -e 's/^.*\.\(.*\)\..*$/\1/'` -req_v_min=`echo $1 | sed -e 's/^.*\..*\.\(.*\)$/\1/'` - -if test "$mico_v_maj" -lt "$req_v_maj" || \ - ( test "$mico_v_maj" -eq "$req_v_maj" && \ - test "$mico_v_mid" -lt "$req_v_mid" ) || \ - ( test "$mico_v_mid" -eq "$req_v_mid" && \ - test "$mico_v_min" -lt "$req_v_min" ) - -then - AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $1 \ -at least is required. You should upgrade MICO.]) -else - AC_MSG_RESULT([$kde_cv_mico_version (minimum version $1, ok)]) -fi - -LIBMICO="-lmico$kde_cv_mico_version $LIBDL" -AC_SUBST(LIBMICO) -IDL=$kde_micodir/bin/idl -AC_SUBST(IDL) -]) - - -AC_DEFUN(KDE_CHECK_MINI_STL, -[ -AC_REQUIRE([KDE_CHECK_MICO]) - -AC_MSG_CHECKING(if we use mico's mini-STL) -AC_CACHE_VAL(kde_cv_have_mini_stl, -[ -AC_LANG_CPLUSPLUS -kde_save_cxxflags="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS $MICO_INCLUDES" -AC_TRY_COMPILE( -[ -#include -], -[ -#ifdef HAVE_MINI_STL -#error "nothing" -#endif -], -kde_cv_have_mini_stl=no, -kde_cv_have_mini_stl=yes) -CXXFLAGS="$kde_save_cxxflags" -]) - - -AC_MSG_RESULT($kde_cv_have_mini_stl) -if test "$kde_cv_have_mini_stl" = "yes"; then - AC_DEFINE_UNQUOTED(HAVE_MINI_STL) -fi -]) - -]) AC_DEFUN(KDE_CHECK_LIBPTHREAD, @@ -2095,112 +1582,6 @@ AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"], LIBPTHREAD= ) AC_SUBST(LIBPTHREAD) ]) -AC_DEFUN(KDE_TRY_LINK_PYTHON, -[ -AC_CACHE_VAL(kde_cv_try_link_python_$1, -[ -kde_save_cxxflags="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS $PYTHONINC" -kde_save_libs="$LIBS" -LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" -kde_save_ldflags="$LDFLAGS" -LDFLAGS="$LDFLAGS $PYTHONLIB" - -AC_TRY_LINK( -[ -#include -],[ - PySys_SetArgv(1, 0); -], - [kde_cv_try_link_python_$1=yes], - [kde_cv_try_link_python_$1=no] -) -CXXFLAGS="$kde_save_cxxflags" -LIBS="$kde_save_libs" -LDFLAGS="$kde_save_ldflags" -]) - -if test "$kde_cv_try_link_python_$1" = "yes"; then - $3 -else - $4 -fi - -]) - -AC_DEFUN(KDE_CHECK_PYTHON, -[ -AC_REQUIRE([KDE_CHECK_LIBDL]) -AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) -if test -z "$1"; then - version="1.5" -else - version="$1" -fi - -AC_MSG_CHECKING([for Python$version]) - -AC_ARG_WITH(pythondir, -[ --with-pythondir=pythondir use python installed in pythondir ], -[ - ac_python_dir=$withval -], ac_python_dir=/usr/local -) - -python_incdirs="$ac_python_dir/include/python$version /usr/include/python$version /usr/local/include/python$version /usr/local/include" -AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) -if test ! -r $python_incdir/Python.h; then - AC_MSG_ERROR(Python.h not found.) -fi - -PYTHONINC=-I$python_incdir - -python_libdirs="$ac_python_dir/lib/python$version/config /usr/lib/python$version/config /usr/local/python$version/config" -AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) -if test ! -r $python_libdir/libpython$version.a; then - AC_MSG_ERROR(libpython$version.a not found.) -fi - -PYTHONLIB=-L$python_libdir -LIBPYTHON=-lpython$version - -AC_MSG_RESULT(header $python_incdir library $python_libdir) - -dnl Note: this test is very weak -AC_MSG_CHECKING(if an Python application links) -KDE_TRY_LINK_PYTHON(normal, "", AC_MSG_RESULT(yes), - [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if Python depends on -lpthread) - KDE_TRY_LINK_PYTHON(pthread, "$LIBPTHREAD", - [ - AC_MSG_RESULT(yes) - LIBPYTHON="$LIBPYTHON $LIBPTHREAD $LIBDL" - ], - [ - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if Python depeds on -ltcl) - KDE_TRY_LINK_PYTHON(tcl, "-ltcl", - [ - AC_MSG_RESULT(yes) - LIBPYTHON="$LIBPYTHON -ltcl" - ], - [ - AC_MSG_RESULT(no) - AC_MSG_WARN([it seems, Python depends on another library. - Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this - and contact the authors to let them know about this problem]) - ]) - ]) - ]) - -AC_SUBST(PYTHONINC) -AC_SUBST(PYTHONLIB) -AC_SUBST(LIBPYTHON) - -]) - - AC_DEFUN(KDE_CHECK_STL_SGI, [ AC_MSG_CHECKING([if STL implementation is SGI like]) @@ -2282,170 +1663,3 @@ else AC_MSG_RESULT(not found) fi ]) - -AC_DEFUN(KDE_CHECK_ANSI, -[ -AC_MSG_CHECKING([for strdup]) - - AC_CACHE_VAL(kde_cv_stl_type_sgi, - [ -AC_LANG_CPLUSPLUS -save_CXXFLAGS="$CXXFLAGS" -if test "$GCC" = "yes"; then - CXXFLAGS="$CXXFLAGS -pedantic-errors" -fi - -AC_TRY_COMPILE([ -#include -],[ - char buffer[] = "Hallo"; - strdup(buffer) -], kde_cv_has_strdup=yes, - kde_cv_has_strdup=no) -CXXFLAGS="$save_CXXFLAGS" -]) -AC_MSG_RESULT($kde_cv_has_strdup) - -if test "$kde_cv_has_strdup" = "yes"; then - AC_DEFINE_UNQUOTED(HAVE_STRDUP) -fi - -]) - -AC_DEFUN(KDE_CHECK_INSURE, -[ - AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]], - [ - if test $enableval = "no"; dnl - then ac_use_insure="no" - else ac_use_insure="yes" - fi - ], [ac_use_insure="no"]) - - AC_MSG_CHECKING(if we will use Insure++ to debug) - AC_MSG_RESULT($ac_use_insure) - if test "$ac_use_insure" = "yes"; dnl - then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "???? - fi -]) - -dnl this is for kdm: - -AC_DEFUN(AC_CHECK_KDM, -[ -AC_CHECK_FUNCS(getsecretkey) -dnl checks for X server - -AC_PATH_PROG(X_SERVER, X) -if test ! -z "$X_SERVER"; then -X_SERVER=`echo $X_SERVER | sed -e 's+/X$++'` -AC_DEFINE_UNQUOTED(XBINDIR,$X_SERVER) -XBINDIR=$X_SERVER -AC_SUBST(XBINDIR) -fi - -dnl This one tries to find XDMDIR for config files -AC_ARG_WITH(xdmdir, - [ --with-xdmdir If the xdm config dir can't be found automaticly], - [ ac_xdmdir=$withval], - [ ac_xdmdir="no"]) - -AC_MSG_CHECKING([for xdm configuration dir]) -if test "$ac_xdmdir" = "no"; then - rm -fr conftestdir - if mkdir conftestdir; then - cd conftestdir - cat > Imakefile <<'EOF' -acfindxdm: - @echo 'ac_xdmdir="$(XDMDIR)";' -EOF - if (xmkmf) > /dev/null 2> /dev/null && test -f Makefile; then - eval `${MAKE-make} acfindxdm 2>/dev/null 2>/dev/null | grep -v make` - fi - cd .. - rm -fr conftestdir - dnl Check if Imake was right - if test -f $ac_xdmdir/xdm-config; then - AC_MSG_RESULT($ac_xdmdir) - else - dnl Here we must do something else - dnl Maybe look for xdm-config in standard places, and - dnl if that fails use a fresh copy in $KDEDIR/config/kdm/ - AC_FIND_FILE(xdm-config,/etc/X11/xdm /var/X11/xdm /usr/openwin/xdm /usr/X11R6/lib/X11/xdm,ac_xdmdir) - if test -f $ac_xdmdir/xdm-config; then - AC_MSG_RESULT($ac_xdmdir) - else - if test "${prefix}" = NONE; then - ac_xdmdir=$ac_default_prefix/config/kdm - else - ac_xdmdir=$prefix/config/kdm - fi - AC_MSG_RESULT([xdm config dir not found, installing defaults in $ac_xdmdir]) - xdmconfigsubdir=xdmconfig - AC_SUBST(xdmconfigsubdir) - fi - fi - fi -else - if test -f $ac_xdmdir/xdm-config; then - AC_MSG_RESULT($ac_xdmdir) - else - - AC_MSG_RESULT([xdm config dir not found, installing defaults in $ac_xdmdir]) - xdmconfigsubdir=xdmconfig - AC_SUBST(xdmconfigsubdir) - fi -fi -AC_DEFINE_UNQUOTED(XDMDIR,"$ac_xdmdir") -AC_SUBST(ac_xdmdir) - -AC_PATH_PAM -if test "x$no_pam" = "xyes"; then - pam_support="no" -else - pam_support="yes" - shadow_support="no" # if pam is installed, use it. We can't savely - # test, if it works *sigh* -fi - -AC_ARG_WITH(shadow, - [ --with-shadow If you want shadow password support ], - [ if test "$withval" = "yes"; then - shadow_support="yes" - else - shadow_support="no" - fi - if test "$pam_support" = "yes" && test "$shadow_support=yes"; then - AC_MSG_WARN("You can not define both pam AND shadow") - fi - ], - [ if test -z "$shadow_support"; then shadow_support="no"; fi ] ) - -if test "$pam_support" = "yes"; then - AC_CHECK_LIB(pam, main, [PASSWDLIB="-lpam -ldl" - AC_DEFINE_UNQUOTED(HAVE_PAM_LIB)], - [],-ldl) -fi - -if test -z "$PASSWDLIB" && test "$shadow_support" = "yes"; then - AC_CHECK_LIB(shadow, main, - [ PASSWDLIB="-lshadow" - AC_DEFINE_UNQUOTED(HAVE_SHADOW_LIB) - ]) -fi -AC_SUBST(PASSWDLIB) -AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for FreeBSD -AC_SUBST(LIBUTIL) -AC_CHECK_LIB(s, main, [LIB_LIBS="-ls"]) dnl for AIX -AC_SUBST(LIB_LIBS) -AC_CHECK_LIB(Xdmcp, main, [LIBXDMCP="-lXdmcp"], , $X_LDFLAGS -lX11) dnl for Unixware -AC_SUBST(LIBXDMCP) - -if test -n "$LIBXDMCP"; then - ac_cpp_safe=$ac_cpp - ac_cpp='$CXXCPP $CPPFLAGS $X_INCLUDES' - AC_CHECK_HEADERS(X11/Xdmcp.h) - ac_cpp=$ac_cpp_safe -fi - -])