1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
14 dnl This file is part of the KDE libraries/packages
15 dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
16 dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
18 dnl This file is free software; you can redistribute it and/or
19 dnl modify it under the terms of the GNU Library General Public
20 dnl License as published by the Free Software Foundation; either
21 dnl version 2 of the License, or (at your option) any later version.
23 dnl This library is distributed in the hope that it will be useful,
24 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
25 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 dnl Library General Public License for more details.
28 dnl You should have received a copy of the GNU Library General Public License
29 dnl along with this library; see the file COPYING.LIB. If not, write to
30 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
31 dnl Boston, MA 02111-1307, USA.
34 dnl Please do not modify this file unless you expect your modifications to be
35 dnl carried into every other module in the repository.
37 dnl Single-module modifications are best placed in configure.in for kdelibs
38 dnl and kdebase or configure.in.in if present.
40 dnl ------------------------------------------------------------------------
41 dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
42 dnl thanks to Raja R Harinath.
43 dnl ------------------------------------------------------------------------
45 ifdef([_AC_PATH_X_XMKMF],[],
46 [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
47 ifdef([AC_OUTPUT_SUBDIRS],[],
48 [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
51 dnl Internal subroutine of AC_PATH_X.
52 dnl Set ac_x_includes and/or ac_x_libraries.
53 AC_DEFUN(KDE_PATH_X_DIRECT,
55 AC_REQUIRE([KDE_CHECK_LIB64])
57 if test "$ac_x_includes" = NO; then
58 # Guess where to find include files, by looking for this one X11 .h file.
59 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
61 # First, try using that file with no special directory specified.
62 AC_TRY_CPP([#include <$x_direct_test_include>],
63 [# We can compile using X headers with no special include directory.
65 [# Look for the header file in a standard set of common directories.
66 # Check X11 before X11Rn because it is often a symlink to the current release.
78 /usr/local/X11/include \
79 /usr/local/X11R6/include \
80 /usr/local/X11R5/include \
81 /usr/local/X11R4/include \
83 /usr/local/include/X11 \
84 /usr/local/include/X11R6 \
85 /usr/local/include/X11R5 \
86 /usr/local/include/X11R4 \
90 /usr/XFree86/include/X11 \
94 /usr/unsupported/include \
96 /usr/local/x11r5/include \
97 /usr/lpp/Xamples/include \
99 /usr/openwin/include \
100 /usr/openwin/share/include \
103 if test -r "$ac_dir/$x_direct_test_include"; then
104 ac_x_includes=$ac_dir
108 fi # $ac_x_includes = NO
110 if test "$ac_x_libraries" = NO; then
111 # Check for the libraries.
113 test -z "$x_direct_test_library" && x_direct_test_library=Xt
114 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
116 # See if we find them without any special options.
117 # Don't add to $LIBS permanently.
119 LIBS="-l$x_direct_test_library $LIBS"
120 AC_TRY_LINK(, [${x_direct_test_function}()],
121 [LIBS="$ac_save_LIBS"
122 # We can link X programs with no special library path.
124 [LIBS="$ac_save_LIBS"
125 # First see if replacing the include by lib works.
126 # Check X11 before X11Rn because it is often a symlink to the current release.
127 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
128 /usr/X11/lib${kdelibsuff} \
129 /usr/X11R6/lib${kdelibsuff} \
130 /usr/X11R5/lib${kdelibsuff} \
131 /usr/X11R4/lib${kdelibsuff} \
133 /usr/lib${kdelibsuff}/X11 \
134 /usr/lib${kdelibsuff}/X11R6 \
135 /usr/lib${kdelibsuff}/X11R5 \
136 /usr/lib${kdelibsuff}/X11R4 \
138 /usr/local/X11/lib${kdelibsuff} \
139 /usr/local/X11R6/lib${kdelibsuff} \
140 /usr/local/X11R5/lib${kdelibsuff} \
141 /usr/local/X11R4/lib${kdelibsuff} \
143 /usr/local/lib${kdelibsuff}/X11 \
144 /usr/local/lib${kdelibsuff}/X11R6 \
145 /usr/local/lib${kdelibsuff}/X11R5 \
146 /usr/local/lib${kdelibsuff}/X11R4 \
148 /usr/X386/lib${kdelibsuff} \
149 /usr/x386/lib${kdelibsuff} \
150 /usr/XFree86/lib${kdelibsuff}/X11 \
152 /usr/lib${kdelibsuff} \
153 /usr/local/lib${kdelibsuff} \
154 /usr/unsupported/lib${kdelibsuff} \
155 /usr/athena/lib${kdelibsuff} \
156 /usr/local/x11r5/lib${kdelibsuff} \
157 /usr/lpp/Xamples/lib${kdelibsuff} \
158 /lib/usr/lib${kdelibsuff}/X11 \
160 /usr/openwin/lib${kdelibsuff} \
161 /usr/openwin/share/lib${kdelibsuff} \
164 dnl Don't even attempt the hair of trying to link an X program!
165 for ac_extension in a so sl; do
166 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
167 ac_x_libraries=$ac_dir
172 fi # $ac_x_libraries = NO
176 dnl ------------------------------------------------------------------------
177 dnl Find a file (or one of more files in a list of dirs)
178 dnl ------------------------------------------------------------------------
180 AC_DEFUN(AC_FIND_FILE,
187 echo "configure: __oline__: $i/$j" >&AC_FD_CC
188 if test -r "$i/$j"; then
189 echo "taking that" >&AC_FD_CC
197 dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
198 dnl if-not-found, test-parameter)
199 AC_DEFUN(KDE_FIND_PATH,
201 AC_MSG_CHECKING([for $1])
202 if test -n "$$2"; then
205 kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
207 AC_CACHE_VAL(kde_cv_path_$kde_cache,
219 if test -x "$dir/$1"; then
222 evalstr="$dir/$1 $5 2>&1 "
223 if eval $evalstr; then
224 kde_cv_path="$dir/$1"
228 kde_cv_path="$dir/$1"
234 eval "kde_cv_path_$kde_cache=$kde_cv_path"
238 eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
242 if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
243 AC_MSG_RESULT(not found)
246 AC_MSG_RESULT($kde_cv_path)
252 AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
254 AC_MSG_ERROR([No Qt meta object compiler (moc) found!
255 Please check whether you installed Qt correctly.
256 You need to have a running moc binary.
257 configure tried to run $ac_cv_path_moc and the test didn't
258 succeed. If configure shouldn't have tried this one, set
259 the environment variable MOC to the right one before running
264 AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
266 AC_MSG_WARN([No Qt ui compiler (uic) found!
267 Please check whether you installed Qt correctly.
268 You need to have a running uic binary.
269 configure tried to run $ac_cv_path_uic and the test didn't
270 succeed. If configure shouldn't have tried this one, set
271 the environment variable UIC to the right one before running
277 AC_DEFUN(KDE_CHECK_UIC_FLAG,
279 AC_MSG_CHECKING([whether uic supports -$1 ])
280 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
281 AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
283 cat >conftest.ui <<EOT
284 <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
286 ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
287 if AC_TRY_EVAL(ac_uic_testrun); then
288 eval "kde_cv_prog_uic_$kde_cache=yes"
290 eval "kde_cv_prog_uic_$kde_cache=no"
295 if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
307 dnl ------------------------------------------------------------------------
308 dnl Find the meta object compiler and the ui compiler in the PATH,
309 dnl in $QTDIR/bin, and some more usual places
310 dnl ------------------------------------------------------------------------
312 AC_DEFUN(AC_PATH_QT_MOC_UIC,
315 for dir in $kde_qt_dirs; do
316 qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
318 qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
319 if test ! "$ac_qt_bindir" = "NO"; then
320 qt_bindirs="$ac_qt_bindir $qt_bindirs"
323 KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
324 if test -z "$UIC_NOT_NEEDED"; then
325 KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
326 if test -z "$UIC_PATH" ; then
327 KDE_UIC_ERROR_MESSAGE
329 elif test $kde_qtver = 3; then
330 KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
331 KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
334 if test x$ac_uic_supports_libpath = xyes; then
335 UIC="$UIC -L \$(kde_widgetdir)"
337 if test x$ac_uic_supports_nounload = xyes; then
342 UIC="echo uic not available: "
349 if test $kde_qtver = 3; then
356 AC_DEFUN(KDE_1_CHECK_PATHS,
358 KDE_1_CHECK_PATH_HEADERS
362 if test -n "$USE_RPATH"; then
364 if test -n "$kde_libraries"; then
365 KDE_TEST_RPATH="-R $kde_libraries"
368 if test -n "$qt_libraries"; then
369 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
372 if test -n "$x_libraries"; then
373 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
376 KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
379 AC_MSG_CHECKING([for KDE libraries installed])
380 ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
382 if AC_TRY_EVAL(ac_link) && test -s conftest; then
385 AC_MSG_ERROR([your system fails at linking a small KDE application!
386 Check, if your compiler is installed correctly and if you have used the
387 same compiler to compile Qt and kdelibs as you did use now.
388 For more details about this problem, look at the end of config.log.])
391 if eval `KDEDIR= ./conftest 2>&5`; then
397 KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
398 kde_have_all_paths=yes
400 KDE_SET_PATHS($kde_result)
404 AC_DEFUN(KDE_SET_PATHS,
406 kde_cv_all_paths="kde_have_all_paths=\"yes\" \
407 kde_htmldir=\"$kde_htmldir\" \
408 kde_appsdir=\"$kde_appsdir\" \
409 kde_icondir=\"$kde_icondir\" \
410 kde_sounddir=\"$kde_sounddir\" \
411 kde_datadir=\"$kde_datadir\" \
412 kde_locale=\"$kde_locale\" \
413 kde_cgidir=\"$kde_cgidir\" \
414 kde_confdir=\"$kde_confdir\" \
415 kde_mimedir=\"$kde_mimedir\" \
416 kde_toolbardir=\"$kde_toolbardir\" \
417 kde_wallpaperdir=\"$kde_wallpaperdir\" \
418 kde_templatesdir=\"$kde_templatesdir\" \
419 kde_bindir=\"$kde_bindir\" \
420 kde_servicesdir=\"$kde_servicesdir\" \
421 kde_servicetypesdir=\"$kde_servicetypesdir\" \
422 kde_moduledir=\"$kde_moduledir\" \
423 kde_styledir=\"$kde_styledir\" \
424 kde_widgetdir=\"$kde_widgetdir\" \
428 AC_DEFUN(KDE_SET_DEFAULT_PATHS,
430 if test "$1" = "default"; then
432 if test -z "$kde_htmldir"; then
433 kde_htmldir='\${prefix}/share/doc/HTML'
435 if test -z "$kde_appsdir"; then
436 kde_appsdir='\${prefix}/share/applnk'
438 if test -z "$kde_icondir"; then
439 kde_icondir='\${prefix}/share/icons'
441 if test -z "$kde_sounddir"; then
442 kde_sounddir='\${prefix}/share/sounds'
444 if test -z "$kde_datadir"; then
445 kde_datadir='\${prefix}/share/apps'
447 if test -z "$kde_locale"; then
448 kde_locale='\${prefix}/share/locale'
450 if test -z "$kde_cgidir"; then
451 kde_cgidir='\${exec_prefix}/cgi-bin'
453 if test -z "$kde_confdir"; then
454 kde_confdir='\${prefix}/share/config'
456 if test -z "$kde_mimedir"; then
457 kde_mimedir='\${prefix}/share/mimelnk'
459 if test -z "$kde_toolbardir"; then
460 kde_toolbardir='\${prefix}/share/toolbar'
462 if test -z "$kde_wallpaperdir"; then
463 kde_wallpaperdir='\${prefix}/share/wallpapers'
465 if test -z "$kde_templatesdir"; then
466 kde_templatesdir='\${prefix}/share/templates'
468 if test -z "$kde_bindir"; then
469 kde_bindir='\${exec_prefix}/bin'
471 if test -z "$kde_servicesdir"; then
472 kde_servicesdir='\${prefix}/share/services'
474 if test -z "$kde_servicetypesdir"; then
475 kde_servicetypesdir='\${prefix}/share/servicetypes'
477 if test -z "$kde_moduledir"; then
478 if test "$kde_qtver" = "2"; then
479 kde_moduledir='\${libdir}/kde2'
481 kde_moduledir='\${libdir}/kde3'
484 if test -z "$kde_styledir"; then
485 kde_styledir='\${libdir}/kde3/plugins/styles'
487 if test -z "$kde_widgetdir"; then
488 kde_widgetdir='\${libdir}/kde3/plugins/designer'
491 KDE_SET_PATHS(defaults)
495 if test $kde_qtver = 1; then
496 AC_MSG_RESULT([compiling])
499 AC_MSG_ERROR([path checking not yet supported for KDE 2])
505 AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
506 [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
507 test -z "$kde_icondir" || test -z "$kde_sounddir" ||
508 test -z "$kde_datadir" || test -z "$kde_locale" ||
509 test -z "$kde_cgidir" || test -z "$kde_confdir" ||
510 test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
511 test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
512 test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
513 test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
514 test -z "$kde_styledir" || test -z "kde_widgetdir"
515 test "x$kde_have_all_paths" != "xyes"; then
516 kde_have_all_paths=no
520 AC_DEFUN(KDE_MISSING_PROG_ERROR,
522 AC_MSG_ERROR([The important program $1 was not found!
523 Please check whether you installed KDE correctly.
527 AC_DEFUN(KDE_MISSING_ARTS_ERROR,
529 AC_MSG_ERROR([The important program $1 was not found!
530 Please check whether you installed aRts correctly.
534 AC_DEFUN(KDE_SUBST_PROGRAMS,
537 kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
538 test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
539 if test -n "$KDEDIRS"; then
542 for dir in $KDEDIRS; do
543 kde_default_bindirs="$dir/bin $kde_default_bindirs "
547 kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
548 KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
549 KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
550 KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
551 KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
552 KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
553 KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
555 if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
556 kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
557 test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
558 AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
559 if test "$KDE_XSL_STYLESHEET" = "NO"; then
560 KDE_XSL_STYLESHEET=""
562 KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
566 DCOP_DEPENDENCIES='$(DCOPIDL)'
568 AC_SUBST(DCOPIDL2CPP)
569 AC_SUBST(DCOP_DEPENDENCIES)
571 AC_SUBST(ARTSCCONFIG)
574 AC_SUBST(KDE_XSL_STYLESHEET)
576 if test -x "$KDECONFIG"; then # it can be "compiled"
577 kde_libs_prefix=`$KDECONFIG --prefix`
578 if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
579 AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
580 This means it has been moved since you installed it.
581 This won't work. Please recompile kdelibs for the new prefix.
584 kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
586 kde_libs_prefix='$(prefix)'
587 kde_libs_htmldir='$(kde_htmldir)'
589 AC_SUBST(kde_libs_prefix)
590 AC_SUBST(kde_libs_htmldir)
593 AC_DEFUN(AC_CREATE_KFSSTND,
595 AC_REQUIRE([AC_CHECK_RPATH])
597 AC_MSG_CHECKING([for KDE paths])
600 AC_CACHE_VAL(kde_cv_all_paths,
602 KDE_SET_DEFAULT_PATHS($1)
605 eval "$kde_cv_all_paths"
606 KDE_CHECK_PATHS_FOR_COMPLETENESS
607 if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
608 # wrong values were cached, may be, we can set better ones
610 kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
611 kde_datadir= kde_locale= kde_cgidir= kde_confdir=
612 kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
613 kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
617 KDE_SET_DEFAULT_PATHS($1)
618 eval "$kde_cv_all_paths"
619 KDE_CHECK_PATHS_FOR_COMPLETENESS
620 kde_result="$kde_result (cache overridden)"
622 if test "$kde_have_all_paths" = "no"; then
623 AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
624 Since it had compiled and linked before, it must be a strange problem on your system.
625 Look at config.log for details. If you are not able to fix this, look at
626 http://www.kde.org/faq/installation.html or any www.kde.org mirror.
627 (If you're using an egcs version on Linux, you may update binutils!)
631 AC_MSG_RESULT($kde_result)
640 AC_DEFUN(AC_SUBST_KFSSTND,
642 AC_SUBST(kde_htmldir)
643 AC_SUBST(kde_appsdir)
644 AC_SUBST(kde_icondir)
645 AC_SUBST(kde_sounddir)
646 AC_SUBST(kde_datadir)
648 AC_SUBST(kde_confdir)
649 AC_SUBST(kde_mimedir)
650 AC_SUBST(kde_wallpaperdir)
653 AC_SUBST(kde_templatesdir)
654 AC_SUBST(kde_servicesdir)
655 AC_SUBST(kde_servicetypesdir)
656 AC_SUBST(kde_moduledir)
657 AC_SUBST(kde_styledir)
658 AC_SUBST(kde_widgetdir)
659 if test "$kde_qtver" = 1; then
660 kde_minidir="$kde_icondir/mini"
662 # for KDE 1 - this breaks KDE2 apps using minidir, but
663 # that's the plan ;-/
664 kde_minidir="/dev/null"
666 dnl AC_SUBST(kde_minidir)
667 dnl AC_SUBST(kde_cgidir)
668 dnl AC_SUBST(kde_toolbardir)
671 AC_DEFUN(KDE_MISC_TESTS,
674 dnl Checks for libraries.
675 AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
677 AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
680 AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
681 AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
682 AC_MSG_WARN([you have no crypt in either libcrypt or libc.
683 You should install libcrypt from another source or configure with PAM
688 if test $kde_have_crypt = yes; then
689 AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
693 AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
694 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
695 AC_CHECK_LIB(dnet_stub, dnet_ntoa,
696 [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
698 AC_CHECK_FUNC(inet_ntoa)
699 if test $ac_cv_func_inet_ntoa = no; then
700 AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
702 AC_CHECK_FUNC(connect)
703 if test $ac_cv_func_connect = no; then
704 AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
708 AC_CHECK_FUNC(remove)
709 if test $ac_cv_func_remove = no; then
710 AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
713 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
714 AC_CHECK_FUNC(shmat, ,
715 AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
717 # darwin needs this to initialize the environment
718 AC_CHECK_HEADERS(crt_externs.h)
719 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
721 # more headers that need to be explicitly included on darwin
722 AC_CHECK_HEADERS(sys/types.h stdint.h)
724 # darwin requires a poll emulation library
725 AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
727 # CoreAudio framework
728 AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
729 AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
730 FRAMEWORK_COREAUDIO="-framework CoreAudio"
735 AC_SUBST(FRAMEWORK_COREAUDIO)
736 LIBSOCKET="$X_EXTRA_LIBS"
738 AC_SUBST(X_EXTRA_LIBS)
739 AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
742 case $host in dnl this *is* LynxOS specific
744 AC_MSG_CHECKING([LynxOS header file wrappers])
745 [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
746 AC_MSG_RESULT(disabled)
747 AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
754 AH_VERBATIM(_AIX_STRINGS_H_BZERO,
757 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
758 * that defines bzero.
766 AC_CHECK_FUNCS([vsnprintf snprintf])
770 * On HP-UX, the declaration of vsnprintf() is needed every time !
773 #if !defined(HAVE_VSNPRINTF) || defined(hpux)
783 int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
787 int snprintf(char *str, size_t n, char const *fmt, ...);
793 dnl ------------------------------------------------------------------------
794 dnl Find the header files and libraries for X-Windows. Extended the
796 dnl ------------------------------------------------------------------------
800 AC_REQUIRE([KDE_MISC_TESTS])dnl
801 AC_REQUIRE([KDE_CHECK_LIB64])
805 [ --enable-embedded link to Qt-embedded, don't use X],
806 kde_use_qt_emb=$enableval,
812 [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
813 kde_use_qt_emb_palm=$enableval,
814 kde_use_qt_emb_palm=no
817 if test "$kde_use_qt_emb" = "no"; then
819 AC_MSG_CHECKING(for X)
822 AC_CACHE_VAL(kde_cv_have_x,
823 [# One or both of the vars are not set, and there is no cached value.
824 if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
827 kde_x_includes=$x_includes
829 if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
832 kde_x_libraries=$x_libraries
835 # below we use the standard autoconf calls
836 ac_x_libraries=$kde_x_libraries
837 ac_x_includes=$kde_x_includes
840 dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
841 dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
842 dnl location. The correct location is /usr/lib32 or an undefined value
843 dnl (the linker is smart enough to pick the correct default library).
844 dnl Things work just fine if you use just AC_PATH_X_DIRECT.
845 dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
846 dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
847 dnl x_includes should be left alone.
855 if test -z "$ac_x_includes"; then
858 if test -z "$ac_x_libraries"; then
859 ac_x_libraries="/usr/lib${kdelibsuff}"
862 #from now on we use our own again
864 # when the user already gave --x-includes, we ignore
865 # what the standard autoconf macros told us.
866 if test "$kde_x_includes" = NO; then
867 kde_x_includes=$ac_x_includes
870 # for --x-libraries too
871 if test "$kde_x_libraries" = NO; then
872 kde_x_libraries=$ac_x_libraries
875 if test "$kde_x_includes" = NO; then
876 AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
879 if test "$kde_x_libraries" = NO; then
880 AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
883 # Record where we found X for the cache.
884 kde_cv_have_x="have_x=yes \
885 kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
888 eval "$kde_cv_have_x"
890 if test "$have_x" != yes; then
891 AC_MSG_RESULT($have_x)
894 AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
897 if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
899 x_includes="."; dnl better than nothing :-
901 x_includes=$kde_x_includes
902 X_INCLUDES="-I$x_includes"
905 if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
907 x_libraries="/usr/lib"; dnl better than nothing :-
909 x_libraries=$kde_x_libraries
910 X_LDFLAGS="-L$x_libraries"
912 all_includes="$X_INCLUDES"
913 all_libraries="$X_LDFLAGS"
917 AC_SUBST(x_libraries)
920 # Check for libraries that X11R6 Xt/Xaw programs need.
921 ac_save_LDFLAGS="$LDFLAGS"
922 LDFLAGS="$LDFLAGS $X_LDFLAGS"
923 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
924 # check for ICE first), but we must link in the order -lSM -lICE or
925 # we get undefined symbols. So assume we have SM if we have ICE.
926 # These have to be linked with before -lX11, unlike the other
927 # libraries we check for below, so use a different variable.
928 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
929 AC_CHECK_LIB(ICE, IceConnectionNumber,
930 [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
932 LDFLAGS="$ac_save_LDFLAGS"
936 LIB_X11='-lX11 $(LIBSOCKET)'
939 AC_MSG_CHECKING(for libXext)
940 AC_CACHE_VAL(kde_cv_have_libXext,
942 kde_ldflags_safe="$LDFLAGS"
943 kde_libs_safe="$LIBS"
945 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
946 LIBS="-lXext -lX11 $LIBSOCKET"
955 printf("hello Xext\n");
957 kde_cv_have_libXext=yes,
958 kde_cv_have_libXext=no
961 LDFLAGS=$kde_ldflags_safe
965 AC_MSG_RESULT($kde_cv_have_libXext)
967 if test "$kde_cv_have_libXext" = "no"; then
968 AC_MSG_ERROR([We need a working libXext to proceed. Since configure
969 can't find it itself, we stop here assuming that make wouldn't find
973 AC_MSG_CHECKING(for Xinerama)
975 AC_ARG_WITH(xinerama,
976 [ --with-xinerama enable support for Xinerama ],
984 kde_save_LDFLAGS="$LDFLAGS"
985 kde_save_CFLAGS="$CFLAGS"
986 kde_save_LIBS="$LIBS"
987 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
988 CFLAGS="$CFLAGS -I$x_includes"
989 LIBS="-lXinerama -lXext"
991 if test "x$no_xinerama" = "xno"; then
993 AC_CACHE_VAL(ac_cv_have_xinerama,
995 AC_TRY_LINK([#include <X11/Xlib.h>
996 #include <X11/extensions/Xinerama.h>],
997 [XineramaIsActive(NULL);],
998 [ac_cv_have_xinerama="yes"],
999 [ac_cv_have_xinerama="no"])
1002 ac_cv_have_xinerama=no;
1005 AC_MSG_RESULT($ac_cv_have_xinerama)
1009 if test "$ac_cv_have_xinerama" = "yes"; then
1010 AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
1011 LIBXINERAMA="-lXinerama"
1014 AC_SUBST(LIBXINERAMA)
1016 LDFLAGS="$kde_save_LDFLAGS"
1017 CFLAGS="$kde_save_CFLAGS"
1018 LIBS="$kde_save_LIBS"
1024 dnl We're using QT Embedded
1026 CXXFLAGS="$CXXFLAGS -fno-rtti"
1027 QTE_NORTTI="-fno-rtti -DQWS"
1036 AC_SUBST(X_PRE_LIBS)
1039 AC_SUBST(X_INCLUDES)
1041 AC_SUBST(x_includes)
1042 AC_SUBST(x_libraries)
1044 AC_SUBST(QTE_NORTTI)
1052 AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1054 AC_REQUIRE([KDE_USE_QT])
1055 cat > conftest.$ac_ext <<EOF
1056 #include "confdefs.h"
1057 #include <qglobal.h>
1058 #include <qapplication.h>
1060 if test "$kde_qtver" = "2"; then
1061 cat >> conftest.$ac_ext <<EOF
1063 #include <qstring.h>
1067 if test $kde_qtsubver -gt 0; then
1068 cat >> conftest.$ac_ext <<EOF
1069 #if QT_VERSION < 210
1076 if test "$kde_qtver" = "3"; then
1077 cat >> conftest.$ac_ext <<EOF
1078 #include <qcursor.h>
1079 #include <qstylefactory.h>
1080 #include <private/qucomextra_p.h>
1084 echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1085 cat >> conftest.$ac_ext <<EOF
1091 if test "$kde_qtver" = "2"; then
1092 cat >> conftest.$ac_ext <<EOF
1093 QStringList *t = new QStringList();
1096 if test $kde_qtsubver -gt 0; then
1097 cat >> conftest.$ac_ext <<EOF
1099 s.setLatin1("Elvis is alive", 14);
1103 if test "$kde_qtver" = "3"; then
1104 cat >> conftest.$ac_ext <<EOF
1105 (void)QStyleFactory::create(QString::null);
1106 QCursor c(Qt::WhatsThisCursor);
1109 cat >> conftest.$ac_ext <<EOF
1115 AC_DEFUN(KDE_USE_QT,
1117 if test -z "$1"; then
1118 # Current default Qt version: 3.1
1122 kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1123 # following is the check if subversion isnt found in passed argument
1124 if test "$kde_qtsubver" = "$1"; then
1127 kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1128 if test "$kde_qtver" = "1"; then
1133 if test -z "$2"; then
1134 if test "$kde_qtver" = "2"; then
1135 if test $kde_qtsubver -gt 0; then
1136 kde_qt_minversion=">= Qt 2.2.2"
1138 kde_qt_minversion=">= Qt 2.0.2"
1141 if test "$kde_qtver" = "3"; then
1142 if test $kde_qtsubver -gt 0; then
1143 kde_qt_minversion=">= Qt 3.1 (20021021)"
1145 kde_qt_minversion=">= Qt 3.0"
1148 if test "$kde_qtver" = "1"; then
1149 kde_qt_minversion=">= 1.42 and < 2.0"
1152 kde_qt_minversion=$2
1155 if test -z "$3"; then
1156 if test $kde_qtver = 3; then
1157 if test $kde_qtsubver -gt 0; then
1158 kde_qt_verstring="QT_VERSION >= 0x030100"
1160 kde_qt_verstring="QT_VERSION >= 300"
1163 if test $kde_qtver = 2; then
1164 if test $kde_qtsubver -gt 0; then
1165 kde_qt_verstring="QT_VERSION >= 222"
1167 kde_qt_verstring="QT_VERSION >= 200"
1170 if test $kde_qtver = 1; then
1171 kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1177 if test $kde_qtver = 3; then
1178 kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
1180 if test $kde_qtver = 2; then
1181 kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1183 if test $kde_qtver = 1; then
1184 kde_qt_dirs="$QTDIR /usr/lib/qt"
1188 AC_DEFUN(KDE_CHECK_QT_DIRECT,
1190 AC_REQUIRE([KDE_USE_QT])
1191 AC_MSG_CHECKING([if Qt compiles without flags])
1192 AC_CACHE_VAL(kde_cv_qt_direct,
1196 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1197 ac_LIBRARY_PATH="$LIBRARY_PATH"
1198 ac_cxxflags_safe="$CXXFLAGS"
1199 ac_ldflags_safe="$LDFLAGS"
1200 ac_libs_safe="$LIBS"
1202 CXXFLAGS="$CXXFLAGS -I$qt_includes"
1203 LDFLAGS="$LDFLAGS $X_LDFLAGS"
1204 if test "x$kde_use_qt_emb" != "xyes"; then
1205 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1207 LIBS="$LIBQT $LIBSOCKET"
1210 export LD_LIBRARY_PATH
1214 KDE_PRINT_QT_PROGRAM
1216 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1217 kde_cv_qt_direct="yes"
1219 kde_cv_qt_direct="no"
1220 echo "configure: failed program was:" >&AC_FD_CC
1221 cat conftest.$ac_ext >&AC_FD_CC
1225 CXXFLAGS="$ac_cxxflags_safe"
1226 LDFLAGS="$ac_ldflags_safe"
1227 LIBS="$ac_libs_safe"
1229 LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1230 export LD_LIBRARY_PATH
1231 LIBRARY_PATH="$ac_LIBRARY_PATH"
1236 if test "$kde_cv_qt_direct" = "yes"; then
1245 dnl ------------------------------------------------------------------------
1246 dnl Try to find the Qt headers and libraries.
1247 dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1248 dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1249 dnl ------------------------------------------------------------------------
1251 AC_DEFUN(AC_PATH_QT_1_3,
1253 AC_REQUIRE([K_PATH_X])
1254 AC_REQUIRE([KDE_USE_QT])
1255 AC_REQUIRE([KDE_CHECK_LIB64])
1257 dnl ------------------------------------------------------------------------
1258 dnl Add configure flag to enable linking to MT version of Qt library.
1259 dnl ------------------------------------------------------------------------
1263 [ --disable-mt link to non-threaded Qt (deprecated)],
1264 kde_use_qt_mt=$enableval,
1266 if test $kde_qtver = 3; then
1276 dnl ------------------------------------------------------------------------
1277 dnl If we not get --disable-qt-mt then adjust some vars for the host.
1278 dnl ------------------------------------------------------------------------
1282 if test "x$kde_use_qt_mt" = "xyes"; then
1284 if test "x$kde_use_threading" = "xyes"; then
1285 CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1286 KDE_MT_LDFLAGS="$USE_THREADS"
1287 KDE_MT_LIBS="$LIBPTHREAD"
1292 AC_SUBST(KDE_MT_LDFLAGS)
1293 AC_SUBST(KDE_MT_LIBS)
1295 kde_qt_was_given=yes
1297 dnl ------------------------------------------------------------------------
1298 dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1299 dnl ------------------------------------------------------------------------
1300 if test -z "$LIBQT_GLOB"; then
1301 if test "x$kde_use_qt_emb" = "xyes"; then
1302 LIBQT_GLOB="libqte.*"
1304 LIBQT_GLOB="libqt.*"
1308 if test -z "$LIBQT"; then
1309 dnl ------------------------------------------------------------
1310 dnl If we got --enable-embedded then adjust the Qt library name.
1311 dnl ------------------------------------------------------------
1312 if test "x$kde_use_qt_emb" = "xyes"; then
1318 kde_int_qt="-l$qtlib"
1324 if test -z "$LIBQPE"; then
1325 dnl ------------------------------------------------------------
1326 dnl If we got --enable-palmtop then add -lqpe to the link line
1327 dnl ------------------------------------------------------------
1328 if test "x$kde_use_qt_emb" = "xyes"; then
1329 if test "x$kde_use_qt_emb_palm" = "xyes"; then
1339 dnl ------------------------------------------------------------------------
1340 dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1341 dnl ------------------------------------------------------------------------
1343 if test "x$kde_use_qt_mt" = "xyes"; then
1344 if test -z "$LIBQT"; then
1346 kde_int_qt="-l$qtlib-mt"
1349 kde_int_qt="$qtlib-mt"
1351 LIBQT_GLOB="lib$qtlib-mt.*"
1352 USING_QT_MT="using -mt"
1357 if test $kde_qtver != 1; then
1359 AC_REQUIRE([AC_FIND_PNG])
1360 AC_REQUIRE([AC_FIND_JPEG])
1361 LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1364 if test $kde_qtver = 3; then
1365 AC_REQUIRE([KDE_CHECK_LIBDL])
1366 LIBQT="$LIBQT $LIBDL"
1369 AC_MSG_CHECKING([for Qt])
1371 if test "x$kde_use_qt_emb" != "xyes"; then
1372 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1374 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1378 [ --with-qt-dir=DIR where the root of Qt is installed ],
1379 [ ac_qt_includes="$withval"/include
1380 ac_qt_libraries="$withval"/lib${kdelibsuff}
1381 ac_qt_bindir="$withval"/bin
1384 AC_ARG_WITH(qt-includes,
1385 [ --with-qt-includes=DIR where the Qt includes are. ],
1387 ac_qt_includes="$withval"
1390 kde_qt_libs_given=no
1392 AC_ARG_WITH(qt-libraries,
1393 [ --with-qt-libraries=DIR where the Qt library is installed.],
1394 [ ac_qt_libraries="$withval"
1395 kde_qt_libs_given=yes
1398 AC_CACHE_VAL(ac_cv_have_qt,
1399 [#try to guess Qt locations
1402 for dir in $kde_qt_dirs; do
1403 qt_incdirs="$qt_incdirs $dir/include $dir"
1405 qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
1406 if test ! "$ac_qt_includes" = "NO"; then
1407 qt_incdirs="$ac_qt_includes $qt_incdirs"
1410 if test "$kde_qtver" != "1"; then
1411 kde_qt_header=qstyle.h
1413 kde_qt_header=qglobal.h
1416 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1417 ac_qt_includes="$qt_incdir"
1420 for dir in $kde_qt_dirs; do
1421 qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1423 qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1424 if test ! "$ac_qt_libraries" = "NO"; then
1425 qt_libdir=$ac_qt_libraries
1427 qt_libdirs="$ac_qt_libraries $qt_libdirs"
1428 # if the Qt was given, the chance is too big that libqt.* doesn't exist
1430 for dir in $qt_libdirs; do
1431 try="ls -1 $dir/${LIBQT_GLOB}"
1432 if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1436 ac_qt_libraries="$qt_libdir"
1441 ac_cxxflags_safe="$CXXFLAGS"
1442 ac_ldflags_safe="$LDFLAGS"
1443 ac_libs_safe="$LIBS"
1445 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1446 LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1447 LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1449 KDE_PRINT_QT_PROGRAM
1451 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1454 echo "configure: failed program was:" >&AC_FD_CC
1455 cat conftest.$ac_ext >&AC_FD_CC
1456 ac_qt_libraries="NO"
1459 CXXFLAGS="$ac_cxxflags_safe"
1460 LDFLAGS="$ac_ldflags_safe"
1461 LIBS="$ac_libs_safe"
1464 if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1465 ac_cv_have_qt="have_qt=no"
1468 if test "$ac_qt_includes" = NO; then
1469 if test "$ac_qt_libraries" = NO; then
1470 ac_qt_notfound="(headers and libraries)";
1472 ac_qt_notfound="(headers)";
1475 if test "x$kde_use_qt_mt" = "xyes"; then
1477 Make sure that you have compiled Qt with thread support!"
1478 ac_qt_notfound="(library $qtlib-mt)";
1480 ac_qt_notfound="(library $qtlib)";
1484 AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1485 For more details about this problem, look at the end of config.log.$missing_qt_mt])
1491 eval "$ac_cv_have_qt"
1493 if test "$have_qt" != yes; then
1494 AC_MSG_RESULT([$have_qt]);
1496 ac_cv_have_qt="have_qt=yes \
1497 ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1498 AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1500 qt_libraries="$ac_qt_libraries"
1501 qt_includes="$ac_qt_includes"
1504 if test ! "$kde_qt_libs_given" = "yes"; then
1505 KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1508 AC_SUBST(qt_libraries)
1509 AC_SUBST(qt_includes)
1511 if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1514 QT_INCLUDES="-I$qt_includes"
1515 all_includes="$QT_INCLUDES $all_includes"
1518 if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1521 QT_LDFLAGS="-L$qt_libraries"
1522 all_libraries="$all_libraries $QT_LDFLAGS"
1524 test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1526 AC_SUBST(QT_INCLUDES)
1527 AC_SUBST(QT_LDFLAGS)
1532 if test "x$kde_use_qt_emb" != "xyes"; then
1533 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1535 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
1537 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1545 AC_DEFUN(AC_PATH_QT,
1550 AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
1552 AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1554 if test x$ac_uic_supports_libpath = xyes; then
1556 AC_MSG_CHECKING([if UIC has KDE plugins available])
1557 AC_CACHE_VAL(kde_cv_uic_plugins,
1559 cat > actest.ui << EOF
1560 <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1561 <class>NewConnectionDialog</class>
1562 <widget class="QDialog">
1563 <widget class="KLineEdit">
1564 <property name="name">
1565 <cstring>testInput</cstring>
1574 kde_cv_uic_plugins=no
1575 kde_line="$UIC_PATH -L $kde_widgetdir"
1576 if test x$ac_uic_supports_nounload = xyes; then
1577 kde_line="$kde_line -nounload"
1579 kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1580 if AC_TRY_EVAL(kde_line); then
1581 if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1582 kde_cv_uic_plugins=yes
1585 rm -f actest.ui actest.cpp
1588 if test "$kde_cv_uic_plugins" = yes; then
1589 AC_MSG_RESULT([yes])
1591 AC_MSG_ERROR([not found - you need to install kdelibs first.])
1596 AC_DEFUN(KDE_CHECK_FINAL,
1598 AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1599 kde_use_final=$enableval, kde_use_final=no)
1602 if test "x$kde_use_final" = "xyes"; then
1603 KDE_USE_FINAL_TRUE=""
1604 KDE_USE_FINAL_FALSE="#"
1606 KDE_USE_FINAL_TRUE="#"
1607 KDE_USE_FINAL_FALSE=""
1609 AC_SUBST(KDE_USE_FINAL_TRUE)
1610 AC_SUBST(KDE_USE_FINAL_FALSE)
1612 AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1613 kde_use_closure=$enableval, kde_use_closure=yes)
1615 if test "x$kde_use_closure" = "xyes"; then
1616 KDE_USE_CLOSURE_TRUE=""
1617 KDE_USE_CLOSURE_FALSE="#"
1618 # CXXFLAGS="$CXXFLAGS $REPO"
1620 KDE_USE_CLOSURE_TRUE="#"
1621 KDE_USE_CLOSURE_FALSE=""
1623 AC_SUBST(KDE_USE_CLOSURE_TRUE)
1624 AC_SUBST(KDE_USE_CLOSURE_FALSE)
1627 dnl ------------------------------------------------------------------------
1628 dnl Now, the same with KDE
1629 dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1630 dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1631 dnl ------------------------------------------------------------------------
1633 AC_DEFUN(AC_BASE_PATH_KDE,
1636 AC_REQUIRE([AC_PATH_QT])dnl
1637 AC_REQUIRE([KDE_CHECK_LIB64])
1640 AC_MSG_CHECKING([for KDE])
1642 if test "${prefix}" != NONE; then
1643 kde_includes=${prefix}/include
1644 ac_kde_includes=$prefix/include
1646 if test "${exec_prefix}" != NONE; then
1647 kde_libraries=${libdir}
1648 ac_kde_libraries=$libdir
1649 if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
1650 ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
1653 kde_libraries=${prefix}/lib${kdelibsuff}
1654 ac_kde_libraries=$prefix/lib${kdelibsuff}
1663 AC_CACHE_VAL(ac_cv_have_kde,
1664 [#try to guess kde locations
1666 if test "$kde_qtver" = 1; then
1667 kde_check_header="ksock.h"
1668 kde_check_lib="libkdecore.la"
1670 kde_check_header="ksharedptr.h"
1671 kde_check_lib="libkio.la"
1674 if test -z "$1"; then
1676 kde_incdirs="/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"
1677 test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1678 kde_incdirs="$ac_kde_includes $kde_incdirs"
1679 AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1680 ac_kde_includes="$kde_incdir"
1682 if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1684 in the prefix, you've chosen, are no KDE headers installed. This will fail.
1685 So, check this please and use another prefix!])
1688 kde_libdirs="/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}"
1689 test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1690 kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1691 AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1692 ac_kde_libraries="$kde_libdir"
1695 dnl this might be somewhere else
1696 AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1698 if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1700 in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1701 So, check this please and use another prefix!])
1704 if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1706 I can't find the designer plugins. These are required and should have been installed
1710 if test -n "$kde_widgetdir"; then
1711 kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1715 if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1716 ac_cv_have_kde="have_kde=no"
1718 ac_cv_have_kde="have_kde=yes \
1719 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1724 ac_cv_have_kde="have_kde=no"
1729 eval "$ac_cv_have_kde"
1731 if test "$have_kde" != "yes"; then
1732 if test "${prefix}" = NONE; then
1733 ac_kde_prefix="$ac_default_prefix"
1735 ac_kde_prefix="$prefix"
1737 if test "$exec_prefix" = NONE; then
1738 ac_kde_exec_prefix="$ac_kde_prefix"
1739 AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1741 ac_kde_exec_prefix="$exec_prefix"
1742 AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1745 kde_libraries="${libdir}"
1746 kde_includes=${ac_kde_prefix}/include
1749 ac_cv_have_kde="have_kde=yes \
1750 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1751 AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1753 kde_libraries="$ac_kde_libraries"
1754 kde_includes="$ac_kde_includes"
1756 AC_SUBST(kde_libraries)
1757 AC_SUBST(kde_includes)
1759 if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1762 KDE_INCLUDES="-I$kde_includes"
1763 all_includes="$KDE_INCLUDES $all_includes"
1766 KDE_LDFLAGS="-L$kde_libraries"
1767 if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1768 all_libraries="$all_libraries $KDE_LDFLAGS"
1771 AC_SUBST(KDE_LDFLAGS)
1772 AC_SUBST(KDE_INCLUDES)
1774 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1776 all_libraries="$all_libraries $USER_LDFLAGS"
1777 all_includes="$all_includes $USER_INCLUDES"
1778 AC_SUBST(all_includes)
1779 AC_SUBST(all_libraries)
1781 if test -z "$1"; then
1782 KDE_CHECK_UIC_PLUGINS
1785 ac_kde_libraries="$kde_libdir"
1792 AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1794 AC_MSG_CHECKING(for extra includes)
1795 AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1796 adds non standard include paths],
1797 kde_use_extra_includes="$withval",
1798 kde_use_extra_includes=NONE
1801 if test -n "$kde_use_extra_includes" && \
1802 test "$kde_use_extra_includes" != "NONE"; then
1806 for dir in $kde_use_extra_includes; do
1807 kde_extra_includes="$kde_extra_includes $dir"
1808 USER_INCLUDES="$USER_INCLUDES -I$dir"
1811 kde_use_extra_includes="added"
1813 kde_use_extra_includes="no"
1815 AC_SUBST(USER_INCLUDES)
1817 AC_MSG_RESULT($kde_use_extra_includes)
1820 AC_MSG_CHECKING(for extra libs)
1821 AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1822 kde_use_extra_libs=$withval,
1823 kde_use_extra_libs=NONE
1825 if test -n "$kde_use_extra_libs" && \
1826 test "$kde_use_extra_libs" != "NONE"; then
1830 for dir in $kde_use_extra_libs; do
1831 kde_extra_libs="$kde_extra_libs $dir"
1832 KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1833 USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1836 kde_use_extra_libs="added"
1838 kde_use_extra_libs="no"
1841 AC_SUBST(USER_LDFLAGS)
1843 AC_MSG_RESULT($kde_use_extra_libs)
1847 AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1849 AC_MSG_CHECKING([for KDE headers installed])
1852 cat > conftest.$ac_ext <<EOF
1854 # include <stdlib.h>
1857 #include "confdefs.h"
1861 printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1862 printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1863 printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1864 printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1865 printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1866 printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1867 printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1868 printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1869 printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1870 printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1871 printf("kde_wallpaperdir=\\"%s\\"\n",
1872 KApplication::kde_wallpaperdir().data());
1873 printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1874 printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1875 printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1876 printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1877 printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1878 printf("kde_styledir=\\"/tmp/dummy\\"\n");
1879 printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1884 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1885 if AC_TRY_EVAL(ac_compile); then
1888 AC_MSG_ERROR([your system is not able to compile a small KDE application!
1889 Check, if you installed the KDE header files correctly.
1890 For more details about this problem, look at the end of config.log.])
1896 AC_DEFUN(KDE_CHECK_KDEQTADDON,
1898 AC_MSG_CHECKING(for kde-qt-addon)
1899 AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1901 kde_ldflags_safe="$LDFLAGS"
1902 kde_libs_safe="$LIBS"
1903 kde_cxxflags_safe="$CXXFLAGS"
1905 LIBS="-lkde-qt-addon $LIBQT $LIBS"
1906 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1907 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1915 kde_cv_have_kdeqtaddon=yes,
1916 kde_cv_have_kdeqtaddon=no
1919 LDFLAGS=$kde_ldflags_safe
1921 CXXFLAGS=$kde_cxxflags_safe
1924 AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1926 if test "$kde_cv_have_kdeqtaddon" = "no"; then
1927 AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1928 It is a separate package (and CVS module) named kde-qt-addon.])
1932 AC_DEFUN(KDE_CHECK_KIMGIO,
1934 AC_REQUIRE([AC_BASE_PATH_KDE])
1935 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1936 AC_REQUIRE([AC_FIND_TIFF])
1937 AC_REQUIRE([AC_FIND_JPEG])
1938 AC_REQUIRE([AC_FIND_PNG])
1939 AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1941 if test "$1" = "existance"; then
1944 kde_save_LIBS="$LIBS"
1945 LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1946 AC_CHECK_LIB(kimgio, kimgioRegister, [
1947 LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1948 LIBS="$kde_save_LIBS"
1951 LIBKIMGIO_EXISTS=yes
1954 if test "$LIBKIMGIO_EXISTS" = "yes"; then
1955 LIB_KIMGIO='-lkimgio'
1959 AC_SUBST(LIB_KIMGIO)
1962 AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1964 AC_REQUIRE([KDE_MISC_TESTS])
1965 AC_REQUIRE([KDE_CHECK_LIBDL])
1966 AC_REQUIRE([K_PATH_X])
1968 if test $kde_qtver = 3; then
1969 AC_SUBST(LIB_KDECORE, "-lkdecore")
1970 AC_SUBST(LIB_KDEUI, "-lkdeui")
1971 AC_SUBST(LIB_KIO, "-lkio")
1972 AC_SUBST(LIB_SMB, "-lsmb")
1973 AC_SUBST(LIB_KAB, "-lkab")
1974 AC_SUBST(LIB_KABC, "-lkabc")
1975 AC_SUBST(LIB_KHTML, "-lkhtml")
1976 AC_SUBST(LIB_KSPELL, "-lkspell")
1977 AC_SUBST(LIB_KPARTS, "-lkparts")
1978 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1979 # these are for backward compatibility
1980 AC_SUBST(LIB_KSYCOCA, "-lkio")
1981 AC_SUBST(LIB_KFILE, "-lkio")
1982 elif test $kde_qtver = 2; then
1983 AC_SUBST(LIB_KDECORE, "-lkdecore")
1984 AC_SUBST(LIB_KDEUI, "-lkdeui")
1985 AC_SUBST(LIB_KIO, "-lkio")
1986 AC_SUBST(LIB_KSYCOCA, "-lksycoca")
1987 AC_SUBST(LIB_SMB, "-lsmb")
1988 AC_SUBST(LIB_KFILE, "-lkfile")
1989 AC_SUBST(LIB_KAB, "-lkab")
1990 AC_SUBST(LIB_KHTML, "-lkhtml")
1991 AC_SUBST(LIB_KSPELL, "-lkspell")
1992 AC_SUBST(LIB_KPARTS, "-lkparts")
1993 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1995 AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
1996 AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
1997 AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
1998 AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
1999 AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2003 AC_DEFUN(AC_PATH_KDE,
2006 AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
2008 if test "$enableval" = "no";
2009 then ac_use_path_checking="default"
2010 else ac_use_path_checking=""
2014 if test "$kde_qtver" = 1;
2015 then ac_use_path_checking=""
2016 else ac_use_path_checking="default"
2021 AC_CREATE_KFSSTND($ac_use_path_checking)
2024 KDE_CREATE_LIBS_ALIASES
2027 dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2028 AC_DEFUN(KDE_CHECK_FUNC_EXT,
2030 AC_MSG_CHECKING(for $1)
2031 AC_CACHE_VAL(kde_cv_func_$1,
2035 save_CXXFLAGS="$CXXFLAGS"
2036 kde_safe_LIBS="$LIBS"
2037 LIBS="$LIBS $X_EXTRA_LIBS"
2038 if test "$GXX" = "yes"; then
2039 CXXFLAGS="$CXXFLAGS -pedantic-errors"
2049 CXXFLAGS="$save_CXXFLAGS"
2054 AC_MSG_RESULT($kde_cv_func_$1)
2056 AC_MSG_CHECKING([if $1 needs custom prototype])
2057 AC_CACHE_VAL(kde_cv_proto_$1,
2059 if test "x$kde_cv_func_$1" = xyes; then
2063 setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2064 kde_cv_proto_$1="yes - in libkdefakes"
2067 kde_cv_proto_$1=unknown
2072 if test "x$kde_cv_proto_$1" = xunknown; then
2077 LIBS="$LIBS $X_EXTRA_LIBS"
2086 [ kde_cv_func_$1=yes
2087 kde_cv_proto_$1=yes ],
2088 [kde_cv_proto_$1="$1 unavailable"]
2094 AC_MSG_RESULT($kde_cv_proto_$1)
2096 if test "x$kde_cv_func_$1" = xyes; then
2097 AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2100 if test "x$kde_cv_proto_$1" = xno; then
2101 AC_DEFINE(HAVE_$5_PROTO, 1,
2102 [Define if you have the $1 prototype])
2105 AH_VERBATIM([_HAVE_$5_PROTO],
2107 #if !defined(HAVE_$5_PROTO)
2116 AC_DEFUN(AC_CHECK_SETENV,
2118 KDE_CHECK_FUNC_EXT(setenv, [
2121 [setenv("VAR", "VALUE", 1);],
2122 [int setenv (const char *, const char *, int)],
2126 AC_DEFUN(AC_CHECK_UNSETENV,
2128 KDE_CHECK_FUNC_EXT(unsetenv, [
2132 [void unsetenv (const char *)],
2136 AC_DEFUN(AC_CHECK_GETDOMAINNAME,
2138 KDE_CHECK_FUNC_EXT(getdomainname, [
2144 getdomainname(buffer, 200);
2146 [int getdomainname (char *, unsigned int)],
2150 AC_DEFUN(AC_CHECK_GETHOSTNAME,
2152 KDE_CHECK_FUNC_EXT(gethostname, [
2158 gethostname(buffer, 200);
2160 [int gethostname (char *, unsigned int)],
2164 AC_DEFUN(AC_CHECK_USLEEP,
2166 KDE_CHECK_FUNC_EXT(usleep, [
2172 [int usleep (unsigned int)],
2177 AC_DEFUN(AC_CHECK_RANDOM,
2179 KDE_CHECK_FUNC_EXT(random, [
2185 [long int random(void)],
2188 KDE_CHECK_FUNC_EXT(srandom, [
2194 [void srandom(unsigned int)],
2199 AC_DEFUN(AC_CHECK_INITGROUPS,
2201 KDE_CHECK_FUNC_EXT(initgroups, [
2202 #include <sys/types.h>
2208 initgroups(buffer, 27);
2210 [int initgroups(const char *, gid_t)],
2214 AC_DEFUN(AC_CHECK_MKSTEMP,
2216 KDE_CHECK_FUNC_EXT(mkstemp, [
2220 mkstemp("/tmp/aaaXXXXXX");
2222 [int mkstemp(char *)],
2226 AC_DEFUN(AC_CHECK_MKSTEMPS,
2228 KDE_CHECK_FUNC_EXT(mkstemps, [
2233 mkstemps("/tmp/aaaXXXXXX", 6);
2235 [int mkstemps(char *, int)],
2239 AC_DEFUN(AC_CHECK_RES_INIT,
2241 AC_MSG_CHECKING([if res_init needs -lresolv])
2242 kde_libs_safe="$LIBS"
2243 LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2246 #include <sys/types.h>
2247 #include <netinet/in.h>
2248 #include <arpa/nameser.h>
2255 LIBRESOLV="-lresolv"
2257 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2259 [ AC_MSG_RESULT(no) ]
2264 AC_MSG_CHECKING([if res_init is available])
2267 #include <sys/types.h>
2268 #include <netinet/in.h>
2269 #include <arpa/nameser.h>
2277 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2279 [ AC_MSG_RESULT(no) ]
2283 AC_DEFUN(AC_CHECK_STRLCPY,
2285 KDE_CHECK_FUNC_EXT(strlcpy, [
2289 strlcpy(buf, "KDE function test", sizeof(buf));
2291 [unsigned long strlcpy(char*, const char*, unsigned long)],
2295 AC_DEFUN(AC_CHECK_STRLCAT,
2297 KDE_CHECK_FUNC_EXT(strlcat, [
2302 strlcat(buf, "KDE function test", sizeof(buf));
2304 [unsigned long strlcat(char*, const char*, unsigned long)],
2308 AC_DEFUN(AC_FIND_GIF,
2309 [AC_MSG_CHECKING([for giflib])
2310 AC_CACHE_VAL(ac_cv_lib_gif,
2311 [ac_save_LIBS="$LIBS"
2312 if test "x$kde_use_qt_emb" != "xyes"; then
2313 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2315 LIBS="$all_libraries -lgif"
2322 int GifLastError(void);
2326 /* We use char because int might match the return type of a gcc2
2327 builtin and then its argument prototype would still apply. */
2329 [return GifLastError();],
2330 eval "ac_cv_lib_gif=yes",
2331 eval "ac_cv_lib_gif=no")
2332 LIBS="$ac_save_LIBS"
2334 if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2336 AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2338 AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2342 AC_DEFUN(KDE_FIND_JPEG_HELPER,
2344 AC_MSG_CHECKING([for libjpeg$2])
2345 AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2348 ac_save_LIBS="$LIBS"
2349 LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2350 ac_save_CFLAGS="$CFLAGS"
2351 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2353 [/* Override any gcc2 internal prototype to avoid an error. */
2354 struct jpeg_decompress_struct;
2355 typedef struct jpeg_decompress_struct * j_decompress_ptr;
2360 void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2361 int version, size_t structsize);
2365 /* We use char because int might match the return type of a gcc2
2366 builtin and then its argument prototype would still apply. */
2368 [jpeg_CreateDecompress(0L, 0, 0);],
2369 eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2370 eval "ac_cv_lib_jpeg_$1=no")
2371 LIBS="$ac_save_LIBS"
2372 CFLAGS="$ac_save_CFLAGS"
2375 if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2376 LIBJPEG="$ac_cv_lib_jpeg_$1"
2377 AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2385 AC_DEFUN(AC_FIND_JPEG,
2387 dnl first look for libraries
2388 KDE_FIND_JPEG_HELPER(6b, 6b,
2389 KDE_FIND_JPEG_HELPER(normal, [],
2396 dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2397 dnl requires system dependent includes loaded before it)
2398 jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2399 AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2400 test "x$jpeg_incdir" = xNO && jpeg_incdir=
2402 dnl if headers _and_ libraries are missing, this is no error, and we
2403 dnl continue with a warning (the user will get no jpeg support in khtml)
2404 dnl if only one is missing, it means a configuration error, but we still
2406 if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2407 AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2409 if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2411 There is an installation error in jpeg support. You seem to have only one
2412 of either the headers _or_ the libraries installed. You may need to either
2413 provide correct --with-extra-... options, or the development package of
2414 libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2415 Disabling JPEG support.
2418 AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2425 AH_VERBATIM(_AC_CHECK_JPEG,
2427 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2428 * headers and I'm too lazy to write a configure test as long as only
2429 * unixware is related
2432 #define HAVE_BOOLEAN
2437 AC_DEFUN(KDE_CHECK_QT_JPEG,
2439 AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2440 AC_CACHE_VAL(kde_cv_qt_jpeg,
2444 ac_save_LIBS="$LIBS"
2445 LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2446 LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2447 ac_save_CXXFLAGS="$CXXFLAGS"
2448 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2450 [#include <qapplication.h>],
2454 QApplication app(argc, argv);],
2455 eval "kde_cv_qt_jpeg=no",
2456 eval "kde_cv_qt_jpeg=yes")
2457 LIBS="$ac_save_LIBS"
2458 CXXFLAGS="$ac_save_CXXFLAGS"
2462 if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2464 LIBJPEG_QT='$(LIBJPEG)'
2472 AC_DEFUN(AC_FIND_ZLIB,
2474 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2475 AC_MSG_CHECKING([for libz])
2476 AC_CACHE_VAL(ac_cv_lib_z,
2479 kde_save_LIBS="$LIBS"
2480 LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2481 kde_save_CFLAGS="$CFLAGS"
2482 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2487 [return (zlibVersion() == ZLIB_VERSION); ],
2488 eval "ac_cv_lib_z='-lz'",
2489 eval "ac_cv_lib_z=no")
2490 LIBS="$kde_save_LIBS"
2491 CFLAGS="$kde_save_CFLAGS"
2493 if test ! "$ac_cv_lib_z" = no; then
2494 AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2497 AC_MSG_RESULT($ac_cv_lib_z)
2499 AC_MSG_ERROR(not found. Check your installation and look into config.log)
2505 AC_DEFUN(KDE_TRY_TIFFLIB,
2507 AC_MSG_CHECKING([for libtiff $1])
2509 AC_CACHE_VAL(kde_cv_libtiff_$1,
2513 kde_save_LIBS="$LIBS"
2514 if test "x$kde_use_qt_emb" != "xyes"; then
2515 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2517 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2519 kde_save_CXXFLAGS="$CXXFLAGS"
2520 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2526 [return (TIFFOpen( "", "r") == 0); ],
2528 kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2530 kde_cv_libtiff_$1=no
2533 LIBS="$kde_save_LIBS"
2534 CXXFLAGS="$kde_save_CXXFLAGS"
2538 if test "$kde_cv_libtiff_$1" = "no"; then
2543 LIBTIFF="$kde_cv_libtiff_$1"
2545 AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2551 AC_DEFUN(AC_FIND_TIFF,
2553 AC_REQUIRE([K_PATH_X])
2554 AC_REQUIRE([AC_FIND_ZLIB])
2555 AC_REQUIRE([AC_FIND_JPEG])
2556 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2558 KDE_TRY_TIFFLIB(tiff, [],
2559 KDE_TRY_TIFFLIB(tiff34))
2565 AC_DEFUN(AC_FIND_PNG,
2567 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2568 AC_REQUIRE([AC_FIND_ZLIB])
2569 AC_MSG_CHECKING([for libpng])
2570 AC_CACHE_VAL(ac_cv_lib_png,
2572 kde_save_LIBS="$LIBS"
2573 if test "x$kde_use_qt_emb" != "xyes"; then
2574 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2576 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2578 kde_save_CFLAGS="$CFLAGS"
2579 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2586 png_structp png_ptr = png_create_read_struct( /* image ptr */
2587 PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2588 return( png_ptr != 0 );
2590 eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2591 eval "ac_cv_lib_png=no"
2593 LIBS="$kde_save_LIBS"
2594 CFLAGS="$kde_save_CFLAGS"
2596 if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2597 AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2598 LIBPNG="$ac_cv_lib_png"
2600 AC_MSG_RESULT($ac_cv_lib_png)
2608 AC_DEFUN(AC_CHECK_BOOL,
2610 AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2613 AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2615 AC_MSG_CHECKING(if you need GNU extensions)
2616 AC_CACHE_VAL(ac_cv_gnu_extensions,
2618 cat > conftest.c << EOF
2619 #include <features.h>
2621 #ifdef __GNU_LIBRARY__
2626 if (eval "$ac_cpp conftest.c") 2>&5 |
2627 egrep "yes" >/dev/null 2>&1; then
2629 ac_cv_gnu_extensions=yes
2631 ac_cv_gnu_extensions=no
2635 AC_MSG_RESULT($ac_cv_gnu_extensions)
2636 if test "$ac_cv_gnu_extensions" = "yes"; then
2637 AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2641 AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2643 AC_MSG_CHECKING(whether $CXX supports -$1)
2644 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2645 AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2649 save_CXXFLAGS="$CXXFLAGS"
2650 CXXFLAGS="$CXXFLAGS -$1"
2651 AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2652 CXXFLAGS="$save_CXXFLAGS"
2655 if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2666 dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2667 dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2668 dnl it's all white-space separated
2669 AC_DEFUN(AC_REMOVE_FORBIDDEN,
2672 if test -n "$__val"; then
2678 *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2679 *) # Careful to not add spaces, where there were none, because otherwise
2680 # libtool gets confused, if we change e.g. CXX
2681 if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2689 dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2690 AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2692 if test "x$kde_use_qt_emb" != "xyes"; then
2693 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2694 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2696 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2697 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2701 AC_DEFUN(AC_CHECK_COMPILERS,
2703 AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2707 kde_use_debug_code="yes"
2708 kde_use_debug_define=no
2711 kde_use_debug_code="full"
2712 kde_use_debug_define=no
2715 kde_use_debug_code="no"
2716 kde_use_debug_define=yes
2720 [kde_use_debug_code="no"
2721 kde_use_debug_define=no
2724 dnl Just for configure --help
2725 AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2727 AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2729 if test $enableval = "no"; then
2730 kde_use_strict_options="no"
2732 kde_use_strict_options="yes"
2734 ], [kde_use_strict_options="no"])
2736 AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2738 if test $enableval = "no"; then
2739 kde_use_warnings="no"
2741 kde_use_warnings="yes"
2743 ], [kde_use_warnings="yes"])
2745 dnl enable warnings for debug build
2746 if test "$kde_use_debug_code" != "no"; then
2747 kde_use_warnings=yes
2750 AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2751 [kde_use_profiling=$enableval],
2752 [kde_use_profiling="no"]
2755 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2762 if test "$GCC" = "yes"; then
2763 if test "$kde_use_debug_code" != "no"; then
2764 if test $kde_use_debug_code = "full"; then
2765 CFLAGS="-g3 $CFLAGS"
2767 CFLAGS="-g -O2 $CFLAGS"
2770 CFLAGS="-O2 $CFLAGS"
2774 if test "$kde_use_debug_define" = "yes"; then
2775 CFLAGS="-DNDEBUG $CFLAGS"
2780 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2781 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2784 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2788 CXXFLAGS=" $CXXFLAGS"
2792 if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2793 if test "$kde_use_debug_code" != "no"; then
2794 if test "$CXX" = "KCC"; then
2795 CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2797 if test "$kde_use_debug_code" = "full"; then
2798 CXXFLAGS="-g3 $CXXFLAGS"
2800 CXXFLAGS="-g -O2 $CXXFLAGS"
2803 KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2805 dnl convenience compiler flags
2806 KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2807 AC_SUBST(WOVERLOADED_VIRTUAL)
2809 if test "$CXX" = "KCC"; then
2810 CXXFLAGS="+K3 $CXXFLAGS"
2812 CXXFLAGS="-O2 $CXXFLAGS"
2817 if test "$kde_use_debug_define" = "yes"; then
2818 CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2821 if test "$kde_use_profiling" = "yes"; then
2822 KDE_CHECK_COMPILER_FLAG(pg,
2824 CFLAGS="-pg $CFLAGS"
2825 CXXFLAGS="-pg $CXXFLAGS"
2829 if test "$kde_use_warnings" = "yes"; then
2830 if test "$GCC" = "yes"; then
2833 CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2834 CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
2837 CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2838 KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2839 KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2840 KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2844 if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
2845 CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2848 if test "$GXX" = "yes"; then
2849 KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2850 KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2851 KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2853 if test "$CXX" = "KCC"; then
2854 dnl unfortunately we currently cannot disable exception support in KCC
2855 dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2856 dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2857 dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2859 AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2861 kde_use_pch=$enableval
2864 if test "$kde_use_pch" = "yes"; then
2865 dnl TODO: support --pch-dir!
2866 KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2867 dnl the below works (but the dir must exist), but it's
2868 dnl useless for a whole package.
2869 dnl The are precompiled headers for each source file, so when compiling
2870 dnl from scratch, it doesn't make a difference, and they take up
2871 dnl around ~5Mb _per_ sourcefile.
2872 dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2873 dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2875 dnl this flag controls inlining. by default KCC inlines in optimisation mode
2876 dnl all implementations that are defined inside the class {} declaration.
2877 dnl because of templates-compatibility with broken gcc compilers, this
2878 dnl can cause excessive inlining. This flag limits it to a sane level
2879 KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2880 KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2881 KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2882 KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2883 dnl Some source files are shared between multiple executables
2884 dnl (or libraries) and some of those need template instantiations.
2885 dnl In that case KCC needs to compile those sources with
2886 dnl --one_instantiation_per_object. To make it easy for us we compile
2887 dnl _all_ objects with that flag (--one_per is a shorthand).
2888 KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2890 AC_SUBST(USE_EXCEPTIONS)
2891 dnl obsolete macro - provided to keep things going
2896 *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2897 *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2898 *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2900 if test "$GXX" = yes; then
2901 libstdcpp=`$CXX -print-file-name=libstdc++.so`
2902 if test ! -f $libstdcpp; then
2903 AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
2909 AC_VALIDIFY_CXXFLAGS
2913 if test "$GCC" = yes; then
2918 AC_SUBST(NOOPT_CXXFLAGS)
2919 AC_SUBST(NOOPT_CFLAGS)
2923 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2926 AC_DEFUN(KDE_ADD_DEPENDENCIES,
2928 [A]M_DEPENDENCIES(CC)
2929 [A]M_DEPENDENCIES(CXX)
2932 dnl just a wrapper to clean up configure.in
2933 AC_DEFUN(KDE_PROG_LIBTOOL,
2935 AC_REQUIRE([AC_CHECK_COMPILERS])
2936 AC_REQUIRE([AC_ENABLE_SHARED])
2937 AC_REQUIRE([AC_ENABLE_STATIC])
2939 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
2940 AC_REQUIRE([KDE_CHECK_LIB64])
2951 LIBTOOL_SHELL="/bin/sh ./libtool"
2952 # LIBTOOL="$LIBTOOL --silent"
2953 KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2954 AC_SUBST(KDE_PLUGIN)
2956 AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
2957 kde_use_objprelink=$enableval, kde_use_objprelink=no)
2958 if test "x$kde_use_objprelink" = "xyes"; then
2960 ------------------------------------------------------------
2961 Configuration option --enable-objprelink is no longer useful.
2962 See http:://objprelink.sourceforge.net for details:
2963 1- Recent binutils are fast enough to do without objprelink.
2964 2- Newer versions of objprelink do not need this option.
2965 ------------------------------------------------------------
2970 AC_DEFUN(KDE_CHECK_LIB64,
2973 AC_ARG_ENABLE(libsuffix,
2974 AC_HELP_STRING([--enable-libsuffix],
2975 [/lib directory suffix (64,32,none)]),
2976 kdelibsuff=$enableval)
2977 if test "$kdelibsuff" = "none"; then
2978 if test -d /lib64 ; then
2984 if test -z "$kdelibsuff"; then
2985 AC_MSG_RESULT([not using lib directory suffix])
2986 AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
2988 if test "$libdir" = '${exec_prefix}/lib'; then
2989 libdir="$libdir${kdelibsuff}"
2990 AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
2992 AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
2993 AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
2997 AC_DEFUN(KDE_CHECK_TYPES,
2998 [ AC_CHECK_SIZEOF(int, 4)dnl
2999 AC_CHECK_SIZEOF(long, 4)dnl
3000 AC_CHECK_SIZEOF(char *, 4)dnl
3001 AC_CHECK_SIZEOF(char, 1)dnl
3004 AC_DEFUN(KDE_DO_IT_ALL,
3008 AM_INIT_AUTOMAKE($1, $2)
3009 AM_DISABLE_LIBRARIES
3010 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3017 AC_DEFUN(AC_CHECK_RPATH,
3019 AC_MSG_CHECKING(for rpath)
3020 AC_ARG_ENABLE(rpath,
3021 [ --disable-rpath do not use the rpath feature of ld],
3022 USE_RPATH=$enableval, USE_RPATH=yes)
3024 if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3026 KDE_RPATH="-R \$(kde_libraries)"
3028 if test -n "$qt_libraries"; then
3029 KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3031 dnl $x_libraries is set to /usr/lib in case
3032 if test -n "$X_LDFLAGS"; then
3033 KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
3035 if test -n "$KDE_EXTRA_RPATH"; then
3036 KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3039 AC_SUBST(KDE_EXTRA_RPATH)
3041 AC_MSG_RESULT($USE_RPATH)
3044 dnl Check for the type of the third argument of getsockname
3045 AC_DEFUN(AC_CHECK_SOCKLEN_T, [
3046 AC_MSG_CHECKING(for socklen_t)
3047 AC_CACHE_VAL(ac_cv_socklen_t, [
3051 #include <sys/types.h>
3052 #include <sys/socket.h>
3055 getsockname(0,(struct sockaddr*)0, &a);
3057 ac_cv_socklen_t=socklen_t,
3059 #include <sys/types.h>
3060 #include <sys/socket.h>
3063 getsockname(0,(struct sockaddr*)0, &a);
3065 ac_cv_socklen_t=int,
3066 ac_cv_socklen_t=size_t
3072 AC_MSG_RESULT($ac_cv_socklen_t)
3073 if test "$ac_cv_socklen_t" != "socklen_t"; then
3074 AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3075 [Define the real type of socklen_t])
3077 AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3081 dnl This is a merge of some macros out of the gettext aclocal.m4
3082 dnl since we don't need anything, I took the things we need
3083 dnl the copyright for them is:
3085 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3086 dnl This Makefile.in is free software; the Free Software Foundation
3087 dnl gives unlimited permission to copy and/or distribute it,
3088 dnl with or without modifications, as long as this notice is preserved.
3090 dnl This program is distributed in the hope that it will be useful,
3091 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3092 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3093 dnl PARTICULAR PURPOSE.
3095 dnl for this file it is relicensed under LGPL
3097 AC_DEFUN(AM_KDE_WITH_NLS,
3099 dnl If we use NLS figure out what method
3101 AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3102 [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3103 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3105 if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3106 AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3113 AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3114 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3116 dnl Test whether we really found GNU xgettext.
3117 if test "$XGETTEXT" != ":"; then
3118 dnl If it is no GNU xgettext we define it as : so that the
3119 dnl Makefiles still can work.
3120 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3124 [found xgettext programs is not GNU xgettext; ignore it])
3132 # Search path for a program which passes the given test.
3133 # Ulrich Drepper <drepper@cygnus.com>, 1996.
3136 # Stephan Kulow: I appended a _KDE against name conflicts
3138 dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3139 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3140 AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
3141 [# Extract the first word of "$2", so it can be a program name with args.
3142 set dummy $2; ac_word=[$]2
3143 AC_MSG_CHECKING([for $ac_word])
3144 AC_CACHE_VAL(ac_cv_path_$1,
3147 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3151 for ac_dir in ifelse([$5], , $PATH, [$5]); do
3152 test -z "$ac_dir" && ac_dir=.
3153 if test -f $ac_dir/$ac_word; then
3155 ac_cv_path_$1="$ac_dir/$ac_word"
3161 dnl If no 4th arg is given, leave the cache variable unset,
3162 dnl so AC_PATH_PROGS will keep looking.
3163 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3168 if test -n "[$]$1"; then
3169 AC_MSG_RESULT([$]$1)
3177 # Check whether LC_MESSAGES is available in <locale.h>.
3178 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3182 AC_DEFUN(AM_LC_MESSAGES,
3183 [if test $ac_cv_header_locale_h = yes; then
3184 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3185 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3186 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3187 if test $am_cv_val_LC_MESSAGES = yes; then
3188 AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3192 dnl From Jim Meyering.
3193 dnl FIXME: migrate into libit.
3195 AC_DEFUN([AM_FUNC_OBSTACK],
3196 [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3197 [AC_TRY_LINK([#include "obstack.h"],
3198 [struct obstack *mem;obstack_free(mem,(char *) 0)],
3199 am_cv_func_obstack=yes,
3200 am_cv_func_obstack=no)])
3201 if test $am_cv_func_obstack = yes; then
3202 AC_DEFINE(HAVE_OBSTACK)
3204 LIBOBJS="$LIBOBJS obstack.o"
3208 dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3209 dnl FIXME: Migrate into libit
3211 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3212 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3213 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3214 am_cv_lib_error_at_line=yes,
3215 am_cv_lib_error_at_line=no)])
3216 if test $am_cv_lib_error_at_line = no; then
3217 LIBOBJS="$LIBOBJS error.o"
3219 AC_SUBST(LIBOBJS)dnl
3222 # Macro to add for using GNU gettext.
3223 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3226 # Stephan Kulow: I put a KDE in it to avoid name conflicts
3228 AC_DEFUN(AM_KDE_GNU_GETTEXT,
3229 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3230 AC_REQUIRE([AC_PROG_RANLIB])dnl
3231 AC_REQUIRE([AC_HEADER_STDC])dnl
3232 AC_REQUIRE([AC_TYPE_OFF_T])dnl
3233 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3234 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3235 AC_REQUIRE([AC_FUNC_MMAP])dnl
3236 AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3237 AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3238 AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3239 __argz_count __argz_stringify __argz_next])
3241 AC_MSG_CHECKING(for stpcpy)
3242 AC_CACHE_VAL(kde_cv_func_stpcpy,
3244 kde_safe_cxxflags=$CXXFLAGS
3245 CXXFLAGS="-Wmissing-prototypes -Werror"
3253 stpcpy(buffer, buffer);
3255 kde_cv_func_stpcpy=yes,
3256 kde_cv_func_stpcpy=no)
3258 CXXFLAGS=$kde_safe_cxxflags
3260 AC_MSG_RESULT($kde_cv_func_stpcpy)
3261 if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3262 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3267 if test "x$CATOBJEXT" != "x"; then
3268 if test "x$ALL_LINGUAS" = "x"; then
3271 AC_MSG_CHECKING(for catalogs to be installed)
3273 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3274 case "$ALL_LINGUAS" in
3275 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3278 LINGUAS=$NEW_LINGUAS
3279 AC_MSG_RESULT($LINGUAS)
3282 dnl Construct list of names of catalog files to be constructed.
3283 if test -n "$LINGUAS"; then
3284 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3290 AC_DEFUN(AC_HAVE_XPM,
3291 [AC_REQUIRE_CPP()dnl
3292 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3294 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3295 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3297 AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3298 xpm_test=$withval, xpm_test="yes")
3299 if test "x$xpm_test" = xno; then
3302 AC_MSG_CHECKING(for XPM)
3303 AC_CACHE_VAL(ac_cv_have_xpm,
3306 ac_save_ldflags="$LDFLAGS"
3307 ac_save_cflags="$CFLAGS"
3308 if test "x$kde_use_qt_emb" != "xyes"; then
3309 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3311 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3313 CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3314 test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3315 AC_TRY_LINK([#include <X11/xpm.h>],[],
3316 ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3317 LDFLAGS="$ac_save_ldflags"
3318 CFLAGS="$ac_save_cflags"
3321 if test "$ac_cv_have_xpm" = no; then
3327 AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3328 if test "$XPM_LDFLAGS" = ""; then
3329 XPMLIB='-lXpm $(LIB_X11)'
3331 XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3333 if test "$XPM_INCLUDE" = ""; then
3336 XPMINC="-I$XPM_INCLUDE"
3346 AC_DEFUN(AC_HAVE_DPMS,
3347 [AC_REQUIRE_CPP()dnl
3348 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3350 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3351 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3354 AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3355 dpms_test=$withval, dpms_test="yes")
3356 if test "x$dpms_test" = xno; then
3359 AC_MSG_CHECKING(for DPMS)
3360 dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3361 dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3362 AC_CACHE_VAL(ac_cv_have_dpms,
3364 if test "x$kde_use_qt_emb" = "xyes"; then
3366 ac_cv_have_dpms="no"
3369 ac_save_ldflags="$LDFLAGS"
3370 ac_save_cflags="$CFLAGS"
3371 ac_save_libs="$LIBS"
3372 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3373 CFLAGS="$CFLAGS $X_INCLUDES"
3374 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3376 #include <X11/Xproto.h>
3378 #include <X11/Xlib.h>
3379 #include <X11/extensions/dpms.h>
3381 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3382 ac_cv_have_dpms="yes", [
3383 LDFLAGS="$ac_save_ldflags"
3384 CFLAGS="$ac_save_cflags"
3385 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3386 LIBS="$LIBS -lXdpms"
3387 CFLAGS="$CFLAGS $X_INCLUDES"
3388 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3390 #include <X11/Xproto.h>
3392 #include <X11/Xlib.h>
3393 #include <X11/extensions/dpms.h>
3395 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3397 ac_cv_have_dpms="-lXdpms"
3398 ],ac_cv_have_dpms="no")
3400 LDFLAGS="$ac_save_ldflags"
3401 CFLAGS="$ac_save_cflags"
3402 LIBS="$ac_save_libs"
3406 if test "$ac_cv_have_dpms" = no; then
3412 AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3413 if test "$ac_cv_have_dpms" = "-lXdpms"; then
3416 if test "$DPMS_LDFLAGS" = ""; then
3417 DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3419 DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3421 if test "$DPMS_INCLUDE" = ""; then
3424 DPMSINC="-I$DPMS_INCLUDE"
3434 AC_DEFUN(AC_HAVE_GL,
3435 [AC_REQUIRE_CPP()dnl
3436 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3438 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3439 test -z "$GL_INCLUDE" && GL_INCLUDE=
3441 AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3442 gl_test=$withval, gl_test="yes")
3443 if test "x$kde_use_qt_emb" = "xyes"; then
3444 # GL and Qt Embedded is a no-go for now.
3446 elif test "x$gl_test" = xno; then
3449 AC_MSG_CHECKING(for GL)
3450 AC_CACHE_VAL(ac_cv_have_gl,
3454 ac_save_ldflags="$LDFLAGS"
3455 ac_save_cxxflags="$CXXFLAGS"
3456 LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3457 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3458 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3459 CXXFLAGS="$CFLAGS $X_INCLUDES"
3460 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3461 AC_TRY_LINK([#include <GL/gl.h>
3464 ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3465 if test "x$ac_cv_have_gl" = "xno"; then
3466 LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3467 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3468 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3469 CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3470 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3471 AC_TRY_LINK([#include <GL/gl.h>
3474 ac_cv_have_gl="yes", ac_cv_have_gl="no")
3477 LDFLAGS="$ac_save_ldflags"
3478 CXXFLAGS="$ac_save_cxxflags"
3481 if test "$ac_cv_have_gl" = "no"; then
3487 AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3488 if test "$GL_LDFLAGS" = ""; then
3489 if test "$ac_cv_have_gl" = "mesa"; then
3490 GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3492 GLLIB='-lGLU -lGL $(LIB_X11)'
3495 if test "$ac_cv_have_gl" = "mesa"; then
3496 GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3498 GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3501 if test "$GL_INCLUDE" = ""; then
3504 GLINC="-I$GL_INCLUDE"
3506 AC_MSG_RESULT($ac_cv_have_gl)
3515 dnl shadow password and PAM magic - maintained by ossi@kde.org
3518 AC_REQUIRE([KDE_CHECK_LIBDL])
3521 [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3522 [ if test "x$withval" = "xyes"; then
3525 elif test "x$withval" = "xno"; then
3529 pam_service=$withval
3531 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3533 AC_CACHE_VAL(ac_cv_path_pam,
3535 AC_CHECK_LIB(pam, pam_start,
3536 [ AC_CHECK_HEADER(security/pam_appl.h,
3540 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3543 eval "$ac_cv_path_pam"
3545 AC_MSG_CHECKING(for PAM)
3546 if test "x$use_pam" = xno; then
3551 AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3552 PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3554 dnl test whether struct pam_message is const (Linux) or not (Sun)
3555 AC_MSG_CHECKING(for const pam_message)
3556 AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
3557 [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
3558 [AC_MSG_RESULT([const: Linux-type PAM])],
3559 [AC_MSG_RESULT([nonconst: Sun-type PAM])
3560 AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3562 [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3568 dnl DEF_PAM_SERVICE(arg name, full name, define name)
3569 AC_DEFUN(DEF_PAM_SERVICE, [
3571 [ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3572 [ if test "x$use_pam" = xyes; then
3573 $3_PAM_SERVICE="$withval"
3575 AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3576 You may want to enforce it by using --with-pam.])
3579 [ if test "x$use_pam" = xyes; then
3580 $3_PAM_SERVICE="$pam_service"
3583 if test -n "$$3_PAM_SERVICE"; then
3584 AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3585 AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3587 AC_SUBST($3_PAM_SERVICE)
3590 AC_DEFUN(KDE_SHADOWPASSWD, [
3591 AC_REQUIRE([KDE_PAM])
3593 AC_CHECK_LIB(shadow, getspent,
3594 [ LIBSHADOW="-lshadow"
3598 AC_CHECK_LIB(gen, getspent,
3602 [ AC_CHECK_FUNC(getspent,
3603 [ ac_use_shadow=yes ],
3604 [ ac_use_shadow=no ])
3610 AC_MSG_CHECKING([for shadow passwords])
3613 [ --with-shadow If you want shadow password support ],
3614 [ if test "x$withval" != "xno"; then
3620 use_shadow="$ac_use_shadow"
3623 if test "x$use_shadow" = xyes; then
3625 AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3632 dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3633 dnl this still applies, if we could use it indirectly through pam.
3634 if test "x$use_shadow" = xyes ||
3635 ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3637 *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3638 SETUIDFLAGS="-m 4755 -o root";;
3640 SETUIDFLAGS="-m 4755";;
3643 AC_SUBST(SETUIDFLAGS)
3647 AC_DEFUN(KDE_PASSWDLIBS, [
3648 AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3649 AC_REQUIRE([KDE_PAM])
3650 AC_REQUIRE([KDE_SHADOWPASSWD])
3652 if test "x$use_pam" = "xyes"; then
3653 PASSWDLIBS="$PAMLIBS"
3655 PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3658 dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3659 dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3660 dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3661 dnl may need to read /etc/master.passwd).
3664 SETUIDFLAGS="-m 4755 -o root"
3670 AC_SUBST(PASSWDLIBS)
3673 AC_DEFUN(KDE_CHECK_LIBDL,
3675 AC_CHECK_LIB(dl, dlopen, [
3677 ac_cv_have_dlfcn=yes
3680 AC_CHECK_LIB(dld, shl_unload, [
3682 ac_cv_have_shload=yes
3688 AC_DEFUN(KDE_CHECK_DLOPEN,
3691 AC_CHECK_HEADERS(dlfcn.h dl.h)
3692 if test "$ac_cv_header_dlfcn_h" = "no"; then
3696 if test "$ac_cv_header_dl_h" = "no"; then
3697 ac_cv_have_shload=no
3700 dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3702 AC_ARG_ENABLE(dlopen,
3703 [ --disable-dlopen link statically [default=no]] ,
3704 enable_dlopen=$enableval,
3707 # override the user's opinion, if we know it better ;)
3708 if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3712 if test "$ac_cv_have_dlfcn" = "yes"; then
3713 AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3716 if test "$ac_cv_have_shload" = "yes"; then
3717 AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3720 if test "$enable_dlopen" = no ; then
3721 test -n "$1" && eval $1
3723 test -n "$2" && eval $2
3728 AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3730 KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3732 AC_MSG_CHECKING([dynamic loading])
3733 eval "`egrep '^build_libtool_libs=' libtool`"
3734 if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3736 AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3740 AC_MSG_RESULT($dynamic_loading)
3741 if test "$dynamic_loading" = "yes"; then
3748 AC_DEFUN(KDE_ADD_INCLUDES,
3750 if test -z "$1"; then
3751 test_include="Pix.h"
3756 AC_MSG_CHECKING([for libg++ ($test_include)])
3758 AC_CACHE_VAL(kde_cv_libgpp_includes,
3760 kde_cv_libgpp_includes=no
3766 /usr/unsupported/include \
3771 if test -r "$ac_dir/$test_include"; then
3772 kde_cv_libgpp_includes=$ac_dir
3778 AC_MSG_RESULT($kde_cv_libgpp_includes)
3779 if test "$kde_cv_libgpp_includes" != "no"; then
3780 all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3786 AC_DEFUN(KDE_CHECK_MICO,
3788 AC_REQUIRE([KDE_CHECK_LIBDL])
3789 AC_REQUIRE([KDE_MISC_TESTS])
3790 AC_MSG_CHECKING(for MICO)
3792 if test -z "$MICODIR"; then
3793 kde_micodir=/usr/local
3795 kde_micodir="$MICODIR"
3798 AC_ARG_WITH(micodir,
3799 [ --with-micodir=micodir where mico is installed ],
3800 kde_micodir=$withval,
3801 kde_micodir=$kde_micodir
3804 AC_CACHE_VAL(kde_cv_mico_incdir,
3806 mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3807 AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3810 kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3812 if test ! -r $kde_micodir/include/CORBA.h; then
3813 AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3816 AC_MSG_RESULT($kde_micodir)
3818 MICO_INCLUDES=-I$kde_micodir/include
3819 AC_SUBST(MICO_INCLUDES)
3820 MICO_LDFLAGS=-L$kde_micodir/lib
3821 AC_SUBST(MICO_LDFLAGS)
3822 micodir=$kde_micodir
3825 AC_MSG_CHECKING([for MICO version])
3826 AC_CACHE_VAL(kde_cv_mico_version,
3829 cat >conftest.$ac_ext <<EOF
3831 #include <mico/version.h>
3834 printf("MICO_VERSION=%s\n",MICO_VERSION);
3838 ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3839 if AC_TRY_EVAL(ac_compile); then
3840 if eval `./conftest 2>&5`; then
3841 kde_cv_mico_version=$MICO_VERSION
3843 AC_MSG_ERROR([your system is not able to execute a small application to
3844 find MICO version! Check $kde_micodir/include/mico/version.h])
3847 AC_MSG_ERROR([your system is not able to compile a small application to
3848 find MICO version! Check $kde_micodir/include/mico/version.h])
3852 dnl installed MICO version
3853 mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3854 mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3855 mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3857 if test "x$1" = "x"; then
3863 dnl required MICO version
3864 req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3865 req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3866 req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3868 if test "$mico_v_maj" -lt "$req_v_maj" || \
3869 ( test "$mico_v_maj" -eq "$req_v_maj" && \
3870 test "$mico_v_mid" -lt "$req_v_mid" ) || \
3871 ( test "$mico_v_mid" -eq "$req_v_mid" && \
3872 test "$mico_v_min" -lt "$req_v_min" )
3875 AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3876 at least is required. You should upgrade MICO.])
3878 AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3881 LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3883 if test -z "$IDL"; then
3884 IDL='$(kde_bindir)/cuteidl'
3887 IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3888 AC_SUBST(IDL_DEPENDENCIES)
3890 idldir="\$(includedir)/idl"
3895 AC_DEFUN(KDE_CHECK_MINI_STL,
3897 AC_REQUIRE([KDE_CHECK_MICO])
3899 AC_MSG_CHECKING(if we use mico's mini-STL)
3900 AC_CACHE_VAL(kde_cv_have_mini_stl,
3904 kde_save_cxxflags="$CXXFLAGS"
3905 CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3908 #include <mico/config.h>
3911 #ifdef HAVE_MINI_STL
3915 kde_cv_have_mini_stl=no,
3916 kde_cv_have_mini_stl=yes)
3917 CXXFLAGS="$kde_save_cxxflags"
3921 if test "x$kde_cv_have_mini_stl" = "xyes"; then
3933 AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3935 AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3936 AC_SUBST(LIBPTHREAD)
3939 AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3941 AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3942 kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3944 if test "$kde_use_kernthreads" = "yes"; then
3945 ac_save_CXXFLAGS="$CXXFLAGS"
3946 ac_save_CFLAGS="$CFLAGS"
3947 CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3948 CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3949 AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3950 CXXFLAGS="$ac_save_CXXFLAGS"
3951 CFLAGS="$ac_save_CFLAGS"
3952 if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3953 kde_use_kernthreads=no
3955 dnl Add proper -I and -l statements
3956 AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3957 if test "x$LIBPTHREAD" = "x"; then
3958 kde_use_kernthreads=no
3960 USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3965 if test -z "$LIBPTHREAD"; then
3966 KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
3970 AH_VERBATIM(__svr_define, [
3971 #if defined(__SVR4) && !defined(__svr4__)
3977 KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3978 CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3981 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3984 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3985 LIBPTHREAD="$LIBPTHREAD -lc_r"
3987 linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3988 if test "$CXX" = "KCC"; then
3989 CXXFLAGS="$CXXFLAGS --thread_safe"
3990 NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3996 AC_SUBST(USE_THREADS)
3997 AC_SUBST(LIBPTHREAD)
4000 AC_DEFUN(KDE_CHECK_THREADING,
4002 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4003 AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4004 dnl default is yes if libpthread is found and no if no libpthread is available
4005 if test -z "$LIBPTHREAD"; then
4006 if test -z "$USE_THREADS"; then
4007 kde_check_threading_default=no
4009 kde_check_threading_default=yes
4012 kde_check_threading_default=yes
4014 AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
4015 kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4016 if test "x$kde_use_threading" = "xyes"; then
4017 AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4021 AC_DEFUN(KDE_TRY_LINK_PYTHON,
4023 if test "$kde_python_link_found" = no; then
4025 if test "$1" = normal; then
4026 AC_MSG_CHECKING(if a Python application links)
4028 AC_MSG_CHECKING(if Python depends on $2)
4031 AC_CACHE_VAL(kde_cv_try_link_python_$1,
4035 kde_save_cflags="$CFLAGS"
4036 CFLAGS="$CFLAGS $PYTHONINC"
4037 kde_save_libs="$LIBS"
4038 LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4039 kde_save_ldflags="$LDFLAGS"
4040 LDFLAGS="$LDFLAGS $PYTHONLIB"
4046 PySys_SetArgv(1, 0);
4048 [kde_cv_try_link_python_$1=yes],
4049 [kde_cv_try_link_python_$1=no]
4051 CFLAGS="$kde_save_cflags"
4052 LIBS="$kde_save_libs"
4053 LDFLAGS="$kde_save_ldflags"
4056 if test "$kde_cv_try_link_python_$1" = "yes"; then
4058 kde_python_link_found=yes
4059 if test ! "$1" = normal; then
4060 LIBPYTHON="$LIBPYTHON $2"
4073 AC_DEFUN(KDE_CHECK_PYTHON_DIR,
4075 AC_MSG_CHECKING([for Python directory])
4077 AC_CACHE_VAL(kde_cv_pythondir,
4079 if test -z "$PYTHONDIR"; then
4080 kde_cv_pythondir=/usr/local
4082 kde_cv_pythondir="$PYTHONDIR"
4086 AC_ARG_WITH(pythondir,
4087 [ --with-pythondir=pythondir use python installed in pythondir ],
4089 ac_python_dir=$withval
4090 ], ac_python_dir=$kde_cv_pythondir
4093 AC_MSG_RESULT($ac_python_dir)
4096 AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
4098 AC_REQUIRE([KDE_CHECK_LIBDL])
4099 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4100 AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4102 if test -z "$1"; then
4108 AC_MSG_CHECKING([for Python$version])
4110 python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4111 AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4112 if test ! -r $python_incdir/Python.h; then
4113 AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4114 python_incdir=$python_incdir/python$version
4115 if test ! -r $python_incdir/Python.h; then
4120 PYTHONINC=-I$python_incdir
4122 python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4123 AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4124 if test ! -r $python_libdir/libpython$version.a; then
4125 AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4126 python_libdir=$python_libdir/python$version/config
4127 if test ! -r $python_libdir/libpython$version.a; then
4132 PYTHONLIB=-L$python_libdir
4133 kde_orig_LIBPYTHON=$LIBPYTHON
4134 if test -z "$LIBPYTHON"; then
4135 LIBPYTHON=-lpython$version
4138 python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4139 AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4140 python_moddir=$python_moddir/python$version
4141 if test ! -r $python_moddir/copy.py; then
4145 PYTHONMODDIR=$python_moddir
4147 AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4149 if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4150 LIBPYTHON=$kde_orig_LIBPYTHON
4151 test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4152 test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4155 dnl Note: this test is very weak
4156 kde_python_link_found=no
4157 KDE_TRY_LINK_PYTHON(normal)
4158 KDE_TRY_LINK_PYTHON(m, -lm)
4159 KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4160 KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4161 KDE_TRY_LINK_PYTHON(db2, -ldb2)
4162 KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4163 KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4164 KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4165 KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4166 KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4167 KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4168 KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4169 [AC_MSG_WARN([it seems, Python depends on another library.
4170 Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4171 and contact the authors to let them know about this problem])
4174 LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4178 AC_SUBST(PYTHONMODDIR)
4179 AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4185 AC_DEFUN(KDE_CHECK_PYTHON,
4187 KDE_CHECK_PYTHON_INTERN("2.2",
4188 [KDE_CHECK_PYTHON_INTERN("2.1",
4189 [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
4193 AC_DEFUN(KDE_CHECK_STL_SGI,
4195 AC_MSG_CHECKING([if STL implementation is SGI like])
4196 AC_CACHE_VAL(kde_cv_stl_type_sgi,
4200 using namespace std;
4202 string astring="Hallo Welt.";
4203 astring.erase(0, 6); // now astring is "Welt"
4205 ], kde_cv_stl_type_sgi=yes,
4206 kde_cv_stl_type_sgi=no)
4209 AC_MSG_RESULT($kde_cv_stl_type_sgi)
4211 if test "$kde_cv_stl_type_sgi" = "yes"; then
4212 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4216 AC_DEFUN(KDE_CHECK_STL_HP,
4218 AC_MSG_CHECKING([if STL implementation is HP like])
4219 AC_CACHE_VAL(kde_cv_stl_type_hp,
4223 using namespace std;
4225 string astring="Hello World";
4226 astring.remove(0, 6); // now astring is "World"
4228 ], kde_cv_stl_type_hp=yes,
4229 kde_cv_stl_type_hp=no)
4231 AC_MSG_RESULT($kde_cv_stl_type_hp)
4233 if test "$kde_cv_stl_type_hp" = "yes"; then
4234 AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
4238 AC_DEFUN(KDE_CHECK_STL,
4242 ac_save_CXXFLAGS="$CXXFLAGS"
4243 CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4246 if test "$kde_cv_stl_type_sgi" = "no"; then
4249 if test "$kde_cv_stl_type_hp" = "no"; then
4250 AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
4254 CXXFLAGS="$ac_save_CXXFLAGS"
4258 AC_DEFUN(AC_FIND_QIMGIO,
4259 [AC_REQUIRE([AC_FIND_JPEG])
4260 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4261 AC_MSG_CHECKING([for qimgio])
4262 AC_CACHE_VAL(ac_cv_lib_qimgio,
4266 ac_save_LIBS="$LIBS"
4267 ac_save_CXXFLAGS="$CXXFLAGS"
4268 LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4269 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4272 #include <qimageio.h>
4273 #include <qstring.h>
4275 QString t = "hallo";
4280 ac_cv_lib_qimgio=yes,
4281 ac_cv_lib_qimgio=no,
4282 ac_cv_lib_qimgio=no)
4283 LIBS="$ac_save_LIBS"
4284 CXXFLAGS="$ac_save_CXXFLAGS"
4287 if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4288 LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4290 AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4293 AC_MSG_RESULT(not found)
4297 AC_DEFUN(KDE_CHECK_ANSI,
4301 AC_DEFUN(KDE_CHECK_INSURE,
4303 AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4305 if test $enableval = "no"; dnl
4306 then ac_use_insure="no"
4307 else ac_use_insure="yes"
4309 ], [ac_use_insure="no"])
4311 AC_MSG_CHECKING(if we will use Insure++ to debug)
4312 AC_MSG_RESULT($ac_use_insure)
4313 if test "$ac_use_insure" = "yes"; dnl
4314 then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4318 AC_DEFUN(AM_DISABLE_LIBRARIES,
4320 AC_PROVIDE([AM_ENABLE_STATIC])
4321 AC_PROVIDE([AM_ENABLE_SHARED])
4327 AC_DEFUN(AC_CHECK_UTMP_FILE,
4329 AC_MSG_CHECKING([for utmp file])
4331 AC_CACHE_VAL(kde_cv_utmp_file,
4342 if test -r "$ac_file"; then
4343 kde_cv_utmp_file=$ac_file
4349 if test "$kde_cv_utmp_file" != "no"; then
4350 AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4352 AC_MSG_RESULT($kde_cv_utmp_file)
4355 AC_MSG_RESULT([non found])
4360 AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4363 DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4365 if test ! -s $srcdir/subdirs; then
4366 dnl Note: Makefile.common creates subdirs, so this is just a fallback
4368 files=`cd $srcdir && ls -1`
4369 dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4371 echo $i >> $srcdir/subdirs
4375 if test -s $srcdir/inst-apps; then
4376 ac_topsubdirs="`cat $srcdir/inst-apps`"
4378 ac_topsubdirs="`cat $srcdir/subdirs`"
4381 for i in $ac_topsubdirs; do
4382 AC_MSG_CHECKING([if $i should be compiled])
4383 if test -d $srcdir/$i; then
4385 for j in $DO_NOT_COMPILE; do
4386 if test $i = $j; then
4393 AC_MSG_RESULT($install_it)
4394 vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4395 if test $install_it = "yes"; then
4396 TOPSUBDIRS="$TOPSUBDIRS $i"
4397 eval "$vari""_SUBDIR_included=yes"
4399 eval "$vari""_SUBDIR_included=no"
4403 AC_SUBST(TOPSUBDIRS)
4406 AC_DEFUN(KDE_CHECK_NAMESPACES,
4408 AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4422 int Foo::Bar::i = 1;
4425 AC_DEFINE(HAVE_NAMESPACES)
4432 AC_DEFUN(KDE_CHECK_NEWLIBS,
4437 dnl ------------------------------------------------------------------------
4438 dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4439 dnl ------------------------------------------------------------------------
4441 AC_DEFUN(AC_CHECK_S_ISSOCK,
4443 AC_MSG_CHECKING(for S_ISSOCK)
4444 AC_CACHE_VAL(ac_cv_have_s_issock,
4450 #include <sys/stat.h>
4454 int b = S_ISSOCK( buff.st_mode );
4456 ac_cv_have_s_issock=yes,
4457 ac_cv_have_s_issock=no)
4460 AC_MSG_RESULT($ac_cv_have_s_issock)
4461 if test "$ac_cv_have_s_issock" = "yes"; then
4462 AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4465 AH_VERBATIM(_ISSOCK,
4467 #ifndef HAVE_S_ISSOCK
4468 #define HAVE_S_ISSOCK
4469 #define S_ISSOCK(mode) (1==0)
4475 dnl ------------------------------------------------------------------------
4476 dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4477 dnl ------------------------------------------------------------------------
4479 AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4481 AC_MSG_CHECKING(for MAXPATHLEN)
4482 AC_CACHE_VAL(ac_cv_maxpathlen,
4485 cat > conftest.$ac_ext <<EOF
4487 # include <stdlib.h>
4490 #include <sys/param.h>
4492 #define MAXPATHLEN 1024
4495 KDE_HELLO MAXPATHLEN
4499 ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4501 if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4502 ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4504 ac_cv_maxpathlen=1024
4510 AC_MSG_RESULT($ac_cv_maxpathlen)
4511 AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4514 dnl -------------------------------------------------------------------------
4515 dnl See if the compiler supports a template repository bero@redhat.de
4516 dnl -------------------------------------------------------------------------
4517 AC_DEFUN(KDE_COMPILER_REPO,
4522 KDE_CHECK_COMPILER_FLAG(frepo,
4528 if test -z "$REPO"; then
4529 KDE_CHECK_COMPILER_FLAG(instances=explicit,
4531 REPO="-instances=explicit"
4532 NOREPO="-instances=extern"
4536 if test -n "$REPO"; then
4537 AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
4538 [C++ compiler supports template repository])
4546 AC_DEFUN(KDE_CHECK_HEADER,
4549 kde_safe_cppflags=$CPPFLAGS
4550 CPPFLAGS="$CPPFLAGS $all_includes"
4552 AC_CHECK_HEADER($1, $2, $3)
4553 CPPFLAGS=$kde_safe_cppflags
4557 AC_DEFUN(KDE_CHECK_HEADERS,
4559 AH_CHECK_HEADERS([$1])
4561 kde_safe_cppflags=$CPPFLAGS
4562 CPPFLAGS="$CPPFLAGS $all_includes"
4564 AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4565 CPPFLAGS=$kde_safe_cppflags
4569 AC_DEFUN(KDE_FAST_CONFIGURE,
4571 dnl makes configure fast (needs perl)
4572 AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4573 with_fast_perl=$enableval, with_fast_perl=yes)
4576 AC_DEFUN(KDE_CONF_FILES,
4579 if test -f $srcdir/configure.files ; then
4580 val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4583 if test -n "$val" ; then
4585 CONF_FILES="$CONF_FILES $i"
4588 AC_SUBST(CONF_FILES)
4591 AC_DEFUN(KDE_SET_PREFIX,
4594 dnl make $KDEDIR the default for the installation
4595 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4597 if test "x$prefix" = "xNONE"; then
4598 prefix=$ac_default_prefix
4599 ac_configure_args="$ac_configure_args --prefix=$prefix"
4601 # And delete superflous '/' to make compares easier
4602 prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4603 exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4608 pushdef([AC_PROG_INSTALL],
4610 dnl our own version, testing for a -p flag
4611 popdef([AC_PROG_INSTALL])
4612 dnl as AC_PROG_INSTALL works as it works we first have
4613 dnl to save if the user didn't specify INSTALL, as the
4614 dnl autoconf one overwrites INSTALL and we have no chance to find
4616 test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4617 test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4618 test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4621 if test -z "$kde_save_INSTALL_given" ; then
4622 # OK, user hasn't given any INSTALL, autoconf found one for us
4623 # now we test, if it supports the -p flag
4624 AC_MSG_CHECKING(for -p flag to install)
4625 rm -f confinst.$$.* > /dev/null 2>&1
4626 echo "Testtest" > confinst.$$.orig
4628 if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4629 if test -f confinst.$$.new ; then
4630 # OK, -p seems to do no harm to install
4631 INSTALL="${INSTALL} -p"
4636 AC_MSG_RESULT($ac_res)
4638 dnl the following tries to resolve some signs and wonders coming up
4639 dnl with different autoconf/automake versions
4641 dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4642 dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4643 dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4644 dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4645 dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4646 dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4647 dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4648 dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4649 dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4650 dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4651 dnl automake (due to broken Makefile.am or whatever) to install programs,
4652 dnl and so does not see the -s flag in automake > 1.4
4653 dnl to clean up that mess we:
4654 dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4655 dnl which cleans KDE's program with automake > 1.4;
4656 dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4657 dnl with automake<=1.4
4658 dnl note that dues to this sometimes two '-s' flags are used (if KDE
4659 dnl properly uses install-@DIR@PROGRAMS, but I don't care
4661 dnl And to all this comes, that I even can't write in comments variable
4662 dnl names used by automake, because it is so stupid to think I wanted to
4663 dnl _use_ them, therefor I have written A_M_... instead of AM_
4664 dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4666 if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4667 INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4669 if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4670 INSTALL_SCRIPT='${INSTALL}'
4674 AC_DEFUN(KDE_LANG_CPLUSPLUS,
4676 ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4677 pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4680 pushdef([AC_LANG_CPLUSPLUS],
4681 [popdef([AC_LANG_CPLUSPLUS])
4685 AC_DEFUN(KDE_CHECK_LONG_LONG,
4687 AC_MSG_CHECKING(for long long)
4688 AC_CACHE_VAL(kde_cv_c_long_long,
4696 kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4699 AC_MSG_RESULT($kde_cv_c_long_long)
4700 if test "$kde_cv_c_long_long" = yes; then
4701 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4705 AC_DEFUN(KDE_CHECK_LIB,
4707 kde_save_LDFLAGS="$LDFLAGS"
4708 dnl AC_CHECK_LIB modifies LIBS, so save it here
4709 kde_save_LIBS="$LIBS"
4710 LDFLAGS="$LDFLAGS $all_libraries"
4712 aix*) LDFLAGS="-brtl $LDFLAGS"
4713 test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4716 AC_CHECK_LIB($1, $2, $3, $4, $5)
4717 LDFLAGS="$kde_save_LDFLAGS"
4718 LIBS="$kde_save_LIBS"
4721 AC_DEFUN(KDE_JAVA_PREFIX,
4724 base=`basename "$1"`
4725 list=`ls -1 $dir 2> /dev/null`
4726 for entry in $list; do
4727 if test -d $dir/$entry/bin; then
4730 javadirs="$javadirs $dir/$entry/bin"
4733 elif test -d $dir/$entry/jre/bin; then
4736 javadirs="$javadirs $dir/$entry/jre/bin"
4743 dnl KDE_CHEC_JAVA_DIR(onlyjre)
4744 AC_DEFUN(KDE_CHECK_JAVA_DIR,
4748 [ --with-java=javadir use java installed in javadir, --without-java disables ],
4749 [ ac_java_dir=$withval
4753 AC_MSG_CHECKING([for Java])
4755 dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4756 if test "x$ac_java_dir" = "xno"; then
4758 kde_java_includedir=no
4759 kde_java_libjvmdir=no
4760 kde_java_libhpidir=no
4762 if test "x$ac_java_dir" = "x"; then
4765 dnl No option set -> look in $PATH
4766 KDE_JAVA_PREFIX(/usr/j2se)
4767 KDE_JAVA_PREFIX(/usr/j*dk*)
4768 KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4769 KDE_JAVA_PREFIX(/opt/j*sdk*)
4770 KDE_JAVA_PREFIX(/usr/lib/java*)
4771 KDE_JAVA_PREFIX(/usr/java*)
4772 KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4773 KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4774 KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4775 KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4776 KDE_JAVA_PREFIX(/opt/java*)
4781 for dir in $PATH; do
4782 javadirs="$javadirs $dir"
4787 for dir in $javadirs; do
4788 if test ! -d $dir; then break; fi
4789 if test -x "$dir/java"; then
4790 libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4791 if test ! -f $libjvmdir/libjvm.so; then continue; fi
4792 jredirs="$jredirs $dir"
4799 for dir in $jredirs; do
4801 kde_java_bindir=$dir
4802 if test -x "$dir/javac"; then
4808 if test -n "$JAVAC"; then
4809 dnl this substitution might not work - well, we test for jni.h below
4810 kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4812 kde_java_includedir=no
4815 dnl config option set
4816 kde_java_bindir=$ac_java_dir/bin
4817 if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4818 kde_java_includedir=no
4820 kde_java_includedir=$ac_java_dir/include
4825 dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4826 if test "x$kde_java_bindir" != "xno"; then
4828 dnl Look for libjvm.so
4829 kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4830 dnl Look for libhpi.so and avoid green threads
4831 kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4833 dnl Now check everything's fine under there
4834 dnl the include dir is our flag for having the JDK
4835 if test -d "$kde_java_includedir"; then
4836 if test ! -x "$kde_java_bindir/javac"; then
4837 AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4839 if test ! -x "$kde_java_bindir/javah"; then
4840 AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4842 if test ! -x "$kde_java_bindir/jar"; then
4843 AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4845 if test ! -r "$kde_java_includedir/jni.h"; then
4846 AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4849 jni_includes="-I$kde_java_includedir"
4850 dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4851 dnl and under linux here..
4852 test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4853 test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4854 test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4861 if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4862 AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4865 if test ! -x "$kde_java_bindir/java"; then
4866 AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4869 if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4870 AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4873 if test -n "$jni_includes"; then
4874 dnl Check for JNI version
4877 ac_cxxflags_safe="$CXXFLAGS"
4878 CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4884 #ifndef JNI_VERSION_1_2
4887 ],[ kde_jni_works=yes ],
4888 [ kde_jni_works=no ])
4890 if test $kde_jni_works = no; then
4891 AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4892 You need to have Java Development Kit (JDK) version 1.2.
4894 Use --with-java to specify another location.
4895 Use --without-java to configure without java support.
4896 Or download a newer JDK and try again.
4897 See e.g. http://java.sun.com/products/jdk/1.2 ])
4900 CXXFLAGS="$ac_cxxflags_safe"
4903 dnl All tests ok, inform and subst the variables
4905 JAVAC=$kde_java_bindir/javac
4906 JAVAH=$kde_java_bindir/javah
4907 JAR=$kde_java_bindir/jar
4908 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4909 JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4910 AC_MSG_RESULT([java JDK in $kde_java_bindir])
4913 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4914 AC_MSG_RESULT([java JRE in $kde_java_bindir])
4917 AC_MSG_RESULT([none found])
4924 AC_SUBST(jni_includes)
4926 # for backward compat
4927 kde_cv_java_includedir=$kde_java_includedir
4928 kde_cv_java_bindir=$kde_java_bindir
4931 dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4932 dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4933 dnl big packages, m4_foreach is dog-slow. So use our own version of
4934 dnl it. (matz@kde.org)
4935 m4_define([mm_foreach],
4936 [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4937 m4_define([mm_car], [[$1]])
4938 m4_define([mm_car2], [[$@]])
4939 m4_define([_mm_foreach],
4940 [m4_if(m4_quote($2), [], [],
4941 [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
4942 mm_car2(m4_shift($2)),
4944 m4_define([AC_FOREACH],
4945 [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4947 AC_DEFUN(KDE_NEED_FLEX,
4950 LIBS="$LIBS $USER_LDFLAGS"
4953 if test -z "$LEXLIB"; then
4954 AC_MSG_ERROR([You need to have flex installed.])
4959 AC_DEFUN(AC_PATH_QTOPIA,
4961 dnl TODO: use AC_CACHE_VAL
4963 if test -z "$1"; then
4968 qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4969 qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4970 qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4973 qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4974 qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4976 AC_REQUIRE([AC_PATH_QT])
4978 AC_MSG_CHECKING([for Qtopia])
4981 AC_SUBST(LIB_QTOPIA)
4983 kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4987 AC_ARG_WITH(qtopia-dir,
4988 [ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
4989 [ ac_qtopia_incdir="$withval"/include] )
4992 for dir in $kde_qtopia_dirs; do
4993 qtopia_incdirs="$qtopia_incdirs $dir/include"
4996 if test ! "$ac_qtopia_incdir" = "NO"; then
4997 qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5001 AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5002 ac_qtopia_incdir="$qtopia_incdir"
5004 if test -z "$qtopia_incdir"; then
5005 AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5008 qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5009 qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5010 qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5012 qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5013 qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5014 if test "$qtopia_ver" -lt "$qtopia_minver"; then
5015 AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5022 ac_cxxflags_safe="$CXXFLAGS"
5023 ac_ldflags_safe="$LDFLAGS"
5024 ac_libs_safe="$LIBS"
5026 CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5027 LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5028 LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5030 cat > conftest.$ac_ext <<EOF
5031 #include "confdefs.h"
5032 #include <qpe/qpeapplication.h>
5033 #include <qpe/version.h>
5035 int main( int argc, char **argv )
5037 QPEApplication app( argc, argv );
5042 if AC_TRY_EVAL(ac_link) && test -s conftest; then
5046 AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5047 the end of config.log])
5050 CXXFLAGS="$ac_cxxflags_safe"
5051 LDFLAGS="$ac_ldflags_safe"
5052 LIBS="$ac_libs_safe"
5056 QTOPIA_INCLUDES="-I$qtopia_incdir"
5057 AC_SUBST(QTOPIA_INCLUDES)
5059 AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5063 AC_DEFUN(KDE_INIT_DOXYGEN,
5065 AC_MSG_CHECKING([for Qt docs])
5067 if test "${with_qt_dir+set}" = set; then
5068 kde_qtdir="$with_qt_dir"
5071 AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc], QTDOCDIR)
5072 AC_MSG_RESULT($QTDOCDIR)
5076 KDE_FIND_PATH(dot, DOT, [], [])
5077 if test -n "$DOT"; then
5082 AC_SUBST(KDE_HAVE_DOT)
5083 KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5086 DOXYGEN_PROJECT_NAME="$1"
5087 DOXYGEN_PROJECT_NUMBER="$2"
5088 AC_SUBST(DOXYGEN_PROJECT_NAME)
5089 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5092 if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5095 AC_SUBST(KDE_HAS_DOXYGEN)
5100 AC_DEFUN(AC_FIND_BZIP2,
5102 AC_MSG_CHECKING([for bzDecompress in libbz2])
5103 AC_CACHE_VAL(ac_cv_lib_bzip2,
5106 kde_save_LIBS="$LIBS"
5107 LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5108 kde_save_CFLAGS="$CFLAGS"
5109 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5115 [ bz_stream s; (void) bzDecompress(&s); ],
5116 eval "ac_cv_lib_bzip2='-lbz2'",
5117 eval "ac_cv_lib_bzip2=no")
5118 LIBS="$kde_save_LIBS"
5119 CFLAGS="$kde_save_CFLAGS"
5121 AC_MSG_RESULT($ac_cv_lib_bzip2)
5123 if test ! "$ac_cv_lib_bzip2" = no; then
5126 LIBBZ2="$ac_cv_lib_bzip2"
5132 KDE_CHECK_COMPILER_FLAG(shared, [
5133 cxx_shared_flag="-shared"
5136 AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5137 AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5140 kde_save_LIBS="$LIBS"
5141 LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET"
5142 kde_save_CFLAGS="$CFLAGS"
5143 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5150 [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5151 eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5152 eval "ac_cv_lib_bzip2_prefix=no")
5153 LIBS="$kde_save_LIBS"
5154 CFLAGS="$kde_save_CFLAGS"
5157 AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5161 if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5164 LIBBZ2="$ac_cv_lib_bzip2_prefix"
5167 AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5168 dnl else, we just ignore this
5172 AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5175 dnl ------------------------------------------------------------------------
5176 dnl Try to find the SSL headers and libraries.
5177 dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5178 dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5179 dnl ------------------------------------------------------------------------
5181 AC_DEFUN(KDE_CHECK_SSL,
5183 LIBSSL="-lssl -lcrypto"
5184 AC_REQUIRE([KDE_CHECK_LIB64])
5186 ac_ssl_includes=NO ac_ssl_libraries=NO
5189 AC_ARG_WITH(ssl-dir,
5190 [ --with-ssl-dir=DIR where the root of OpenSSL is installed],
5191 [ ac_ssl_includes="$withval"/include
5192 ac_ssl_libraries="$withval"/lib$kdelibsuff
5197 [ --without-ssl disable SSL checks],
5198 [want_ssl=$withval])
5200 if test $want_ssl = yes; then
5202 AC_MSG_CHECKING(for OpenSSL)
5204 AC_CACHE_VAL(ac_cv_have_ssl,
5205 [#try to guess OpenSSL locations
5207 ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5208 ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5209 AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5210 ac_ssl_includes="$ssl_incdir"
5212 ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
5213 if test ! "$ac_ssl_libraries" = "NO"; then
5214 ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5219 for dir in $ssl_libdirs; do
5220 try="ls -1 $dir/libssl*"
5221 if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5224 ac_ssl_libraries="$ssl_libdir"
5229 ac_cflags_safe="$CFLAGS"
5230 ac_ldflags_safe="$LDFLAGS"
5231 ac_libs_safe="$LIBS"
5233 CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
5234 LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5235 LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5237 AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5243 CFLAGS="$ac_cflags_safe"
5244 LDFLAGS="$ac_ldflags_safe"
5245 LIBS="$ac_libs_safe"
5249 if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5257 eval "$ac_cv_have_ssl"
5259 AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5261 AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5262 AC_MSG_RESULT($ac_ssl_rsaref)
5264 AC_MSG_CHECKING([for easter eggs])
5265 AC_MSG_RESULT([none found])
5271 if test "$have_ssl" = yes; then
5272 AC_MSG_CHECKING(for OpenSSL version)
5273 dnl Check for SSL version
5274 AC_CACHE_VAL(ac_cv_ssl_version,
5279 cat >conftest.$ac_ext <<EOF
5280 #include <openssl/opensslv.h>
5284 #ifndef OPENSSL_VERSION_NUMBER
5285 printf("ssl_version=\\"error\\"\n");
5287 if (OPENSSL_VERSION_NUMBER < 0x00906000)
5288 printf("ssl_version=\\"old\\"\n");
5290 printf("ssl_version=\\"ok\\"\n");
5296 ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
5297 if AC_TRY_EVAL(ac_compile); then
5299 if eval `./conftest 2>&5`; then
5300 if test $ssl_version = error; then
5301 AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5303 if test $ssl_version = old; then
5304 AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5308 ac_cv_ssl_version="ssl_version=$ssl_version"
5310 AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5311 Check config.log, and if you can't figure it out, send a mail to
5312 David Faure <faure@kde.org>, attaching your config.log])
5316 AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5317 Check config.log, and if you can't figure it out, send a mail to
5318 David Faure <faure@kde.org>, attaching your config.log])
5325 eval "$ac_cv_ssl_version"
5326 AC_MSG_RESULT($ssl_version)
5329 if test "$have_ssl" != yes; then
5332 AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5333 ac_cv_have_ssl="have_ssl=yes \
5334 ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5337 ssl_libraries="$ac_ssl_libraries"
5338 ssl_includes="$ac_ssl_includes"
5340 if test "$ac_ssl_rsaref" = yes; then
5341 LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5344 if test $ssl_version = "old"; then
5345 AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5349 if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
5352 SSL_INCLUDES="-I$ssl_includes"
5355 if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
5358 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5361 AC_SUBST(SSL_INCLUDES)
5362 AC_SUBST(SSL_LDFLAGS)
5366 AC_DEFUN(KDE_CHECK_STRLCPY,
5370 AC_CHECK_SIZEOF(size_t)
5371 AC_CHECK_SIZEOF(unsigned long)
5373 AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
5375 #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5378 ],[AC_MSG_RESULT([yes])],[
5381 Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
5382 does not apply. Please mail kde-devel@kde.org with a description of your system!
5387 AC_DEFUN(AC_CHECK_C_COMPILER,
5389 AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
5391 if test $enableval = "no"; dnl
5393 kde_use_debug_code="no"
5394 kde_use_debug_define=yes
5396 kde_use_debug_code="yes"
5397 kde_use_debug_define=no
5400 [kde_use_debug_code="no"
5401 kde_use_debug_define=no
5404 dnl Just for configure --help
5405 AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
5407 AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
5409 if test $enableval = "no"; then
5410 kde_use_strict_options="no"
5412 kde_use_strict_options="yes"
5414 ], [kde_use_strict_options="no"])
5416 AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
5417 [kde_use_profiling=$enableval],
5418 [kde_use_profiling="no"]
5421 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
5426 if test "$GCC" = "yes"; then
5427 if test "$kde_use_debug_code" = "yes"; then
5428 CFLAGS="-g -O2 $CFLAGS"
5431 CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
5435 CFLAGS="-O2 $CFLAGS"
5439 if test "$kde_use_debug_define" = "yes"; then
5440 CFLAGS="-DNDEBUG $CFLAGS"
5444 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
5445 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
5448 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
5452 if test "$kde_use_profiling" = "yes"; then
5453 KDE_CHECK_COMPILER_FLAG(pg,
5455 CFLAGS="-pg $CFLAGS"
5460 AC_SUBST(USE_EXCEPTIONS)
5461 dnl obsolete macro - provided to keep things going
5467 # the following is to allow programs, that are known to
5468 # have problems when compiled with -O2
5469 if test -n "$CFLAGS"; then
5473 for i in $CFLAGS; do
5478 NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
5485 AC_SUBST(NOOPT_CFLAGS)
5489 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), [])
5492 AC_SUBST(KDE_CXXFLAGS)
5495 AC_DEFUN(KDEV_ADD_DEPENDENCIES,
5497 [A]M_DEPENDENCIES(CC)
5501 dnl just a wrapper to clean up configure.in only for c projects
5502 AC_DEFUN(KDEV_PROG_LIBTOOL,
5504 AC_REQUIRE([AC_CHECK_C_COMPILER])
5505 AC_REQUIRE([AC_ENABLE_SHARED])
5506 AC_REQUIRE([AC_ENABLE_STATIC])
5508 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
5519 LIBTOOL_SHELL="/bin/sh ./libtool"
5520 # LIBTOOL="$LIBTOOL --silent"
5523 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5525 # serial 47 AC_PROG_LIBTOOL
5529 AC_DEFUN([AC_PROG_LIBTOOL],
5530 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5531 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5532 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5533 AC_PROVIDE_IFELSE([AC_PROG_CXX],
5535 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5538 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5539 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5540 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5541 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5543 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5545 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5547 [ifdef([AC_PROG_GCJ],
5548 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5549 ifdef([A][M_PROG_GCJ],
5550 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5551 ifdef([LT_AC_PROG_GCJ],
5552 [define([LT_AC_PROG_GCJ],
5553 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5554 ])])# AC_PROG_LIBTOOL
5559 AC_DEFUN([_AC_PROG_LIBTOOL],
5560 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5561 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5562 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5564 # This can be used to rebuild libtool when needed
5565 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5567 # Always use our own libtool.
5568 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5569 AC_SUBST(LIBTOOL)dnl
5571 # Prevent multiple expansion
5572 define([AC_PROG_LIBTOOL], [])
5573 ])# _AC_PROG_LIBTOOL
5578 AC_DEFUN([AC_LIBTOOL_SETUP],
5580 AC_REQUIRE([AC_ENABLE_SHARED])dnl
5581 AC_REQUIRE([AC_ENABLE_STATIC])dnl
5582 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5583 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5584 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5585 AC_REQUIRE([AC_PROG_CC])dnl
5586 AC_REQUIRE([AC_PROG_LD])dnl
5587 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5588 AC_REQUIRE([AC_PROG_NM])dnl
5589 AC_REQUIRE([LT_AC_PROG_SED])dnl
5591 AC_REQUIRE([AC_PROG_LN_S])dnl
5592 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5593 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5594 AC_REQUIRE([AC_OBJEXT])dnl
5595 AC_REQUIRE([AC_EXEEXT])dnl
5598 AC_LIBTOOL_SYS_MAX_CMD_LEN
5599 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5602 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5603 _LT_AC_PROG_ECHO_BACKSLASH
5607 # AIX sometimes has problems with the GCC collect2 program. For some
5608 # reason, if we set the COLLECT_NAMES environment variable, the problems
5609 # vanish in a puff of smoke.
5610 if test "X${COLLECT_NAMES+set}" != Xset; then
5612 export COLLECT_NAMES
5617 # Sed substitution that helps us do robust quoting. It backslashifies
5618 # metacharacters that are still active within double-quoted strings.
5619 Xsed='sed -e s/^X//'
5620 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5622 # Same as above, but do not quote variable references.
5623 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5625 # Sed substitution to delay expansion of an escaped shell variable in a
5626 # double_quote_subst'ed string.
5627 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5629 # Sed substitution to avoid accidental globbing in evaled expressions
5630 no_glob_subst='s/\*/\\\*/g'
5636 default_ofile=libtool
5637 can_build_shared=yes
5639 # All known linkers require a `.a' archive for static linking (except M$VC,
5640 # which needs '.lib').
5642 ltmain="$ac_aux_dir/ltmain.sh"
5643 ofile="$default_ofile"
5644 with_gnu_ld="$lt_cv_prog_gnu_ld"
5646 AC_CHECK_TOOL(RANLIB, ranlib, :)
5647 AC_CHECK_TOOL(STRIP, strip, :)
5650 old_CFLAGS="$CFLAGS"
5652 # Set sane defaults for various variables
5653 test -z "$AR" && AR=ar
5654 test -z "$AR_FLAGS" && AR_FLAGS=cru
5655 test -z "$AS" && AS=as
5656 test -z "$CC" && CC=cc
5657 test -z "$LTCC" && LTCC=$CC
5658 test -z "$DLLTOOL" && DLLTOOL=dlltool
5659 test -z "$LD" && LD=ld
5660 test -z "$LN_S" && LN_S="ln -s"
5661 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5662 test -z "$NM" && NM=nm
5663 test -z "$SED" && SED=sed
5664 test -z "$OBJDUMP" && OBJDUMP=objdump
5665 test -z "$RANLIB" && RANLIB=:
5666 test -z "$STRIP" && STRIP=:
5667 test -z "$ac_objext" && ac_objext=o
5669 # Determine commands to create old-style static archives.
5670 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5671 old_postinstall_cmds='chmod 644 $oldlib'
5672 old_postuninstall_cmds=
5674 if test -n "$RANLIB"; then
5677 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5680 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5683 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5686 # Only perform the check for file, if the check method requires it
5687 case $deplibs_check_method in
5689 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5695 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5696 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5697 enable_win32_dll=yes, enable_win32_dll=no)
5699 AC_ARG_ENABLE([libtool-lock],
5700 [AC_HELP_STRING([--disable-libtool-lock],
5701 [avoid locking (might break parallel builds)])])
5702 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5705 [AC_HELP_STRING([--with-pic],
5706 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5707 [pic_mode="$withval"],
5709 test -z "$pic_mode" && pic_mode=default
5711 # Use C for the default configuration in the libtool script
5713 AC_LIBTOOL_LANG_C_CONFIG
5715 ])# AC_LIBTOOL_SETUP
5718 # _LT_AC_SYS_COMPILER
5719 # -------------------
5720 AC_DEFUN([_LT_AC_SYS_COMPILER],
5721 [AC_REQUIRE([AC_PROG_CC])dnl
5723 # If no C compiler was specified, use CC.
5726 # Allow CC to be a program name with arguments.
5729 ])# _LT_AC_SYS_COMPILER
5732 # _LT_AC_SYS_LIBPATH_AIX
5733 # ----------------------
5734 # Links a minimal program and checks the executable
5735 # for the system default hardcoded library path. In most cases,
5736 # this is /usr/lib:/lib, but when the MPI compilers are used
5737 # the location of the communication and MPI libs are included too.
5738 # If we don't find anything, use the default library path according
5739 # to the aix ld manual.
5740 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5741 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5742 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5744 # Check for a 64-bit object if we didn't find anything.
5745 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5747 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5748 ])# _LT_AC_SYS_LIBPATH_AIX
5751 # _LT_AC_PROG_ECHO_BACKSLASH
5752 # --------------------------
5753 # Add some code to the start of the generated configure script which
5754 # will find an echo command which doesn't interpret backslashes.
5755 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5756 [ifdef([AC_DIVERSION_NOTICE],
5757 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5758 [AC_DIVERT_PUSH(NOTICE)])
5760 # Check that we are running under the correct shell.
5761 SHELL=${CONFIG_SHELL-/bin/sh}
5765 # Remove one level of quotation (which was required for Make).
5766 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5771 if test "X[$]1" = X--no-reexec; then
5772 # Discard the --no-reexec flag, and continue.
5774 elif test "X[$]1" = X--fallback-echo; then
5775 # Avoid inline document here, it may be left over
5777 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5778 # Yippee, $echo works!
5781 # Restart under the correct shell.
5782 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5785 if test "X[$]1" = X--fallback-echo; then
5786 # used as fallback echo
5794 # The HP-UX ksh and POSIX shell print the target directory to stdout
5796 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5798 if test -z "$ECHO"; then
5799 if test "X${echo_test_string+set}" != Xset; then
5800 # find a string as large as possible, as long as the shell can cope with it
5801 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5802 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5803 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5804 echo_test_string="`eval $cmd`" &&
5805 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5812 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5813 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5814 test "X$echo_testing_string" = "X$echo_test_string"; then
5817 # The Solaris, AIX, and Digital Unix default echo programs unquote
5818 # backslashes. This makes it impossible to quote backslashes using
5819 # echo "$something" | sed 's/\\/\\\\/g'
5821 # So, first we look for a working echo in the user's PATH.
5823 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5824 for dir in $PATH /usr/ucb; do
5826 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5827 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5828 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5829 test "X$echo_testing_string" = "X$echo_test_string"; then
5836 if test "X$echo" = Xecho; then
5837 # We didn't find a better echo, so look for alternatives.
5838 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5839 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5840 test "X$echo_testing_string" = "X$echo_test_string"; then
5841 # This shell has a builtin print -r that does the trick.
5843 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5844 test "X$CONFIG_SHELL" != X/bin/ksh; then
5845 # If we have ksh, try running configure again with it.
5846 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5847 export ORIGINAL_CONFIG_SHELL
5848 CONFIG_SHELL=/bin/ksh
5850 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5854 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5855 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5856 test "X$echo_testing_string" = "X$echo_test_string"; then
5857 # Cool, printf works
5859 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5860 test "X$echo_testing_string" = 'X\t' &&
5861 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5862 test "X$echo_testing_string" = "X$echo_test_string"; then
5863 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5865 SHELL="$CONFIG_SHELL"
5867 echo="$CONFIG_SHELL [$]0 --fallback-echo"
5868 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5869 test "X$echo_testing_string" = 'X\t' &&
5870 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5871 test "X$echo_testing_string" = "X$echo_test_string"; then
5872 echo="$CONFIG_SHELL [$]0 --fallback-echo"
5874 # maybe with a smaller string...
5877 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5878 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5885 if test "$prev" != 'sed 50q "[$]0"'; then
5886 echo_test_string=`eval $prev`
5887 export echo_test_string
5888 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5890 # Oops. We lost completely, so just stick with echo.
5899 # Copy echo and quote the copy suitably for passing to libtool from
5900 # the Makefile, instead of quoting the original, which is used later.
5902 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5903 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5908 ])# _LT_AC_PROG_ECHO_BACKSLASH
5913 AC_DEFUN([_LT_AC_LOCK],
5914 [AC_ARG_ENABLE([libtool-lock],
5915 [AC_HELP_STRING([--disable-libtool-lock],
5916 [avoid locking (might break parallel builds)])])
5917 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5919 # Some flags need to be propagated to the compiler or linker for good
5923 # Find out which ABI we are using.
5924 echo 'int i;' > conftest.$ac_ext
5925 if AC_TRY_EVAL(ac_compile); then
5926 case `/usr/bin/file conftest.$ac_objext` in
5938 # Find out which ABI we are using.
5939 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5940 if AC_TRY_EVAL(ac_compile); then
5941 case `/usr/bin/file conftest.$ac_objext` in
5957 # Test if the compiler is 64bit
5958 echo 'int i;' > conftest.$ac_ext
5959 if AC_TRY_EVAL(ac_compile); then
5960 case `/usr/bin/file conftest.$ac_objext` in
5973 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5974 SAVE_CFLAGS="$CFLAGS"
5975 CFLAGS="$CFLAGS -belf"
5976 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5978 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5980 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5981 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5982 CFLAGS="$SAVE_CFLAGS"
5985 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5986 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5987 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5988 AC_CHECK_TOOL(AS, as, false)
5989 AC_CHECK_TOOL(OBJDUMP, objdump, false)
5991 # recent cygwin and mingw systems supply a stub DllMain which the user
5992 # can override, but on older systems we have to supply one
5993 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5995 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5996 DllMain (0, 0, 0);],
5997 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
6000 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
6001 # old mingw systems require "-dll" to link a DLL, while more recent ones
6003 SAVE_CFLAGS="$CFLAGS"
6004 CFLAGS="$CFLAGS -mdll"
6005 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
6006 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
6007 CFLAGS="$SAVE_CFLAGS" ;;
6008 *-*-cygwin* | *-*-pw32*)
6009 # cygwin systems need to pass --dll to the linker, and not link
6010 # crt.o which will require a WinMain@16 definition.
6011 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
6017 need_locks="$enable_libtool_lock"
6022 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6023 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6024 # ----------------------------------------------------------------
6025 # Check whether the given compiler option works
6026 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6027 [AC_CACHE_CHECK([$1], [$2],
6029 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6030 save_CFLAGS="$CFLAGS"
6032 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6033 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
6034 # The compiler can only warn and ignore the option if not recognized
6035 # So say no if there are warnings
6036 if test -s conftest.err; then
6037 # Append any errors to the config.log.
6038 cat conftest.err 1>&AS_MESSAGE_LOG_FD
6044 CFLAGS="$save_CFLAGS"
6047 if test x"[$]$2" = xyes; then
6048 ifelse([$5], , :, [$5])
6050 ifelse([$6], , :, [$6])
6052 ])# AC_LIBTOOL_COMPILER_OPTION
6055 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6056 # [ACTION-SUCCESS], [ACTION-FAILURE])
6057 # ------------------------------------------------------------
6058 # Check whether the given compiler option works
6059 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6060 [AC_CACHE_CHECK([$1], [$2],
6062 save_LDFLAGS="$LDFLAGS"
6063 LDFLAGS="$LDFLAGS $3"
6064 echo "$lt_simple_link_test_code" > conftest.$ac_ext
6065 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6066 # The compiler can only warn and ignore the option if not recognized
6067 # So say no if there are warnings
6068 if test -s conftest.err; then
6069 # Append any errors to the config.log.
6070 cat conftest.err 1>&AS_MESSAGE_LOG_FD
6076 LDFLAGS="$save_LDFLAGS"
6079 if test x"[$]$2" = xyes; then
6080 ifelse([$4], , :, [$4])
6082 ifelse([$5], , :, [$5])
6084 ])# AC_LIBTOOL_LINKER_OPTION
6087 # AC_LIBTOOL_SYS_MAX_CMD_LEN
6088 # --------------------------
6089 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6090 [# find the maximum length of command line arguments
6091 AC_MSG_CHECKING([the maximum length of command line arguments])
6092 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6098 # On DJGPP, this test can blow up pretty badly due to problems in libc
6099 # (any single argument exceeding 2000 bytes causes a buffer overrun
6100 # during glob expansion). Even if it were fixed, the result of this
6101 # check would be larger than it should be.
6102 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6106 # Under GNU Hurd, this test is not required because there is
6107 # no limit to the length of command line arguments.
6108 # Libtool will interpret -1 as no limit whatsoever
6109 lt_cv_sys_max_cmd_len=-1;
6113 # If test is not a shell built-in, we'll probably end up computing a
6114 # maximum length that is only half of the actual maximum length, but
6116 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6117 = "XX$testring") >/dev/null 2>&1 &&
6118 new_result=`expr "X$testring" : ".*" 2>&1` &&
6119 lt_cv_sys_max_cmd_len=$new_result &&
6120 test $i != 17 # 1/2 MB should be enough
6123 testring=$testring$testring
6126 # Add a significant safety factor because C++ compilers can tack on massive
6127 # amounts of additional arguments before passing them to the linker.
6128 # It appears as though 1/2 is a usable value.
6129 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6133 if test -n $lt_cv_sys_max_cmd_len ; then
6134 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6138 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6141 # _LT_AC_CHECK_DLFCN
6142 # --------------------
6143 AC_DEFUN([_LT_AC_CHECK_DLFCN],
6144 [AC_CHECK_HEADERS(dlfcn.h)dnl
6145 ])# _LT_AC_CHECK_DLFCN
6148 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6149 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6150 # ------------------------------------------------------------------
6151 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6152 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6153 if test "$cross_compiling" = yes; then :
6156 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6157 lt_status=$lt_dlunknown
6158 cat > conftest.$ac_ext <<EOF
6159 [#line __oline__ "configure"
6160 #include "confdefs.h"
6169 # define LT_DLGLOBAL RTLD_GLOBAL
6172 # define LT_DLGLOBAL DL_GLOBAL
6174 # define LT_DLGLOBAL 0
6178 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6179 find out it does not work in some platform. */
6180 #ifndef LT_DLLAZY_OR_NOW
6182 # define LT_DLLAZY_OR_NOW RTLD_LAZY
6185 # define LT_DLLAZY_OR_NOW DL_LAZY
6188 # define LT_DLLAZY_OR_NOW RTLD_NOW
6191 # define LT_DLLAZY_OR_NOW DL_NOW
6193 # define LT_DLLAZY_OR_NOW 0
6201 extern "C" void exit (int);
6204 void fnord() { int i=42;}
6207 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6208 int status = $lt_dlunknown;
6212 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6213 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6214 /* dlclose (self); */
6220 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6221 (./conftest; exit; ) 2>/dev/null
6224 x$lt_dlno_uscore) $1 ;;
6225 x$lt_dlneed_uscore) $2 ;;
6226 x$lt_unknown|x*) $3 ;;
6229 # compilation failed
6234 ])# _LT_AC_TRY_DLOPEN_SELF
6237 # AC_LIBTOOL_DLOPEN_SELF
6238 # -------------------
6239 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6240 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6241 if test "x$enable_dlopen" != xyes; then
6242 enable_dlopen=unknown
6243 enable_dlopen_self=unknown
6244 enable_dlopen_self_static=unknown
6251 lt_cv_dlopen="load_add_on"
6253 lt_cv_dlopen_self=yes
6256 cygwin* | mingw* | pw32*)
6257 lt_cv_dlopen="LoadLibrary"
6262 AC_CHECK_FUNC([shl_load],
6263 [lt_cv_dlopen="shl_load"],
6264 [AC_CHECK_LIB([dld], [shl_load],
6265 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6266 [AC_CHECK_FUNC([dlopen],
6267 [lt_cv_dlopen="dlopen"],
6268 [AC_CHECK_LIB([dl], [dlopen],
6269 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6270 [AC_CHECK_LIB([svld], [dlopen],
6271 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6272 [AC_CHECK_LIB([dld], [dld_link],
6273 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6282 if test "x$lt_cv_dlopen" != xno; then
6288 case $lt_cv_dlopen in
6290 save_CPPFLAGS="$CPPFLAGS"
6291 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6293 save_LDFLAGS="$LDFLAGS"
6294 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6297 LIBS="$lt_cv_dlopen_libs $LIBS"
6299 AC_CACHE_CHECK([whether a program can dlopen itself],
6300 lt_cv_dlopen_self, [dnl
6301 _LT_AC_TRY_DLOPEN_SELF(
6302 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6303 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6306 if test "x$lt_cv_dlopen_self" = xyes; then
6307 LDFLAGS="$LDFLAGS $link_static_flag"
6308 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6309 lt_cv_dlopen_self_static, [dnl
6310 _LT_AC_TRY_DLOPEN_SELF(
6311 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6312 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6316 CPPFLAGS="$save_CPPFLAGS"
6317 LDFLAGS="$save_LDFLAGS"
6322 case $lt_cv_dlopen_self in
6323 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6324 *) enable_dlopen_self=unknown ;;
6327 case $lt_cv_dlopen_self_static in
6328 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6329 *) enable_dlopen_self_static=unknown ;;
6332 ])# AC_LIBTOOL_DLOPEN_SELF
6335 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6336 # ---------------------------------
6337 # Check to see if options -c and -o are simultaneously supported by compiler
6338 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6339 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6340 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6341 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6342 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6343 $rm -r conftest 2>/dev/null
6347 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
6348 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
6349 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
6350 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
6351 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
6352 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
6353 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6355 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6356 # that will create temporary files in the current directory regardless of
6357 # the output directory. Thus, making CWD read-only will cause this test
6358 # to fail, enabling locking or at least warning the user not to do parallel
6362 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
6364 # The compiler can only warn and ignore the option if not recognized
6365 # So say no if there are warnings
6366 if test -s out/conftest.err; then
6367 # Append any errors to the config.log.
6368 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
6370 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6373 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
6374 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
6375 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
6383 ])# AC_LIBTOOL_PROG_CC_C_O
6386 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6387 # -----------------------------------------
6388 # Check to see if we can do hard links to lock some files if needed
6389 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6390 [AC_REQUIRE([_LT_AC_LOCK])dnl
6392 hard_links="nottested"
6393 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6394 # do not overwrite the value of need_locks provided by the user
6395 AC_MSG_CHECKING([if we can lock with hard links])
6398 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6400 ln conftest.a conftest.b 2>&5 || hard_links=no
6401 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6402 AC_MSG_RESULT([$hard_links])
6403 if test "$hard_links" = no; then
6404 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6410 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6415 AC_DEFUN([AC_LIBTOOL_OBJDIR],
6416 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6417 [rm -f .libs 2>/dev/null
6418 mkdir .libs 2>/dev/null
6419 if test -d .libs; then
6422 # MS-DOS does not allow filenames that begin with a dot.
6425 rmdir .libs 2>/dev/null])
6426 objdir=$lt_cv_objdir
6427 ])# AC_LIBTOOL_OBJDIR
6430 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6431 # ----------------------------------------------
6432 # Check hardcoding attributes.
6433 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6434 [AC_MSG_CHECKING([how to hardcode library paths into programs])
6435 _LT_AC_TAGVAR(hardcode_action, $1)=
6436 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6437 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6439 # We can hardcode non-existant directories.
6440 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6441 # If the only mechanism to avoid hardcoding is shlibpath_var, we
6442 # have to relink, otherwise we might link with an installed library
6443 # when we should be linking with a yet-to-be-installed one
6444 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6445 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6446 # Linking always hardcodes the temporary library directory.
6447 _LT_AC_TAGVAR(hardcode_action, $1)=relink
6449 # We can link without hardcoding, and we can hardcode nonexisting dirs.
6450 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6453 # We cannot hardcode anything, or else we can only hardcode existing
6455 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6457 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6459 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6460 # Fast installation is not supported
6461 enable_fast_install=no
6462 elif test "$shlibpath_overrides_runpath" = yes ||
6463 test "$enable_shared" = no; then
6464 # Fast installation is not necessary
6465 enable_fast_install=needless
6467 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6470 # AC_LIBTOOL_SYS_LIB_STRIP
6471 # ------------------------
6472 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6475 AC_MSG_CHECKING([whether stripping libraries is possible])
6476 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6477 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6478 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6479 AC_MSG_RESULT([yes])
6483 ])# AC_LIBTOOL_SYS_LIB_STRIP
6486 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
6487 # -----------------------------
6488 # PORTME Fill in your ld.so characteristics
6489 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6490 [AC_MSG_CHECKING([dynamic linker characteristics])
6492 libname_spec='lib$name'
6499 shlibpath_overrides_runpath=unknown
6501 dynamic_linker="$host_os ld.so"
6502 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6503 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6504 need_lib_prefix=unknown
6505 hardcode_into_libs=no
6507 # when you set need_version to no, make sure it does not cause -set_version
6508 # flags to be left without arguments
6509 need_version=unknown
6514 library_names_spec='${libname}${release}.so$versuffix $libname.a'
6515 shlibpath_var=LIBPATH
6517 # AIX 3 has no versioning support, so we append a major version to the name.
6518 soname_spec='${libname}${release}.so$major'
6523 if test "$host_cpu" = ia64; then
6524 # AIX 5 supports IA64
6525 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6526 shlibpath_var=LD_LIBRARY_PATH
6528 # With GCC up to 2.95.x, collect2 would create an import file
6529 # for dependence libraries. The import file would start with
6530 # the line `#! .'. This would cause the generated library to
6531 # depend on `.', always an invalid library. This was fixed in
6532 # development snapshots of GCC prior to 3.0.
6534 aix4 | aix4.[[01]] | aix4.[[01]].*)
6535 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6537 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6544 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6545 # soname into executable. Probably we can add versioning support to
6546 # collect2, so additional links can be useful in future.
6547 if test "$aix_use_runtimelinking" = yes; then
6548 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6549 # instead of lib<name>.a to let people know that these are not
6550 # typical AIX shared libraries.
6551 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6553 # We preserve .a as extension for shared libraries through AIX4.2
6554 # and later when we are not doing run time linking.
6555 library_names_spec='${libname}${release}.a $libname.a'
6556 soname_spec='${libname}${release}.so$major'
6558 shlibpath_var=LIBPATH
6563 library_names_spec='$libname.ixlibrary $libname.a'
6564 # Create ${libname}_ixlibrary.a entries in /sys/libs.
6565 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6569 library_names_spec='${libname}.so'
6570 dynamic_linker="$host_os ld.so"
6571 shlibpath_var=LIBRARY_PATH
6577 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6578 soname_spec='${libname}${release}.so$major'
6579 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6580 shlibpath_var=LD_LIBRARY_PATH
6581 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6582 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6583 # the default ld.so.conf also contains /usr/contrib/lib and
6584 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6585 # libtool to hard-code these into programs
6588 cygwin* | mingw* | pw32*)
6589 version_type=windows
6592 case $GCC,$host_os in
6594 library_names_spec='$libname.dll.a'
6595 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
6596 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6597 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6598 dldir=$destdir/`dirname \$dlpath`~
6599 test -d \$dldir || mkdir -p \$dldir~
6600 $install_prog .libs/$dlname \$dldir/$dlname'
6601 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6602 dlpath=$dir/\$dldll~
6606 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6607 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
6608 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
6609 # It is most probably a Windows format PATH printed by
6610 # mingw gcc, but we are running on Cygwin. Gcc prints its search
6611 # path with ; separators, and with drive letters. We can handle the
6612 # drive letters (cygwin fileutils understands them), so leave them,
6613 # especially as we might pass files found there to a mingw objdump,
6614 # which wouldn't understand a cygwinified path. Ahh.
6615 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6617 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
6621 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6624 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6627 dynamic_linker='Win32 ld.exe'
6628 # FIXME: first we should search . and the directory the executable is in
6632 darwin* | rhapsody*)
6633 dynamic_linker="$host_os dyld"
6637 # FIXME: Relying on posixy $() will cause problems for
6638 # cross-compilation, but unfortunately the echo tests do not
6639 # yet detect zsh echo's removal of \ escapes.
6640 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6641 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6642 shlibpath_overrides_runpath=yes
6643 shlibpath_var=DYLD_LIBRARY_PATH
6650 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6651 soname_spec='${libname}${release}.so$major'
6652 shlibpath_var=LD_LIBRARY_PATH
6660 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6661 version_type=freebsd-$objformat
6662 case $version_type in
6664 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6669 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6673 shlibpath_var=LD_LIBRARY_PATH
6676 shlibpath_overrides_runpath=yes
6678 freebsd3.[01]* | freebsdelf3.[01]*)
6679 shlibpath_overrides_runpath=yes
6680 hardcode_into_libs=yes
6683 shlibpath_overrides_runpath=no
6684 hardcode_into_libs=yes
6693 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6694 soname_spec='${libname}${release}.so$major'
6695 shlibpath_var=LD_LIBRARY_PATH
6696 hardcode_into_libs=yes
6699 hpux9* | hpux10* | hpux11*)
6700 # Give a soname corresponding to the major version so that dld.sl refuses to
6701 # link against other versions.
6705 if test "$host_cpu" = ia64; then
6706 hardcode_into_libs=yes
6707 dynamic_linker="$host_os dld.so"
6708 shlibpath_var=LD_LIBRARY_PATH
6709 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6710 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6711 soname_spec='${libname}${release}.so$major'
6712 if test "X$HPUX_IA64_MODE" = X32; then
6713 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6715 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6717 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6719 dynamic_linker="$host_os dld.sl"
6720 shlibpath_var=SHLIB_PATH
6721 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6722 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6723 soname_spec='${libname}${release}.sl$major'
6725 # HP-UX runs *really* slowly unless shared libraries are mode 555.
6726 postinstall_cmds='chmod 555 $lib'
6729 irix5* | irix6* | nonstopux*)
6731 nonstopux*) version_type=nonstopux ;;
6732 *) version_type=irix ;;
6736 soname_spec='${libname}${release}.so$major'
6737 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6739 irix5* | nonstopux*)
6743 case $LD in # libtool.m4 will add one of these switches to LD
6744 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6745 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6746 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6747 *) libsuff= shlibsuff= libmagic=never-match;;
6751 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6752 shlibpath_overrides_runpath=no
6753 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6754 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6757 # No shared lib support for Linux oldld, aout, or coff.
6758 linux*oldld* | linux*aout* | linux*coff*)
6762 # This must be Linux ELF.
6767 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6768 soname_spec='${libname}${release}.so$major'
6769 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6771 if test "x$LINUX_64_MODE" = x64; then
6772 # Some platforms are per default 64-bit, so there's no /lib64
6773 if test -d /lib64; then
6777 shlibpath_var=LD_LIBRARY_PATH
6778 shlibpath_overrides_runpath=no
6779 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6780 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6781 # This implies no fast_install, which is unacceptable.
6782 # Some rework will be needed to allow for fast_install
6783 # before this can be enabled.
6784 hardcode_into_libs=yes
6786 # We used to test for /lib/ld.so.1 and disable shared libraries on
6787 # powerpc, because MkLinux only supported shared libraries with the
6788 # GNU dynamic linker. Since this was broken with cross compilers,
6789 # most powerpc-linux boxes support dynamic linking these days and
6790 # people can always --disable-shared, the test was removed, and we
6791 # assume the GNU/Linux dynamic linker is in use.
6792 dynamic_linker='GNU/Linux ld.so'
6799 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6800 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6801 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6802 dynamic_linker='NetBSD (a.out) ld.so'
6804 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6805 soname_spec='${libname}${release}.so$major'
6806 dynamic_linker='NetBSD ld.elf_so'
6808 shlibpath_var=LD_LIBRARY_PATH
6809 shlibpath_overrides_runpath=yes
6810 hardcode_into_libs=yes
6815 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6816 shlibpath_var=LD_LIBRARY_PATH
6817 shlibpath_overrides_runpath=yes
6824 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6825 soname_spec='${libname}${release}.so$major'
6826 shlibpath_var=LD_LIBRARY_PATH
6827 shlibpath_overrides_runpath=yes
6834 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6835 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6836 shlibpath_var=LD_LIBRARY_PATH
6837 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6839 openbsd2.[[89]] | openbsd2.[[89]].*)
6840 shlibpath_overrides_runpath=no
6843 shlibpath_overrides_runpath=yes
6847 shlibpath_overrides_runpath=yes
6852 libname_spec='$name'
6854 library_names_spec='$libname.dll $libname.a'
6855 dynamic_linker='OS/2 ld.exe'
6856 shlibpath_var=LIBPATH
6859 osf3* | osf4* | osf5*)
6863 soname_spec='${libname}${release}.so'
6864 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6865 shlibpath_var=LD_LIBRARY_PATH
6866 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6867 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6872 soname_spec='${libname}${release}.so$major'
6873 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6874 shlibpath_var=LD_LIBRARY_PATH
6881 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6882 soname_spec='${libname}${release}.so$major'
6883 shlibpath_var=LD_LIBRARY_PATH
6884 shlibpath_overrides_runpath=yes
6885 hardcode_into_libs=yes
6886 # ldd complains unless libraries are executable
6887 postinstall_cmds='chmod +x $lib'
6892 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6893 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6894 shlibpath_var=LD_LIBRARY_PATH
6895 shlibpath_overrides_runpath=yes
6896 if test "$with_gnu_ld" = yes; then
6902 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6904 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6905 soname_spec='${libname}${release}.so$major'
6906 shlibpath_var=LD_LIBRARY_PATH
6907 case $host_vendor in
6909 shlibpath_overrides_runpath=no
6914 shlibpath_overrides_runpath=no
6915 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6921 if test -d /usr/nec ;then
6923 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6924 soname_spec='$libname.so.$major'
6925 shlibpath_var=LD_LIBRARY_PATH
6931 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6932 soname_spec='${libname}${release}.so$major'
6933 shlibpath_var=LD_LIBRARY_PATH
6940 AC_MSG_RESULT([$dynamic_linker])
6941 test "$dynamic_linker" = no && can_build_shared=no
6942 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6947 AC_DEFUN([_LT_AC_TAGCONFIG],
6948 [AC_ARG_WITH([tags],
6949 [AC_HELP_STRING([--with-tags=TAGS],
6950 [include additional configurations @<:@CXX,GCJ@:>@])],
6951 [tagnames="$withval"],
6954 mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6957 if test -f "$ltmain" && test -n "$tagnames"; then
6958 if test ! -f "${ofile}"; then
6959 AC_MSG_WARN([output file `$ofile' does not exist])
6962 if test -z "$LTCC"; then
6963 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6964 if test -z "$LTCC"; then
6965 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6967 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6971 # Extract list of available tagged configurations in $ofile.
6972 # Note that this assumes the entire list is on one line.
6973 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6975 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6976 for tagname in $tagnames; do
6978 # Check whether tagname contains only valid characters
6979 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6981 *) AC_MSG_ERROR([invalid tag name: $tagname])
6985 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6987 AC_MSG_ERROR([tag name \"$tagname\" already exists])
6990 # Update the list of available tags.
6991 if test -n "$tagname"; then
6992 echo appending configuration tag \"$tagname\" to $ofile
6996 AC_LIBTOOL_LANG_CXX_CONFIG
7000 AC_LIBTOOL_LANG_GCJ_CONFIG
7004 AC_LIBTOOL_LANG_RC_CONFIG
7008 AC_MSG_ERROR([Unsupported tag name: $tagname])
7012 # Append the new tag name to the list of available tags.
7013 available_tags="$available_tags $tagname"
7018 # Now substitute the updated list of available tags.
7019 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7020 mv "${ofile}T" "$ofile"
7024 AC_MSG_ERROR([unable to update list of available tagged configurations.])
7027 ])# _LT_AC_TAGCONFIG
7032 # enable checks for dlopen support
7033 AC_DEFUN([AC_LIBTOOL_DLOPEN],
7034 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7035 ])# AC_LIBTOOL_DLOPEN
7038 # AC_LIBTOOL_WIN32_DLL
7039 # --------------------
7040 # declare package support for building win32 dll's
7041 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7042 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7043 ])# AC_LIBTOOL_WIN32_DLL
7046 # AC_ENABLE_SHARED([DEFAULT])
7047 # ---------------------------
7048 # implement the --enable-shared flag
7049 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7050 AC_DEFUN([AC_ENABLE_SHARED],
7051 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7052 AC_ARG_ENABLE([shared],
7053 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7054 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7055 [p=${PACKAGE-default}
7057 yes) enable_shared=yes ;;
7058 no) enable_shared=no ;;
7061 # Look at the argument we got. We use all the common list separators.
7062 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7063 for pkg in $enableval; do
7065 if test "X$pkg" = "X$p"; then
7072 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7073 ])# AC_ENABLE_SHARED
7078 #- set the default shared flag to --disable-shared
7079 AC_DEFUN([AC_DISABLE_SHARED],
7080 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7081 AC_ENABLE_SHARED(no)
7082 ])# AC_DISABLE_SHARED
7085 # AC_ENABLE_STATIC([DEFAULT])
7086 # ---------------------------
7087 # implement the --enable-static flag
7088 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7089 AC_DEFUN([AC_ENABLE_STATIC],
7090 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7091 AC_ARG_ENABLE([static],
7092 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7093 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7094 [p=${PACKAGE-default}
7096 yes) enable_static=yes ;;
7097 no) enable_static=no ;;
7100 # Look at the argument we got. We use all the common list separators.
7101 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7102 for pkg in $enableval; do
7104 if test "X$pkg" = "X$p"; then
7111 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7112 ])# AC_ENABLE_STATIC
7117 # set the default static flag to --disable-static
7118 AC_DEFUN([AC_DISABLE_STATIC],
7119 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7120 AC_ENABLE_STATIC(no)
7121 ])# AC_DISABLE_STATIC
7124 # AC_ENABLE_FAST_INSTALL([DEFAULT])
7125 # ---------------------------------
7126 # implement the --enable-fast-install flag
7127 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7128 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7129 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7130 AC_ARG_ENABLE([fast-install],
7131 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7132 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7133 [p=${PACKAGE-default}
7135 yes) enable_fast_install=yes ;;
7136 no) enable_fast_install=no ;;
7138 enable_fast_install=no
7139 # Look at the argument we got. We use all the common list separators.
7140 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7141 for pkg in $enableval; do
7143 if test "X$pkg" = "X$p"; then
7144 enable_fast_install=yes
7150 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7151 ])# AC_ENABLE_FAST_INSTALL
7154 # AC_DISABLE_FAST_INSTALL
7155 # -----------------------
7156 # set the default to --disable-fast-install
7157 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7158 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7159 AC_ENABLE_FAST_INSTALL(no)
7160 ])# AC_DISABLE_FAST_INSTALL
7163 # AC_LIBTOOL_PICMODE([MODE])
7164 # --------------------------
7165 # implement the --with-pic flag
7166 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7167 AC_DEFUN([AC_LIBTOOL_PICMODE],
7168 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7169 pic_mode=ifelse($#,1,$1,default)
7170 ])# AC_LIBTOOL_PICMODE
7173 # AC_PATH_TOOL_PREFIX
7174 # -------------------
7175 # find a file program which can recognise shared library
7176 AC_DEFUN([AC_PATH_TOOL_PREFIX],
7177 [AC_MSG_CHECKING([for $1])
7178 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7180 [[\\/*] | ?:[\\/]*])
7181 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7184 lt_save_MAGIC_CMD="$MAGIC_CMD"
7185 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7186 dnl $ac_dummy forces splitting on constant user-supplied paths.
7187 dnl POSIX.2 word splitting is done only on the output of word expansions,
7188 dnl not every word. This closes a longstanding sh security hole.
7189 ac_dummy="ifelse([$2], , $PATH, [$2])"
7190 for ac_dir in $ac_dummy; do
7192 test -z "$ac_dir" && ac_dir=.
7193 if test -f $ac_dir/$1; then
7194 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7195 if test -n "$file_magic_test_file"; then
7196 case $deplibs_check_method in
7198 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7199 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7200 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7201 egrep "$file_magic_regex" > /dev/null; then
7206 *** Warning: the command libtool uses to detect shared libraries,
7207 *** $file_magic_cmd, produces output that libtool cannot recognize.
7208 *** The result is that libtool may fail to recognize shared libraries
7209 *** as such. This will affect the creation of libtool libraries that
7210 *** depend on shared libraries, but programs linked with such libtool
7211 *** libraries will work regardless of this problem. Nevertheless, you
7212 *** may want to report the problem to your system manager and/or to
7213 *** bug-libtool@gnu.org
7223 MAGIC_CMD="$lt_save_MAGIC_CMD"
7226 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7227 if test -n "$MAGIC_CMD"; then
7228 AC_MSG_RESULT($MAGIC_CMD)
7232 ])# AC_PATH_TOOL_PREFIX
7237 # find a file program which can recognise a shared library
7238 AC_DEFUN([AC_PATH_MAGIC],
7239 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7240 if test -z "$lt_cv_path_MAGIC_CMD"; then
7241 if test -n "$ac_tool_prefix"; then
7242 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7252 # find the path to the GNU or non-GNU linker
7253 AC_DEFUN([AC_PROG_LD],
7254 [AC_ARG_WITH([gnu-ld],
7255 [AC_HELP_STRING([--with-gnu-ld],
7256 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7257 [test "$withval" = no || with_gnu_ld=yes],
7259 AC_REQUIRE([AC_PROG_CC])dnl
7260 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7261 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7263 if test "$GCC" = yes; then
7264 # Check if gcc -print-prog-name=ld gives a path.
7265 AC_MSG_CHECKING([for ld used by GCC])
7268 # gcc leaves a trailing carriage return which upsets mingw
7269 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7271 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7274 # Accept absolute paths.
7275 [[\\/]]* | ?:[[\\/]]*)
7276 re_direlt='/[[^/]][[^/]]*/\.\./'
7277 # Canonicalize the path of ld
7278 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7279 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7280 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7282 test -z "$LD" && LD="$ac_prog"
7285 # If it fails, then pretend we aren't using GCC.
7289 # If it is relative, then search for the first ld in PATH.
7293 elif test "$with_gnu_ld" = yes; then
7294 AC_MSG_CHECKING([for GNU ld])
7296 AC_MSG_CHECKING([for non-GNU ld])
7298 AC_CACHE_VAL(lt_cv_path_LD,
7299 [if test -z "$LD"; then
7300 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7301 for ac_dir in $PATH; do
7303 test -z "$ac_dir" && ac_dir=.
7304 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7305 lt_cv_path_LD="$ac_dir/$ac_prog"
7306 # Check to see if the program is GNU ld. I'd rather use --version,
7307 # but apparently some GNU ld's only accept -v.
7308 # Break only if it was the GNU/non-GNU ld that we prefer.
7309 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7310 test "$with_gnu_ld" != no && break
7312 test "$with_gnu_ld" != yes && break
7318 lt_cv_path_LD="$LD" # Let the user override the test with a path.
7321 if test -n "$LD"; then
7326 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7333 AC_DEFUN([AC_PROG_LD_GNU],
7334 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7335 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7336 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7337 lt_cv_prog_gnu_ld=yes
7339 lt_cv_prog_gnu_ld=no
7341 with_gnu_ld=$lt_cv_prog_gnu_ld
7345 # AC_PROG_LD_RELOAD_FLAG
7346 # ----------------------
7347 # find reload flag for linker
7348 # -- PORTME Some linkers may need a different reload flag.
7349 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7350 [AC_CACHE_CHECK([for $LD option to reload object files],
7351 lt_cv_ld_reload_flag,
7352 [lt_cv_ld_reload_flag='-r'])
7353 reload_flag=$lt_cv_ld_reload_flag
7354 case $reload_flag in
7356 *) reload_flag=" $reload_flag" ;;
7358 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7359 ])# AC_PROG_LD_RELOAD_FLAG
7362 # AC_DEPLIBS_CHECK_METHOD
7363 # -----------------------
7364 # how to check for library dependencies
7365 # -- PORTME fill in with the dynamic library characteristics
7366 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7367 [AC_CACHE_CHECK([how to recognise dependant libraries],
7368 lt_cv_deplibs_check_method,
7369 [lt_cv_file_magic_cmd='$MAGIC_CMD'
7370 lt_cv_file_magic_test_file=
7371 lt_cv_deplibs_check_method='unknown'
7372 # Need to set the preceding variable on all platforms that support
7373 # interlibrary dependencies.
7374 # 'none' -- dependencies not supported.
7375 # `unknown' -- same as none, but documents that we really don't know.
7376 # 'pass_all' -- all dependencies passed with no checks.
7377 # 'test_compile' -- check by making test program.
7378 # 'file_magic [[regex]]' -- check by looking for files in library path
7379 # which responds to the $file_magic_cmd with a given egrep regex.
7380 # If you have `file' or equivalent on your system and you're not sure
7381 # whether `pass_all' will *always* work, you probably want this one.
7385 lt_cv_deplibs_check_method=pass_all
7389 lt_cv_deplibs_check_method=pass_all
7393 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7394 lt_cv_file_magic_cmd='/usr/bin/file -L'
7395 lt_cv_file_magic_test_file=/shlib/libc.so
7398 cygwin* | mingw* | pw32*)
7399 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7400 lt_cv_file_magic_cmd='$OBJDUMP -f'
7403 darwin* | rhapsody*)
7404 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7405 lt_cv_file_magic_cmd='/usr/bin/file -L'
7407 rhapsody* | darwin1.[[012]])
7408 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7411 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7417 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7420 # Not sure whether the presence of OpenBSD here was a mistake.
7421 # Let's accept both of them until this is cleared up.
7422 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7423 lt_cv_file_magic_cmd=/usr/bin/file
7424 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7428 lt_cv_deplibs_check_method=pass_all
7433 lt_cv_deplibs_check_method=pass_all
7436 hpux10.20* | hpux11*)
7437 lt_cv_file_magic_cmd=/usr/bin/file
7438 if test "$host_cpu" = ia64; then
7439 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7440 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7442 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7443 lt_cv_file_magic_test_file=/usr/lib/libc.sl
7447 irix5* | irix6* | nonstopux*)
7449 irix5* | nonstopux*)
7450 # this will be overridden with pass_all, but let us keep it just in case
7451 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7455 *-32|*"-32 ") libmagic=32-bit;;
7456 *-n32|*"-n32 ") libmagic=N32;;
7457 *-64|*"-64 ") libmagic=64-bit;;
7458 *) libmagic=never-match;;
7460 # this will be overridden with pass_all, but let us keep it just in case
7461 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7464 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7465 lt_cv_deplibs_check_method=pass_all
7468 # This must be Linux ELF.
7471 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
7472 lt_cv_deplibs_check_method=pass_all ;;
7474 # glibc up to 2.1.1 does not perform some relocations on ARM
7475 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7477 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7481 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7482 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
7484 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
7489 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7490 lt_cv_file_magic_cmd=/usr/bin/file
7491 lt_cv_file_magic_test_file=/usr/lib/libnls.so
7495 lt_cv_deplibs_check_method=unknown
7499 lt_cv_file_magic_cmd=/usr/bin/file
7500 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7501 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7502 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7504 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7508 osf3* | osf4* | osf5*)
7509 # this will be overridden with pass_all, but let us keep it just in case
7510 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7511 lt_cv_file_magic_test_file=/shlib/libc.so
7512 lt_cv_deplibs_check_method=pass_all
7516 lt_cv_deplibs_check_method=pass_all
7520 lt_cv_deplibs_check_method=pass_all
7521 lt_cv_file_magic_test_file=/lib/libc.so
7524 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7525 case $host_vendor in
7527 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
7528 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7531 lt_cv_deplibs_check_method=pass_all
7534 lt_cv_file_magic_cmd='/bin/file'
7535 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7538 lt_cv_file_magic_cmd='/bin/file'
7539 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7540 lt_cv_file_magic_test_file=/lib/libc.so
7545 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7546 lt_cv_deplibs_check_method=pass_all
7550 file_magic_cmd=$lt_cv_file_magic_cmd
7551 deplibs_check_method=$lt_cv_deplibs_check_method
7552 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7553 ])# AC_DEPLIBS_CHECK_METHOD
7558 # find the path to a BSD-compatible name lister
7559 AC_DEFUN([AC_PROG_NM],
7560 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7561 [if test -n "$NM"; then
7562 # Let the user override the test.
7565 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7566 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7568 test -z "$ac_dir" && ac_dir=.
7569 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7570 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7571 # Check to see if the nm accepts a BSD-compat flag.
7572 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7573 # nm: unknown option "B" ignored
7574 # Tru64's nm complains that /dev/null is an invalid object file
7575 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
7576 lt_cv_path_NM="$tmp_nm -B"
7578 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
7579 lt_cv_path_NM="$tmp_nm -p"
7582 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7583 continue # so that we can try to find one that supports BSD flags
7588 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7596 # check for math library
7597 AC_DEFUN([AC_CHECK_LIBM],
7598 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7601 *-*-beos* | *-*-cygwin* | *-*-pw32*)
7602 # These system don't have libm
7605 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7606 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
7609 AC_CHECK_LIB(m, main, LIBM="-lm")
7615 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7616 # -----------------------------------
7617 # sets LIBLTDL to the link flags for the libltdl convenience library and
7618 # LTDLINCL to the include flags for the libltdl header and adds
7619 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7620 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7621 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7622 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7623 # '${top_srcdir}/' (note the single quotes!). If your package is not
7624 # flat and you're not using automake, define top_builddir and
7625 # top_srcdir appropriately in the Makefiles.
7626 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7627 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7628 case $enable_ltdl_convenience in
7629 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7630 "") enable_ltdl_convenience=yes
7631 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7633 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7634 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7635 # For backwards non-gettext consistent compatibility...
7637 ])# AC_LIBLTDL_CONVENIENCE
7640 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7641 # -----------------------------------
7642 # sets LIBLTDL to the link flags for the libltdl installable library and
7643 # LTDLINCL to the include flags for the libltdl header and adds
7644 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7645 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7646 # DIRECTORY is not provided and an installed libltdl is not found, it is
7647 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7648 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7649 # quotes!). If your package is not flat and you're not using automake,
7650 # define top_builddir and top_srcdir appropriately in the Makefiles.
7651 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7652 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7653 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7654 AC_CHECK_LIB(ltdl, main,
7655 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7656 [if test x"$enable_ltdl_install" = xno; then
7657 AC_MSG_WARN([libltdl not installed, but installation disabled])
7659 enable_ltdl_install=yes
7662 if test x"$enable_ltdl_install" = x"yes"; then
7663 ac_configure_args="$ac_configure_args --enable-ltdl-install"
7664 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7665 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7667 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7671 # For backwards non-gettext consistent compatibility...
7673 ])# AC_LIBLTDL_INSTALLABLE
7676 # If this macro is not defined by Autoconf, define it here.
7677 ifdef([AC_PROVIDE_IFELSE],
7679 [define([AC_PROVIDE_IFELSE],
7680 [ifdef([AC_PROVIDE_$1],
7686 # enable support for C++ libraries
7687 AC_DEFUN([AC_LIBTOOL_CXX],
7688 [AC_REQUIRE([_LT_AC_LANG_CXX])
7694 AC_DEFUN([_LT_AC_LANG_CXX],
7695 [AC_REQUIRE([AC_PROG_CXX])
7696 AC_REQUIRE([AC_PROG_CXXCPP])
7702 # enable support for GCJ libraries
7703 AC_DEFUN([AC_LIBTOOL_GCJ],
7704 [AC_REQUIRE([_LT_AC_LANG_GCJ])
7710 AC_DEFUN([_LT_AC_LANG_GCJ],
7711 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7712 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7713 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7714 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7715 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7716 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7722 # enable support for Windows resource files
7723 AC_DEFUN([AC_LIBTOOL_RC],
7724 [AC_REQUIRE([AC_PROG_RC])
7728 # AC_LIBTOOL_LANG_C_CONFIG
7729 # ------------------------
7730 # Ensure that the configuration vars for the C compiler are
7731 # suitably defined. Those variables are subsequently used by
7732 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7733 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7734 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7738 # Source file extension for C test sources.
7741 # Object file extension for compiled C test sources.
7743 _LT_AC_TAGVAR(objext, $1)=$objext
7745 # Code to be used in simple compile tests
7746 lt_simple_compile_test_code="int some_variable = 0;"
7748 # Code to be used in simple link tests
7749 lt_simple_link_test_code='main(){return(0);}'
7754 # Check for any special shared library compilation flags.
7756 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7757 if test "$GCC" = no; then
7760 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7764 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7765 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7766 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7768 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7769 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7775 # Check to make sure the static flag actually works.
7777 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7778 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7779 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7781 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7784 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7785 AC_LIBTOOL_PROG_COMPILER_PIC($1)
7786 AC_LIBTOOL_PROG_CC_C_O($1)
7787 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7788 AC_LIBTOOL_PROG_LD_SHLIBS($1)
7789 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7790 AC_LIBTOOL_SYS_LIB_STRIP
7791 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7792 AC_LIBTOOL_DLOPEN_SELF($1)
7794 # Report which librarie types wil actually be built
7795 AC_MSG_CHECKING([if libtool supports shared libraries])
7796 AC_MSG_RESULT([$can_build_shared])
7798 AC_MSG_CHECKING([whether to build shared libraries])
7799 test "$can_build_shared" = "no" && enable_shared=no
7801 # On AIX, shared libraries and static libraries use the same namespace, and
7802 # are all built from PIC.
7805 test "$enable_shared" = yes && enable_static=no
7806 if test -n "$RANLIB"; then
7807 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7808 postinstall_cmds='$RANLIB $lib'
7813 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7814 test "$enable_shared" = yes && enable_static=no
7818 AC_MSG_RESULT([$enable_shared])
7820 AC_MSG_CHECKING([whether to build static libraries])
7821 # Make sure either enable_shared or enable_static is yes.
7822 test "$enable_shared" = yes || enable_static=yes
7823 AC_MSG_RESULT([$enable_static])
7825 AC_LIBTOOL_CONFIG($1)
7829 ])# AC_LIBTOOL_LANG_C_CONFIG
7832 # AC_LIBTOOL_LANG_CXX_CONFIG
7833 # --------------------------
7834 # Ensure that the configuration vars for the C compiler are
7835 # suitably defined. Those variables are subsequently used by
7836 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7837 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7838 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7840 AC_REQUIRE([AC_PROG_CXX])
7841 AC_REQUIRE([AC_PROG_CXXCPP])
7843 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7844 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7845 _LT_AC_TAGVAR(always_export_symbols, $1)=no
7846 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7847 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7848 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7849 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7850 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7851 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7852 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7853 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7854 _LT_AC_TAGVAR(no_undefined_flag, $1)=
7855 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7857 # Dependencies to place before and after the object being linked:
7858 _LT_AC_TAGVAR(predep_objects, $1)=
7859 _LT_AC_TAGVAR(postdep_objects, $1)=
7860 _LT_AC_TAGVAR(predeps, $1)=
7861 _LT_AC_TAGVAR(postdeps, $1)=
7862 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7864 # Source file extension for C test sources.
7867 # Object file extension for compiled C test sources.
7869 _LT_AC_TAGVAR(objext, $1)=$objext
7871 # Code to be used in simple compile tests
7872 lt_simple_compile_test_code="int some_variable = 0;"
7874 # Code to be used in simple link tests
7875 lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7877 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7880 # Allow CC to be a program name with arguments.
7885 _LT_AC_TAGVAR(compiler, $1)=$CC
7886 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7888 # We don't want -fno-exception wen compiling C++ code, so set the
7889 # no_builtin_flag separately
7890 if test "$GXX" = yes; then
7891 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7893 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7896 if test "$GXX" = yes; then
7897 # Set up default GNU C++ configuration
7899 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7900 # archiving commands below assume that GNU ld is being used.
7901 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7902 egrep 'GNU ld' > /dev/null; then
7905 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7906 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7908 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7909 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7911 # If archive_cmds runs LD, not CC, wlarc should be empty
7912 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7913 # investigate it a little bit more. (MM)
7916 # ancient GNU ld didn't support --whole-archive et. al.
7917 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7918 egrep 'no-whole-archive' > /dev/null; then
7919 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7921 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7927 # A generic and very simple default shared library creation
7928 # command for GNU C++ for the case where it uses the native
7929 # linker, instead of GNU ld. If possible, this setting should
7930 # overridden to take advantage of the native linker features on
7931 # the platform it is being used on.
7932 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7935 # Commands to make compiler produce verbose output that lists
7936 # what "hidden" libraries, object files and flags are used when
7937 # linking a shared library.
7938 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7946 # PORTME: fill in a description of your system's C++ link characteristics
7947 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7948 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7951 # FIXME: insert proper C++ library support
7952 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7955 if test "$host_cpu" = ia64; then
7956 # On IA64, the linker does run time linking by default, so we don't
7957 # have to do anything special.
7958 aix_use_runtimelinking=no
7959 exp_sym_flag='-Bexport'
7962 # KDE requires run time linking. Make it the default.
7963 aix_use_runtimelinking=yes
7964 exp_sym_flag='-bexport'
7965 no_entry_flag='-bnoentry'
7968 # When large executables or shared objects are built, AIX ld can
7969 # have problems creating the table of contents. If linking a library
7970 # or program results in "error TOC overflow" add -mminimal-toc to
7971 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7972 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7974 _LT_AC_TAGVAR(archive_cmds, $1)=''
7975 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7976 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7977 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7979 if test "$GXX" = yes; then
7980 case $host_os in aix4.[012]|aix4.[012].*)
7981 # We only want to do this on AIX 4.2 and lower, the check
7982 # below for broken collect2 doesn't work under 4.3+
7983 collect2name=`${CC} -print-prog-name=collect2`
7984 if test -f "$collect2name" && \
7985 strings "$collect2name" | grep resolve_lib_name >/dev/null
7987 # We have reworked collect2
7988 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7990 # We have old collect2
7991 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7992 # It fails to find uninstalled libraries when the uninstalled
7993 # path is not listed in the libpath. Setting hardcode_minus_L
7994 # to unsupported forces relinking
7995 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7996 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7997 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8000 shared_flag='-shared'
8003 if test "$host_cpu" = ia64; then
8004 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8005 # chokes on -Wl,-G. The following line is correct:
8008 if test "$aix_use_runtimelinking" = yes; then
8009 shared_flag='-qmkshrobj ${wl}-G'
8011 shared_flag='-qmkshrobj'
8016 # Let the compiler handle the export list.
8017 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8018 if test "$aix_use_runtimelinking" = yes; then
8019 # Warning - without using the other runtime loading flags (-brtl),
8020 # -berok will link without error, but may produce a broken library.
8021 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8022 # Determine the default libpath from the value encoded in an empty executable.
8023 _LT_AC_SYS_LIBPATH_AIX
8024 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8026 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8027 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8029 if test "$host_cpu" = ia64; then
8030 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8031 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8034 # Determine the default libpath from the value encoded in an empty executable.
8035 _LT_AC_SYS_LIBPATH_AIX
8036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8037 # Warning - without using the other run time loading flags,
8038 # -berok will link without error, but may produce a broken library.
8039 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8040 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8041 # -bexpall does not export symbols beginning with underscore (_)
8042 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8043 # Exported symbols can be pulled into shared objects from archives
8044 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8045 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8046 # This is similar to how AIX traditionally builds it's shared libraries.
8047 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8052 case $cc_basename in
8054 # FIXME: insert proper C++ library support
8055 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8060 case $cc_basename in
8062 # FIXME: insert proper C++ library support
8063 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8066 # Green Hills C++ Compiler
8067 # FIXME: insert proper C++ library support
8068 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8071 # FIXME: insert proper C++ library support
8072 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8077 # C++ shared libraries reported to be fairly broken before switch to ELF
8078 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8081 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8084 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8086 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8091 if test $with_gnu_ld = no; then
8092 if test "$host_cpu" = ia64; then
8093 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8096 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8097 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8100 if test "$host_cpu" = ia64; then
8101 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8102 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8104 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8106 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8107 # but as the default
8108 # location of the library.
8110 case $cc_basename in
8112 # FIXME: insert proper C++ library support
8113 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8118 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8121 if test "$host_cpu" = ia64; then
8122 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8124 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8128 # Commands to make compiler produce verbose output that lists
8129 # what "hidden" libraries, object files and flags are used when
8130 # linking a shared library.
8132 # There doesn't appear to be a way to prevent this compiler from
8133 # explicitly linking system object files so we need to strip them
8134 # from the output so that they don't get included in the library
8136 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8139 if test "$GXX" = yes; then
8140 if test $with_gnu_ld = no; then
8143 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8146 if test "$host_cpu" = ia64; then
8147 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8155 # FIXME: insert proper C++ library support
8156 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8162 case $cc_basename in
8165 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8167 # Archives containing C++ object files must be created using
8168 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8169 # necessary to make sure instantiated templates are included
8171 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8174 if test "$GXX" = yes; then
8175 if test "$with_gnu_ld" = no; then
8176 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8178 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
8181 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8185 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8188 case $cc_basename in
8190 # Kuck and Associates, Inc. (KAI) C++ Compiler
8192 # KCC will only create a shared library if the output file
8193 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8194 # to its proper name (with version) after linking.
8195 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8196 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8198 # Commands to make compiler produce verbose output that lists
8199 # what "hidden" libraries, object files and flags are used when
8200 # linking a shared library.
8202 # There doesn't appear to be a way to prevent this compiler from
8203 # explicitly linking system object files so we need to strip them
8204 # from the output so that they don't get included in the library
8206 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8208 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8209 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8211 # Archives containing C++ object files must be created using
8212 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8213 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8217 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8218 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8220 runpath_var=LD_RUN_PATH
8221 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8222 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8224 # Commands to make compiler produce verbose output that lists
8225 # what "hidden" libraries, object files and flags are used when
8226 # linking a shared library.
8228 # There doesn't appear to be a way to prevent this compiler from
8229 # explicitly linking system object files so we need to strip them
8230 # from the output so that they don't get included in the library
8232 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8237 # FIXME: insert proper C++ library support
8238 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8241 # FIXME: insert proper C++ library support
8242 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8245 case $cc_basename in
8247 # FIXME: insert proper C++ library support
8248 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8251 # FIXME: insert proper C++ library support
8252 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8257 # NetBSD uses g++ - do we need to do anything?
8260 case $cc_basename in
8262 # Kuck and Associates, Inc. (KAI) C++ Compiler
8264 # KCC will only create a shared library if the output file
8265 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8266 # to its proper name (with version) after linking.
8267 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8269 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8270 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8272 # Archives containing C++ object files must be created using
8273 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8274 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8278 # Rational C++ 2.4.1
8279 # FIXME: insert proper C++ library support
8280 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8283 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8284 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8287 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8289 # Commands to make compiler produce verbose output that lists
8290 # what "hidden" libraries, object files and flags are used when
8291 # linking a shared library.
8293 # There doesn't appear to be a way to prevent this compiler from
8294 # explicitly linking system object files so we need to strip them
8295 # from the output so that they don't get included in the library
8297 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8300 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8301 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8302 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8304 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8305 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8307 # Commands to make compiler produce verbose output that lists
8308 # what "hidden" libraries, object files and flags are used when
8309 # linking a shared library.
8310 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8313 # FIXME: insert proper C++ library support
8314 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8320 case $cc_basename in
8322 # Kuck and Associates, Inc. (KAI) C++ Compiler
8324 # KCC will only create a shared library if the output file
8325 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8326 # to its proper name (with version) after linking.
8327 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8329 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8330 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8332 # Archives containing C++ object files must be created using
8333 # the KAI C++ compiler.
8334 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8337 # Rational C++ 2.4.1
8338 # FIXME: insert proper C++ library support
8339 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8342 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8343 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8344 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
8345 echo "-hidden">> $lib.exp~
8346 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8349 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8350 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8352 # Commands to make compiler produce verbose output that lists
8353 # what "hidden" libraries, object files and flags are used when
8354 # linking a shared library.
8356 # There doesn't appear to be a way to prevent this compiler from
8357 # explicitly linking system object files so we need to strip them
8358 # from the output so that they don't get included in the library
8360 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8363 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8364 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8365 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8367 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8368 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8370 # Commands to make compiler produce verbose output that lists
8371 # what "hidden" libraries, object files and flags are used when
8372 # linking a shared library.
8373 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8376 # FIXME: insert proper C++ library support
8377 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8383 # FIXME: insert proper C++ library support
8384 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8387 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8388 case $cc_basename in
8390 # FIXME: insert proper C++ library support
8391 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8394 # FIXME: insert proper C++ library support
8395 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8400 case $cc_basename in
8403 # FIXME: insert proper C++ library support
8404 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8408 # FIXME: insert proper C++ library support
8409 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8412 # FIXME: insert proper C++ library support
8413 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8418 case $cc_basename in
8420 # Sun C++ 4.2, 5.x and Centerline C++
8421 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8423 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8424 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8426 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8427 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8429 solaris2.[0-5] | solaris2.[0-5].*) ;;
8431 # The C++ compiler is used as linker so we must use $wl
8432 # flag to pass the commands to the underlying system
8434 # Supported since Solaris 2.6 (maybe 2.5.1?)
8435 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8438 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8440 # Commands to make compiler produce verbose output that lists
8441 # what "hidden" libraries, object files and flags are used when
8442 # linking a shared library.
8444 # There doesn't appear to be a way to prevent this compiler from
8445 # explicitly linking system object files so we need to strip them
8446 # from the output so that they don't get included in the library
8448 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8450 # Archives containing C++ object files must be created using
8451 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8452 # necessary to make sure instantiated templates are included
8454 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8457 # Green Hills C++ Compiler
8458 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8460 # The C++ compiler must be used to create the archive.
8461 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8464 # GNU C++ compiler with Solaris linker
8465 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8466 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8467 if $CC --version | egrep -v '^2\.7' > /dev/null; then
8468 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8469 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8470 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8472 # Commands to make compiler produce verbose output that lists
8473 # what "hidden" libraries, object files and flags are used when
8474 # linking a shared library.
8475 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8477 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8479 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8480 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8481 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8483 # Commands to make compiler produce verbose output that lists
8484 # what "hidden" libraries, object files and flags are used when
8485 # linking a shared library.
8486 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8489 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8494 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8495 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8498 case $cc_basename in
8500 # NonStop-UX NCC 3.20
8501 # FIXME: insert proper C++ library support
8502 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8505 # FIXME: insert proper C++ library support
8506 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8511 # FIXME: insert proper C++ library support
8512 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8515 # FIXME: insert proper C++ library support
8516 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8519 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8520 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8522 # Figure out "hidden" C++ library dependencies from verbose
8523 # compiler output whening linking a shared library.
8524 cat > conftest.$ac_ext <<EOF
8528 Foo (void) { a = 0; }
8535 if AC_TRY_EVAL(ac_compile); then
8536 # Parse the compiler output and extract the necessary
8537 # objects, libraries and library flags.
8539 # Sentinel used to keep track of whether or not we are before
8540 # the conftest object file.
8541 pre_test_object_deps_done=no
8543 # The `*' in the case matches for architectures that use `case' in
8544 # $output_verbose_cmd can trigger glob expansion during the loop
8545 # eval without this substitution.
8546 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8548 for p in `eval $output_verbose_link_cmd`; do
8552 # Some compilers place space between "-{L,R}" and the path.
8555 || test $p = "-R"; then
8562 if test "$pre_test_object_deps_done" = no; then
8565 # Internal compiler library paths should come after those
8566 # provided the user. The postdeps already come after the
8567 # user supplied libs so there is no need to process them.
8568 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8569 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8571 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8574 # The "-l" case would never come before the object being
8575 # linked, so don't bother handling this case.
8578 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8579 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8581 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8586 *.$objext|*.$libext)
8587 # This assumes that the test object file only shows up
8588 # once in the compiler output.
8589 if test "$p" = "conftest.$objext"; then
8590 pre_test_object_deps_done=yes
8594 if test "$pre_test_object_deps_done" = no; then
8595 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8596 _LT_AC_TAGVAR(predep_objects, $1)="$p"
8598 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8601 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8602 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
8604 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8609 *) ;; # Ignore the rest.
8617 echo "libtool.m4: error: problem compiling C++ test program"
8620 $rm -f confest.$objext
8622 case " $_LT_AC_TAGVAR(postdeps, $1) " in
8623 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8624 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
8627 _LT_AC_TAGVAR(GCC, $1)="$GXX"
8628 _LT_AC_TAGVAR(LD, $1)="$LD"
8630 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8631 AC_LIBTOOL_PROG_CC_C_O($1)
8632 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8633 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8634 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8635 AC_LIBTOOL_SYS_LIB_STRIP
8636 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8637 AC_LIBTOOL_DLOPEN_SELF($1)
8639 AC_LIBTOOL_CONFIG($1)
8643 ])# AC_LIBTOOL_LANG_CXX_CONFIG
8646 # AC_LIBTOOL_LANG_GCJ_CONFIG
8647 # --------------------------
8648 # Ensure that the configuration vars for the C compiler are
8649 # suitably defined. Those variables are subsequently used by
8650 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8651 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8652 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8655 # Source file extension for C test sources.
8658 # Object file extension for compiled C test sources.
8660 _LT_AC_TAGVAR(objext, $1)=$objext
8662 # Code to be used in simple compile tests
8663 lt_simple_compile_test_code="class foo {}"
8665 # Code to be used in simple link tests
8666 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8668 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8671 # Allow CC to be a program name with arguments.
8676 _LT_AC_TAGVAR(compiler, $1)=$CC
8678 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8679 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8681 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8682 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8683 AC_LIBTOOL_PROG_CC_C_O($1)
8684 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8685 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8686 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8687 AC_LIBTOOL_SYS_LIB_STRIP
8688 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8689 AC_LIBTOOL_DLOPEN_SELF($1)
8691 AC_LIBTOOL_CONFIG($1)
8695 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
8698 # AC_LIBTOOL_LANG_RC_CONFIG
8699 # --------------------------
8700 # Ensure that the configuration vars for the Windows resource compiler are
8701 # suitably defined. Those variables are subsequently used by
8702 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8703 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8704 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8707 # Source file extension for RC test sources.
8710 # Object file extension for compiled RC test sources.
8712 _LT_AC_TAGVAR(objext, $1)=$objext
8714 # Code to be used in simple compile tests
8715 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8717 # Code to be used in simple link tests
8718 lt_simple_link_test_code="$lt_simple_compile_test_code"
8720 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8723 # Allow CC to be a program name with arguments.
8728 _LT_AC_TAGVAR(compiler, $1)=$CC
8729 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8731 AC_LIBTOOL_CONFIG($1)
8735 ])# AC_LIBTOOL_LANG_RC_CONFIG
8738 # AC_LIBTOOL_CONFIG([TAGNAME])
8739 # ----------------------------
8740 # If TAGNAME is not passed, then create an initial libtool script
8741 # with a default configuration from the untagged config vars. Otherwise
8742 # add code to config.status for appending the configuration named by
8743 # TAGNAME from the matching tagged config vars.
8744 AC_DEFUN([AC_LIBTOOL_CONFIG],
8745 [# The else clause should only fire when bootstrapping the
8746 # libtool distribution, otherwise you forgot to ship ltmain.sh
8747 # with your package, and you will get complaints that there are
8748 # no rules to generate ltmain.sh.
8749 if test -f "$ltmain"; then
8750 # Now quote all the things that may contain metacharacters while being
8751 # careful not to overquote the AC_SUBSTed values. We take copies of the
8752 # variables and quote the copies for generation of the libtool script.
8753 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8754 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8755 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8756 deplibs_check_method reload_flag reload_cmds need_locks \
8757 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8758 lt_cv_sys_global_symbol_to_c_name_address \
8759 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8760 old_postinstall_cmds old_postuninstall_cmds \
8761 _LT_AC_TAGVAR(compiler, $1) \
8762 _LT_AC_TAGVAR(CC, $1) \
8763 _LT_AC_TAGVAR(LD, $1) \
8764 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8765 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8766 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8767 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8768 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8769 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8770 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8771 _LT_AC_TAGVAR(old_archive_cmds, $1) \
8772 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8773 _LT_AC_TAGVAR(predep_objects, $1) \
8774 _LT_AC_TAGVAR(postdep_objects, $1) \
8775 _LT_AC_TAGVAR(predeps, $1) \
8776 _LT_AC_TAGVAR(postdeps, $1) \
8777 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8778 _LT_AC_TAGVAR(archive_cmds, $1) \
8779 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8780 _LT_AC_TAGVAR(postinstall_cmds, $1) \
8781 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
8782 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8783 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
8784 _LT_AC_TAGVAR(no_undefined_flag, $1) \
8785 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
8786 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8787 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8788 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8789 _LT_AC_TAGVAR(exclude_expsyms, $1) \
8790 _LT_AC_TAGVAR(include_expsyms, $1); do
8793 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
8794 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8795 _LT_AC_TAGVAR(archive_cmds, $1) | \
8796 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8797 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8798 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8799 extract_expsyms_cmds | reload_cmds | finish_cmds | \
8800 postinstall_cmds | postuninstall_cmds | \
8801 old_postinstall_cmds | old_postuninstall_cmds | \
8802 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8803 # Double-quote double-evaled strings.
8804 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8807 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8813 *'\[$]0 --fallback-echo"')
8814 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8819 [cfgfile="${ofile}T"
8820 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8822 AC_MSG_NOTICE([creating $ofile])],
8825 cat <<__EOF__ >> "$cfgfile"
8829 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8830 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8831 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
8833 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8834 # Free Software Foundation, Inc.
8836 # This file is part of GNU Libtool:
8837 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8839 # This program is free software; you can redistribute it and/or modify
8840 # it under the terms of the GNU General Public License as published by
8841 # the Free Software Foundation; either version 2 of the License, or
8842 # (at your option) any later version.
8844 # This program is distributed in the hope that it will be useful, but
8845 # WITHOUT ANY WARRANTY; without even the implied warranty of
8846 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8847 # General Public License for more details.
8849 # You should have received a copy of the GNU General Public License
8850 # along with this program; if not, write to the Free Software
8851 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8853 # As a special exception to the GNU General Public License, if you
8854 # distribute this file as part of a program that contains a
8855 # configuration script generated by Autoconf, you may include it under
8856 # the same distribution terms that you use for the rest of that program.
8858 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
8859 Xsed="sed -e s/^X//"
8861 # The HP-UX ksh and POSIX shell print the target directory to stdout
8863 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8865 # The names of the tagged configurations supported by this script.
8868 # ### BEGIN LIBTOOL CONFIG],
8869 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8871 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8873 # Shell to use when invoking shell scripts.
8876 # Whether or not to build shared libraries.
8877 build_libtool_libs=$enable_shared
8879 # Whether or not to build static libraries.
8880 build_old_libs=$enable_static
8882 # Whether or not to add -lc for building shared libraries.
8883 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8885 # Whether or not to optimize for fast installation.
8886 fast_install=$enable_fast_install
8889 host_alias=$host_alias
8892 # An echo program that does not interpret backslashes.
8897 AR_FLAGS=$lt_AR_FLAGS
8902 # A language-specific compiler.
8903 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8905 # Is the compiler the GNU C compiler?
8906 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8908 # The linker used to build libraries.
8909 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8911 # Whether we need hard or soft links.
8914 # A BSD-compatible nm program.
8917 # A sed program that does not truncate output.
8920 # A symbol stripping program
8923 # Used to examine libraries when file_magic_cmd begins "file"
8924 MAGIC_CMD=$MAGIC_CMD
8926 # Used on cygwin: DLL creation program.
8929 # Used on cygwin: object dumper.
8932 # Used on cygwin: assembler.
8935 # The name of the directory that contains temporary libtool files.
8938 # How to create reloadable object files.
8939 reload_flag=$lt_reload_flag
8940 reload_cmds=$lt_reload_cmds
8942 # How to pass a linker flag through the compiler.
8943 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8945 # Object file suffix (normally "o").
8948 # Old archive suffix (normally "a").
8951 # Executable file suffix (normally "").
8954 # Additional compiler flags for building library objects.
8955 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8958 # What is the maximum length of a command?
8959 max_cmd_len=$lt_cv_sys_max_cmd_len
8961 # Does compiler simultaneously support -c and -o options?
8962 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8964 # Must we lock files when doing compilation ?
8965 need_locks=$lt_need_locks
8967 # Do we need the lib prefix for modules?
8968 need_lib_prefix=$need_lib_prefix
8970 # Do we need a version for libraries?
8971 need_version=$need_version
8973 # Whether dlopen is supported.
8974 dlopen_support=$enable_dlopen
8976 # Whether dlopen of programs is supported.
8977 dlopen_self=$enable_dlopen_self
8979 # Whether dlopen of statically linked programs is supported.
8980 dlopen_self_static=$enable_dlopen_self_static
8982 # Compiler flag to prevent dynamic linking.
8983 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
8985 # Compiler flag to turn off builtin functions.
8986 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
8988 # Compiler flag to allow reflexive dlopens.
8989 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
8991 # Compiler flag to generate shared objects directly from archives.
8992 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
8994 # Compiler flag to generate thread-safe objects.
8995 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
8997 # Library versioning type.
8998 version_type=$version_type
9000 # Format of library name prefix.
9001 libname_spec=$lt_libname_spec
9003 # List of archive names. First name is the real one, the rest are links.
9004 # The last name is the one that the linker finds with -lNAME.
9005 library_names_spec=$lt_library_names_spec
9007 # The coded name of the library, if different from the real name.
9008 soname_spec=$lt_soname_spec
9010 # Commands used to build and install an old-style archive.
9012 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9013 old_postinstall_cmds=$lt_old_postinstall_cmds
9014 old_postuninstall_cmds=$lt_old_postuninstall_cmds
9016 # Create an old-style archive from a shared archive.
9017 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9019 # Create a temporary old-style archive to link instead of a shared archive.
9020 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9022 # Commands used to build and install a shared archive.
9023 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9024 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9025 postinstall_cmds=$lt_postinstall_cmds
9026 postuninstall_cmds=$lt_postuninstall_cmds
9028 # Commands to strip libraries.
9029 old_striplib=$lt_old_striplib
9030 striplib=$lt_striplib
9032 # Dependencies to place before the objects being linked to create a
9034 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9036 # Dependencies to place after the objects being linked to create a
9038 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9040 # Dependencies to place before the objects being linked to create a
9042 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9044 # Dependencies to place after the objects being linked to create a
9046 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9048 # The library search path used internally by the compiler when linking
9050 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9052 # Method to check whether dependent libraries are shared objects.
9053 deplibs_check_method=$lt_deplibs_check_method
9055 # Command to use when deplibs_check_method == file_magic.
9056 file_magic_cmd=$lt_file_magic_cmd
9058 # Flag that allows shared libraries with undefined symbols to be built.
9059 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9061 # Flag that forces no undefined symbols.
9062 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9064 # Commands used to finish a libtool library installation in a directory.
9065 finish_cmds=$lt_finish_cmds
9067 # Same as above, but a single script fragment to be evaled but not shown.
9068 finish_eval=$lt_finish_eval
9070 # Take the output of nm and produce a listing of raw symbols and C names.
9071 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9073 # Transform the output of nm in a proper C declaration
9074 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9076 # Transform the output of nm in a C name address pair
9077 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9079 # This is the shared library runtime path variable.
9080 runpath_var=$runpath_var
9082 # This is the shared library path variable.
9083 shlibpath_var=$shlibpath_var
9085 # Is shlibpath searched before the hard-coded library search path?
9086 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9088 # How to hardcode a shared library path into an executable.
9089 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9091 # Whether we should hardcode library paths into libraries.
9092 hardcode_into_libs=$hardcode_into_libs
9094 # Flag to hardcode \$libdir into a binary during linking.
9095 # This must work even if \$libdir does not exist.
9096 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9098 # Whether we need a single -rpath flag with a separated argument.
9099 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9101 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9103 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9105 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9107 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9109 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9110 # the resulting binary.
9111 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9113 # Variables whose values should be saved in libtool wrapper scripts and
9114 # restored at relink time.
9115 variables_saved_for_relink="$variables_saved_for_relink"
9117 # Whether libtool must link a program against all its dependency libraries.
9118 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9120 # Compile-time system search path for libraries
9121 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9123 # Run-time system search path for libraries
9124 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9126 # Fix the shell variable \$srcfile for the compiler.
9127 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9129 # Set to yes if exported symbols are required.
9130 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9132 # The commands to list exported symbols.
9133 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9135 # The commands to extract the exported symbol list from a shared archive.
9136 extract_expsyms_cmds=$lt_extract_expsyms_cmds
9138 # Symbols that should not be listed in the preloaded symbols.
9139 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9141 # Symbols that must always be exported.
9142 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9145 [# ### END LIBTOOL CONFIG],
9146 [# ### END LIBTOOL TAG CONFIG: $tagname])
9153 cat <<\EOF >> "$cfgfile"
9155 # AIX sometimes has problems with the GCC collect2 program. For some
9156 # reason, if we set the COLLECT_NAMES environment variable, the problems
9157 # vanish in a puff of smoke.
9158 if test "X${COLLECT_NAMES+set}" != Xset; then
9160 export COLLECT_NAMES
9165 cygwin* | mingw* | pw32* | os2*)
9166 cat <<'EOF' >> "$cfgfile"
9167 # This is a source program that is used to create dlls on Windows
9168 # Don't remove nor modify the starting and closing comments
9170 # This is a source program that is used to create import libraries
9171 # on Windows for dlls which lack them. Don't remove nor modify the
9172 # starting and closing comments
9173 _LT_AC_FILE_IMPGEN_C
9178 # We use sed instead of cat because bash on DJGPP gets confused if
9179 # if finds mixed CR/LF and LF-only lines. Since sed operates in
9180 # text mode, it properly converts lines to CR/LF. This bash problem
9181 # is reportedly fixed, but why not run on old versions too?
9182 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9184 mv -f "$cfgfile" "$ofile" || \
9185 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9189 # If there is no Makefile yet, we rely on a make rule to execute
9190 # `config.status --recheck' to rerun these tests and create the
9191 # libtool script then.
9192 test -f Makefile && make "$ltmain"
9194 ])# AC_LIBTOOL_CONFIG
9197 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9198 # -------------------------------------------
9199 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9200 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9202 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9204 if test "$GCC" = yes; then
9205 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9207 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9208 lt_cv_prog_compiler_rtti_exceptions,
9209 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
9210 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9212 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9215 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9216 # ---------------------------------
9217 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9218 [AC_REQUIRE([AC_CANONICAL_HOST])
9219 AC_REQUIRE([AC_PROG_NM])
9220 AC_REQUIRE([AC_OBJEXT])
9221 # Check for command to grab the raw symbol name followed by C symbol from nm.
9222 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9223 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9225 # These are sane defaults that work on at least a few old systems.
9226 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
9228 # Character class describing NM global symbol codes.
9229 symcode='[[BCDEGRST]]'
9231 # Regexp to match symbols that can be accessed directly from C.
9232 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9234 # Transform the above into a raw symbol and a C symbol.
9235 symxfrm='\1 \2\3 \3'
9237 # Transform an extracted symbol line into a proper C declaration
9238 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9240 # Transform an extracted symbol line into symbol name and symbol address
9241 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
9243 # Define system-specific variables.
9248 cygwin* | mingw* | pw32*)
9249 symcode='[[ABCDGISTW]]'
9251 hpux*) # Its linker distinguishes data from code symbols
9252 if test "$host_cpu" = ia64; then
9253 symcode='[[ABCDEGRST]]'
9255 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9256 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
9259 symcode='[[BCDEGRST]]'
9265 symcode='[[DFNSTU]]'
9269 # Handle CRLF in mingw tool chain
9273 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9277 # If we're using GNU nm, then use its standard symbol codes.
9278 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
9279 symcode='[[ABCDGISTW]]'
9282 # Try without a prefix undercore, then with it.
9283 for ac_symprfx in "" "_"; do
9285 # Write the raw and C identifiers.
9286 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9288 # Check to see that the pipe works correctly.
9292 cat > conftest.$ac_ext <<EOF
9297 void nm_test_func(){}
9301 int main(){nm_test_var='a';nm_test_func();return(0);}
9304 if AC_TRY_EVAL(ac_compile); then
9305 # Now try to grab the symbols.
9307 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9308 # Try sorting and uniquifying the output.
9309 if sort "$nlist" | uniq > "$nlist"T; then
9310 mv -f "$nlist"T "$nlist"
9315 # Make sure that we snagged all the symbols we need.
9316 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
9317 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
9318 cat <<EOF > conftest.$ac_ext
9324 # Now generate the symbol file.
9325 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9327 cat <<EOF >> conftest.$ac_ext
9328 #if defined (__STDC__) && __STDC__
9329 # define lt_ptr_t void *
9331 # define lt_ptr_t char *
9335 /* The mapping between symbol names and symbols. */
9340 lt_preloaded_symbols[[]] =
9343 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9344 cat <<\EOF >> conftest.$ac_ext
9352 # Now try linking the two files.
9353 mv conftest.$ac_objext conftstm.$ac_objext
9354 lt_save_LIBS="$LIBS"
9355 lt_save_CFLAGS="$CFLAGS"
9356 LIBS="conftstm.$ac_objext"
9357 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9358 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9361 LIBS="$lt_save_LIBS"
9362 CFLAGS="$lt_save_CFLAGS"
9364 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9367 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9370 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9373 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9374 cat conftest.$ac_ext >&5
9376 rm -f conftest* conftst*
9378 # Do not use the global_symbol_pipe unless it works.
9379 if test "$pipe_works" = yes; then
9382 lt_cv_sys_global_symbol_pipe=
9386 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9387 lt_cv_sys_global_symbol_to_cdecl=
9389 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9390 AC_MSG_RESULT(failed)
9394 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9397 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9398 # ---------------------------------------
9399 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9400 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9401 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9402 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9404 AC_MSG_CHECKING([for $compiler option to produce PIC])
9406 # C++ specific cases for pic, static, wl, etc.
9407 if test "$GXX" = yes; then
9408 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9409 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9413 # All AIX code is PIC.
9414 if test "$host_cpu" = ia64; then
9415 # AIX 5 now supports IA64 processor
9416 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9420 # FIXME: we need at least 68020 code to build shared libraries, but
9421 # adding the `-m68020' flag to GCC prevents building anything better,
9423 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9425 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9426 # PIC is the default for these OSes.
9428 cygwin* | mingw* | os2*)
9429 # This hack is so that the source file can tell whether it is being
9430 # built for inclusion in a dll (and should export symbols for example).
9431 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9433 darwin* | rhapsody*)
9434 # PIC is the default on this platform
9435 # Common symbols not allowed in MH_DYLIB files
9436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9439 # DJGPP does not support shared libraries at all
9440 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9443 if test -d /usr/nec; then
9444 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9448 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9449 if test "$host_cpu" != ia64; then
9450 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9454 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9460 # All AIX code is PIC.
9461 if test "$host_cpu" = ia64; then
9462 # AIX 5 now supports IA64 processor
9463 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9465 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9469 case $cc_basename in
9471 # Green Hills C++ Compiler
9472 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
9477 case $cc_basename in
9479 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9482 # Green Hills C++ Compiler
9483 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9490 # FreeBSD uses GNU C++
9492 hpux9* | hpux10* | hpux11*)
9493 case $cc_basename in
9495 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9496 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9497 if test "$host_cpu" != ia64; then
9498 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9502 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9503 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9504 if test "$host_cpu" != ia64; then
9505 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9512 irix5* | irix6* | nonstopux*)
9513 case $cc_basename in
9515 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9516 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9517 # CC pic flag -KPIC is the default.
9524 case $cc_basename in
9527 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9528 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9532 # Make sure the PIC flag is empty. It appears that all Alpha
9533 # Linux and Compaq Tru64 Unix objects are PIC.
9534 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9535 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9546 case $cc_basename in
9548 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9556 osf3* | osf4* | osf5*)
9557 case $cc_basename in
9559 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9562 # Rational C++ 2.4.1
9563 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9566 # Digital/Compaq C++
9567 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9568 # Make sure the PIC flag is empty. It appears that all Alpha
9569 # Linux and Compaq Tru64 Unix objects are PIC.
9570 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9571 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9580 case $cc_basename in
9582 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9589 case $cc_basename in
9591 # Sun C++ 4.2, 5.x and Centerline C++
9592 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9593 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9594 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9597 # Green Hills C++ Compiler
9598 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9605 case $cc_basename in
9608 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9609 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9613 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9620 case $cc_basename in
9622 # NonStop-UX NCC 3.20
9623 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9634 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9640 if test "$GCC" = yes; then
9641 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9642 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9646 # All AIX code is PIC.
9647 if test "$host_cpu" = ia64; then
9648 # AIX 5 now supports IA64 processor
9649 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9654 # FIXME: we need at least 68020 code to build shared libraries, but
9655 # adding the `-m68020' flag to GCC prevents building anything better,
9657 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9660 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9661 # PIC is the default for these OSes.
9664 cygwin* | mingw* | pw32* | os2*)
9665 # This hack is so that the source file can tell whether it is being
9666 # built for inclusion in a dll (and should export symbols for example).
9667 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9670 darwin* | rhapsody*)
9671 # PIC is the default on this platform
9672 # Common symbols not allowed in MH_DYLIB files
9673 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9677 # Just because we use GCC doesn't mean we suddenly get shared libraries
9678 # on systems that don't support them.
9679 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9684 if test -d /usr/nec; then
9685 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9690 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9691 if test "$host_cpu" != ia64; then
9692 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9697 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9701 # PORTME Check for flag to pass linker flags through the system compiler.
9704 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9705 if test "$host_cpu" = ia64; then
9706 # AIX 5 now supports IA64 processor
9707 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9709 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9713 cygwin* | mingw* | pw32* | os2*)
9714 # This hack is so that the source file can tell whether it is being
9715 # built for inclusion in a dll (and should export symbols for example).
9716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9719 hpux9* | hpux10* | hpux11*)
9720 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9721 if test "$host_cpu" != ia64; then
9722 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9724 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9725 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9728 irix5* | irix6* | nonstopux*)
9729 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9730 # PIC (with -KPIC) is the default.
9731 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9735 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9736 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9739 osf3* | osf4* | osf5*)
9740 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9741 # All OSF/1 code is PIC.
9742 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9746 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9747 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9751 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9752 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9753 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9757 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9758 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9759 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9762 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9763 if test "x$host_vendor" = xsni; then
9764 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9766 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9768 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9769 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9773 if test -d /usr/nec ;then
9774 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9775 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9780 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9781 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9785 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9790 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9793 # Check to make sure the PIC flag actually works.
9795 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9796 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9797 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9798 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9799 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9801 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9803 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9804 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9807 # For platforms which do not support PIC, -DPIC is meaningless:
9809 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9812 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9818 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9819 # ------------------------------------
9820 # See if the linker supports building shared libraries.
9821 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9822 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9824 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9827 # If we're using GNU nm, then we don't want the "-C" option.
9828 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9829 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9830 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
9832 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
9835 cygwin* | mingw* | pw32*)
9836 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9839 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9844 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9846 _LT_AC_TAGVAR(archive_cmds, $1)=
9847 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9848 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9849 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9850 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9851 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9852 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9853 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9854 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9855 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9856 _LT_AC_TAGVAR(hardcode_direct, $1)=no
9857 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9858 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9859 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9860 _LT_AC_TAGVAR(always_export_symbols, $1)=no
9861 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9862 # include_expsyms should be a list of space-separated symbols to be *always*
9863 # included in the symbol list
9864 _LT_AC_TAGVAR(include_expsyms, $1)=
9865 # exclude_expsyms can be an egrep regular expression of symbols to exclude
9866 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9867 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9868 # as well as any symbol that contains `d'.
9869 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9870 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9871 # platforms (ab)use it in PIC code, but their linkers get confused if
9872 # the symbol is explicitly referenced. Since portable code cannot
9873 # rely on this symbol name, it's probably fine to never include it in
9874 # preloaded symbol tables.
9875 extract_expsyms_cmds=
9878 cygwin* | mingw* | pw32*)
9879 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9880 # When not using gcc, we currently assume that we are using
9881 # Microsoft Visual C++.
9882 if test "$GCC" != yes; then
9891 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9892 if test "$with_gnu_ld" = yes; then
9893 # If archive_cmds runs LD, not CC, wlarc should be empty
9896 # See if GNU ld supports shared libraries.
9898 aix3* | aix4* | aix5*)
9899 # On AIX/PPC, the GNU linker is very broken
9900 if test "$host_cpu" != ia64; then
9901 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9904 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9905 *** to be unable to reliably create shared libraries on AIX.
9906 *** Therefore, libtool is disabling shared libraries support. If you
9907 *** really care for shared libraries, you may want to modify your PATH
9908 *** so that a non-GNU linker is found, and then restart.
9915 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9916 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9917 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9919 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9920 # that the semantics of dynamic libraries on AmigaOS, at least up
9921 # to version 4, is to share data among multiple programs linked
9922 # with the same dynamic library. Since this doesn't match the
9923 # behavior of shared libraries on other platforms, we can't use
9925 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9929 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9930 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9931 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9932 # support --undefined. This deserves some investigation. FIXME
9933 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9935 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9939 cygwin* | mingw* | pw32*)
9940 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9941 # no search path for DLLs.
9942 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9943 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9944 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
9946 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9947 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9948 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9949 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9950 else $CC -o impgen impgen.c ; fi)~
9951 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9953 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9955 # cygwin and mingw dlls have different entry points and sets of symbols
9957 # FIXME: what about values for MSVC?
9958 dll_entry=__cygwin_dll_entry@12
9959 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9963 dll_entry=_DllMainCRTStartup@12
9964 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
9968 # mingw and cygwin differ, and it's simplest to just exclude the union
9969 # of the two symbol sets.
9970 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
9972 # recent cygwin and mingw systems supply a stub DllMain which the user
9973 # can override, but on older systems we have to supply one (in ltdll.c)
9974 if test "x$lt_cv_need_dllmain" = "xyes"; then
9975 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
9976 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
9977 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
9983 # Extract the symbol export list from an `--export-all' def file,
9984 # then regenerate the def file from the symbol export list, so that
9985 # the compiled dll only exports the symbol export list.
9986 # Be careful not to strip the DATA tag left by newer dlltools.
9987 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
9988 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
9989 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
9991 # If the export-symbols file already is a .def file (1st line
9992 # is EXPORTS), use it as is.
9993 # If DATA tags from a recent dlltool are present, honour them!
9994 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
9995 cp $export_symbols $output_objdir/$soname-def;
9997 echo EXPORTS > $output_objdir/$soname-def;
9999 cat $export_symbols | while read symbol; do
10000 set dummy \$symbol;
10002 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
10003 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
10005 _lt_hint=`expr 1 + \$_lt_hint`;
10009 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
10010 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
10011 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
10012 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
10013 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
10017 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10018 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10021 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10022 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10027 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
10028 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10031 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10032 *** create shared libraries on Solaris systems. Therefore, libtool
10033 *** is disabling shared libraries support. We urge you to upgrade GNU
10034 *** binutils to release 2.9.1 or newer. Another option is to modify
10035 *** your PATH or compiler configuration so that the native linker is
10036 *** used, and then restart.
10039 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10040 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10041 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10043 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10048 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10050 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10051 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10055 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10056 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10057 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10059 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10064 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10065 runpath_var=LD_RUN_PATH
10066 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10067 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10069 cygwin* | mingw* | pw32*)
10070 # dlltool doesn't understand --whole-archive et. al.
10071 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10074 # ancient GNU ld didn't support --whole-archive et. al.
10075 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
10076 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10078 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10084 # PORTME fill in a description of your system's linker (not GNU ld)
10087 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10088 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10089 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
10090 # Note: this linker hardcodes the directories in LIBPATH if there
10091 # are no directories specified by -L.
10092 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10093 if test "$GCC" = yes && test -z "$link_static_flag"; then
10094 # Neither direct hardcoding nor static linking is supported with a
10096 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10101 if test "$host_cpu" = ia64; then
10102 # On IA64, the linker does run time linking by default, so we don't
10103 # have to do anything special.
10104 aix_use_runtimelinking=no
10105 exp_sym_flag='-Bexport'
10108 # If we're using GNU nm, then we don't want the "-C" option.
10109 # -C means demangle to AIX nm, but means don't demangle with GNU nm
10110 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
10111 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
10113 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
10116 # KDE requires run time linking. Make it the default.
10117 aix_use_runtimelinking=yes
10118 exp_sym_flag='-bexport'
10119 no_entry_flag='-bnoentry'
10122 # When large executables or shared objects are built, AIX ld can
10123 # have problems creating the table of contents. If linking a library
10124 # or program results in "error TOC overflow" add -mminimal-toc to
10125 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10126 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10128 _LT_AC_TAGVAR(archive_cmds, $1)=''
10129 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10130 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10131 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10133 if test "$GCC" = yes; then
10134 case $host_os in aix4.[012]|aix4.[012].*)
10135 # We only want to do this on AIX 4.2 and lower, the check
10136 # below for broken collect2 doesn't work under 4.3+
10137 collect2name=`${CC} -print-prog-name=collect2`
10138 if test -f "$collect2name" && \
10139 strings "$collect2name" | grep resolve_lib_name >/dev/null
10141 # We have reworked collect2
10142 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10144 # We have old collect2
10145 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10146 # It fails to find uninstalled libraries when the uninstalled
10147 # path is not listed in the libpath. Setting hardcode_minus_L
10148 # to unsupported forces relinking
10149 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10150 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10151 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10154 shared_flag='-shared'
10157 if test "$host_cpu" = ia64; then
10158 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10159 # chokes on -Wl,-G. The following line is correct:
10162 if test "$aix_use_runtimelinking" = yes; then
10163 shared_flag='-qmkshrobj ${wl}-G'
10165 shared_flag='-qmkshrobj'
10170 # Let the compiler handle the export list.
10171 _LT_AC_TAGVAR(always_export_symbols, $1)=no
10172 if test "$aix_use_runtimelinking" = yes; then
10173 # Warning - without using the other runtime loading flags (-brtl),
10174 # -berok will link without error, but may produce a broken library.
10175 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10176 # Determine the default libpath from the value encoded in an empty executable.
10177 _LT_AC_SYS_LIBPATH_AIX
10178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10179 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10180 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10182 if test "$host_cpu" = ia64; then
10183 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10184 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10185 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10187 # Determine the default libpath from the value encoded in an empty executable.
10188 _LT_AC_SYS_LIBPATH_AIX
10189 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10190 # Warning - without using the other run time loading flags,
10191 # -berok will link without error, but may produce a broken library.
10192 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10193 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10194 # -bexpall does not export symbols beginning with underscore (_)
10195 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10196 # Exported symbols can be pulled into shared objects from archives
10197 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10198 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10199 # This is similar to how AIX traditionally builds it's shared libraries.
10200 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10206 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
10207 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10208 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10209 # see comment about different semantics on the GNU ld section
10210 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10214 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10217 cygwin* | mingw* | pw32*)
10218 # When not using gcc, we currently assume that we are using
10219 # Microsoft Visual C++.
10220 # hardcode_libdir_flag_spec is actually meaningless, as there is
10221 # no search path for DLLs.
10222 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10223 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10224 # Tell ltmain to make .lib files, not .a files.
10226 # FIXME: Setting linknames here is a bad hack.
10227 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
10228 # The linker will automatically build a .lib file if we build a DLL.
10229 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10230 # FIXME: Should let the user specify the lib program.
10231 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10232 fix_srcfile_path='`cygpath -w "$srcfile"`'
10235 darwin* | rhapsody*)
10237 rhapsody* | darwin1.[[012]])
10238 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10241 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10245 # FIXME: Relying on posixy $() will cause problems for
10246 # cross-compilation, but unfortunately the echo tests do not
10247 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
10248 # `"' quotes if we put them in here... so don't!
10249 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
10250 # We need to add '_' to the symbols in $export_symbols first
10251 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
10252 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10253 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10254 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10258 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10259 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10260 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10264 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10267 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10268 # support. Future versions do this automatically, but an explicit c++rt0.o
10269 # does not break anything, and helps significantly (at the cost of a little
10272 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10273 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10274 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10275 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10278 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10280 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10281 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10282 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10283 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10286 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10288 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10289 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10290 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10291 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10294 hpux9* | hpux10* | hpux11*)
10295 if test "$GCC" = yes; then
10298 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10301 if test "$host_cpu" = ia64; then
10302 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10304 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10311 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10314 if test "$host_cpu" = ia64; then
10315 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10317 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10322 if test "$host_cpu" = ia64; then
10323 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10324 _LT_AC_TAGVAR(hardcode_direct, $1)=no
10325 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10327 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10328 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10329 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10331 # hardcode_minus_L: Not really in the search PATH,
10332 # but as the default location of the library.
10333 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10334 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10337 irix5* | irix6* | nonstopux*)
10338 if test "$GCC" = yes; then
10339 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10341 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
10343 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10344 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10345 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10349 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10350 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10352 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10355 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10356 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10360 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10361 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10364 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10368 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10369 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10371 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10373 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10374 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10377 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10378 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10379 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10382 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10383 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10390 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10391 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10392 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10393 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
10394 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10398 if test "$GCC" = yes; then
10399 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10400 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10402 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10403 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
10405 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10406 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10409 osf4* | osf5*) # as osf3* with the addition of -msym flag
10410 if test "$GCC" = yes; then
10411 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10412 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10413 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10415 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10416 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
10417 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
10418 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
10420 # Both c and cxx compiler support -rpath directly
10421 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10423 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10427 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10428 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10429 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10430 runpath_var=LD_RUN_PATH
10431 hardcode_runpath_var=yes
10435 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10436 if test "$GCC" = yes; then
10437 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10438 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10439 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10441 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10442 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10443 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10445 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10446 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10448 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10449 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
10450 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10452 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10456 if test "x$host_vendor" = xsequent; then
10457 # Use $CC to link under sequent, because it throws in some extra .o
10458 # files that make .init and .fini sections work.
10459 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10461 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10463 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10464 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10465 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10466 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10470 if test "x$host_vendor" = xsni; then
10471 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
10472 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10474 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10475 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10477 runpath_var='LD_RUN_PATH'
10478 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10482 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10483 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10484 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10488 if test -d /usr/nec; then
10489 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10490 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10491 runpath_var=LD_RUN_PATH
10492 hardcode_runpath_var=yes
10493 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10498 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10499 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10500 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10501 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10502 hardcode_runpath_var=yes
10503 runpath_var=LD_RUN_PATH
10506 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10507 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10508 if test "$GCC" = yes; then
10509 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10511 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10513 runpath_var='LD_RUN_PATH'
10514 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10518 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10519 # $CC -shared without GNU ld will not create a library from C++
10520 # object files and a static libstdc++, better avoid it by now
10521 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10522 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10523 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10524 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10525 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10526 runpath_var='LD_RUN_PATH'
10530 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10532 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10536 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10541 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10542 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10544 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10545 if test "$GCC" = yes; then
10546 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10550 # Do we need to explicitly link libc?
10552 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10553 if test "$enable_shared" = yes && test "$GCC" = yes; then
10554 case $_LT_AC_TAGVAR(archive_cmds, $1) in
10556 # FIXME: we may have to deal with multi-command sequences.
10559 # Test whether the compiler implicitly links with -lc since on some
10560 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10561 # to ld, don't add -lc before -lgcc.
10562 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
10564 echo 'static int dummy;' > conftest.$ac_ext
10566 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10569 libobjs=conftest.$ac_objext
10571 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10577 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
10578 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10579 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
10581 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10583 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10585 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10587 cat conftest.err 1>&5
10590 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
10594 ])# AC_LIBTOOL_PROG_LD_SHLIBS
10597 # _LT_AC_FILE_LTDLL_C
10598 # -------------------
10599 # Be careful that the start marker always follows a newline.
10600 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
10601 # /* ltdll.c starts here */
10602 # #define WIN32_LEAN_AND_MEAN
10603 # #include <windows.h>
10604 # #undef WIN32_LEAN_AND_MEAN
10605 # #include <stdio.h>
10607 # #ifndef __CYGWIN__
10608 # # ifdef __CYGWIN32__
10609 # # define __CYGWIN__ __CYGWIN32__
10613 # #ifdef __cplusplus
10616 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
10617 # #ifdef __cplusplus
10621 # #ifdef __CYGWIN__
10622 # #include <cygwin/cygwin_dll.h>
10623 # DECLARE_CYGWIN_DLL( DllMain );
10625 # HINSTANCE __hDllInstance_base;
10628 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
10630 # __hDllInstance_base = hInst;
10633 # /* ltdll.c ends here */
10634 ])# _LT_AC_FILE_LTDLL_C
10637 # _LT_AC_FILE_IMPGEN_C
10638 # --------------------
10639 # Be careful that the start marker always follows a newline.
10640 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10641 # /* impgen.c starts here */
10642 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10644 # This file is part of GNU libtool.
10646 # This program is free software; you can redistribute it and/or modify
10647 # it under the terms of the GNU General Public License as published by
10648 # the Free Software Foundation; either version 2 of the License, or
10649 # (at your option) any later version.
10651 # This program is distributed in the hope that it will be useful,
10652 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10653 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10654 # GNU General Public License for more details.
10656 # You should have received a copy of the GNU General Public License
10657 # along with this program; if not, write to the Free Software
10658 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10661 # #include <stdio.h> /* for printf() */
10662 # #include <unistd.h> /* for open(), lseek(), read() */
10663 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
10664 # #include <string.h> /* for strdup() */
10666 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
10668 # #define O_BINARY 0
10671 # static unsigned int
10672 # pe_get16 (fd, offset)
10676 # unsigned char b[2];
10677 # lseek (fd, offset, SEEK_SET);
10679 # return b[0] + (b[1]<<8);
10682 # static unsigned int
10683 # pe_get32 (fd, offset)
10687 # unsigned char b[4];
10688 # lseek (fd, offset, SEEK_SET);
10690 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10693 # static unsigned int
10697 # unsigned char *b = ptr;
10698 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10702 # main (argc, argv)
10707 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10708 # unsigned long export_rva, export_size, nsections, secptr, expptr;
10709 # unsigned long name_rvas, nexp;
10710 # unsigned char *expdata, *erva;
10711 # char *filename, *dll_name;
10713 # filename = argv[1];
10715 # dll = open(filename, O_RDONLY|O_BINARY);
10719 # dll_name = filename;
10721 # for (i=0; filename[i]; i++)
10722 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
10723 # dll_name = filename + i +1;
10725 # pe_header_offset = pe_get32 (dll, 0x3c);
10726 # opthdr_ofs = pe_header_offset + 4 + 20;
10727 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
10729 # if (num_entries < 1) /* no exports */
10732 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
10733 # export_size = pe_get32 (dll, opthdr_ofs + 100);
10734 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10735 # secptr = (pe_header_offset + 4 + 20 +
10736 # pe_get16 (dll, pe_header_offset + 4 + 16));
10739 # for (i = 0; i < nsections; i++)
10742 # unsigned long secptr1 = secptr + 40 * i;
10743 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10744 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10745 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10746 # lseek(dll, secptr1, SEEK_SET);
10747 # read(dll, sname, 8);
10748 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
10750 # expptr = fptr + (export_rva - vaddr);
10751 # if (export_rva + export_size > vaddr + vsize)
10752 # export_size = vsize - (export_rva - vaddr);
10757 # expdata = (unsigned char*)malloc(export_size);
10758 # lseek (dll, expptr, SEEK_SET);
10759 # read (dll, expdata, export_size);
10760 # erva = expdata - export_rva;
10762 # nexp = pe_as32 (expdata+24);
10763 # name_rvas = pe_as32 (expdata+32);
10765 # printf ("EXPORTS\n");
10766 # for (i = 0; i<nexp; i++)
10768 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10769 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10774 # /* impgen.c ends here */
10775 ])# _LT_AC_FILE_IMPGEN_C
10777 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10778 # ---------------------------------
10779 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10783 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
10784 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10785 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10786 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10787 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10788 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
10789 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
10791 # This is just to silence aclocal about the macro not being used
10792 ifelse([AC_DISABLE_FAST_INSTALL])
10794 AC_DEFUN([LT_AC_PROG_GCJ],
10795 [AC_CHECK_TOOL(GCJ, gcj, no)
10796 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10800 AC_DEFUN([LT_AC_PROG_RC],
10801 [AC_CHECK_TOOL(RC, windres, no)
10804 # NOTE: This macro has been submitted for inclusion into #
10805 # GNU Autoconf as AC_PROG_SED. When it is available in #
10806 # a released version of Autoconf we should remove this #
10807 # macro and use it instead. #
10810 # Check for a fully-functional sed program, that truncates
10811 # as few characters as possible. Prefer GNU sed if found.
10812 AC_DEFUN([LT_AC_PROG_SED],
10813 [AC_MSG_CHECKING([for a sed that does not truncate output])
10814 AC_CACHE_VAL(lt_cv_path_SED,
10815 [# Loop through the user's path and test for sed and gsed.
10816 # Then use that list of sed's as ones to test for truncation.
10817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10818 for as_dir in $PATH
10821 test -z "$as_dir" && as_dir=.
10822 for ac_prog in sed gsed; do
10823 for ac_exec_ext in '' $ac_executable_extensions; do
10824 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10825 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10831 # Create a temporary directory, and hook for its removal unless debugging.
10834 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10835 trap '{ (exit 1); exit 1; }' 1 2 13 15
10838 # Create a (secure) tmp directory for tmp files.
10841 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10842 test -n "$tmp" && test -d "$tmp"
10845 tmp=$TMPDIR/sed$$-$RANDOM
10846 (umask 077 && mkdir $tmp)
10849 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10850 { (exit 1); exit 1; }
10854 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
10855 # along with /bin/sed that truncates output.
10856 for _sed in $_sed_list /usr/xpg4/bin/sed; do
10857 test ! -f ${_sed} && break
10858 cat /dev/null > "$tmp/sed.in"
10860 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10861 # Check for GNU sed and select it if it is found.
10862 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10863 lt_cv_path_SED=${_sed}
10867 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10868 mv "$tmp/sed.tmp" "$tmp/sed.in"
10869 cp "$tmp/sed.in" "$tmp/sed.nl"
10870 echo >>"$tmp/sed.nl"
10871 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10872 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10873 # 10000 chars as input seems more than enough
10874 test $_count -gt 10 && break
10875 _count=`expr $_count + 1`
10876 if test $_count -gt $_max; then
10878 lt_cv_path_SED=$_sed
10884 AC_MSG_RESULT([$SED])
10887 # Do all the work for Automake. This macro actually does too much --
10888 # some checks are only needed if your package does certain things.
10889 # But this isn't really a big deal.
10894 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
10896 AC_DEFUN([AM_INIT_AUTOMAKE],
10897 [AC_REQUIRE([AC_PROG_INSTALL])
10902 dnl test to see if srcdir already configured
10903 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
10904 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10907 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10908 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
10909 AC_REQUIRE([AM_SANITY_CHECK])
10910 AC_REQUIRE([AC_ARG_PROGRAM])
10911 dnl FIXME This is truly gross.
10912 missing_dir=`cd $ac_aux_dir && pwd`
10913 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
10914 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
10915 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
10916 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
10917 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
10918 AC_REQUIRE([AC_PROG_MAKE_SET])])
10921 # Check to make sure that the build environment is sane.
10924 AC_DEFUN([AM_SANITY_CHECK],
10925 [AC_MSG_CHECKING([whether build environment is sane])
10928 echo timestamp > conftestfile
10929 # Do `set' in a subshell so we don't clobber the current shell's
10930 # arguments. Must try -L first in case configure is actually a
10931 # symlink; some systems play weird games with the mod time of symlinks
10932 # (eg FreeBSD returns the mod time of the symlink's containing
10935 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
10936 if test "[$]*" = "X"; then
10938 set X `ls -t $srcdir/configure conftestfile`
10940 if test "[$]*" != "X $srcdir/configure conftestfile" \
10941 && test "[$]*" != "X conftestfile $srcdir/configure"; then
10943 # If neither matched, then we have a broken ls. This can happen
10944 # if, for instance, CONFIG_SHELL is bash and it inherits a
10945 # broken ls alias from the environment. This has actually
10946 # happened. Such a system could not be considered "sane".
10947 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10948 alias in your environment])
10951 test "[$]2" = conftestfile
10957 AC_MSG_ERROR([newly created file is older than distributed files!
10958 Check your system clock])
10961 AC_MSG_RESULT(yes)])
10963 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
10964 dnl The program must properly implement --version.
10965 AC_DEFUN([AM_MISSING_PROG],
10966 [AC_MSG_CHECKING(for working $2)
10967 # Run test in a subshell; some versions of sh will print an error if
10968 # an executable is not found, even if stderr is redirected.
10969 # Redirect stdin to placate older versions of autoconf. Sigh.
10970 if ($2 --version) < /dev/null > /dev/null 2>&1; then
10972 AC_MSG_RESULT(found)
10975 AC_MSG_RESULT(missing)
10981 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
10982 AC_DEFUN([AM_PROG_LEX],
10983 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
10984 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
10988 # Define a conditional.
10990 AC_DEFUN([AM_CONDITIONAL],
11001 # Like AC_CONFIG_HEADER, but automatically create stamp file.
11003 AC_DEFUN([AM_CONFIG_HEADER],
11005 AC_CONFIG_HEADER([$1])
11006 dnl When config.status generates a header, we must update the stamp-h file.
11007 dnl This file resides in the same directory as the config header
11008 dnl that is generated. We must strip everything past the first ":",
11009 dnl and everything past the last "/".
11010 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
11011 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
11012 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
11014 for am_file in <<$1>>; do
11015 case " <<$>>CONFIG_HEADERS " in
11016 *" <<$>>am_file "*<<)>>
11017 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
11020 am_indx=`expr "<<$>>am_indx" + 1`
11022 changequote([,]))])