3 dnl This file is part of the KDE libraries/packages
4 dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5 dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
7 dnl This file is free software; you can redistribute it and/or
8 dnl modify it under the terms of the GNU Library General Public
9 dnl License as published by the Free Software Foundation; either
10 dnl version 2 of the License, or (at your option) any later version.
12 dnl This library is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 dnl Library General Public License for more details.
17 dnl You should have received a copy of the GNU Library General Public License
18 dnl along with this library; see the file COPYING.LIB. If not, write to
19 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 dnl Boston, MA 02111-1307, USA.
23 dnl Please do not modify this file unless you expect your modifications to be
24 dnl carried into every other module in the repository.
26 dnl Single-module modifications are best placed in configure.in for kdelibs
27 dnl and kdebase or configure.in.in if present.
30 dnl Internal subroutine of AC_PATH_X.
31 dnl Set ac_x_includes and/or ac_x_libraries.
32 AC_DEFUN([KDE_PATH_X_DIRECT],
34 AC_REQUIRE([KDE_CHECK_LIB64])
36 if test "$ac_x_includes" = NO; then
37 # Guess where to find include files, by looking for this one X11 .h file.
38 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
40 # First, try using that file with no special directory specified.
41 AC_TRY_CPP([#include <$x_direct_test_include>],
42 [# We can compile using X headers with no special include directory.
44 [# Look for the header file in a standard set of common directories.
45 # Check X11 before X11Rn because it is often a symlink to the current release.
57 /usr/local/X11/include \
58 /usr/local/X11R6/include \
59 /usr/local/X11R5/include \
60 /usr/local/X11R4/include \
62 /usr/local/include/X11 \
63 /usr/local/include/X11R6 \
64 /usr/local/include/X11R5 \
65 /usr/local/include/X11R4 \
69 /usr/XFree86/include/X11 \
73 /usr/unsupported/include \
75 /usr/local/x11r5/include \
76 /usr/lpp/Xamples/include \
78 /usr/openwin/include \
79 /usr/openwin/share/include \
82 if test -r "$ac_dir/$x_direct_test_include"; then
87 fi # $ac_x_includes = NO
89 if test "$ac_x_libraries" = NO; then
90 # Check for the libraries.
92 test -z "$x_direct_test_library" && x_direct_test_library=Xt
93 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
95 # See if we find them without any special options.
96 # Don't add to $LIBS permanently.
98 LIBS="-l$x_direct_test_library $LIBS"
99 AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
100 [LIBS="$ac_save_LIBS"
101 # We can link X programs with no special library path.
103 [LIBS="$ac_save_LIBS"
104 # First see if replacing the include by lib works.
105 # Check X11 before X11Rn because it is often a symlink to the current release.
106 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
107 /usr/X11/lib${kdelibsuff} \
108 /usr/X11R6/lib${kdelibsuff} \
109 /usr/X11R5/lib${kdelibsuff} \
110 /usr/X11R4/lib${kdelibsuff} \
112 /usr/lib${kdelibsuff}/X11 \
113 /usr/lib${kdelibsuff}/X11R6 \
114 /usr/lib${kdelibsuff}/X11R5 \
115 /usr/lib${kdelibsuff}/X11R4 \
117 /usr/local/X11/lib${kdelibsuff} \
118 /usr/local/X11R6/lib${kdelibsuff} \
119 /usr/local/X11R5/lib${kdelibsuff} \
120 /usr/local/X11R4/lib${kdelibsuff} \
122 /usr/local/lib${kdelibsuff}/X11 \
123 /usr/local/lib${kdelibsuff}/X11R6 \
124 /usr/local/lib${kdelibsuff}/X11R5 \
125 /usr/local/lib${kdelibsuff}/X11R4 \
127 /usr/X386/lib${kdelibsuff} \
128 /usr/x386/lib${kdelibsuff} \
129 /usr/XFree86/lib${kdelibsuff}/X11 \
131 /usr/lib${kdelibsuff} \
132 /usr/local/lib${kdelibsuff} \
133 /usr/unsupported/lib${kdelibsuff} \
134 /usr/athena/lib${kdelibsuff} \
135 /usr/local/x11r5/lib${kdelibsuff} \
136 /usr/lpp/Xamples/lib${kdelibsuff} \
137 /lib/usr/lib${kdelibsuff}/X11 \
139 /usr/openwin/lib${kdelibsuff} \
140 /usr/openwin/share/lib${kdelibsuff} \
143 dnl Don't even attempt the hair of trying to link an X program!
144 for ac_extension in a so sl; do
145 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
146 ac_x_libraries=$ac_dir
151 fi # $ac_x_libraries = NO
155 dnl ------------------------------------------------------------------------
156 dnl Find a file (or one of more files in a list of dirs)
157 dnl ------------------------------------------------------------------------
159 AC_DEFUN([AC_FIND_FILE],
166 echo "configure: __oline__: $i/$j" >&AC_FD_CC
167 if test -r "$i/$j"; then
168 echo "taking that" >&AC_FD_CC
176 dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
177 dnl if-not-found, test-parameter, prepend-path)
179 dnl Look for program-name in list-of-dirs+$PATH.
180 dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
181 dnl If found, $variable-name is set. If not, if-not-found is evaluated.
182 dnl test-parameter: if set, the program is executed with this arg,
183 dnl and only a successful exit code is required.
184 AC_DEFUN([KDE_FIND_PATH],
186 AC_MSG_CHECKING([for $1])
187 if test -n "$$2"; then
190 kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
192 AC_CACHE_VAL(kde_cv_path_$kde_cache,
201 if test -z "$6"; then dnl Append dirs in PATH (default)
203 else dnl Prepend dirs in PATH (if 6th arg is set)
209 if test -x "$dir/$1"; then
212 evalstr="$dir/$1 $5 2>&1 "
213 if eval $evalstr; then
214 kde_cv_path="$dir/$1"
218 kde_cv_path="$dir/$1"
224 eval "kde_cv_path_$kde_cache=$kde_cv_path"
228 eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
232 if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
233 AC_MSG_RESULT(not found)
236 AC_MSG_RESULT($kde_cv_path)
242 AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
244 AC_MSG_ERROR([No Qt meta object compiler (moc) found!
245 Please check whether you installed Qt correctly.
246 You need to have a running moc binary.
247 configure tried to run $ac_cv_path_moc and the test didn't
248 succeed. If configure shouldn't have tried this one, set
249 the environment variable MOC to the right one before running
254 AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
256 AC_MSG_WARN([No Qt ui compiler (uic) found!
257 Please check whether you installed Qt correctly.
258 You need to have a running uic binary.
259 configure tried to run $ac_cv_path_uic and the test didn't
260 succeed. If configure shouldn't have tried this one, set
261 the environment variable UIC to the right one before running
267 AC_DEFUN([KDE_CHECK_UIC_FLAG],
269 AC_MSG_CHECKING([whether uic supports -$1 ])
270 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
271 AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
273 cat >conftest.ui <<EOT
274 <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
276 ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
277 if AC_TRY_EVAL(ac_uic_testrun); then
278 eval "kde_cv_prog_uic_$kde_cache=yes"
280 eval "kde_cv_prog_uic_$kde_cache=no"
285 if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
297 dnl ------------------------------------------------------------------------
298 dnl Find the meta object compiler and the ui compiler in the PATH,
299 dnl in $QTDIR/bin, and some more usual places
300 dnl ------------------------------------------------------------------------
302 AC_DEFUN([AC_PATH_QT_MOC_UIC],
304 AC_REQUIRE([KDE_CHECK_PERL])
306 for dir in $kde_qt_dirs; do
307 qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
309 qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
310 if test ! "$ac_qt_bindir" = "NO"; then
311 qt_bindirs="$ac_qt_bindir $qt_bindirs"
314 KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
315 if test -z "$UIC_NOT_NEEDED"; then
316 KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
317 if test -z "$UIC_PATH" ; then
318 KDE_UIC_ERROR_MESSAGE
323 if test $kde_qtver = 3; then
324 KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
325 KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
327 if test x$ac_uic_supports_libpath = xyes; then
328 UIC="$UIC -L \$(kde_widgetdir)"
330 if test x$ac_uic_supports_nounload = xyes; then
336 UIC="echo uic not available: "
343 if test $kde_qtver = 3; then
350 AC_DEFUN([KDE_1_CHECK_PATHS],
352 KDE_1_CHECK_PATH_HEADERS
356 if test -n "$USE_RPATH"; then
358 if test -n "$kde_libraries"; then
359 KDE_TEST_RPATH="-R $kde_libraries"
362 if test -n "$qt_libraries"; then
363 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
366 if test -n "$x_libraries"; then
367 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
370 KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
373 AC_MSG_CHECKING([for KDE libraries installed])
374 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'
376 if AC_TRY_EVAL(ac_link) && test -s conftest; then
379 AC_MSG_ERROR([your system fails at linking a small KDE application!
380 Check, if your compiler is installed correctly and if you have used the
381 same compiler to compile Qt and kdelibs as you did use now.
382 For more details about this problem, look at the end of config.log.])
385 if eval `KDEDIR= ./conftest 2>&5`; then
391 KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
392 kde_have_all_paths=yes
394 KDE_SET_PATHS($kde_result)
398 AC_DEFUN([KDE_SET_PATHS],
400 kde_cv_all_paths="kde_have_all_paths=\"yes\" \
401 kde_htmldir=\"$kde_htmldir\" \
402 kde_appsdir=\"$kde_appsdir\" \
403 kde_icondir=\"$kde_icondir\" \
404 kde_sounddir=\"$kde_sounddir\" \
405 kde_datadir=\"$kde_datadir\" \
406 kde_locale=\"$kde_locale\" \
407 kde_cgidir=\"$kde_cgidir\" \
408 kde_confdir=\"$kde_confdir\" \
409 kde_kcfgdir=\"$kde_kcfgdir\" \
410 kde_mimedir=\"$kde_mimedir\" \
411 kde_toolbardir=\"$kde_toolbardir\" \
412 kde_wallpaperdir=\"$kde_wallpaperdir\" \
413 kde_templatesdir=\"$kde_templatesdir\" \
414 kde_bindir=\"$kde_bindir\" \
415 kde_servicesdir=\"$kde_servicesdir\" \
416 kde_servicetypesdir=\"$kde_servicetypesdir\" \
417 kde_moduledir=\"$kde_moduledir\" \
418 kde_styledir=\"$kde_styledir\" \
419 kde_widgetdir=\"$kde_widgetdir\" \
420 xdg_appsdir=\"$xdg_appsdir\" \
421 xdg_menudir=\"$xdg_menudir\" \
422 xdg_directorydir=\"$xdg_directorydir\" \
426 AC_DEFUN([KDE_SET_DEFAULT_PATHS],
428 if test "$1" = "default"; then
430 if test -z "$kde_htmldir"; then
431 kde_htmldir='\${datadir}/doc/HTML'
433 if test -z "$kde_appsdir"; then
434 kde_appsdir='\${datadir}/applnk'
436 if test -z "$kde_icondir"; then
437 kde_icondir='\${datadir}/icons'
439 if test -z "$kde_sounddir"; then
440 kde_sounddir='\${datadir}/sounds'
442 if test -z "$kde_datadir"; then
443 kde_datadir='\${datadir}/apps'
445 if test -z "$kde_locale"; then
446 kde_locale='\${datadir}/locale'
448 if test -z "$kde_cgidir"; then
449 kde_cgidir='\${exec_prefix}/cgi-bin'
451 if test -z "$kde_confdir"; then
452 kde_confdir='\${datadir}/config'
454 if test -z "$kde_kcfgdir"; then
455 kde_kcfgdir='\${datadir}/config.kcfg'
457 if test -z "$kde_mimedir"; then
458 kde_mimedir='\${datadir}/mimelnk'
460 if test -z "$kde_toolbardir"; then
461 kde_toolbardir='\${datadir}/toolbar'
463 if test -z "$kde_wallpaperdir"; then
464 kde_wallpaperdir='\${datadir}/wallpapers'
466 if test -z "$kde_templatesdir"; then
467 kde_templatesdir='\${datadir}/templates'
469 if test -z "$kde_bindir"; then
470 kde_bindir='\${exec_prefix}/bin'
472 if test -z "$kde_servicesdir"; then
473 kde_servicesdir='\${datadir}/services'
475 if test -z "$kde_servicetypesdir"; then
476 kde_servicetypesdir='\${datadir}/servicetypes'
478 if test -z "$kde_moduledir"; then
479 if test "$kde_qtver" = "2"; then
480 kde_moduledir='\${libdir}/kde2'
482 kde_moduledir='\${libdir}/kde3'
485 if test -z "$kde_styledir"; then
486 kde_styledir='\${libdir}/kde3/plugins/styles'
488 if test -z "$kde_widgetdir"; then
489 kde_widgetdir='\${libdir}/kde3/plugins/designer'
491 if test -z "$xdg_appsdir"; then
492 xdg_appsdir='\${datadir}/applications/kde'
494 if test -z "$xdg_menudir"; then
495 xdg_menudir='\${sysconfdir}/xdg/menus'
497 if test -z "$xdg_directorydir"; then
498 xdg_directorydir='\${datadir}/desktop-directories'
501 KDE_SET_PATHS(defaults)
505 if test $kde_qtver = 1; then
506 AC_MSG_RESULT([compiling])
509 AC_MSG_ERROR([path checking not yet supported for KDE 2])
515 AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
516 [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
517 test -z "$kde_icondir" || test -z "$kde_sounddir" ||
518 test -z "$kde_datadir" || test -z "$kde_locale" ||
519 test -z "$kde_cgidir" || test -z "$kde_confdir" ||
520 test -z "$kde_kcfgdir" ||
521 test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
522 test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
523 test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
524 test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
525 test -z "$kde_styledir" || test -z "kde_widgetdir" ||
526 test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
527 test "x$kde_have_all_paths" != "xyes"; then
528 kde_have_all_paths=no
532 AC_DEFUN([KDE_MISSING_PROG_ERROR],
534 AC_MSG_ERROR([The important program $1 was not found!
535 Please check whether you installed KDE correctly.
539 AC_DEFUN([KDE_MISSING_ARTS_ERROR],
541 AC_MSG_ERROR([The important program $1 was not found!
542 Please check whether you installed aRts correctly or use
543 --without-arts to compile without aRts support (this will remove functionality).
547 AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
549 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"
550 test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
551 if test -n "$KDEDIRS"; then
554 for dir in $KDEDIRS; do
555 kde_default_bindirs="$dir/bin $kde_default_bindirs "
561 AC_DEFUN([KDE_SUBST_PROGRAMS],
564 AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
565 [build_arts=$withval],
568 AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
569 if test "$build_arts" = "no"; then
570 AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
573 KDE_SET_DEFAULT_BINDIRS
574 kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
575 KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
576 KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
577 if test "$build_arts" '!=' "no"; then
578 KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
579 KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
581 KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
585 if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
589 if test "$kde_qtver" = "3"; then
590 if test "$kde_qtsubver" -le 1; then
593 if test "$kde_qtsubver" -le 2 -o `kde-config --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` == 3.2; then
599 if test -n "$kde32ornewer"; then
600 KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
601 KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
603 if test -n "$kde33ornewer"; then
604 KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
605 AC_SUBST(MAKEKDEWIDGETS)
607 KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
609 if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
610 kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
611 test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
612 AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
613 if test "$KDE_XSL_STYLESHEET" = "NO"; then
614 KDE_XSL_STYLESHEET=""
616 KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
620 DCOP_DEPENDENCIES='$(DCOPIDL)'
621 if test -n "$kde32ornewer"; then
622 KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
623 DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
624 AC_SUBST(KCONFIG_COMPILER)
625 AC_SUBST(KCFG_DEPENDENCIES)
629 AC_SUBST(DCOPIDL2CPP)
630 AC_SUBST(DCOP_DEPENDENCIES)
632 AC_SUBST(ARTSCCONFIG)
634 AC_SUBST(KDE_XSL_STYLESHEET)
638 AC_DEFUN([AC_CREATE_KFSSTND],
640 AC_REQUIRE([AC_CHECK_RPATH])
642 AC_MSG_CHECKING([for KDE paths])
645 AC_CACHE_VAL(kde_cv_all_paths,
647 KDE_SET_DEFAULT_PATHS($1)
650 eval "$kde_cv_all_paths"
651 KDE_CHECK_PATHS_FOR_COMPLETENESS
652 if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
653 # wrong values were cached, may be, we can set better ones
655 kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
656 kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
657 kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
658 kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
662 xdg_appsdir = xdg_menudir= xdg_directorydir=
663 KDE_SET_DEFAULT_PATHS($1)
664 eval "$kde_cv_all_paths"
665 KDE_CHECK_PATHS_FOR_COMPLETENESS
666 kde_result="$kde_result (cache overridden)"
668 if test "$kde_have_all_paths" = "no"; then
669 AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
670 Since it had compiled and linked before, it must be a strange problem on your system.
671 Look at config.log for details. If you are not able to fix this, look at
672 http://www.kde.org/faq/installation.html or any www.kde.org mirror.
673 (If you're using an egcs version on Linux, you may update binutils!)
677 AC_MSG_RESULT($kde_result)
686 AC_DEFUN([AC_SUBST_KFSSTND],
688 AC_SUBST(kde_htmldir)
689 AC_SUBST(kde_appsdir)
690 AC_SUBST(kde_icondir)
691 AC_SUBST(kde_sounddir)
692 AC_SUBST(kde_datadir)
694 AC_SUBST(kde_confdir)
695 AC_SUBST(kde_kcfgdir)
696 AC_SUBST(kde_mimedir)
697 AC_SUBST(kde_wallpaperdir)
699 dnl X Desktop Group standards
700 AC_SUBST(xdg_appsdir)
701 AC_SUBST(xdg_menudir)
702 AC_SUBST(xdg_directorydir)
704 AC_SUBST(kde_templatesdir)
705 AC_SUBST(kde_servicesdir)
706 AC_SUBST(kde_servicetypesdir)
707 AC_SUBST(kde_moduledir)
708 AC_SUBST(kdeinitdir, '$(kde_moduledir)')
709 AC_SUBST(kde_styledir)
710 AC_SUBST(kde_widgetdir)
711 if test "$kde_qtver" = 1; then
712 kde_minidir="$kde_icondir/mini"
714 # for KDE 1 - this breaks KDE2 apps using minidir, but
715 # that's the plan ;-/
716 kde_minidir="/dev/null"
718 dnl AC_SUBST(kde_minidir)
719 dnl AC_SUBST(kde_cgidir)
720 dnl AC_SUBST(kde_toolbardir)
723 AC_DEFUN([KDE_MISC_TESTS],
725 dnl Checks for libraries.
726 AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
728 AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
731 AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
732 AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
733 AC_MSG_WARN([you have no crypt in either libcrypt or libc.
734 You should install libcrypt from another source or configure with PAM
739 if test $kde_have_crypt = yes; then
740 AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
743 AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
744 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
745 AC_CHECK_LIB(dnet_stub, dnet_ntoa,
746 [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
748 AC_CHECK_FUNC(inet_ntoa)
749 if test $ac_cv_func_inet_ntoa = no; then
750 AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
752 AC_CHECK_FUNC(connect)
753 if test $ac_cv_func_connect = no; then
754 AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
758 AC_CHECK_FUNC(remove)
759 if test $ac_cv_func_remove = no; then
760 AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
763 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
764 AC_CHECK_FUNC(shmat, ,
765 AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
767 # more headers that need to be explicitly included on darwin
768 AC_CHECK_HEADERS(sys/types.h stdint.h)
770 # sys/bitypes.h is needed for uint32_t and friends on Tru64
771 AC_CHECK_HEADERS(sys/bitypes.h)
773 # darwin requires a poll emulation library
774 AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
776 # for some image handling on Mac OS X
777 AC_CHECK_HEADERS(Carbon/Carbon.h)
779 # CoreAudio framework
780 AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
781 AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
782 FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
787 AC_SUBST(FRAMEWORK_COREAUDIO)
788 LIBSOCKET="$X_EXTRA_LIBS"
790 AC_SUBST(X_EXTRA_LIBS)
791 AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
794 case $host in dnl this *is* LynxOS specific
796 AC_MSG_CHECKING([LynxOS header file wrappers])
797 [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
798 AC_MSG_RESULT(disabled)
799 AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
807 # darwin needs this to initialize the environment
808 AC_CHECK_HEADERS(crt_externs.h)
809 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
811 AH_VERBATIM(_DARWIN_ENVIRON,
813 #if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
814 # include <sys/time.h>
815 # include <crt_externs.h>
816 # define environ (*_NSGetEnviron())
820 AH_VERBATIM(_AIX_STRINGS_H_BZERO,
823 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
824 * that defines bzero.
832 AC_CHECK_FUNCS([vsnprintf snprintf])
836 * On HP-UX, the declaration of vsnprintf() is needed every time !
839 #if !defined(HAVE_VSNPRINTF) || defined(hpux)
849 int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
853 int snprintf(char *str, size_t n, char const *fmt, ...);
859 dnl ------------------------------------------------------------------------
860 dnl Find the header files and libraries for X-Windows. Extended the
862 dnl ------------------------------------------------------------------------
866 AC_REQUIRE([KDE_MISC_TESTS])dnl
867 AC_REQUIRE([KDE_CHECK_LIB64])
871 AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
872 kde_use_qt_emb=$enableval,
878 AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
879 kde_use_qt_emb_palm=$enableval,
880 kde_use_qt_emb_palm=no
885 AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
886 kde_use_qt_mac=$enableval,
890 # used to disable x11-specific stuff on special platforms
891 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
893 if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
895 AC_MSG_CHECKING(for X)
897 AC_CACHE_VAL(kde_cv_have_x,
898 [# One or both of the vars are not set, and there is no cached value.
899 if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
902 kde_x_includes=$x_includes
904 if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
907 kde_x_libraries=$x_libraries
910 # below we use the standard autoconf calls
911 ac_x_libraries=$kde_x_libraries
912 ac_x_includes=$kde_x_includes
915 dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
916 dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
917 dnl location. The correct location is /usr/lib32 or an undefined value
918 dnl (the linker is smart enough to pick the correct default library).
919 dnl Things work just fine if you use just AC_PATH_X_DIRECT.
920 dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
921 dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
922 dnl x_includes should be left alone.
930 if test -z "$ac_x_includes"; then
933 if test -z "$ac_x_libraries"; then
934 ac_x_libraries="/usr/lib${kdelibsuff}"
937 #from now on we use our own again
939 # when the user already gave --x-includes, we ignore
940 # what the standard autoconf macros told us.
941 if test "$kde_x_includes" = NO; then
942 kde_x_includes=$ac_x_includes
945 # for --x-libraries too
946 if test "$kde_x_libraries" = NO; then
947 kde_x_libraries=$ac_x_libraries
950 if test "$kde_x_includes" = NO; then
951 AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
954 if test "$kde_x_libraries" = NO; then
955 AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
958 # Record where we found X for the cache.
959 kde_cv_have_x="have_x=yes \
960 kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
963 eval "$kde_cv_have_x"
965 if test "$have_x" != yes; then
966 AC_MSG_RESULT($have_x)
969 AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
972 if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
974 x_includes="."; dnl better than nothing :-
976 x_includes=$kde_x_includes
977 X_INCLUDES="-I$x_includes"
980 if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
982 x_libraries="/usr/lib"; dnl better than nothing :-
984 x_libraries=$kde_x_libraries
985 X_LDFLAGS="-L$x_libraries"
987 all_includes="$X_INCLUDES"
988 all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
990 # Check for libraries that X11R6 Xt/Xaw programs need.
991 ac_save_LDFLAGS="$LDFLAGS"
992 LDFLAGS="$LDFLAGS $X_LDFLAGS"
993 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
994 # check for ICE first), but we must link in the order -lSM -lICE or
995 # we get undefined symbols. So assume we have SM if we have ICE.
996 # These have to be linked with before -lX11, unlike the other
997 # libraries we check for below, so use a different variable.
998 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
999 AC_CHECK_LIB(ICE, IceConnectionNumber,
1000 [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1001 LDFLAGS="$ac_save_LDFLAGS"
1003 LIB_X11='-lX11 $(LIBSOCKET)'
1005 AC_MSG_CHECKING(for libXext)
1006 AC_CACHE_VAL(kde_cv_have_libXext,
1008 kde_ldflags_safe="$LDFLAGS"
1009 kde_libs_safe="$LIBS"
1011 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1012 LIBS="-lXext -lX11 $LIBSOCKET"
1017 # include <stdlib.h>
1021 printf("hello Xext\n");
1023 kde_cv_have_libXext=yes,
1024 kde_cv_have_libXext=no
1027 LDFLAGS=$kde_ldflags_safe
1031 AC_MSG_RESULT($kde_cv_have_libXext)
1033 if test "$kde_cv_have_libXext" = "no"; then
1034 AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1035 can't find it itself, we stop here assuming that make wouldn't find
1042 elif test "$kde_use_qt_emb" = "yes"; then
1043 dnl We're using QT Embedded
1045 CXXFLAGS="$CXXFLAGS -fno-rtti"
1046 QTE_NORTTI="-fno-rtti -DQWS"
1056 elif test "$kde_use_qt_mac" = "yes"; then
1057 dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1058 dnl be included to get the information) --Sam
1059 CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1060 CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1071 AC_SUBST(X_PRE_LIBS)
1073 AC_SUBST(LIB_XRENDER)
1075 AC_SUBST(X_INCLUDES)
1077 AC_SUBST(x_includes)
1078 AC_SUBST(x_libraries)
1079 AC_SUBST(QTE_NORTTI)
1084 AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1086 AC_REQUIRE([KDE_USE_QT])
1087 cat > conftest.$ac_ext <<EOF
1088 #include "confdefs.h"
1089 #include <qglobal.h>
1090 #include <qapplication.h>
1092 if test "$kde_qtver" = "2"; then
1093 cat >> conftest.$ac_ext <<EOF
1095 #include <qstring.h>
1099 if test $kde_qtsubver -gt 0; then
1100 cat >> conftest.$ac_ext <<EOF
1101 #if QT_VERSION < 210
1108 if test "$kde_qtver" = "3"; then
1109 cat >> conftest.$ac_ext <<EOF
1110 #include <qcursor.h>
1111 #include <qstylefactory.h>
1112 #include <private/qucomextra_p.h>
1116 echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1117 cat >> conftest.$ac_ext <<EOF
1123 if test "$kde_qtver" = "2"; then
1124 cat >> conftest.$ac_ext <<EOF
1125 QStringList *t = new QStringList();
1128 if test $kde_qtsubver -gt 0; then
1129 cat >> conftest.$ac_ext <<EOF
1131 s.setLatin1("Elvis is alive", 14);
1135 if test "$kde_qtver" = "3"; then
1136 cat >> conftest.$ac_ext <<EOF
1137 (void)QStyleFactory::create(QString::null);
1138 QCursor c(Qt::WhatsThisCursor);
1141 cat >> conftest.$ac_ext <<EOF
1147 AC_DEFUN([KDE_USE_QT],
1149 if test -z "$1"; then
1150 # Current default Qt version: 3.3
1154 kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1155 # following is the check if subversion isnt found in passed argument
1156 if test "$kde_qtsubver" = "$1"; then
1159 kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1160 if test "$kde_qtver" = "1"; then
1165 if test -z "$2"; then
1166 if test "$kde_qtver" = "2"; then
1167 if test $kde_qtsubver -gt 0; then
1168 kde_qt_minversion=">= Qt 2.2.2"
1170 kde_qt_minversion=">= Qt 2.0.2"
1173 if test "$kde_qtver" = "3"; then
1174 if test $kde_qtsubver -gt 0; then
1175 if test $kde_qtsubver -gt 1; then
1176 if test $kde_qtsubver -gt 2; then
1177 kde_qt_minversion=">= Qt 3.3"
1179 kde_qt_minversion=">= Qt 3.2"
1182 kde_qt_minversion=">= Qt 3.1 (20021021)"
1185 kde_qt_minversion=">= Qt 3.0"
1188 if test "$kde_qtver" = "1"; then
1189 kde_qt_minversion=">= 1.42 and < 2.0"
1192 kde_qt_minversion="$2"
1195 if test -z "$3"; then
1196 if test $kde_qtver = 3; then
1197 if test $kde_qtsubver -gt 0; then
1198 kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1199 qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1200 kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1202 kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1205 if test $kde_qtver = 2; then
1206 if test $kde_qtsubver -gt 0; then
1207 kde_qt_verstring="QT_VERSION >= 222"
1209 kde_qt_verstring="QT_VERSION >= 200"
1212 if test $kde_qtver = 1; then
1213 kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1216 kde_qt_verstring="$3"
1219 if test $kde_qtver = 3; then
1220 kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1222 if test $kde_qtver = 2; then
1223 kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1225 if test $kde_qtver = 1; then
1226 kde_qt_dirs="$QTDIR /usr/lib/qt"
1230 AC_DEFUN([KDE_CHECK_QT_DIRECT],
1232 AC_REQUIRE([KDE_USE_QT])
1233 AC_MSG_CHECKING([if Qt compiles without flags])
1234 AC_CACHE_VAL(kde_cv_qt_direct,
1238 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1239 ac_LIBRARY_PATH="$LIBRARY_PATH"
1240 ac_cxxflags_safe="$CXXFLAGS"
1241 ac_ldflags_safe="$LDFLAGS"
1242 ac_libs_safe="$LIBS"
1244 CXXFLAGS="$CXXFLAGS -I$qt_includes"
1245 LDFLAGS="$LDFLAGS $X_LDFLAGS"
1246 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1247 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1249 LIBS="$LIBQT $LIBSOCKET"
1252 export LD_LIBRARY_PATH
1256 KDE_PRINT_QT_PROGRAM
1258 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1259 kde_cv_qt_direct="yes"
1261 kde_cv_qt_direct="no"
1262 echo "configure: failed program was:" >&AC_FD_CC
1263 cat conftest.$ac_ext >&AC_FD_CC
1267 CXXFLAGS="$ac_cxxflags_safe"
1268 LDFLAGS="$ac_ldflags_safe"
1269 LIBS="$ac_libs_safe"
1271 LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1272 export LD_LIBRARY_PATH
1273 LIBRARY_PATH="$ac_LIBRARY_PATH"
1278 if test "$kde_cv_qt_direct" = "yes"; then
1287 dnl ------------------------------------------------------------------------
1288 dnl Try to find the Qt headers and libraries.
1289 dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1290 dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1291 dnl ------------------------------------------------------------------------
1293 AC_DEFUN([AC_PATH_QT_1_3],
1295 AC_REQUIRE([K_PATH_X])
1296 AC_REQUIRE([KDE_USE_QT])
1297 AC_REQUIRE([KDE_CHECK_LIB64])
1299 dnl ------------------------------------------------------------------------
1300 dnl Add configure flag to enable linking to MT version of Qt library.
1301 dnl ------------------------------------------------------------------------
1305 AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1306 kde_use_qt_mt=$enableval,
1308 if test $kde_qtver = 3; then
1318 dnl ------------------------------------------------------------------------
1319 dnl If we not get --disable-qt-mt then adjust some vars for the host.
1320 dnl ------------------------------------------------------------------------
1324 if test "x$kde_use_qt_mt" = "xyes"; then
1326 if test "x$kde_use_threading" = "xyes"; then
1327 CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1328 KDE_MT_LDFLAGS="$USE_THREADS"
1329 KDE_MT_LIBS="$LIBPTHREAD"
1334 AC_SUBST(KDE_MT_LDFLAGS)
1335 AC_SUBST(KDE_MT_LIBS)
1337 kde_qt_was_given=yes
1339 dnl ------------------------------------------------------------------------
1340 dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1341 dnl ------------------------------------------------------------------------
1342 if test -z "$LIBQT_GLOB"; then
1343 if test "x$kde_use_qt_emb" = "xyes"; then
1344 LIBQT_GLOB="libqte.*"
1346 LIBQT_GLOB="libqt.*"
1350 if test -z "$LIBQT"; then
1351 dnl ------------------------------------------------------------
1352 dnl If we got --enable-embedded then adjust the Qt library name.
1353 dnl ------------------------------------------------------------
1354 if test "x$kde_use_qt_emb" = "xyes"; then
1360 kde_int_qt="-l$qtlib"
1366 if test -z "$LIBQPE"; then
1367 dnl ------------------------------------------------------------
1368 dnl If we got --enable-palmtop then add -lqpe to the link line
1369 dnl ------------------------------------------------------------
1370 if test "x$kde_use_qt_emb" = "xyes"; then
1371 if test "x$kde_use_qt_emb_palm" = "xyes"; then
1381 dnl ------------------------------------------------------------------------
1382 dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1383 dnl ------------------------------------------------------------------------
1385 if test "x$kde_use_qt_mt" = "xyes"; then
1386 if test -z "$LIBQT"; then
1388 kde_int_qt="-l$qtlib-mt"
1391 kde_int_qt="$qtlib-mt"
1393 LIBQT_GLOB="lib$qtlib-mt.*"
1394 USING_QT_MT="using -mt"
1399 if test $kde_qtver != 1; then
1401 AC_REQUIRE([AC_FIND_PNG])
1402 AC_REQUIRE([AC_FIND_JPEG])
1403 LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1406 if test $kde_qtver = 3; then
1407 AC_REQUIRE([KDE_CHECK_LIBDL])
1408 LIBQT="$LIBQT $LIBDL"
1411 AC_MSG_CHECKING([for Qt])
1413 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1414 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1416 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1420 AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1421 [ ac_qt_includes="$withval"/include
1422 ac_qt_libraries="$withval"/lib${kdelibsuff}
1423 ac_qt_bindir="$withval"/bin
1426 AC_ARG_WITH(qt-includes,
1427 AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1429 ac_qt_includes="$withval"
1432 kde_qt_libs_given=no
1434 AC_ARG_WITH(qt-libraries,
1435 AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1436 [ ac_qt_libraries="$withval"
1437 kde_qt_libs_given=yes
1440 AC_CACHE_VAL(ac_cv_have_qt,
1441 [#try to guess Qt locations
1444 for dir in $kde_qt_dirs; do
1445 qt_incdirs="$qt_incdirs $dir/include $dir"
1447 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 /usr/include/qt3 $x_includes"
1448 if test ! "$ac_qt_includes" = "NO"; then
1449 qt_incdirs="$ac_qt_includes $qt_incdirs"
1452 if test "$kde_qtver" != "1"; then
1453 kde_qt_header=qstyle.h
1455 kde_qt_header=qglobal.h
1458 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1459 ac_qt_includes="$qt_incdir"
1462 for dir in $kde_qt_dirs; do
1463 qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1465 qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1466 if test ! "$ac_qt_libraries" = "NO"; then
1467 qt_libdir=$ac_qt_libraries
1469 qt_libdirs="$ac_qt_libraries $qt_libdirs"
1470 # if the Qt was given, the chance is too big that libqt.* doesn't exist
1472 for dir in $qt_libdirs; do
1473 try="ls -1 $dir/${LIBQT_GLOB}"
1474 if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1477 for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1478 if test -e "$a"; then
1479 LIBQT="$LIBQT ${kde_int_qt}_incremental"
1484 ac_qt_libraries="$qt_libdir"
1489 ac_cxxflags_safe="$CXXFLAGS"
1490 ac_ldflags_safe="$LDFLAGS"
1491 ac_libs_safe="$LIBS"
1493 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1494 LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1495 LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1497 KDE_PRINT_QT_PROGRAM
1499 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1502 echo "configure: failed program was:" >&AC_FD_CC
1503 cat conftest.$ac_ext >&AC_FD_CC
1504 ac_qt_libraries="NO"
1507 CXXFLAGS="$ac_cxxflags_safe"
1508 LDFLAGS="$ac_ldflags_safe"
1509 LIBS="$ac_libs_safe"
1512 if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1513 ac_cv_have_qt="have_qt=no"
1516 if test "$ac_qt_includes" = NO; then
1517 if test "$ac_qt_libraries" = NO; then
1518 ac_qt_notfound="(headers and libraries)";
1520 ac_qt_notfound="(headers)";
1523 if test "x$kde_use_qt_mt" = "xyes"; then
1525 Make sure that you have compiled Qt with thread support!"
1526 ac_qt_notfound="(library $qtlib-mt)";
1528 ac_qt_notfound="(library $qtlib)";
1532 AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1533 For more details about this problem, look at the end of config.log.$missing_qt_mt])
1539 eval "$ac_cv_have_qt"
1541 if test "$have_qt" != yes; then
1542 AC_MSG_RESULT([$have_qt]);
1544 ac_cv_have_qt="have_qt=yes \
1545 ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1546 AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1548 qt_libraries="$ac_qt_libraries"
1549 qt_includes="$ac_qt_includes"
1552 if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1553 KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1556 AC_SUBST(qt_libraries)
1557 AC_SUBST(qt_includes)
1559 if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1562 QT_INCLUDES="-I$qt_includes"
1563 all_includes="$QT_INCLUDES $all_includes"
1566 if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1569 QT_LDFLAGS="-L$qt_libraries"
1570 all_libraries="$QT_LDFLAGS $all_libraries"
1572 test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1574 AC_SUBST(QT_INCLUDES)
1575 AC_SUBST(QT_LDFLAGS)
1580 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1581 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1583 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1585 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1586 for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1587 if test -e "$a"; then
1588 LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1599 AC_DEFUN([AC_PATH_QT],
1604 AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1606 AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1608 if test x$ac_uic_supports_libpath = xyes; then
1610 AC_MSG_CHECKING([if UIC has KDE plugins available])
1611 AC_CACHE_VAL(kde_cv_uic_plugins,
1613 cat > actest.ui << EOF
1614 <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1615 <class>NewConnectionDialog</class>
1616 <widget class="QDialog">
1617 <widget class="KLineEdit">
1618 <property name="name">
1619 <cstring>testInput</cstring>
1628 kde_cv_uic_plugins=no
1629 kde_line="$UIC_PATH -L $kde_widgetdir"
1630 if test x$ac_uic_supports_nounload = xyes; then
1631 kde_line="$kde_line -nounload"
1633 kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1634 if AC_TRY_EVAL(kde_line); then
1635 # if you're trying to debug this check and think it's incorrect,
1636 # better check your installation. The check _is_ correct - your
1637 # installation is not.
1638 if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1639 kde_cv_uic_plugins=yes
1642 rm -f actest.ui actest.cpp
1645 AC_MSG_RESULT([$kde_cv_uic_plugins])
1646 if test "$kde_cv_uic_plugins" != yes; then
1647 AC_MSG_ERROR([you need to install kdelibs first.])
1652 AC_DEFUN([KDE_CHECK_FINAL],
1654 AC_ARG_ENABLE(final,
1655 AC_HELP_STRING([--enable-final],
1656 [build size optimized apps (experimental - needs lots of memory)]),
1657 kde_use_final=$enableval, kde_use_final=no)
1659 if test "x$kde_use_final" = "xyes"; then
1660 KDE_USE_FINAL_TRUE=""
1661 KDE_USE_FINAL_FALSE="#"
1663 KDE_USE_FINAL_TRUE="#"
1664 KDE_USE_FINAL_FALSE=""
1666 AC_SUBST(KDE_USE_FINAL_TRUE)
1667 AC_SUBST(KDE_USE_FINAL_FALSE)
1670 AC_DEFUN([KDE_CHECK_CLOSURE],
1672 AC_ARG_ENABLE(closure,
1673 AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1674 kde_use_closure=$enableval, kde_use_closure=no)
1677 if test "x$kde_use_closure" = "xyes"; then
1678 KDE_USE_CLOSURE_TRUE=""
1679 KDE_USE_CLOSURE_FALSE="#"
1680 # CXXFLAGS="$CXXFLAGS $REPO"
1682 KDE_USE_CLOSURE_TRUE="#"
1683 KDE_USE_CLOSURE_FALSE=""
1687 KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1688 [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1689 [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1690 [KDE_NO_UNDEFINED=""])],
1691 [KDE_NO_UNDEFINED=""])
1695 AC_SUBST(KDE_USE_CLOSURE_TRUE)
1696 AC_SUBST(KDE_USE_CLOSURE_FALSE)
1697 AC_SUBST(KDE_NO_UNDEFINED)
1700 dnl Check if the linker supports --enable-new-dtags and --as-needed
1701 AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1703 AC_ARG_ENABLE(new_ldflags,
1704 AC_HELP_STRING([--enable-new-ldflags],
1705 [enable the new linker flags]),
1706 kde_use_new_ldflags=$enableval,
1707 kde_use_new_ldflags=no)
1709 LDFLAGS_AS_NEEDED=""
1710 LDFLAGS_NEW_DTAGS=""
1711 if test "x$kde_use_new_ldflags" = "xyes"; then
1712 LDFLAGS_NEW_DTAGS=""
1713 KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1714 [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1716 KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1717 [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1719 AC_SUBST(LDFLAGS_AS_NEEDED)
1720 AC_SUBST(LDFLAGS_NEW_DTAGS)
1723 AC_DEFUN([KDE_CHECK_NMCHECK],
1725 AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1726 kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1728 if test "$kde_use_nmcheck" = "yes"; then
1729 KDE_USE_NMCHECK_TRUE=""
1730 KDE_USE_NMCHECK_FALSE="#"
1732 KDE_USE_NMCHECK_TRUE="#"
1733 KDE_USE_NMCHECK_FALSE=""
1735 AC_SUBST(KDE_USE_NMCHECK_TRUE)
1736 AC_SUBST(KDE_USE_NMCHECK_FALSE)
1739 AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1741 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1743 while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1747 dnl ------------------------------------------------------------------------
1748 dnl Now, the same with KDE
1749 dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1750 dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1751 dnl ------------------------------------------------------------------------
1753 AC_DEFUN([AC_BASE_PATH_KDE],
1755 AC_REQUIRE([KDE_CHECK_STL])
1756 AC_REQUIRE([AC_PATH_QT])dnl
1757 AC_REQUIRE([KDE_CHECK_LIB64])
1760 AC_MSG_CHECKING([for KDE])
1762 if test "${prefix}" != NONE; then
1763 kde_includes=${includedir}
1764 KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1766 kde_libraries=${libdir}
1767 KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1776 AC_CACHE_VAL(ac_cv_have_kde,
1777 [#try to guess kde locations
1779 if test "$kde_qtver" = 1; then
1780 kde_check_header="ksock.h"
1781 kde_check_lib="libkdecore.la"
1783 kde_check_header="ksharedptr.h"
1784 kde_check_lib="libkio.la"
1787 if test -z "$1"; then
1789 kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1790 test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1791 kde_incdirs="$ac_kde_includes $kde_incdirs"
1792 AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1793 ac_kde_includes="$kde_incdir"
1795 if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1797 in the prefix, you've chosen, are no KDE headers installed. This will fail.
1798 So, check this please and use another prefix!])
1801 kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1802 test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1803 kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1804 AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1805 ac_kde_libraries="$kde_libdir"
1808 dnl this might be somewhere else
1809 AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1811 if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1813 in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1814 So, check this please and use another prefix!])
1817 if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1819 I can't find the designer plugins. These are required and should have been installed
1823 if test -n "$kde_widgetdir"; then
1824 kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1828 if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1829 ac_cv_have_kde="have_kde=no"
1831 ac_cv_have_kde="have_kde=yes \
1832 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1835 else dnl test -z $1, e.g. from kdelibs
1837 ac_cv_have_kde="have_kde=no"
1842 eval "$ac_cv_have_kde"
1844 if test "$have_kde" != "yes"; then
1845 if test "${prefix}" = NONE; then
1846 ac_kde_prefix="$ac_default_prefix"
1848 ac_kde_prefix="$prefix"
1850 if test "$exec_prefix" = NONE; then
1851 ac_kde_exec_prefix="$ac_kde_prefix"
1852 AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1854 ac_kde_exec_prefix="$exec_prefix"
1855 AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1858 kde_libraries="${libdir}"
1859 kde_includes="${includedir}"
1862 ac_cv_have_kde="have_kde=yes \
1863 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1864 AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1866 kde_libraries="$ac_kde_libraries"
1867 kde_includes="$ac_kde_includes"
1869 AC_SUBST(kde_libraries)
1870 AC_SUBST(kde_includes)
1872 if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1875 KDE_INCLUDES="-I$kde_includes"
1876 all_includes="$KDE_INCLUDES $all_includes"
1879 KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1881 KDE_LDFLAGS="-L$kde_libraries"
1882 if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1883 all_libraries="$KDE_LDFLAGS $all_libraries"
1886 AC_SUBST(KDE_LDFLAGS)
1887 AC_SUBST(KDE_INCLUDES)
1889 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1891 all_libraries="$all_libraries $USER_LDFLAGS"
1892 all_includes="$all_includes $USER_INCLUDES"
1893 AC_SUBST(all_includes)
1894 AC_SUBST(all_libraries)
1896 if test -z "$1"; then
1897 KDE_CHECK_UIC_PLUGINS
1900 ac_kde_libraries="$kde_libdir"
1907 AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1909 AC_MSG_CHECKING(for extra includes)
1910 AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1911 kde_use_extra_includes="$withval",
1912 kde_use_extra_includes=NONE
1915 if test -n "$kde_use_extra_includes" && \
1916 test "$kde_use_extra_includes" != "NONE"; then
1920 for dir in $kde_use_extra_includes; do
1921 kde_extra_includes="$kde_extra_includes $dir"
1922 USER_INCLUDES="$USER_INCLUDES -I$dir"
1925 kde_use_extra_includes="added"
1927 kde_use_extra_includes="no"
1929 AC_SUBST(USER_INCLUDES)
1931 AC_MSG_RESULT($kde_use_extra_includes)
1934 AC_MSG_CHECKING(for extra libs)
1935 AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1936 kde_use_extra_libs=$withval,
1937 kde_use_extra_libs=NONE
1939 if test -n "$kde_use_extra_libs" && \
1940 test "$kde_use_extra_libs" != "NONE"; then
1944 for dir in $kde_use_extra_libs; do
1945 kde_extra_libs="$kde_extra_libs $dir"
1946 KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1947 USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1950 kde_use_extra_libs="added"
1952 kde_use_extra_libs="no"
1955 AC_SUBST(USER_LDFLAGS)
1957 AC_MSG_RESULT($kde_use_extra_libs)
1961 AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1963 AC_MSG_CHECKING([for KDE headers installed])
1966 cat > conftest.$ac_ext <<EOF
1968 # include <stdlib.h>
1971 #include "confdefs.h"
1975 printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1976 printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1977 printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1978 printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1979 printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1980 printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1981 printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1982 printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1983 printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1984 printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1985 printf("kde_wallpaperdir=\\"%s\\"\n",
1986 KApplication::kde_wallpaperdir().data());
1987 printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1988 printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1989 printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1990 printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1991 printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1992 printf("kde_styledir=\\"/tmp/dummy\\"\n");
1993 printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1994 printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1995 printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1996 printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1997 printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2002 ac_save_CPPFLAGS=$CPPFLAGS
2003 CPPFLAGS="$all_includes $CPPFLAGS"
2004 if AC_TRY_EVAL(ac_compile); then
2007 AC_MSG_ERROR([your system is not able to compile a small KDE application!
2008 Check, if you installed the KDE header files correctly.
2009 For more details about this problem, look at the end of config.log.])
2011 CPPFLAGS=$ac_save_CPPFLAGS
2016 AC_DEFUN([KDE_CHECK_KDEQTADDON],
2018 AC_MSG_CHECKING(for kde-qt-addon)
2019 AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2021 kde_ldflags_safe="$LDFLAGS"
2022 kde_libs_safe="$LIBS"
2023 kde_cxxflags_safe="$CXXFLAGS"
2025 LIBS="-lkde-qt-addon $LIBQT $LIBS"
2026 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2027 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2035 kde_cv_have_kdeqtaddon=yes,
2036 kde_cv_have_kdeqtaddon=no
2039 LDFLAGS=$kde_ldflags_safe
2041 CXXFLAGS=$kde_cxxflags_safe
2044 AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2046 if test "$kde_cv_have_kdeqtaddon" = "no"; then
2047 AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2048 It is a separate package (and CVS module) named kde-qt-addon.])
2052 AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2054 AC_REQUIRE([KDE_MISC_TESTS])
2055 AC_REQUIRE([KDE_CHECK_LIBDL])
2056 AC_REQUIRE([K_PATH_X])
2058 if test $kde_qtver = 3; then
2059 AC_SUBST(LIB_KDECORE, "-lkdecore")
2060 AC_SUBST(LIB_KDEUI, "-lkdeui")
2061 AC_SUBST(LIB_KIO, "-lkio")
2062 AC_SUBST(LIB_KJS, "-lkjs")
2063 AC_SUBST(LIB_SMB, "-lsmb")
2064 AC_SUBST(LIB_KAB, "-lkab")
2065 AC_SUBST(LIB_KABC, "-lkabc")
2066 AC_SUBST(LIB_KHTML, "-lkhtml")
2067 AC_SUBST(LIB_KSPELL, "-lkspell")
2068 AC_SUBST(LIB_KPARTS, "-lkparts")
2069 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2070 AC_SUBST(LIB_KUTILS, "-lkutils")
2071 AC_SUBST(LIB_KDEPIM, "-lkdepim")
2072 AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2073 AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2074 AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2075 # these are for backward compatibility
2076 AC_SUBST(LIB_KSYCOCA, "-lkio")
2077 AC_SUBST(LIB_KFILE, "-lkio")
2078 elif test $kde_qtver = 2; then
2079 AC_SUBST(LIB_KDECORE, "-lkdecore")
2080 AC_SUBST(LIB_KDEUI, "-lkdeui")
2081 AC_SUBST(LIB_KIO, "-lkio")
2082 AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2083 AC_SUBST(LIB_SMB, "-lsmb")
2084 AC_SUBST(LIB_KFILE, "-lkfile")
2085 AC_SUBST(LIB_KAB, "-lkab")
2086 AC_SUBST(LIB_KHTML, "-lkhtml")
2087 AC_SUBST(LIB_KSPELL, "-lkspell")
2088 AC_SUBST(LIB_KPARTS, "-lkparts")
2089 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2091 AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2092 AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2093 AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2094 AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2095 AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2099 AC_DEFUN([AC_PATH_KDE],
2102 AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2104 if test "$enableval" = "no";
2105 then ac_use_path_checking="default"
2106 else ac_use_path_checking=""
2110 if test "$kde_qtver" = 1;
2111 then ac_use_path_checking=""
2112 else ac_use_path_checking="default"
2117 AC_CREATE_KFSSTND($ac_use_path_checking)
2120 KDE_CREATE_LIBS_ALIASES
2123 dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2124 AC_DEFUN([KDE_CHECK_FUNC_EXT],
2126 AC_MSG_CHECKING(for $1)
2127 AC_CACHE_VAL(kde_cv_func_$1,
2131 save_CXXFLAGS="$CXXFLAGS"
2132 kde_safe_LIBS="$LIBS"
2133 LIBS="$LIBS $X_EXTRA_LIBS"
2134 if test "$GXX" = "yes"; then
2135 CXXFLAGS="$CXXFLAGS -pedantic-errors"
2145 CXXFLAGS="$save_CXXFLAGS"
2146 LIBS="$kde_safe_LIBS"
2150 AC_MSG_RESULT($kde_cv_func_$1)
2152 AC_MSG_CHECKING([if $1 needs custom prototype])
2153 AC_CACHE_VAL(kde_cv_proto_$1,
2155 if test "x$kde_cv_func_$1" = xyes; then
2159 setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2160 kde_cv_proto_$1="yes - in libkdefakes"
2163 kde_cv_proto_$1=unknown
2168 if test "x$kde_cv_proto_$1" = xunknown; then
2173 LIBS="$LIBS $X_EXTRA_LIBS"
2182 [ kde_cv_func_$1=yes
2183 kde_cv_proto_$1=yes ],
2184 [kde_cv_proto_$1="$1 unavailable"]
2190 AC_MSG_RESULT($kde_cv_proto_$1)
2192 if test "x$kde_cv_func_$1" = xyes; then
2193 AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2196 if test "x$kde_cv_proto_$1" = xno; then
2197 AC_DEFINE(HAVE_$5_PROTO, 1,
2198 [Define if you have the $1 prototype])
2201 AH_VERBATIM([_HAVE_$5_PROTO],
2203 #if !defined(HAVE_$5_PROTO)
2215 AC_DEFUN([AC_CHECK_SETENV],
2217 KDE_CHECK_FUNC_EXT(setenv, [
2220 [setenv("VAR", "VALUE", 1);],
2221 [int setenv (const char *, const char *, int)],
2225 AC_DEFUN([AC_CHECK_UNSETENV],
2227 KDE_CHECK_FUNC_EXT(unsetenv, [
2231 [void unsetenv (const char *)],
2235 AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2237 KDE_CHECK_FUNC_EXT(getdomainname, [
2244 getdomainname(buffer, 200);
2246 [#include <sys/types.h>
2247 int getdomainname (char *, size_t)],
2251 AC_DEFUN([AC_CHECK_GETHOSTNAME],
2253 KDE_CHECK_FUNC_EXT(gethostname, [
2259 gethostname(buffer, 200);
2261 [int gethostname (char *, unsigned int)],
2265 AC_DEFUN([AC_CHECK_USLEEP],
2267 KDE_CHECK_FUNC_EXT(usleep, [
2273 [int usleep (unsigned int)],
2278 AC_DEFUN([AC_CHECK_RANDOM],
2280 KDE_CHECK_FUNC_EXT(random, [
2286 [long int random(void)],
2289 KDE_CHECK_FUNC_EXT(srandom, [
2295 [void srandom(unsigned int)],
2300 AC_DEFUN([AC_CHECK_INITGROUPS],
2302 KDE_CHECK_FUNC_EXT(initgroups, [
2303 #include <sys/types.h>
2309 initgroups(buffer, 27);
2311 [int initgroups(const char *, gid_t)],
2315 AC_DEFUN([AC_CHECK_MKSTEMPS],
2317 KDE_CHECK_FUNC_EXT(mkstemps, [
2322 mkstemps("/tmp/aaaXXXXXX", 6);
2324 [int mkstemps(char *, int)],
2328 AC_DEFUN([AC_CHECK_MKSTEMP],
2330 KDE_CHECK_FUNC_EXT(mkstemp, [
2335 mkstemp("/tmp/aaaXXXXXX");
2337 [int mkstemp(char *)],
2341 AC_DEFUN([AC_CHECK_MKDTEMP],
2343 KDE_CHECK_FUNC_EXT(mkdtemp, [
2348 mkdtemp("/tmp/aaaXXXXXX");
2350 [char *mkdtemp(char *)],
2355 AC_DEFUN([AC_CHECK_RES_INIT],
2357 AC_MSG_CHECKING([if res_init needs -lresolv])
2358 kde_libs_safe="$LIBS"
2359 LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2362 #include <sys/types.h>
2363 #include <netinet/in.h>
2364 #include <arpa/nameser.h>
2371 LIBRESOLV="-lresolv"
2373 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2375 [ AC_MSG_RESULT(no) ]
2380 KDE_CHECK_FUNC_EXT(res_init,
2382 #include <sys/types.h>
2383 #include <netinet/in.h>
2384 #include <arpa/nameser.h>
2388 [int res_init(void)],
2392 AC_DEFUN([AC_CHECK_STRLCPY],
2394 KDE_CHECK_FUNC_EXT(strlcpy, [
2398 strlcpy(buf, "KDE function test", sizeof(buf));
2400 [unsigned long strlcpy(char*, const char*, unsigned long)],
2404 AC_DEFUN([AC_CHECK_STRLCAT],
2406 KDE_CHECK_FUNC_EXT(strlcat, [
2411 strlcat(buf, "KDE function test", sizeof(buf));
2413 [unsigned long strlcat(char*, const char*, unsigned long)],
2417 AC_DEFUN([AC_CHECK_RES_QUERY],
2419 KDE_CHECK_FUNC_EXT(res_query, [
2420 #include <sys/types.h>
2421 #include <netinet/in.h>
2422 #include <arpa/nameser.h>
2427 res_query(NULL, 0, 0, NULL, 0);
2429 [int res_query(const char *, int, int, unsigned char *, int)],
2433 AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2435 KDE_CHECK_FUNC_EXT(dn_skipname, [
2436 #include <sys/types.h>
2437 #include <netinet/in.h>
2438 #include <arpa/nameser.h>
2442 dn_skipname (NULL, NULL);
2444 [int dn_skipname (unsigned char *, unsigned char *)],
2449 AC_DEFUN([AC_FIND_GIF],
2450 [AC_MSG_CHECKING([for giflib])
2451 AC_CACHE_VAL(ac_cv_lib_gif,
2452 [ac_save_LIBS="$LIBS"
2453 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2454 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2456 LIBS="$all_libraries -lgif"
2463 int GifLastError(void);
2467 /* We use char because int might match the return type of a gcc2
2468 builtin and then its argument prototype would still apply. */
2470 [return GifLastError();],
2471 eval "ac_cv_lib_gif=yes",
2472 eval "ac_cv_lib_gif=no")
2473 LIBS="$ac_save_LIBS"
2475 if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2477 AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2479 AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2483 AC_DEFUN([KDE_FIND_JPEG_HELPER],
2485 AC_MSG_CHECKING([for libjpeg$2])
2486 AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2488 ac_save_LIBS="$LIBS"
2489 LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2490 ac_save_CFLAGS="$CFLAGS"
2491 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2493 [/* Override any gcc2 internal prototype to avoid an error. */
2494 struct jpeg_decompress_struct;
2495 typedef struct jpeg_decompress_struct * j_decompress_ptr;
2500 void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2501 int version, size_t structsize);
2505 /* We use char because int might match the return type of a gcc2
2506 builtin and then its argument prototype would still apply. */
2508 [jpeg_CreateDecompress(0L, 0, 0);],
2509 eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2510 eval "ac_cv_lib_jpeg_$1=no")
2511 LIBS="$ac_save_LIBS"
2512 CFLAGS="$ac_save_CFLAGS"
2515 if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2516 LIBJPEG="$ac_cv_lib_jpeg_$1"
2517 AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2525 AC_DEFUN([AC_FIND_JPEG],
2527 dnl first look for libraries
2528 KDE_FIND_JPEG_HELPER(6b, 6b,
2529 KDE_FIND_JPEG_HELPER(normal, [],
2536 dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2537 dnl requires system dependent includes loaded before it)
2538 jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2539 AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2540 test "x$jpeg_incdir" = xNO && jpeg_incdir=
2542 dnl if headers _and_ libraries are missing, this is no error, and we
2543 dnl continue with a warning (the user will get no jpeg support in khtml)
2544 dnl if only one is missing, it means a configuration error, but we still
2546 if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2547 AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2549 if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2551 There is an installation error in jpeg support. You seem to have only one
2552 of either the headers _or_ the libraries installed. You may need to either
2553 provide correct --with-extra-... options, or the development package of
2554 libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2555 Disabling JPEG support.
2558 AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2565 AH_VERBATIM(_AC_CHECK_JPEG,
2567 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2568 * headers and I'm too lazy to write a configure test as long as only
2569 * unixware is related
2572 #define HAVE_BOOLEAN
2577 AC_DEFUN([KDE_CHECK_QT_JPEG],
2579 if test -n "$LIBJPEG"; then
2580 AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2581 AC_CACHE_VAL(kde_cv_qt_jpeg,
2585 ac_save_LIBS="$LIBS"
2586 LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2587 LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2588 ac_save_CXXFLAGS="$CXXFLAGS"
2589 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2591 [#include <qapplication.h>],
2595 QApplication app(argc, argv);],
2596 eval "kde_cv_qt_jpeg=no",
2597 eval "kde_cv_qt_jpeg=yes")
2598 LIBS="$ac_save_LIBS"
2599 CXXFLAGS="$ac_save_CXXFLAGS"
2604 if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2606 LIBJPEG_QT='$(LIBJPEG)'
2614 AC_DEFUN([AC_FIND_ZLIB],
2616 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2617 AC_MSG_CHECKING([for libz])
2618 AC_CACHE_VAL(ac_cv_lib_z,
2620 kde_save_LIBS="$LIBS"
2621 LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2622 kde_save_CFLAGS="$CFLAGS"
2623 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2630 gzFile f = (gzFile) 0;
2631 /* this would segfault.. but we only link, don't run */
2632 (void) gzgets(f, buf, sizeof(buf));
2634 return (zlibVersion() == ZLIB_VERSION);
2636 eval "ac_cv_lib_z='-lz'",
2637 eval "ac_cv_lib_z=no")
2638 LIBS="$kde_save_LIBS"
2639 CFLAGS="$kde_save_CFLAGS"
2641 if test ! "$ac_cv_lib_z" = no; then
2642 AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2644 AC_MSG_RESULT($ac_cv_lib_z)
2646 AC_MSG_ERROR(not found.
2647 Possibly configure picks up an outdated version
2648 installed by XFree86. Remove it from your system.
2650 Check your installation and look into config.log)
2656 AC_DEFUN([KDE_TRY_TIFFLIB],
2658 AC_MSG_CHECKING([for libtiff $1])
2660 AC_CACHE_VAL(kde_cv_libtiff_$1,
2664 kde_save_LIBS="$LIBS"
2665 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2666 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2668 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2670 kde_save_CXXFLAGS="$CXXFLAGS"
2671 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2677 [return (TIFFOpen( "", "r") == 0); ],
2679 kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2681 kde_cv_libtiff_$1=no
2684 LIBS="$kde_save_LIBS"
2685 CXXFLAGS="$kde_save_CXXFLAGS"
2689 if test "$kde_cv_libtiff_$1" = "no"; then
2694 LIBTIFF="$kde_cv_libtiff_$1"
2696 AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2702 AC_DEFUN([AC_FIND_TIFF],
2704 AC_REQUIRE([K_PATH_X])
2705 AC_REQUIRE([AC_FIND_ZLIB])
2706 AC_REQUIRE([AC_FIND_JPEG])
2707 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2709 KDE_TRY_TIFFLIB(tiff, [],
2710 KDE_TRY_TIFFLIB(tiff34))
2716 AC_DEFUN([AC_FIND_PNG],
2718 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2719 AC_REQUIRE([AC_FIND_ZLIB])
2720 AC_MSG_CHECKING([for libpng])
2721 AC_CACHE_VAL(ac_cv_lib_png,
2723 kde_save_LIBS="$LIBS"
2724 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2725 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2727 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2729 kde_save_CFLAGS="$CFLAGS"
2730 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2737 png_structp png_ptr = png_create_read_struct( /* image ptr */
2738 PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2739 return( png_ptr != 0 );
2741 eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2742 eval "ac_cv_lib_png=no"
2744 LIBS="$kde_save_LIBS"
2745 CFLAGS="$kde_save_CFLAGS"
2747 if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2748 AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2749 LIBPNG="$ac_cv_lib_png"
2751 AC_MSG_RESULT($ac_cv_lib_png)
2760 AC_DEFUN([AC_FIND_JASPER],
2762 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2763 AC_REQUIRE([AC_FIND_JPEG])
2764 AC_MSG_CHECKING([for jasper])
2765 AC_CACHE_VAL(ac_cv_jasper,
2767 kde_save_LIBS="$LIBS"
2768 LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2769 kde_save_CFLAGS="$CFLAGS"
2770 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2774 #include<jasper/jasper.h>
2777 return( jas_init() );
2779 eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2780 eval "ac_cv_jasper=no"
2782 LIBS="$kde_save_LIBS"
2783 CFLAGS="$kde_save_CFLAGS"
2785 if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2786 AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2787 LIB_JASPER="$ac_cv_jasper"
2788 AC_MSG_RESULT($ac_cv_jasper)
2793 AC_SUBST(LIB_JASPER)
2796 AC_DEFUN([AC_CHECK_BOOL],
2798 AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2801 AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2803 AC_MSG_CHECKING(if you need GNU extensions)
2804 AC_CACHE_VAL(ac_cv_gnu_extensions,
2806 cat > conftest.c << EOF
2807 #include <features.h>
2809 #ifdef __GNU_LIBRARY__
2814 if (eval "$ac_cpp conftest.c") 2>&5 |
2815 egrep "yes" >/dev/null 2>&1; then
2817 ac_cv_gnu_extensions=yes
2819 ac_cv_gnu_extensions=no
2823 AC_MSG_RESULT($ac_cv_gnu_extensions)
2824 if test "$ac_cv_gnu_extensions" = "yes"; then
2825 AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2829 AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2831 AC_MSG_CHECKING([whether $CXX supports -$1])
2832 kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2833 AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2837 save_CXXFLAGS="$CXXFLAGS"
2838 CXXFLAGS="$CXXFLAGS -$1"
2839 AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2840 CXXFLAGS="$save_CXXFLAGS"
2843 if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2854 AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2856 AC_MSG_CHECKING([whether $CC supports -$1])
2857 kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2858 AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2862 save_CFLAGS="$CFLAGS"
2863 CFLAGS="$CFLAGS -$1"
2864 AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2865 CFLAGS="$save_CFLAGS"
2868 if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2880 dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2881 dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2882 dnl it's all white-space separated
2883 AC_DEFUN([AC_REMOVE_FORBIDDEN],
2886 if test -n "$__val"; then
2892 *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2893 *) # Careful to not add spaces, where there were none, because otherwise
2894 # libtool gets confused, if we change e.g. CXX
2895 if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2903 dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2904 AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2906 if test "x$kde_use_qt_emb" != "xyes"; then
2907 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2908 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2910 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2911 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2915 AC_DEFUN([AC_CHECK_COMPILERS],
2917 AC_ARG_ENABLE(debug,
2918 AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2922 kde_use_debug_code="yes"
2923 kde_use_debug_define=no
2926 kde_use_debug_code="full"
2927 kde_use_debug_define=no
2930 kde_use_debug_code="no"
2931 kde_use_debug_define=yes
2935 [kde_use_debug_code="no"
2936 kde_use_debug_define=no
2939 dnl Just for configure --help
2940 AC_ARG_ENABLE(dummyoption,
2941 AC_HELP_STRING([--disable-debug],
2942 [disables debug output and debug symbols [default=no]]),
2945 AC_ARG_ENABLE(strict,
2946 AC_HELP_STRING([--enable-strict],
2947 [compiles with strict compiler options (may not work!)]),
2949 if test $enableval = "no"; then
2950 kde_use_strict_options="no"
2952 kde_use_strict_options="yes"
2954 ], [kde_use_strict_options="no"])
2956 AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
2958 if test $enableval = "no"; then
2959 kde_use_warnings="no"
2961 kde_use_warnings="yes"
2963 ], [kde_use_warnings="yes"])
2965 dnl enable warnings for debug build
2966 if test "$kde_use_debug_code" != "no"; then
2967 kde_use_warnings=yes
2970 AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
2971 [kde_use_profiling=$enableval],
2972 [kde_use_profiling="no"]
2975 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2982 if test "$GCC" = "yes"; then
2983 if test "$kde_use_debug_code" != "no"; then
2984 if test $kde_use_debug_code = "full"; then
2985 CFLAGS="-g3 -fno-inline $CFLAGS"
2987 CFLAGS="-g -O2 $CFLAGS"
2990 CFLAGS="-O2 $CFLAGS"
2994 if test "$kde_use_debug_define" = "yes"; then
2995 CFLAGS="-DNDEBUG $CFLAGS"
3000 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3001 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3004 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3008 CXXFLAGS=" $CXXFLAGS"
3012 if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3013 if test "$kde_use_debug_code" != "no"; then
3014 if test "$CXX" = "KCC"; then
3015 CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3017 if test "$kde_use_debug_code" = "full"; then
3018 CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3020 CXXFLAGS="-g -O2 $CXXFLAGS"
3023 KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3025 dnl convenience compiler flags
3026 KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3027 AC_SUBST(WOVERLOADED_VIRTUAL)
3029 if test "$CXX" = "KCC"; then
3030 CXXFLAGS="+K3 $CXXFLAGS"
3032 CXXFLAGS="-O2 $CXXFLAGS"
3037 if test "$kde_use_debug_define" = "yes"; then
3038 CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3041 if test "$kde_use_profiling" = "yes"; then
3042 KDE_CHECK_COMPILER_FLAG(pg,
3044 CFLAGS="-pg $CFLAGS"
3045 CXXFLAGS="-pg $CXXFLAGS"
3049 if test "$kde_use_warnings" = "yes"; then
3050 if test "$GCC" = "yes"; then
3051 CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3054 CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3055 CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3056 KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3057 KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3060 KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3061 KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3062 KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
3066 if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3067 CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3071 AC_HELP_STRING([--enable-pch],
3072 [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3073 [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3075 HAVE_GCC_VISIBILITY=0
3076 AC_SUBST([HAVE_GCC_VISIBILITY])
3078 if test "$GXX" = "yes"; then
3079 KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3080 KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3081 KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3082 KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
3083 ENABLE_PERMISSIVE_FLAG="-fpermissive"
3085 if test "$kde_use_pch" = "yes"; then
3086 AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3088 if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3089 kde_gcc_supports_pch=yes
3092 kde_gcc_supports_pch=no
3095 if test "$kde_gcc_supports_pch" = "yes"; then
3096 AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3097 if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3098 kde_gcc_supports_pch=yes
3101 kde_gcc_supports_pch=no
3105 rm -f conftest.h conftest.h.gch
3107 AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3109 if test "$CXX" = "KCC"; then
3110 dnl unfortunately we currently cannot disable exception support in KCC
3111 dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3112 dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3113 dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
3115 if test "$kde_use_pch" = "yes"; then
3116 dnl TODO: support --pch-dir!
3117 KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3118 dnl the below works (but the dir must exist), but it's
3119 dnl useless for a whole package.
3120 dnl The are precompiled headers for each source file, so when compiling
3121 dnl from scratch, it doesn't make a difference, and they take up
3122 dnl around ~5Mb _per_ sourcefile.
3123 dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3124 dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3126 dnl this flag controls inlining. by default KCC inlines in optimisation mode
3127 dnl all implementations that are defined inside the class {} declaration.
3128 dnl because of templates-compatibility with broken gcc compilers, this
3129 dnl can cause excessive inlining. This flag limits it to a sane level
3130 KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3131 KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3132 KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3133 KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3134 dnl Some source files are shared between multiple executables
3135 dnl (or libraries) and some of those need template instantiations.
3136 dnl In that case KCC needs to compile those sources with
3137 dnl --one_instantiation_per_object. To make it easy for us we compile
3138 dnl _all_ objects with that flag (--one_per is a shorthand).
3139 KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3141 AC_SUBST(USE_EXCEPTIONS)
3142 dnl obsolete macro - provided to keep things going
3147 *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3148 *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3149 *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3151 if test "$GXX" = yes; then
3152 libstdcpp=`$CXX -print-file-name=libstdc++.so`
3153 if test ! -f $libstdcpp; then
3154 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])
3160 AC_VALIDIFY_CXXFLAGS
3164 if test "$GCC" = yes; then
3167 KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3169 AC_ARG_ENABLE(coverage,
3170 AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3171 if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3172 ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3173 ac_coverage_linker="-lgcc"
3174 elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3175 ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3176 ac_coverage_linker=""
3178 AC_MSG_ERROR([coverage with your compiler is not supported])
3180 CFLAGS="$CFLAGS $ac_coverage_compiler"
3181 CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3182 LDFLAGS="$LDFLAGS $ac_coverage_linker"
3185 AC_SUBST(NOOPT_CXXFLAGS)
3186 AC_SUBST(NOOPT_CFLAGS)
3187 AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3189 KDE_CHECK_NEW_LDFLAGS
3194 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3197 AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY],
3199 if test "$GXX" = "yes"; then
3200 KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3201 KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3202 KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3203 KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
3205 CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
3206 HAVE_GCC_VISIBILITY=1
3207 AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3212 AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3214 AC_REQUIRE([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY])
3217 AC_DEFUN([KDE_ADD_DEPENDENCIES],
3219 [A]M_DEPENDENCIES(CC)
3220 [A]M_DEPENDENCIES(CXX)
3223 dnl just a wrapper to clean up configure.in
3224 AC_DEFUN([KDE_PROG_LIBTOOL],
3226 AC_REQUIRE([AC_CHECK_COMPILERS])
3227 AC_REQUIRE([AC_ENABLE_SHARED])
3228 AC_REQUIRE([AC_ENABLE_STATIC])
3230 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3231 AC_REQUIRE([KDE_CHECK_LIB64])
3239 LIBTOOL_SHELL="/bin/sh ./libtool"
3240 # LIBTOOL="$LIBTOOL --silent"
3241 KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3242 AC_SUBST(KDE_PLUGIN)
3244 # we patch configure quite some so we better keep that consistent for incremental runs
3245 AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3248 AC_DEFUN([KDE_CHECK_LIB64],
3250 kdelibsuff="$kde_libs_suffix"
3251 if test -z "$kdelibsuff"; then
3254 AC_ARG_ENABLE(libsuffix,
3255 AC_HELP_STRING([--enable-libsuffix],
3256 [/lib directory suffix (64,32,none[=default])]),
3257 kdelibsuff=$enableval)
3258 # TODO: add an auto case that compiles a little C app to check
3259 # where the glibc is
3260 if test "$kdelibsuff" = "no"; then
3263 if test -z "$kdelibsuff"; then
3264 AC_MSG_RESULT([not using lib directory suffix])
3265 AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3267 if test "$libdir" = '${exec_prefix}/lib'; then
3268 libdir="$libdir${kdelibsuff}"
3269 AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3271 AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3272 AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3276 AC_DEFUN([KDE_CHECK_TYPES],
3277 [ AC_CHECK_SIZEOF(int, 4)dnl
3278 AC_CHECK_SIZEOF(short)dnl
3279 AC_CHECK_SIZEOF(long, 4)dnl
3280 AC_CHECK_SIZEOF(char *, 4)dnl
3283 dnl Not used - kept for compat only?
3284 AC_DEFUN([KDE_DO_IT_ALL],
3288 AM_INIT_AUTOMAKE($1, $2)
3289 AM_DISABLE_LIBRARIES
3290 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3297 AC_DEFUN([AC_CHECK_RPATH],
3299 AC_MSG_CHECKING(for rpath)
3300 AC_ARG_ENABLE(rpath,
3301 AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3302 USE_RPATH=$enableval, USE_RPATH=yes)
3304 if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3306 KDE_RPATH="-R \$(libdir)"
3308 if test "$kde_libraries" != "$libdir"; then
3309 KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3312 if test -n "$qt_libraries"; then
3313 KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3315 dnl $x_libraries is set to /usr/lib in case
3316 if test -n "$X_LDFLAGS"; then
3317 X_RPATH="-R \$(x_libraries)"
3318 KDE_RPATH="$KDE_RPATH $X_RPATH"
3320 if test -n "$KDE_EXTRA_RPATH"; then
3321 KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3324 AC_SUBST(KDE_EXTRA_RPATH)
3327 AC_MSG_RESULT($USE_RPATH)
3330 dnl Check for the type of the third argument of getsockname
3331 AC_DEFUN([AC_CHECK_SOCKLEN_T],
3333 AC_MSG_CHECKING(for socklen_t)
3334 AC_CACHE_VAL(kde_cv_socklen_t,
3339 #include <sys/types.h>
3340 #include <sys/socket.h>
3344 getpeername(0,0,&len);
3347 kde_cv_socklen_t=yes
3348 kde_cv_socklen_t_equiv=socklen_t
3352 AC_MSG_RESULT($kde_cv_socklen_t)
3353 if test $kde_cv_socklen_t = no; then
3354 AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3355 AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3357 kde_cv_socklen_t_equiv=int
3359 for t in int size_t unsigned long "unsigned long"; do
3361 #include <sys/types.h>
3362 #include <sys/socket.h>
3366 getpeername(0,0,&len);
3369 kde_cv_socklen_t_equiv="$t"
3375 AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3377 AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3378 [type to use in place of socklen_t if not defined])
3379 AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3380 [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3383 dnl This is a merge of some macros out of the gettext aclocal.m4
3384 dnl since we don't need anything, I took the things we need
3385 dnl the copyright for them is:
3387 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3388 dnl This Makefile.in is free software; the Free Software Foundation
3389 dnl gives unlimited permission to copy and/or distribute it,
3390 dnl with or without modifications, as long as this notice is preserved.
3392 dnl This program is distributed in the hope that it will be useful,
3393 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3394 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3395 dnl PARTICULAR PURPOSE.
3397 dnl for this file it is relicensed under LGPL
3399 AC_DEFUN([AM_KDE_WITH_NLS],
3401 dnl If we use NLS figure out what method
3403 AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3404 [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3405 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3407 if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3408 AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3415 AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3416 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3418 dnl Test whether we really found GNU xgettext.
3419 if test "$XGETTEXT" != ":"; then
3420 dnl If it is no GNU xgettext we define it as : so that the
3421 dnl Makefiles still can work.
3422 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3426 [found xgettext programs is not GNU xgettext; ignore it])
3434 # Search path for a program which passes the given test.
3435 # Ulrich Drepper <drepper@cygnus.com>, 1996.
3438 # Stephan Kulow: I appended a _KDE against name conflicts
3440 dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3441 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3442 AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3443 [# Extract the first word of "$2", so it can be a program name with args.
3444 set dummy $2; ac_word=[$]2
3445 AC_MSG_CHECKING([for $ac_word])
3446 AC_CACHE_VAL(ac_cv_path_$1,
3449 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3452 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3453 for ac_dir in ifelse([$5], , $PATH, [$5]); do
3454 test -z "$ac_dir" && ac_dir=.
3455 if test -f $ac_dir/$ac_word; then
3457 ac_cv_path_$1="$ac_dir/$ac_word"
3463 dnl If no 4th arg is given, leave the cache variable unset,
3464 dnl so AC_PATH_PROGS will keep looking.
3465 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3470 if test -n "[$]$1"; then
3471 AC_MSG_RESULT([$]$1)
3479 # Check whether LC_MESSAGES is available in <locale.h>.
3480 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3484 AC_DEFUN([AM_LC_MESSAGES],
3485 [if test $ac_cv_header_locale_h = yes; then
3486 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3487 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3488 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3489 if test $am_cv_val_LC_MESSAGES = yes; then
3490 AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3494 dnl From Jim Meyering.
3495 dnl FIXME: migrate into libit.
3497 AC_DEFUN([AM_FUNC_OBSTACK],
3498 [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3499 [AC_TRY_LINK([#include "obstack.h"],
3500 [struct obstack *mem;obstack_free(mem,(char *) 0)],
3501 am_cv_func_obstack=yes,
3502 am_cv_func_obstack=no)])
3503 if test $am_cv_func_obstack = yes; then
3504 AC_DEFINE(HAVE_OBSTACK)
3506 LIBOBJS="$LIBOBJS obstack.o"
3510 dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3511 dnl FIXME: Migrate into libit
3513 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3514 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3515 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3516 am_cv_lib_error_at_line=yes,
3517 am_cv_lib_error_at_line=no)])
3518 if test $am_cv_lib_error_at_line = no; then
3519 LIBOBJS="$LIBOBJS error.o"
3521 AC_SUBST(LIBOBJS)dnl
3524 # Macro to add for using GNU gettext.
3525 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3528 # Stephan Kulow: I put a KDE in it to avoid name conflicts
3530 AC_DEFUN([AM_KDE_GNU_GETTEXT],
3531 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3532 AC_REQUIRE([AC_PROG_RANLIB])dnl
3533 AC_REQUIRE([AC_HEADER_STDC])dnl
3534 AC_REQUIRE([AC_TYPE_OFF_T])dnl
3535 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3536 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3537 AC_REQUIRE([AC_FUNC_MMAP])dnl
3538 AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3539 AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3540 AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3541 __argz_count __argz_stringify __argz_next])
3543 AC_MSG_CHECKING(for stpcpy)
3544 AC_CACHE_VAL(kde_cv_func_stpcpy,
3546 kde_safe_cxxflags=$CXXFLAGS
3555 stpcpy(buffer, buffer);
3557 kde_cv_func_stpcpy=yes,
3558 kde_cv_func_stpcpy=no)
3560 CXXFLAGS=$kde_safe_cxxflags
3562 AC_MSG_RESULT($kde_cv_func_stpcpy)
3563 if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3564 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3569 if test "x$CATOBJEXT" != "x"; then
3570 if test "x$ALL_LINGUAS" = "x"; then
3573 AC_MSG_CHECKING(for catalogs to be installed)
3575 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3576 case "$ALL_LINGUAS" in
3577 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3580 LINGUAS=$NEW_LINGUAS
3581 AC_MSG_RESULT($LINGUAS)
3584 dnl Construct list of names of catalog files to be constructed.
3585 if test -n "$LINGUAS"; then
3586 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3592 AC_DEFUN([AC_HAVE_XPM],
3593 [AC_REQUIRE_CPP()dnl
3594 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3596 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3597 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3599 AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3600 xpm_test=$withval, xpm_test="yes")
3601 if test "x$xpm_test" = xno; then
3604 AC_MSG_CHECKING(for XPM)
3605 AC_CACHE_VAL(ac_cv_have_xpm,
3607 ac_save_ldflags="$LDFLAGS"
3608 ac_save_cflags="$CFLAGS"
3609 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3610 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3612 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3614 CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3615 test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3616 AC_TRY_LINK([#include <X11/xpm.h>],[],
3617 ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3618 LDFLAGS="$ac_save_ldflags"
3619 CFLAGS="$ac_save_cflags"
3622 if test "$ac_cv_have_xpm" = no; then
3628 AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3629 if test "$XPM_LDFLAGS" = ""; then
3630 XPMLIB='-lXpm $(LIB_X11)'
3632 XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3634 if test "$XPM_INCLUDE" = ""; then
3637 XPMINC="-I$XPM_INCLUDE"
3647 AC_DEFUN([AC_HAVE_DPMS],
3648 [AC_REQUIRE_CPP()dnl
3649 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3651 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3652 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3655 AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3656 dpms_test=$withval, dpms_test="yes")
3657 if test "x$dpms_test" = xno; then
3660 AC_MSG_CHECKING(for DPMS)
3661 dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3662 dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3663 AC_CACHE_VAL(ac_cv_have_dpms,
3665 if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3667 ac_cv_have_dpms="no"
3669 ac_save_ldflags="$LDFLAGS"
3670 ac_save_cflags="$CFLAGS"
3671 ac_save_libs="$LIBS"
3672 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3673 CFLAGS="$CFLAGS $X_INCLUDES"
3674 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3676 #include <X11/Xproto.h>
3678 #include <X11/Xlib.h>
3679 #include <X11/extensions/dpms.h>
3681 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3682 ac_cv_have_dpms="yes", [
3683 LDFLAGS="$ac_save_ldflags"
3684 CFLAGS="$ac_save_cflags"
3685 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3686 LIBS="$LIBS -lXdpms"
3687 CFLAGS="$CFLAGS $X_INCLUDES"
3688 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3690 #include <X11/Xproto.h>
3692 #include <X11/Xlib.h>
3693 #include <X11/extensions/dpms.h>
3695 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3697 ac_cv_have_dpms="-lXdpms"
3698 ],ac_cv_have_dpms="no")
3700 LDFLAGS="$ac_save_ldflags"
3701 CFLAGS="$ac_save_cflags"
3702 LIBS="$ac_save_libs"
3706 if test "$ac_cv_have_dpms" = no; then
3712 AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3713 if test "$ac_cv_have_dpms" = "-lXdpms"; then
3716 if test "$DPMS_LDFLAGS" = ""; then
3717 DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3719 DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3721 if test "$DPMS_INCLUDE" = ""; then
3724 DPMSINC="-I$DPMS_INCLUDE"
3730 ac_save_cflags="$CFLAGS"
3731 CFLAGS="$CFLAGS $X_INCLUDES"
3732 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3733 AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3734 [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3735 AC_CHECK_DECL(DPMSCapable,
3736 AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3737 [#include <X11/extensions/dpms.h>])
3738 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3739 [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3740 AC_CHECK_DECL(DPMSInfo,
3741 AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3742 [#include <X11/extensions/dpms.h>])
3743 CFLAGS="$ac_save_cflags"
3748 AC_DEFUN([AC_HAVE_GL],
3749 [AC_REQUIRE_CPP()dnl
3750 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3752 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3753 test -z "$GL_INCLUDE" && GL_INCLUDE=
3755 AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3756 gl_test=$withval, gl_test="yes")
3757 if test "x$kde_use_qt_emb" = "xyes"; then
3758 # GL and Qt Embedded is a no-go for now.
3760 elif test "x$gl_test" = xno; then
3763 AC_MSG_CHECKING(for GL)
3764 AC_CACHE_VAL(ac_cv_have_gl,
3768 ac_save_ldflags="$LDFLAGS"
3769 ac_save_cxxflags="$CXXFLAGS"
3770 LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lGL -lGLU"
3771 test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3772 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3773 CXXFLAGS="$CFLAGS $X_INCLUDES"
3774 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3775 AC_TRY_LINK([#include <GL/gl.h>
3778 ac_cv_have_gl="yes", ac_cv_have_gl="no")
3780 LDFLAGS="$ac_save_ldflags"
3781 CXXFLAGS="$ac_save_cxxflags"
3784 if test "$ac_cv_have_gl" = "no"; then
3790 AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3791 if test "$GL_LDFLAGS" = ""; then
3792 GLLIB='-lGLU -lGL $(LIB_X11)'
3794 GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3796 if test "$GL_INCLUDE" = ""; then
3799 GLINC="-I$GL_INCLUDE"
3801 AC_MSG_RESULT($ac_cv_have_gl)
3810 dnl shadow password and PAM magic - maintained by ossi@kde.org
3812 AC_DEFUN([KDE_PAM], [
3813 AC_REQUIRE([KDE_CHECK_LIBDL])
3817 AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3818 [ if test "x$withval" = "xyes"; then
3821 elif test "x$withval" = "xno"; then
3825 pam_service=$withval
3827 ], [ pam_service=kde ])
3831 if test "x$want_pam" != xno; then
3832 AC_CHECK_LIB(pam, pam_start, [
3833 AC_CHECK_HEADER(security/pam_appl.h,
3834 [ pam_header=security/pam_appl.h ],
3835 [ AC_CHECK_HEADER(pam/pam_appl.h,
3836 [ pam_header=pam/pam_appl.h ],
3838 AC_MSG_WARN([PAM detected, but no headers found!
3839 Make sure you have the necessary development packages installed.])
3845 if test -z "$pam_header"; then
3846 if test "x$want_pam" = xyes; then
3847 AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3850 AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3851 PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3854 dnl darwin claims to be something special
3855 if test "$pam_header" = "pam/pam_appl.h"; then
3856 AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3859 dnl test whether struct pam_message is const (Linux) or not (Sun)
3860 AC_MSG_CHECKING(for const pam_message)
3861 AC_EGREP_HEADER([struct pam_message], $pam_header,
3862 [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3863 [AC_MSG_RESULT([const: Linux-type PAM])],
3864 [AC_MSG_RESULT([nonconst: Sun-type PAM])
3865 AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3867 [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3874 dnl DEF_PAM_SERVICE(arg name, full name, define name)
3875 AC_DEFUN([DEF_PAM_SERVICE], [
3877 AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3878 [ if test "x$use_pam" = xyes; then
3879 $3_PAM_SERVICE=$withval
3881 AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3882 You may want to enforce it by using --with-pam.])
3885 [ if test "x$use_pam" = xyes; then
3886 $3_PAM_SERVICE="$pam_service"
3889 if test -n "$$3_PAM_SERVICE"; then
3890 AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3891 AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3893 AC_SUBST($3_PAM_SERVICE)
3896 AC_DEFUN([KDE_SHADOWPASSWD], [
3897 AC_REQUIRE([KDE_PAM])
3899 AC_CHECK_LIB(shadow, getspent,
3900 [ LIBSHADOW="-lshadow"
3904 AC_CHECK_LIB(gen, getspent,
3908 [ AC_CHECK_FUNC(getspent,
3909 [ ac_use_shadow=yes ],
3910 [ ac_use_shadow=no ])
3916 AC_MSG_CHECKING([for shadow passwords])
3919 AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
3920 [ if test "x$withval" != "xno"; then
3926 use_shadow="$ac_use_shadow"
3929 if test "x$use_shadow" = xyes; then
3931 AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3938 dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3939 dnl this still applies, if we could use it indirectly through pam.
3940 if test "x$use_shadow" = xyes ||
3941 ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3943 *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3944 SETUIDFLAGS="-m 4755 -o root";;
3946 SETUIDFLAGS="-m 4755";;
3949 AC_SUBST(SETUIDFLAGS)
3953 AC_DEFUN([KDE_PASSWDLIBS], [
3954 AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3955 AC_REQUIRE([KDE_PAM])
3956 AC_REQUIRE([KDE_SHADOWPASSWD])
3958 if test "x$use_pam" = "xyes"; then
3959 PASSWDLIBS="$PAMLIBS"
3961 PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3964 dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3965 dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3966 dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3967 dnl may need to read /etc/master.passwd).
3970 SETUIDFLAGS="-m 4755 -o root"
3976 AC_SUBST(PASSWDLIBS)
3979 AC_DEFUN([KDE_CHECK_LIBDL],
3981 AC_CHECK_LIB(dl, dlopen, [
3983 ac_cv_have_dlfcn=yes
3986 AC_CHECK_LIB(dld, shl_unload, [
3988 ac_cv_have_shload=yes
3994 AC_DEFUN([KDE_CHECK_DLOPEN],
3997 AC_CHECK_HEADERS(dlfcn.h dl.h)
3998 if test "$ac_cv_header_dlfcn_h" = "no"; then
4002 if test "$ac_cv_header_dl_h" = "no"; then
4003 ac_cv_have_shload=no
4006 dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4008 AC_ARG_ENABLE(dlopen,
4009 AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4010 enable_dlopen=$enableval,
4013 # override the user's opinion, if we know it better ;)
4014 if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4018 if test "$ac_cv_have_dlfcn" = "yes"; then
4019 AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4022 if test "$ac_cv_have_shload" = "yes"; then
4023 AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4026 if test "$enable_dlopen" = no ; then
4027 test -n "$1" && eval $1
4029 test -n "$2" && eval $2
4034 AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4036 KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4038 AC_MSG_CHECKING([dynamic loading])
4039 eval "`egrep '^build_libtool_libs=' libtool`"
4040 if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4042 AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4046 AC_MSG_RESULT($dynamic_loading)
4047 if test "$dynamic_loading" = "yes"; then
4054 AC_DEFUN([KDE_ADD_INCLUDES],
4056 if test -z "$1"; then
4057 test_include="Pix.h"
4062 AC_MSG_CHECKING([for libg++ ($test_include)])
4064 AC_CACHE_VAL(kde_cv_libgpp_includes,
4066 kde_cv_libgpp_includes=no
4072 /usr/unsupported/include \
4077 if test -r "$ac_dir/$test_include"; then
4078 kde_cv_libgpp_includes=$ac_dir
4084 AC_MSG_RESULT($kde_cv_libgpp_includes)
4085 if test "$kde_cv_libgpp_includes" != "no"; then
4086 all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4091 AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4093 dnl This code is here specifically to handle the
4094 dnl various flavors of threading library on FreeBSD
4095 dnl 4-, 5-, and 6-, and the (weird) rules around it.
4096 dnl There may be an environment PTHREAD_LIBS that
4097 dnl specifies what to use; otherwise, search for it.
4098 dnl -pthread is special cased and unsets LIBPTHREAD
4102 if test -n "$PTHREAD_LIBS"; then
4103 if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4104 LIBPTHREAD="PTHREAD"
4106 PTHREAD_LIBS_save="$PTHREAD_LIBS"
4107 PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4108 AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4109 KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4110 LIBPTHREAD="$PTHREAD_LIBS_save"])
4111 PTHREAD_LIBS="$PTHREAD_LIBS_save"
4115 dnl Is this test really needed, in the face of the Tru64 test below?
4116 if test -z "$LIBPTHREAD"; then
4117 AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4120 dnl This is a special Tru64 check, see BR 76171 issue #18.
4121 if test -z "$LIBPTHREAD" ; then
4122 AC_MSG_CHECKING([for pthread_create in -lpthread])
4124 LIBS="$LIBS -lpthread"
4125 AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4127 LIBPTHREAD="-lpthread"],[
4132 dnl Un-special-case for FreeBSD.
4133 if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4137 AC_SUBST(LIBPTHREAD)
4140 AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4143 if test -z "$LIBPTHREAD"; then
4144 KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4147 AH_VERBATIM(__svr_define, [
4148 #if defined(__SVR4) && !defined(__svr4__)
4154 KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4155 CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4158 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4161 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4162 LIBPTHREAD="$LIBPTHREAD -lc_r"
4164 linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4165 if test "$CXX" = "KCC"; then
4166 CXXFLAGS="$CXXFLAGS --thread_safe"
4167 NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4173 AC_SUBST(USE_THREADS)
4174 AC_SUBST(LIBPTHREAD)
4177 AC_DEFUN([KDE_CHECK_THREADING],
4179 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4180 AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4181 dnl default is yes if libpthread is found and no if no libpthread is available
4182 if test -z "$LIBPTHREAD"; then
4183 if test -z "$USE_THREADS"; then
4184 kde_check_threading_default=no
4186 kde_check_threading_default=yes
4189 kde_check_threading_default=yes
4191 AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4192 kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4193 if test "x$kde_use_threading" = "xyes"; then
4194 AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4198 AC_DEFUN([KDE_TRY_LINK_PYTHON],
4200 if test "$kde_python_link_found" = no; then
4202 if test "$1" = normal; then
4203 AC_MSG_CHECKING(if a Python application links)
4205 AC_MSG_CHECKING(if Python depends on $2)
4208 AC_CACHE_VAL(kde_cv_try_link_python_$1,
4210 kde_save_cflags="$CFLAGS"
4211 CFLAGS="$CFLAGS $PYTHONINC"
4212 kde_save_libs="$LIBS"
4213 LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4214 kde_save_ldflags="$LDFLAGS"
4215 LDFLAGS="$LDFLAGS $PYTHONLIB"
4221 PySys_SetArgv(1, 0);
4223 [kde_cv_try_link_python_$1=yes],
4224 [kde_cv_try_link_python_$1=no]
4226 CFLAGS="$kde_save_cflags"
4227 LIBS="$kde_save_libs"
4228 LDFLAGS="$kde_save_ldflags"
4231 if test "$kde_cv_try_link_python_$1" = "yes"; then
4233 kde_python_link_found=yes
4234 if test ! "$1" = normal; then
4235 LIBPYTHON="$LIBPYTHON $2"
4247 AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4249 AC_MSG_CHECKING([for Python directory])
4251 AC_CACHE_VAL(kde_cv_pythondir,
4253 if test -z "$PYTHONDIR"; then
4254 kde_cv_pythondir=/usr/local
4256 kde_cv_pythondir="$PYTHONDIR"
4260 AC_ARG_WITH(pythondir,
4261 AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4263 ac_python_dir=$withval
4264 ], ac_python_dir=$kde_cv_pythondir
4267 AC_MSG_RESULT($ac_python_dir)
4270 AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4272 AC_REQUIRE([KDE_CHECK_LIBDL])
4273 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4274 AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4276 if test -z "$1"; then
4282 AC_MSG_CHECKING([for Python$version])
4284 python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4285 AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4286 if test ! -r $python_incdir/Python.h; then
4287 AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4288 python_incdir=$python_incdir/python$version
4289 if test ! -r $python_incdir/Python.h; then
4294 PYTHONINC=-I$python_incdir
4296 python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4297 AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4298 if test ! -r $python_libdir/libpython$version.so; then
4299 AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4300 if test ! -r $python_libdir/libpython$version.a; then
4301 AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4302 python_libdir=$python_libdir/python$version/config
4303 if test ! -r $python_libdir/libpython$version.a; then
4309 PYTHONLIB=-L$python_libdir
4310 kde_orig_LIBPYTHON=$LIBPYTHON
4311 if test -z "$LIBPYTHON"; then
4312 LIBPYTHON=-lpython$version
4315 AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4316 python_moddir=$python_moddir/python$version
4317 if test ! -r $python_moddir/copy.py; then
4321 PYTHONMODDIR=$python_moddir
4323 AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4325 if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4326 LIBPYTHON=$kde_orig_LIBPYTHON
4327 test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4328 test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4331 dnl Note: this test is very weak
4332 kde_python_link_found=no
4333 KDE_TRY_LINK_PYTHON(normal)
4334 KDE_TRY_LINK_PYTHON(m, -lm)
4335 KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4336 KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4337 KDE_TRY_LINK_PYTHON(db2, -ldb2)
4338 KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4339 KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4340 KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4341 KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4342 KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4343 KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4344 KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4345 KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4346 [AC_MSG_WARN([it seems, Python depends on another library.
4347 Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4348 and contact the authors to let them know about this problem])
4351 LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4355 AC_SUBST(PYTHONMODDIR)
4356 AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4362 AC_DEFUN([KDE_CHECK_PYTHON],
4364 KDE_CHECK_PYTHON_INTERN("2.4",
4365 [KDE_CHECK_PYTHON_INTERN("2.3",
4366 [KDE_CHECK_PYTHON_INTERN("2.2",
4367 [KDE_CHECK_PYTHON_INTERN("2.1",
4368 [KDE_CHECK_PYTHON_INTERN("2.0",
4369 [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4376 AC_DEFUN([KDE_CHECK_STL],
4380 ac_save_CXXFLAGS="$CXXFLAGS"
4381 CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4383 AC_MSG_CHECKING([if C++ programs can be compiled])
4384 AC_CACHE_VAL(kde_cv_stl_works,
4388 using namespace std;
4390 string astring="Hallo Welt.";
4391 astring.erase(0, 6); // now astring is "Welt"
4393 ], kde_cv_stl_works=yes,
4394 kde_cv_stl_works=no)
4397 AC_MSG_RESULT($kde_cv_stl_works)
4399 if test "$kde_cv_stl_works" = "yes"; then
4401 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4403 AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4404 Check config.log for details - if you're using a Linux distribution you might miss
4405 a package named similar to libstdc++-dev.])
4408 CXXFLAGS="$ac_save_CXXFLAGS"
4412 AC_DEFUN([AC_FIND_QIMGIO],
4413 [AC_REQUIRE([AC_FIND_JPEG])
4414 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4415 AC_MSG_CHECKING([for qimgio])
4416 AC_CACHE_VAL(ac_cv_lib_qimgio,
4420 ac_save_LIBS="$LIBS"
4421 ac_save_CXXFLAGS="$CXXFLAGS"
4422 LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4423 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4426 #include <qimageio.h>
4427 #include <qstring.h>
4429 QString t = "hallo";
4434 ac_cv_lib_qimgio=yes,
4435 ac_cv_lib_qimgio=no,
4436 ac_cv_lib_qimgio=no)
4437 LIBS="$ac_save_LIBS"
4438 CXXFLAGS="$ac_save_CXXFLAGS"
4441 if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4442 LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4444 AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4447 AC_MSG_RESULT(not found)
4451 AC_DEFUN([AM_DISABLE_LIBRARIES],
4453 AC_PROVIDE([AM_ENABLE_STATIC])
4454 AC_PROVIDE([AM_ENABLE_SHARED])
4460 AC_DEFUN([AC_CHECK_UTMP_FILE],
4462 AC_MSG_CHECKING([for utmp file])
4464 AC_CACHE_VAL(kde_cv_utmp_file,
4475 if test -r "$ac_file"; then
4476 kde_cv_utmp_file=$ac_file
4482 if test "$kde_cv_utmp_file" != "no"; then
4483 AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4485 AC_MSG_RESULT($kde_cv_utmp_file)
4488 AC_MSG_RESULT([non found])
4493 AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4496 DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4499 if test ! -s $srcdir/subdirs; then
4500 dnl Note: Makefile.common creates subdirs, so this is just a fallback
4501 files=`cd $srcdir && ls -1`
4502 dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4504 echo $i >> $srcdir/subdirs
4509 if test -s $srcdir/inst-apps; then
4510 ac_topsubdirs="`cat $srcdir/inst-apps`"
4511 elif test -s $srcdir/subdirs; then
4512 ac_topsubdirs="`cat $srcdir/subdirs`"
4515 for i in $ac_topsubdirs; do
4516 AC_MSG_CHECKING([if $i should be compiled])
4517 if test -d $srcdir/$i; then
4519 for j in $DO_NOT_COMPILE; do
4520 if test $i = $j; then
4527 AC_MSG_RESULT($install_it)
4528 vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4529 if test $install_it = "yes"; then
4530 TOPSUBDIRS="$TOPSUBDIRS $i"
4531 eval "$vari""_SUBDIR_included=yes"
4533 eval "$vari""_SUBDIR_included=no"
4537 AC_SUBST(TOPSUBDIRS)
4540 AC_DEFUN([KDE_CHECK_NAMESPACES],
4542 AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4556 int Foo::Bar::i = 1;
4559 AC_DEFINE(HAVE_NAMESPACES)
4566 dnl ------------------------------------------------------------------------
4567 dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4568 dnl ------------------------------------------------------------------------
4570 AC_DEFUN([AC_CHECK_S_ISSOCK],
4572 AC_MSG_CHECKING(for S_ISSOCK)
4573 AC_CACHE_VAL(ac_cv_have_s_issock,
4577 #include <sys/stat.h>
4581 int b = S_ISSOCK( buff.st_mode );
4583 ac_cv_have_s_issock=yes,
4584 ac_cv_have_s_issock=no)
4586 AC_MSG_RESULT($ac_cv_have_s_issock)
4587 if test "$ac_cv_have_s_issock" = "yes"; then
4588 AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4591 AH_VERBATIM(_ISSOCK,
4593 #ifndef HAVE_S_ISSOCK
4594 #define HAVE_S_ISSOCK
4595 #define S_ISSOCK(mode) (1==0)
4601 dnl ------------------------------------------------------------------------
4602 dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4603 dnl ------------------------------------------------------------------------
4605 AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4607 AC_MSG_CHECKING(for MAXPATHLEN)
4608 AC_CACHE_VAL(ac_cv_maxpathlen,
4610 cat > conftest.$ac_ext <<EOF
4612 # include <stdlib.h>
4615 #include <sys/param.h>
4617 #define MAXPATHLEN 1024
4620 KDE_HELLO MAXPATHLEN
4624 ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4626 if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4627 ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4629 ac_cv_maxpathlen=1024
4635 AC_MSG_RESULT($ac_cv_maxpathlen)
4636 AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4639 AC_DEFUN([KDE_CHECK_HEADER],
4642 kde_safe_cppflags=$CPPFLAGS
4643 CPPFLAGS="$CPPFLAGS $all_includes"
4645 AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4646 CPPFLAGS=$kde_safe_cppflags
4650 AC_DEFUN([KDE_CHECK_HEADERS],
4652 AH_CHECK_HEADERS([$1])
4654 kde_safe_cppflags=$CPPFLAGS
4655 CPPFLAGS="$CPPFLAGS $all_includes"
4657 AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4658 CPPFLAGS=$kde_safe_cppflags
4662 AC_DEFUN([KDE_FAST_CONFIGURE],
4664 dnl makes configure fast (needs perl)
4665 AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4666 with_fast_perl=$enableval, with_fast_perl=yes)
4669 AC_DEFUN([KDE_CONF_FILES],
4672 if test -f $srcdir/configure.files ; then
4673 val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4676 if test -n "$val" ; then
4678 CONF_FILES="$CONF_FILES $i"
4681 AC_SUBST(CONF_FILES)
4684 dnl This sets the prefix, for arts and kdelibs
4685 dnl Do NOT use in any other module.
4686 dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4687 AC_DEFUN([KDE_SET_PREFIX_CORE],
4690 dnl make $KDEDIR the default for the installation
4691 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4693 if test "x$prefix" = "xNONE"; then
4694 prefix=$ac_default_prefix
4695 ac_configure_args="$ac_configure_args --prefix=$prefix"
4697 # And delete superfluous '/' to make compares easier
4698 prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4699 exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4701 kde_libs_prefix='$(prefix)'
4702 kde_libs_htmldir='$(kde_htmldir)'
4703 AC_SUBST(kde_libs_prefix)
4704 AC_SUBST(kde_libs_htmldir)
4710 AC_DEFUN([KDE_SET_PREFIX],
4713 dnl We can't give real code to that macro, only a value.
4714 dnl It only matters for --help, since we set the prefix in this function anyway.
4715 AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4717 KDE_SET_DEFAULT_BINDIRS
4718 if test "x$prefix" = "xNONE"; then
4719 dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4720 KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4722 dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4723 kde_save_PATH="$PATH"
4724 PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4725 KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4726 PATH="$kde_save_PATH"
4729 kde_libs_prefix=`$KDECONFIG --prefix`
4730 if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4731 AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4732 This means it has been moved since you installed it.
4733 This won't work. Please recompile kdelibs for the new prefix.
4736 kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4737 kde_libs_suffix=`$KDECONFIG --libsuffix`
4739 AC_MSG_CHECKING([where to install])
4740 if test "x$prefix" = "xNONE"; then
4741 prefix=$kde_libs_prefix
4742 AC_MSG_RESULT([$prefix (as returned by kde-config)])
4744 dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4745 given_prefix=$prefix
4746 AC_MSG_RESULT([$prefix (as requested)])
4749 # And delete superfluous '/' to make compares easier
4750 prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4751 exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4752 given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4755 AC_SUBST(kde_libs_prefix)
4756 AC_SUBST(kde_libs_htmldir)
4762 pushdef([AC_PROG_INSTALL],
4764 dnl our own version, testing for a -p flag
4765 popdef([AC_PROG_INSTALL])
4766 dnl as AC_PROG_INSTALL works as it works we first have
4767 dnl to save if the user didn't specify INSTALL, as the
4768 dnl autoconf one overwrites INSTALL and we have no chance to find
4770 test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4771 test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4772 test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4775 if test -z "$kde_save_INSTALL_given" ; then
4776 # OK, user hasn't given any INSTALL, autoconf found one for us
4777 # now we test, if it supports the -p flag
4778 AC_MSG_CHECKING(for -p flag to install)
4779 rm -f confinst.$$.* > /dev/null 2>&1
4780 echo "Testtest" > confinst.$$.orig
4782 if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4783 if test -f confinst.$$.new ; then
4784 # OK, -p seems to do no harm to install
4785 INSTALL="${INSTALL} -p"
4790 AC_MSG_RESULT($ac_res)
4792 dnl the following tries to resolve some signs and wonders coming up
4793 dnl with different autoconf/automake versions
4795 dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4796 dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4797 dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4798 dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4799 dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4800 dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4801 dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4802 dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4803 dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4804 dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4805 dnl automake (due to broken Makefile.am or whatever) to install programs,
4806 dnl and so does not see the -s flag in automake > 1.4
4807 dnl to clean up that mess we:
4808 dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4809 dnl which cleans KDE's program with automake > 1.4;
4810 dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4811 dnl with automake<=1.4
4812 dnl note that dues to this sometimes two '-s' flags are used (if KDE
4813 dnl properly uses install-@DIR@PROGRAMS, but I don't care
4815 dnl And to all this comes, that I even can't write in comments variable
4816 dnl names used by automake, because it is so stupid to think I wanted to
4817 dnl _use_ them, therefor I have written A_M_... instead of AM_
4818 dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4820 if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4821 INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4823 if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4824 INSTALL_SCRIPT='${INSTALL}'
4828 AC_DEFUN([KDE_LANG_CPLUSPLUS],
4830 ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4831 pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4834 pushdef([AC_LANG_CPLUSPLUS],
4835 [popdef([AC_LANG_CPLUSPLUS])
4839 AC_DEFUN([KDE_CHECK_LONG_LONG],
4841 AC_MSG_CHECKING(for long long)
4842 AC_CACHE_VAL(kde_cv_c_long_long,
4850 kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4853 AC_MSG_RESULT($kde_cv_c_long_long)
4854 if test "$kde_cv_c_long_long" = yes; then
4855 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4859 AC_DEFUN([KDE_CHECK_LIB],
4861 kde_save_LDFLAGS="$LDFLAGS"
4862 dnl AC_CHECK_LIB modifies LIBS, so save it here
4863 kde_save_LIBS="$LIBS"
4864 LDFLAGS="$LDFLAGS $all_libraries"
4866 aix*) LDFLAGS="-brtl $LDFLAGS"
4867 test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4870 AC_CHECK_LIB($1, $2, $3, $4, $5)
4871 LDFLAGS="$kde_save_LDFLAGS"
4872 LIBS="$kde_save_LIBS"
4875 AC_DEFUN([KDE_JAVA_PREFIX],
4878 base=`basename "$1"`
4879 list=`ls -1 $dir 2> /dev/null`
4880 for entry in $list; do
4881 if test -d $dir/$entry/bin; then
4884 javadirs="$javadirs $dir/$entry/bin"
4887 elif test -d $dir/$entry/jre/bin; then
4890 javadirs="$javadirs $dir/$entry/jre/bin"
4897 dnl KDE_CHEC_JAVA_DIR(onlyjre)
4898 AC_DEFUN([KDE_CHECK_JAVA_DIR],
4902 AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4903 [ ac_java_dir=$withval
4907 AC_MSG_CHECKING([for Java])
4909 dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4910 if test "x$ac_java_dir" = "xno"; then
4912 kde_java_includedir=no
4913 kde_java_libjvmdir=no
4914 kde_java_libgcjdir=no
4915 kde_java_libhpidir=no
4917 if test "x$ac_java_dir" = "x"; then
4920 dnl No option set -> collect list of candidate paths
4921 if test -n "$JAVA_HOME"; then
4922 KDE_JAVA_PREFIX($JAVA_HOME)
4924 KDE_JAVA_PREFIX(/usr/j2se)
4925 KDE_JAVA_PREFIX(/usr/lib/j2se)
4926 KDE_JAVA_PREFIX(/usr/j*dk*)
4927 KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4928 KDE_JAVA_PREFIX(/opt/j*sdk*)
4929 KDE_JAVA_PREFIX(/usr/lib/java*)
4930 KDE_JAVA_PREFIX(/usr/java*)
4931 KDE_JAVA_PREFIX(/usr/java/j*dk*)
4932 KDE_JAVA_PREFIX(/usr/java/j*re*)
4933 KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4934 KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4935 KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4936 KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4937 KDE_JAVA_PREFIX(/opt/java*)
4942 for dir in $PATH; do
4943 if test -d "$dir"; then
4944 javadirs="$javadirs $dir"
4950 dnl Now javadirs contains a list of paths that exist, all ending with bin/
4951 for dir in $javadirs; do
4952 dnl Check for the java executable
4953 if test -x "$dir/java"; then
4954 dnl And also check for a libjvm.so somewhere under there
4955 dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
4956 if test "$dir" != "/usr/bin"; then
4957 libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4958 if test ! -f $libjvmdir/libjvm.so; then continue; fi
4959 jredirs="$jredirs $dir"
4964 dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
4968 for dir in $jredirs; do
4970 kde_java_bindir=$dir
4971 if test -x "$dir/javac"; then
4977 if test -n "$JAVAC"; then
4978 dnl this substitution might not work - well, we test for jni.h below
4979 kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4981 kde_java_includedir=no
4984 dnl config option set
4985 kde_java_bindir=$ac_java_dir/bin
4986 if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4987 kde_java_includedir=no
4989 kde_java_includedir=$ac_java_dir/include
4994 dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4995 if test "x$kde_java_bindir" != "xno"; then
4997 dnl Look for libjvm.so
4998 kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4999 dnl Look for libgcj.so
5000 kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5001 dnl Look for libhpi.so and avoid green threads
5002 kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5004 dnl Now check everything's fine under there
5005 dnl the include dir is our flag for having the JDK
5006 if test -d "$kde_java_includedir"; then
5007 if test ! -x "$kde_java_bindir/javac"; then
5008 AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5010 if test ! -x "$kde_java_bindir/javah"; then
5011 AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5013 if test ! -x "$kde_java_bindir/jar"; then
5014 AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5016 if test ! -r "$kde_java_includedir/jni.h"; then
5017 AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5020 jni_includes="-I$kde_java_includedir"
5021 dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5022 dnl and under linux here..
5024 dnl not needed for gcj
5026 if test "x$kde_java_libgcjdir" = "x"; then
5027 test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5028 test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5029 test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5037 if test "x$kde_java_libgcjdir" = "x"; then
5038 if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5039 AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5042 if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5043 AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5047 if test ! -x "$kde_java_bindir/java"; then
5048 AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5051 dnl not needed for gcj compile
5053 if test "x$kde_java_libgcjdir" = "x"; then
5054 if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5055 AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5059 if test -n "$jni_includes"; then
5060 dnl Check for JNI version
5063 ac_cxxflags_safe="$CXXFLAGS"
5064 CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5070 #ifndef JNI_VERSION_1_2
5073 ],[ kde_jni_works=yes ],
5074 [ kde_jni_works=no ])
5076 if test $kde_jni_works = no; then
5077 AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5078 You need to have Java Development Kit (JDK) version 1.2.
5080 Use --with-java to specify another location.
5081 Use --without-java to configure without java support.
5082 Or download a newer JDK and try again.
5083 See e.g. http://java.sun.com/products/jdk/1.2 ])
5086 CXXFLAGS="$ac_cxxflags_safe"
5089 dnl All tests ok, inform and subst the variables
5091 JAVAC=$kde_java_bindir/javac
5092 JAVAH=$kde_java_bindir/javah
5093 JAR=$kde_java_bindir/jar
5094 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5095 if test "x$kde_java_libgcjdir" = "x"; then
5096 JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5098 JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5100 AC_MSG_RESULT([java JDK in $kde_java_bindir])
5103 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5104 AC_MSG_RESULT([java JRE in $kde_java_bindir])
5106 elif test -d "/Library/Java/Home"; then
5107 kde_java_bindir="/Library/Java/Home/bin"
5108 jni_includes="-I/Library/Java/Home/include"
5110 JAVAC=$kde_java_bindir/javac
5111 JAVAH=$kde_java_bindir/javah
5112 JAR=$kde_java_bindir/jar
5113 JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
5115 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5116 AC_MSG_RESULT([Apple Java Framework])
5118 AC_MSG_RESULT([none found])
5125 AC_SUBST(jni_includes)
5127 # for backward compat
5128 kde_cv_java_includedir=$kde_java_includedir
5129 kde_cv_java_bindir=$kde_java_bindir
5132 dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5133 dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5134 dnl big packages, m4_foreach is dog-slow. So use our own version of
5135 dnl it. (matz@kde.org)
5136 m4_define([mm_foreach],
5137 [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5138 m4_define([mm_car], [[$1]])
5139 m4_define([mm_car2], [[$@]])
5140 m4_define([_mm_foreach],
5141 [m4_if(m4_quote($2), [], [],
5142 [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5143 mm_car2(m4_shift($2)),
5145 m4_define([AC_FOREACH],
5146 [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5148 AC_DEFUN([KDE_NEED_FLEX],
5151 LIBS="$LIBS $USER_LDFLAGS"
5154 if test -z "$LEXLIB"; then
5155 AC_MSG_ERROR([You need to have flex installed.])
5160 AC_DEFUN([AC_PATH_QTOPIA],
5162 dnl TODO: use AC_CACHE_VAL
5164 if test -z "$1"; then
5169 qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5170 qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5171 qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5174 qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5175 qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5177 AC_REQUIRE([AC_PATH_QT])
5179 AC_MSG_CHECKING([for Qtopia])
5182 AC_SUBST(LIB_QTOPIA)
5184 kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5188 AC_ARG_WITH(qtopia-dir,
5189 AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5190 [ ac_qtopia_incdir="$withval"/include] )
5193 for dir in $kde_qtopia_dirs; do
5194 qtopia_incdirs="$qtopia_incdirs $dir/include"
5197 if test ! "$ac_qtopia_incdir" = "NO"; then
5198 qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5202 AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5203 ac_qtopia_incdir="$qtopia_incdir"
5205 if test -z "$qtopia_incdir"; then
5206 AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5209 qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5210 qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5211 qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5213 qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5214 qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5215 if test "$qtopia_ver" -lt "$qtopia_minver"; then
5216 AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5223 ac_cxxflags_safe="$CXXFLAGS"
5224 ac_ldflags_safe="$LDFLAGS"
5225 ac_libs_safe="$LIBS"
5227 CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5228 LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5229 LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5231 cat > conftest.$ac_ext <<EOF
5232 #include "confdefs.h"
5233 #include <qpe/qpeapplication.h>
5234 #include <qpe/version.h>
5236 int main( int argc, char **argv )
5238 QPEApplication app( argc, argv );
5243 if AC_TRY_EVAL(ac_link) && test -s conftest; then
5247 AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5248 the end of config.log])
5251 CXXFLAGS="$ac_cxxflags_safe"
5252 LDFLAGS="$ac_ldflags_safe"
5253 LIBS="$ac_libs_safe"
5257 QTOPIA_INCLUDES="-I$qtopia_incdir"
5258 AC_SUBST(QTOPIA_INCLUDES)
5260 AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5264 AC_DEFUN([KDE_INIT_DOXYGEN],
5266 AC_MSG_CHECKING([for Qt docs])
5268 if test "${with_qt_dir+set}" = set; then
5269 kde_qtdir="$with_qt_dir"
5272 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 /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
5273 AC_MSG_RESULT($QTDOCDIR)
5277 KDE_FIND_PATH(dot, DOT, [], [])
5278 if test -n "$DOT"; then
5283 AC_SUBST(KDE_HAVE_DOT)
5284 KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5287 DOXYGEN_PROJECT_NAME="$1"
5288 DOXYGEN_PROJECT_NUMBER="$2"
5289 AC_SUBST(DOXYGEN_PROJECT_NAME)
5290 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5293 if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5296 AC_SUBST(KDE_HAS_DOXYGEN)
5301 AC_DEFUN([AC_FIND_BZIP2],
5303 AC_MSG_CHECKING([for bzDecompress in libbz2])
5304 AC_CACHE_VAL(ac_cv_lib_bzip2,
5308 kde_save_LIBS="$LIBS"
5309 LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5310 kde_save_CXXFLAGS="$CXXFLAGS"
5311 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5317 [ bz_stream s; (void) bzDecompress(&s); ],
5318 eval "ac_cv_lib_bzip2='-lbz2'",
5319 eval "ac_cv_lib_bzip2=no")
5320 LIBS="$kde_save_LIBS"
5321 CXXFLAGS="$kde_save_CXXFLAGS"
5324 AC_MSG_RESULT($ac_cv_lib_bzip2)
5326 if test ! "$ac_cv_lib_bzip2" = no; then
5329 LIBBZ2="$ac_cv_lib_bzip2"
5336 KDE_CHECK_COMPILER_FLAG(shared, [
5337 ld_shared_flag="-shared"
5339 KDE_CHECK_COMPILER_FLAG(fPIC, [
5340 cxx_shared_flag="-fPIC"
5343 AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5344 AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5348 kde_save_LIBS="$LIBS"
5349 LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5350 kde_save_CXXFLAGS="$CXXFLAGS"
5351 CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5358 [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5359 eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5360 eval "ac_cv_lib_bzip2_prefix=no")
5361 LIBS="$kde_save_LIBS"
5362 CXXFLAGS="$kde_save_CXXFLAGS"
5366 AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5368 if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5371 LIBBZ2="$ac_cv_lib_bzip2_prefix"
5374 AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5375 dnl else, we just ignore this
5379 AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5382 dnl ------------------------------------------------------------------------
5383 dnl Try to find the SSL headers and libraries.
5384 dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5385 dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5386 dnl ------------------------------------------------------------------------
5388 AC_DEFUN([KDE_CHECK_SSL],
5390 LIBSSL="-lssl -lcrypto"
5391 AC_REQUIRE([KDE_CHECK_LIB64])
5393 ac_ssl_includes=NO ac_ssl_libraries=NO
5396 AC_ARG_WITH(ssl-dir,
5397 AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5398 [ ac_ssl_includes="$withval"/include
5399 ac_ssl_libraries="$withval"/lib$kdelibsuff
5404 AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5405 [want_ssl=$withval])
5407 if test $want_ssl = yes; then
5409 AC_MSG_CHECKING(for OpenSSL)
5411 AC_CACHE_VAL(ac_cv_have_ssl,
5412 [#try to guess OpenSSL locations
5414 ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5415 ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5416 AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5417 ac_ssl_includes="$ssl_incdir"
5419 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"
5420 if test ! "$ac_ssl_libraries" = "NO"; then
5421 ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5426 for dir in $ssl_libdirs; do
5427 try="ls -1 $dir/libssl*"
5428 if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5431 ac_ssl_libraries="$ssl_libdir"
5433 ac_ldflags_safe="$LDFLAGS"
5434 ac_libs_safe="$LIBS"
5436 LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5437 LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5439 AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5445 LDFLAGS="$ac_ldflags_safe"
5446 LIBS="$ac_libs_safe"
5448 if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5456 eval "$ac_cv_have_ssl"
5458 AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5460 AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5461 AC_MSG_RESULT($ac_ssl_rsaref)
5463 AC_MSG_CHECKING([for easter eggs])
5464 AC_MSG_RESULT([none found])
5470 if test "$have_ssl" = yes; then
5471 AC_MSG_CHECKING(for OpenSSL version)
5472 dnl Check for SSL version
5473 AC_CACHE_VAL(ac_cv_ssl_version,
5476 cat >conftest.$ac_ext <<EOF
5477 #include <openssl/opensslv.h>
5481 #ifndef OPENSSL_VERSION_NUMBER
5482 printf("ssl_version=\\"error\\"\n");
5484 if (OPENSSL_VERSION_NUMBER < 0x00906000)
5485 printf("ssl_version=\\"old\\"\n");
5487 printf("ssl_version=\\"ok\\"\n");
5493 ac_save_CPPFLAGS=$CPPFLAGS
5494 if test "$ac_ssl_includes" != "/usr/include"; then
5495 CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5498 if AC_TRY_EVAL(ac_link); then
5500 if eval `./conftest 2>&5`; then
5501 if test $ssl_version = error; then
5502 AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5504 if test $ssl_version = old; then
5505 AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5509 ac_cv_ssl_version="ssl_version=$ssl_version"
5511 AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5512 Check config.log, and if you can't figure it out, send a mail to
5513 David Faure <faure@kde.org>, attaching your config.log])
5517 AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5518 Check config.log, and if you can't figure it out, send a mail to
5519 David Faure <faure@kde.org>, attaching your config.log])
5521 CPPFLAGS=$ac_save_CPPFLAGS
5525 eval "$ac_cv_ssl_version"
5526 AC_MSG_RESULT($ssl_version)
5529 if test "$have_ssl" != yes; then
5532 AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5533 ac_cv_have_ssl="have_ssl=yes \
5534 ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5537 ssl_libraries="$ac_ssl_libraries"
5538 ssl_includes="$ac_ssl_includes"
5540 if test "$ac_ssl_rsaref" = yes; then
5541 LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5544 if test $ssl_version = "old"; then
5545 AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5551 if test "$ssl_includes" = "/usr/include"; then
5552 if test -f /usr/kerberos/include/krb5.h; then
5553 SSL_INCLUDES="-I/usr/kerberos/include"
5555 elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5556 SSL_INCLUDES="-I$ssl_includes"
5559 if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5562 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5565 AC_SUBST(SSL_INCLUDES)
5566 AC_SUBST(SSL_LDFLAGS)
5570 AC_DEFUN([KDE_CHECK_STRLCPY],
5572 AC_REQUIRE([AC_CHECK_STRLCAT])
5573 AC_REQUIRE([AC_CHECK_STRLCPY])
5574 AC_CHECK_SIZEOF(size_t)
5575 AC_CHECK_SIZEOF(unsigned long)
5577 AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5579 #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5582 ],AC_MSG_RESULT([yes]),[
5585 Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5586 does not apply. Please mail kde-devel@kde.org with a description of your system!
5591 AC_DEFUN([KDE_CHECK_BINUTILS],
5593 AC_MSG_CHECKING([if ld supports unversioned version maps])
5595 kde_save_LDFLAGS="$LDFLAGS"
5596 LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5597 echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5598 AC_TRY_LINK([int foo;],
5600 #ifdef __INTEL_COMPILER
5601 icc apparently does not support libtools version-info and version-script
5602 at the same time. Dunno where the bug is, but until somebody figured out,
5603 better disable the optional version scripts.
5607 ], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5608 LDFLAGS="$kde_save_LDFLAGS"
5610 AM_CONDITIONAL(include_VERSION_SCRIPT,
5611 [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5613 AC_MSG_RESULT($kde_supports_versionmaps)
5616 AC_DEFUN([AM_PROG_OBJC],[
5617 AC_CHECK_PROGS(OBJC, gcc, gcc)
5618 test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5619 if test "x${OBJCFLAGS-unset}" = xunset; then
5623 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5626 AC_DEFUN([KDE_CHECK_PERL],
5628 KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5629 AC_MSG_ERROR([No Perl found in your $PATH.
5630 We need perl to generate some code.])
5635 AC_DEFUN([KDE_CHECK_LARGEFILE],
5638 if test "$ac_cv_sys_file_offset_bits" != no; then
5639 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5642 if test "x$ac_cv_sys_large_files" != "xno"; then
5643 CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5648 dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5649 dnl which allows to search for libs that get installed into the KDE prefix.
5651 dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5652 dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5653 dnl also defines KSTUFF_PKG_ERRORS on error
5654 AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5656 PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5657 if test "$prefix" != "$kde_libs_prefix"; then
5658 PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5660 export PKG_CONFIG_PATH
5661 PKG_CHECK_MODULES($1,$2,$3,$4)
5664 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5665 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5666 ## Free Software Foundation, Inc.
5667 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5669 ## This program is free software; you can redistribute it and/or modify
5670 ## it under the terms of the GNU General Public License as published by
5671 ## the Free Software Foundation; either version 2 of the License, or
5672 ## (at your option) any later version.
5674 ## This program is distributed in the hope that it will be useful, but
5675 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5676 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5677 ## General Public License for more details.
5679 ## You should have received a copy of the GNU General Public License
5680 ## along with this program; if not, write to the Free Software
5681 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5683 ## As a special exception to the GNU General Public License, if you
5684 ## distribute this file as part of a program that contains a
5685 ## configuration script generated by Autoconf, you may include it under
5686 ## the same distribution terms that you use for the rest of that program.
5688 # serial 47 AC_PROG_LIBTOOL
5691 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5692 # -----------------------------------------------------------
5693 # If this macro is not defined by Autoconf, define it here.
5694 m4_ifdef([AC_PROVIDE_IFELSE],
5696 [m4_define([AC_PROVIDE_IFELSE],
5697 [m4_ifdef([AC_PROVIDE_$1],
5703 AC_DEFUN([AC_PROG_LIBTOOL],
5704 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5705 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5706 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5707 AC_PROVIDE_IFELSE([AC_PROG_CXX],
5709 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5711 dnl And a similar setup for Fortran 77 support
5712 AC_PROVIDE_IFELSE([AC_PROG_F77],
5714 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5717 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5718 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5719 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5720 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5722 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5724 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5726 [ifdef([AC_PROG_GCJ],
5727 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5728 ifdef([A][M_PROG_GCJ],
5729 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5730 ifdef([LT_AC_PROG_GCJ],
5731 [define([LT_AC_PROG_GCJ],
5732 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5733 ])])# AC_PROG_LIBTOOL
5738 AC_DEFUN([_AC_PROG_LIBTOOL],
5739 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5740 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5741 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5742 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5744 # This can be used to rebuild libtool when needed
5745 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5747 # Always use our own libtool.
5748 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5749 AC_SUBST(LIBTOOL)dnl
5751 # Prevent multiple expansion
5752 define([AC_PROG_LIBTOOL], [])
5753 ])# _AC_PROG_LIBTOOL
5758 AC_DEFUN([AC_LIBTOOL_SETUP],
5760 AC_REQUIRE([AC_ENABLE_SHARED])dnl
5761 AC_REQUIRE([AC_ENABLE_STATIC])dnl
5762 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5763 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5764 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5765 AC_REQUIRE([AC_PROG_CC])dnl
5766 AC_REQUIRE([AC_PROG_LD])dnl
5767 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5768 AC_REQUIRE([AC_PROG_NM])dnl
5770 AC_REQUIRE([AC_PROG_LN_S])dnl
5771 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5772 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5773 AC_REQUIRE([AC_OBJEXT])dnl
5774 AC_REQUIRE([AC_EXEEXT])dnl
5777 AC_LIBTOOL_SYS_MAX_CMD_LEN
5778 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5781 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5782 _LT_AC_PROG_ECHO_BACKSLASH
5786 # AIX sometimes has problems with the GCC collect2 program. For some
5787 # reason, if we set the COLLECT_NAMES environment variable, the problems
5788 # vanish in a puff of smoke.
5789 if test "X${COLLECT_NAMES+set}" != Xset; then
5791 export COLLECT_NAMES
5796 # Sed substitution that helps us do robust quoting. It backslashifies
5797 # metacharacters that are still active within double-quoted strings.
5798 Xsed='sed -e s/^X//'
5799 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5801 # Same as above, but do not quote variable references.
5802 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5804 # Sed substitution to delay expansion of an escaped shell variable in a
5805 # double_quote_subst'ed string.
5806 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5808 # Sed substitution to avoid accidental globbing in evaled expressions
5809 no_glob_subst='s/\*/\\\*/g'
5815 default_ofile=libtool
5816 can_build_shared=yes
5818 # All known linkers require a `.a' archive for static linking (except M$VC,
5819 # which needs '.lib').
5821 ltmain="$ac_aux_dir/ltmain.sh"
5822 ofile="$default_ofile"
5823 with_gnu_ld="$lt_cv_prog_gnu_ld"
5825 AC_CHECK_TOOL(AR, ar, false)
5826 AC_CHECK_TOOL(RANLIB, ranlib, :)
5827 AC_CHECK_TOOL(STRIP, strip, :)
5830 old_CFLAGS="$CFLAGS"
5832 # Set sane defaults for various variables
5833 test -z "$AR" && AR=ar
5834 test -z "$AR_FLAGS" && AR_FLAGS=cru
5835 test -z "$AS" && AS=as
5836 test -z "$CC" && CC=cc
5837 test -z "$LTCC" && LTCC=$CC
5838 test -z "$DLLTOOL" && DLLTOOL=dlltool
5839 test -z "$LD" && LD=ld
5840 test -z "$LN_S" && LN_S="ln -s"
5841 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5842 test -z "$NM" && NM=nm
5843 test -z "$SED" && SED=sed
5844 test -z "$OBJDUMP" && OBJDUMP=objdump
5845 test -z "$RANLIB" && RANLIB=:
5846 test -z "$STRIP" && STRIP=:
5847 test -z "$ac_objext" && ac_objext=o
5849 # Determine commands to create old-style static archives.
5850 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5851 old_postinstall_cmds='chmod 644 $oldlib'
5852 old_postuninstall_cmds=
5854 if test -n "$RANLIB"; then
5857 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5860 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5863 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5866 # Only perform the check for file, if the check method requires it
5867 case $deplibs_check_method in
5869 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5875 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5876 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5877 enable_win32_dll=yes, enable_win32_dll=no)
5879 AC_ARG_ENABLE([libtool-lock],
5880 [AC_HELP_STRING([--disable-libtool-lock],
5881 [avoid locking (might break parallel builds)])])
5882 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5885 [AC_HELP_STRING([--with-pic],
5886 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5887 [pic_mode="$withval"],
5889 test -z "$pic_mode" && pic_mode=default
5891 # Use C for the default configuration in the libtool script
5893 AC_LIBTOOL_LANG_C_CONFIG
5895 ])# AC_LIBTOOL_SETUP
5898 # _LT_AC_SYS_COMPILER
5899 # -------------------
5900 AC_DEFUN([_LT_AC_SYS_COMPILER],
5901 [AC_REQUIRE([AC_PROG_CC])dnl
5903 # If no C compiler was specified, use CC.
5906 # Allow CC to be a program name with arguments.
5908 ])# _LT_AC_SYS_COMPILER
5911 # _LT_AC_SYS_LIBPATH_AIX
5912 # ----------------------
5913 # Links a minimal program and checks the executable
5914 # for the system default hardcoded library path. In most cases,
5915 # this is /usr/lib:/lib, but when the MPI compilers are used
5916 # the location of the communication and MPI libs are included too.
5917 # If we don't find anything, use the default library path according
5918 # to the aix ld manual.
5919 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5920 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5921 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5923 # Check for a 64-bit object if we didn't find anything.
5924 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; }
5926 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5927 ])# _LT_AC_SYS_LIBPATH_AIX
5930 # _LT_AC_SHELL_INIT(ARG)
5931 # ----------------------
5932 AC_DEFUN([_LT_AC_SHELL_INIT],
5933 [ifdef([AC_DIVERSION_NOTICE],
5934 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5935 [AC_DIVERT_PUSH(NOTICE)])
5938 ])# _LT_AC_SHELL_INIT
5941 # _LT_AC_PROG_ECHO_BACKSLASH
5942 # --------------------------
5943 # Add some code to the start of the generated configure script which
5944 # will find an echo command which doesn't interpret backslashes.
5945 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5946 [_LT_AC_SHELL_INIT([
5947 # Check that we are running under the correct shell.
5948 SHELL=${CONFIG_SHELL-/bin/sh}
5952 # Remove one level of quotation (which was required for Make).
5953 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5958 if test "X[$]1" = X--no-reexec; then
5959 # Discard the --no-reexec flag, and continue.
5961 elif test "X[$]1" = X--fallback-echo; then
5962 # Avoid inline document here, it may be left over
5964 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
5965 # Yippee, $echo works!
5968 # Restart under the correct shell.
5969 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5972 if test "X[$]1" = X--fallback-echo; then
5973 # used as fallback echo
5981 # The HP-UX ksh and POSIX shell print the target directory to stdout
5983 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5985 if test -z "$ECHO"; then
5986 if test "X${echo_test_string+set}" != Xset; then
5987 # find a string as large as possible, as long as the shell can cope with it
5988 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5989 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5990 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5991 echo_test_string="`eval $cmd`" &&
5992 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5999 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6000 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6001 test "X$echo_testing_string" = "X$echo_test_string"; then
6004 # The Solaris, AIX, and Digital Unix default echo programs unquote
6005 # backslashes. This makes it impossible to quote backslashes using
6006 # echo "$something" | sed 's/\\/\\\\/g'
6008 # So, first we look for a working echo in the user's PATH.
6010 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6011 for dir in $PATH /usr/ucb; do
6013 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6014 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6015 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6016 test "X$echo_testing_string" = "X$echo_test_string"; then
6023 if test "X$echo" = Xecho; then
6024 # We didn't find a better echo, so look for alternatives.
6025 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6026 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6027 test "X$echo_testing_string" = "X$echo_test_string"; then
6028 # This shell has a builtin print -r that does the trick.
6030 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6031 test "X$CONFIG_SHELL" != X/bin/ksh; then
6032 # If we have ksh, try running configure again with it.
6033 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6034 export ORIGINAL_CONFIG_SHELL
6035 CONFIG_SHELL=/bin/ksh
6037 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6041 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6042 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6043 test "X$echo_testing_string" = "X$echo_test_string"; then
6044 # Cool, printf works
6046 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6047 test "X$echo_testing_string" = 'X\t' &&
6048 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6049 test "X$echo_testing_string" = "X$echo_test_string"; then
6050 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6052 SHELL="$CONFIG_SHELL"
6054 echo="$CONFIG_SHELL [$]0 --fallback-echo"
6055 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6056 test "X$echo_testing_string" = 'X\t' &&
6057 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6058 test "X$echo_testing_string" = "X$echo_test_string"; then
6059 echo="$CONFIG_SHELL [$]0 --fallback-echo"
6061 # maybe with a smaller string...
6064 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6065 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6072 if test "$prev" != 'sed 50q "[$]0"'; then
6073 echo_test_string=`eval $prev`
6074 export echo_test_string
6075 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6077 # Oops. We lost completely, so just stick with echo.
6086 # Copy echo and quote the copy suitably for passing to libtool from
6087 # the Makefile, instead of quoting the original, which is used later.
6089 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6090 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6094 ])])# _LT_AC_PROG_ECHO_BACKSLASH
6099 AC_DEFUN([_LT_AC_LOCK],
6100 [AC_ARG_ENABLE([libtool-lock],
6101 [AC_HELP_STRING([--disable-libtool-lock],
6102 [avoid locking (might break parallel builds)])])
6103 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6105 # Some flags need to be propagated to the compiler or linker for good
6109 # Find out which ABI we are using.
6110 echo 'int i;' > conftest.$ac_ext
6111 if AC_TRY_EVAL(ac_compile); then
6112 case `/usr/bin/file conftest.$ac_objext` in
6124 # Find out which ABI we are using.
6125 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6126 if AC_TRY_EVAL(ac_compile); then
6127 if test "$lt_cv_prog_gnu_ld" = yes; then
6128 case `/usr/bin/file conftest.$ac_objext` in
6130 LD="${LD-ld} -melf32bsmip"
6133 LD="${LD-ld} -melf32bmipn32"
6136 LD="${LD-ld} -melf64bmip"
6140 case `/usr/bin/file conftest.$ac_objext` in
6156 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6157 # Find out which ABI we are using.
6158 echo 'int i;' > conftest.$ac_ext
6159 if AC_TRY_EVAL(ac_compile); then
6160 case "`/usr/bin/file conftest.o`" in
6165 LD="${LD-ld} -m elf_i386"
6168 LD="${LD-ld} -m elf32ppclinux"
6171 LD="${LD-ld} -m elf_s390"
6174 LD="${LD-ld} -m elf32_sparc"
6182 LD="${LD-ld} -m elf_x86_64"
6184 ppc*-*linux*|powerpc*-*linux*)
6185 LD="${LD-ld} -m elf64ppc"
6188 LD="${LD-ld} -m elf64_s390"
6191 LD="${LD-ld} -m elf64_sparc"
6201 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6202 SAVE_CFLAGS="$CFLAGS"
6203 CFLAGS="$CFLAGS -belf"
6204 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6206 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6208 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6209 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6210 CFLAGS="$SAVE_CFLAGS"
6213 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6214 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6215 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6216 AC_CHECK_TOOL(AS, as, false)
6217 AC_CHECK_TOOL(OBJDUMP, objdump, false)
6222 need_locks="$enable_libtool_lock"
6227 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6228 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6229 # ----------------------------------------------------------------
6230 # Check whether the given compiler option works
6231 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6232 [AC_REQUIRE([LT_AC_PROG_SED])
6233 AC_CACHE_CHECK([$1], [$2],
6235 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6236 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6237 lt_compiler_flag="$3"
6238 # Insert the option either (1) after the last *FLAGS variable, or
6239 # (2) before a word containing "conftest.", or (3) at the end.
6240 # Note that $ac_compile itself does not contain backslashes and begins
6241 # with a dollar sign (not a hyphen), so the echo should work correctly.
6242 # The option is referenced via a variable to avoid confusing sed.
6243 lt_compile=`echo "$ac_compile" | $SED \
6244 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6245 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6246 -e 's:$: $lt_compiler_flag:'`
6247 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6248 (eval "$lt_compile" 2>conftest.err)
6250 cat conftest.err >&AS_MESSAGE_LOG_FD
6251 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6252 if (exit $ac_status) && test -s "$ac_outfile"; then
6253 # The compiler can only warn and ignore the option if not recognized
6254 # So say no if there are warnings
6255 if test ! -s conftest.err; then
6262 if test x"[$]$2" = xyes; then
6263 ifelse([$5], , :, [$5])
6265 ifelse([$6], , :, [$6])
6267 ])# AC_LIBTOOL_COMPILER_OPTION
6270 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6271 # [ACTION-SUCCESS], [ACTION-FAILURE])
6272 # ------------------------------------------------------------
6273 # Check whether the given compiler option works
6274 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6275 [AC_CACHE_CHECK([$1], [$2],
6277 save_LDFLAGS="$LDFLAGS"
6278 LDFLAGS="$LDFLAGS $3"
6279 printf "$lt_simple_link_test_code" > conftest.$ac_ext
6280 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6281 # The compiler can only warn and ignore the option if not recognized
6282 # So say no if there are warnings
6283 if test -s conftest.err; then
6284 # Append any errors to the config.log.
6285 cat conftest.err 1>&AS_MESSAGE_LOG_FD
6291 LDFLAGS="$save_LDFLAGS"
6294 if test x"[$]$2" = xyes; then
6295 ifelse([$4], , :, [$4])
6297 ifelse([$5], , :, [$5])
6299 ])# AC_LIBTOOL_LINKER_OPTION
6302 # AC_LIBTOOL_SYS_MAX_CMD_LEN
6303 # --------------------------
6304 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6305 [# find the maximum length of command line arguments
6306 AC_MSG_CHECKING([the maximum length of command line arguments])
6307 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6313 # On DJGPP, this test can blow up pretty badly due to problems in libc
6314 # (any single argument exceeding 2000 bytes causes a buffer overrun
6315 # during glob expansion). Even if it were fixed, the result of this
6316 # check would be larger than it should be.
6317 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6321 # Under GNU Hurd, this test is not required because there is
6322 # no limit to the length of command line arguments.
6323 # Libtool will interpret -1 as no limit whatsoever
6324 lt_cv_sys_max_cmd_len=-1;
6328 # On Win9x/ME, this test blows up -- it succeeds, but takes
6329 # about 5 minutes as the teststring grows exponentially.
6330 # Worse, since 9x/ME are not pre-emptively multitasking,
6331 # you end up with a "frozen" computer, even though with patience
6332 # the test eventually succeeds (with a max line length of 256k).
6333 # Instead, let's just punt: use the minimum linelength reported by
6334 # all of the supported platforms: 8192 (on NT/2K/XP).
6335 lt_cv_sys_max_cmd_len=8192;
6339 # If test is not a shell built-in, we'll probably end up computing a
6340 # maximum length that is only half of the actual maximum length, but
6342 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6343 = "XX$testring") >/dev/null 2>&1 &&
6344 new_result=`expr "X$testring" : ".*" 2>&1` &&
6345 lt_cv_sys_max_cmd_len=$new_result &&
6346 test $i != 17 # 1/2 MB should be enough
6349 testring=$testring$testring
6352 # Add a significant safety factor because C++ compilers can tack on massive
6353 # amounts of additional arguments before passing them to the linker.
6354 # It appears as though 1/2 is a usable value.
6355 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6359 if test -n $lt_cv_sys_max_cmd_len ; then
6360 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6364 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6367 # _LT_AC_CHECK_DLFCN
6368 # --------------------
6369 AC_DEFUN([_LT_AC_CHECK_DLFCN],
6370 [AC_CHECK_HEADERS(dlfcn.h)dnl
6371 ])# _LT_AC_CHECK_DLFCN
6374 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6375 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6376 # ------------------------------------------------------------------
6377 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6378 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6379 if test "$cross_compiling" = yes; then :
6382 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6383 lt_status=$lt_dlunknown
6384 cat > conftest.$ac_ext <<EOF
6385 [#line __oline__ "configure"
6386 #include "confdefs.h"
6395 # define LT_DLGLOBAL RTLD_GLOBAL
6398 # define LT_DLGLOBAL DL_GLOBAL
6400 # define LT_DLGLOBAL 0
6404 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6405 find out it does not work in some platform. */
6406 #ifndef LT_DLLAZY_OR_NOW
6408 # define LT_DLLAZY_OR_NOW RTLD_LAZY
6411 # define LT_DLLAZY_OR_NOW DL_LAZY
6414 # define LT_DLLAZY_OR_NOW RTLD_NOW
6417 # define LT_DLLAZY_OR_NOW DL_NOW
6419 # define LT_DLLAZY_OR_NOW 0
6427 extern "C" void exit (int);
6430 void fnord() { int i=42;}
6433 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6434 int status = $lt_dlunknown;
6438 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6439 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6440 /* dlclose (self); */
6446 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6447 (./conftest; exit; ) 2>/dev/null
6450 x$lt_dlno_uscore) $1 ;;
6451 x$lt_dlneed_uscore) $2 ;;
6452 x$lt_unknown|x*) $3 ;;
6455 # compilation failed
6460 ])# _LT_AC_TRY_DLOPEN_SELF
6463 # AC_LIBTOOL_DLOPEN_SELF
6464 # -------------------
6465 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6466 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6467 if test "x$enable_dlopen" != xyes; then
6468 enable_dlopen=unknown
6469 enable_dlopen_self=unknown
6470 enable_dlopen_self_static=unknown
6477 lt_cv_dlopen="load_add_on"
6479 lt_cv_dlopen_self=yes
6483 lt_cv_dlopen="LoadLibrary"
6488 lt_cv_dlopen="dlopen"
6493 # if libdl is installed we need to link against it
6494 AC_CHECK_LIB([dl], [dlopen],
6495 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6498 lt_cv_dlopen_self=yes
6503 AC_CHECK_FUNC([shl_load],
6504 [lt_cv_dlopen="shl_load"],
6505 [AC_CHECK_LIB([dld], [shl_load],
6506 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6507 [AC_CHECK_FUNC([dlopen],
6508 [lt_cv_dlopen="dlopen"],
6509 [AC_CHECK_LIB([dl], [dlopen],
6510 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6511 [AC_CHECK_LIB([svld], [dlopen],
6512 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6513 [AC_CHECK_LIB([dld], [dld_link],
6514 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6523 if test "x$lt_cv_dlopen" != xno; then
6529 case $lt_cv_dlopen in
6531 save_CPPFLAGS="$CPPFLAGS"
6532 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6534 save_LDFLAGS="$LDFLAGS"
6535 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6538 LIBS="$lt_cv_dlopen_libs $LIBS"
6540 AC_CACHE_CHECK([whether a program can dlopen itself],
6541 lt_cv_dlopen_self, [dnl
6542 _LT_AC_TRY_DLOPEN_SELF(
6543 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6544 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6547 if test "x$lt_cv_dlopen_self" = xyes; then
6548 LDFLAGS="$LDFLAGS $link_static_flag"
6549 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6550 lt_cv_dlopen_self_static, [dnl
6551 _LT_AC_TRY_DLOPEN_SELF(
6552 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6553 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6557 CPPFLAGS="$save_CPPFLAGS"
6558 LDFLAGS="$save_LDFLAGS"
6563 case $lt_cv_dlopen_self in
6564 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6565 *) enable_dlopen_self=unknown ;;
6568 case $lt_cv_dlopen_self_static in
6569 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6570 *) enable_dlopen_self_static=unknown ;;
6573 ])# AC_LIBTOOL_DLOPEN_SELF
6576 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6577 # ---------------------------------
6578 # Check to see if options -c and -o are simultaneously supported by compiler
6579 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6580 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6581 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6582 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6583 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6584 $rm -r conftest 2>/dev/null
6588 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6590 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6591 # that will create temporary files in the current directory regardless of
6592 # the output directory. Thus, making CWD read-only will cause this test
6593 # to fail, enabling locking or at least warning the user not to do parallel
6597 lt_compiler_flag="-o out/conftest2.$ac_objext"
6598 # Insert the option either (1) after the last *FLAGS variable, or
6599 # (2) before a word containing "conftest.", or (3) at the end.
6600 # Note that $ac_compile itself does not contain backslashes and begins
6601 # with a dollar sign (not a hyphen), so the echo should work correctly.
6602 lt_compile=`echo "$ac_compile" | $SED \
6603 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6604 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6605 -e 's:$: $lt_compiler_flag:'`
6606 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6607 (eval "$lt_compile" 2>out/conftest.err)
6609 cat out/conftest.err >&AS_MESSAGE_LOG_FD
6610 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6611 if (exit $ac_status) && test -s out/conftest2.$ac_objext
6613 # The compiler can only warn and ignore the option if not recognized
6614 # So say no if there are warnings
6615 if test ! -s out/conftest.err; then
6616 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6626 ])# AC_LIBTOOL_PROG_CC_C_O
6629 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6630 # -----------------------------------------
6631 # Check to see if we can do hard links to lock some files if needed
6632 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6633 [AC_REQUIRE([_LT_AC_LOCK])dnl
6635 hard_links="nottested"
6636 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6637 # do not overwrite the value of need_locks provided by the user
6638 AC_MSG_CHECKING([if we can lock with hard links])
6641 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6643 ln conftest.a conftest.b 2>&5 || hard_links=no
6644 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6645 AC_MSG_RESULT([$hard_links])
6646 if test "$hard_links" = no; then
6647 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6653 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6658 AC_DEFUN([AC_LIBTOOL_OBJDIR],
6659 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6660 [rm -f .libs 2>/dev/null
6661 mkdir .libs 2>/dev/null
6662 if test -d .libs; then
6665 # MS-DOS does not allow filenames that begin with a dot.
6668 rmdir .libs 2>/dev/null])
6669 objdir=$lt_cv_objdir
6670 ])# AC_LIBTOOL_OBJDIR
6673 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6674 # ----------------------------------------------
6675 # Check hardcoding attributes.
6676 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6677 [AC_MSG_CHECKING([how to hardcode library paths into programs])
6678 _LT_AC_TAGVAR(hardcode_action, $1)=
6679 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6680 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6681 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6683 # We can hardcode non-existant directories.
6684 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6685 # If the only mechanism to avoid hardcoding is shlibpath_var, we
6686 # have to relink, otherwise we might link with an installed library
6687 # when we should be linking with a yet-to-be-installed one
6688 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6689 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6690 # Linking always hardcodes the temporary library directory.
6691 _LT_AC_TAGVAR(hardcode_action, $1)=relink
6693 # We can link without hardcoding, and we can hardcode nonexisting dirs.
6694 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6697 # We cannot hardcode anything, or else we can only hardcode existing
6699 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6701 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6703 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6704 # Fast installation is not supported
6705 enable_fast_install=no
6706 elif test "$shlibpath_overrides_runpath" = yes ||
6707 test "$enable_shared" = no; then
6708 # Fast installation is not necessary
6709 enable_fast_install=needless
6711 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6714 # AC_LIBTOOL_SYS_LIB_STRIP
6715 # ------------------------
6716 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6719 AC_MSG_CHECKING([whether stripping libraries is possible])
6720 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6721 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6722 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6723 AC_MSG_RESULT([yes])
6725 # FIXME - insert some real tests, host_os isn't really good enough
6728 if test -n "$STRIP" ; then
6729 striplib="$STRIP -x"
6730 AC_MSG_RESULT([yes])
6740 ])# AC_LIBTOOL_SYS_LIB_STRIP
6743 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
6744 # -----------------------------
6745 # PORTME Fill in your ld.so characteristics
6746 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6747 [AC_MSG_CHECKING([dynamic linker characteristics])
6749 libname_spec='lib$name'
6757 shlibpath_overrides_runpath=unknown
6759 dynamic_linker="$host_os ld.so"
6760 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6761 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6762 need_lib_prefix=unknown
6763 hardcode_into_libs=no
6765 # when you set need_version to no, make sure it does not cause -set_version
6766 # flags to be left without arguments
6767 need_version=unknown
6772 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6773 shlibpath_var=LIBPATH
6775 # AIX 3 has no versioning support, so we append a major version to the name.
6776 soname_spec='${libname}${release}${shared_ext}$major'
6783 hardcode_into_libs=yes
6784 if test "$host_cpu" = ia64; then
6785 # AIX 5 supports IA64
6786 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6787 shlibpath_var=LD_LIBRARY_PATH
6789 # With GCC up to 2.95.x, collect2 would create an import file
6790 # for dependence libraries. The import file would start with
6791 # the line `#! .'. This would cause the generated library to
6792 # depend on `.', always an invalid library. This was fixed in
6793 # development snapshots of GCC prior to 3.0.
6795 aix4 | aix4.[[01]] | aix4.[[01]].*)
6796 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6798 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6805 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6806 # soname into executable. Probably we can add versioning support to
6807 # collect2, so additional links can be useful in future.
6808 if test "$aix_use_runtimelinking" = yes; then
6809 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6810 # instead of lib<name>.a to let people know that these are not
6811 # typical AIX shared libraries.
6812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6814 # We preserve .a as extension for shared libraries through AIX4.2
6815 # and later when we are not doing run time linking.
6816 library_names_spec='${libname}${release}.a $libname.a'
6817 soname_spec='${libname}${release}${shared_ext}$major'
6819 shlibpath_var=LIBPATH
6824 library_names_spec='$libname.ixlibrary $libname.a'
6825 # Create ${libname}_ixlibrary.a entries in /sys/libs.
6826 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'
6830 library_names_spec='${libname}${shared_ext}'
6831 dynamic_linker="$host_os ld.so"
6832 shlibpath_var=LIBRARY_PATH
6838 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6839 soname_spec='${libname}${release}${shared_ext}$major'
6840 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6841 shlibpath_var=LD_LIBRARY_PATH
6842 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6843 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6844 # the default ld.so.conf also contains /usr/contrib/lib and
6845 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6846 # libtool to hard-code these into programs
6849 cygwin* | mingw* | pw32*)
6850 version_type=windows
6855 case $GCC,$host_os in
6856 yes,cygwin* | yes,mingw* | yes,pw32*)
6857 library_names_spec='$libname.dll.a'
6858 # DLL is installed to $(libdir)/../bin by postinstall_cmds
6859 postinstall_cmds='base_file=`basename \${file}`~
6860 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6861 dldir=$destdir/`dirname \$dlpath`~
6862 test -d \$dldir || mkdir -p \$dldir~
6863 $install_prog $dir/$dlname \$dldir/$dlname'
6864 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6865 dlpath=$dir/\$dldll~
6867 shlibpath_overrides_runpath=yes
6871 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6872 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6873 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6876 # MinGW DLLs use traditional 'lib' prefix
6877 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6878 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6879 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6880 # It is most probably a Windows format PATH printed by
6881 # mingw gcc, but we are running on Cygwin. Gcc prints its search
6882 # path with ; separators, and with drive letters. We can handle the
6883 # drive letters (cygwin fileutils understands them), so leave them,
6884 # especially as we might pass files found there to a mingw objdump,
6885 # which wouldn't understand a cygwinified path. Ahh.
6886 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6888 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6892 # pw32 DLLs use 'pw' prefix rather than 'lib'
6893 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6899 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6902 dynamic_linker='Win32 ld.exe'
6903 # FIXME: first we should search . and the directory the executable is in
6907 darwin* | rhapsody*)
6908 dynamic_linker="$host_os dyld"
6912 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6913 soname_spec='${libname}${release}${major}$shared_ext'
6914 shlibpath_overrides_runpath=yes
6915 shlibpath_var=DYLD_LIBRARY_PATH
6916 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
6917 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6918 if test "$GCC" = yes; then
6919 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
6921 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6923 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6930 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6931 soname_spec='${libname}${release}${shared_ext}$major'
6932 shlibpath_var=LD_LIBRARY_PATH
6943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6944 soname_spec='${libname}${release}${shared_ext}$major'
6945 shlibpath_var=LD_LIBRARY_PATH
6946 shlibpath_overrides_runpath=no
6947 hardcode_into_libs=yes
6948 dynamic_linker='GNU ld.so'
6952 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6953 version_type=freebsd-$objformat
6954 case $version_type in
6956 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6961 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6965 shlibpath_var=LD_LIBRARY_PATH
6968 shlibpath_overrides_runpath=yes
6970 freebsd3.[01]* | freebsdelf3.[01]*)
6971 shlibpath_overrides_runpath=yes
6972 hardcode_into_libs=yes
6975 shlibpath_overrides_runpath=no
6976 hardcode_into_libs=yes
6985 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6986 soname_spec='${libname}${release}${shared_ext}$major'
6987 shlibpath_var=LD_LIBRARY_PATH
6988 hardcode_into_libs=yes
6991 hpux9* | hpux10* | hpux11*)
6992 # Give a soname corresponding to the major version so that dld.sl refuses to
6993 # link against other versions.
7000 hardcode_into_libs=yes
7001 dynamic_linker="$host_os dld.so"
7002 shlibpath_var=LD_LIBRARY_PATH
7003 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7004 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7005 soname_spec='${libname}${release}${shared_ext}$major'
7006 if test "X$HPUX_IA64_MODE" = X32; then
7007 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7009 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7011 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7015 hardcode_into_libs=yes
7016 dynamic_linker="$host_os dld.sl"
7017 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7018 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7019 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7020 soname_spec='${libname}${release}${shared_ext}$major'
7021 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7022 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7026 dynamic_linker="$host_os dld.sl"
7027 shlibpath_var=SHLIB_PATH
7028 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7029 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7030 soname_spec='${libname}${release}${shared_ext}$major'
7033 # HP-UX runs *really* slowly unless shared libraries are mode 555.
7034 postinstall_cmds='chmod 555 $lib'
7037 irix5* | irix6* | nonstopux*)
7039 nonstopux*) version_type=nonstopux ;;
7041 if test "$lt_cv_prog_gnu_ld" = yes; then
7049 soname_spec='${libname}${release}${shared_ext}$major'
7050 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7052 irix5* | nonstopux*)
7056 case $LD in # libtool.m4 will add one of these switches to LD
7057 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7058 libsuff= shlibsuff= libmagic=32-bit;;
7059 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7060 libsuff=32 shlibsuff=N32 libmagic=N32;;
7061 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7062 libsuff=64 shlibsuff=64 libmagic=64-bit;;
7063 *) libsuff= shlibsuff= libmagic=never-match;;
7067 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7068 shlibpath_overrides_runpath=no
7069 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7070 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7071 hardcode_into_libs=yes
7074 # No shared lib support for Linux oldld, aout, or coff.
7075 linux*oldld* | linux*aout* | linux*coff*)
7079 # This must be Linux ELF.
7084 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7085 soname_spec='${libname}${release}${shared_ext}$major'
7086 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7088 if test "x$LINUX_64_MODE" = x64; then
7089 # Some platforms are per default 64-bit, so there's no /lib64
7090 if test -d /lib64; then
7094 shlibpath_var=LD_LIBRARY_PATH
7095 shlibpath_overrides_runpath=no
7096 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7097 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7098 # This implies no fast_install, which is unacceptable.
7099 # Some rework will be needed to allow for fast_install
7100 # before this can be enabled.
7101 hardcode_into_libs=yes
7103 # We used to test for /lib/ld.so.1 and disable shared libraries on
7104 # powerpc, because MkLinux only supported shared libraries with the
7105 # GNU dynamic linker. Since this was broken with cross compilers,
7106 # most powerpc-linux boxes support dynamic linking these days and
7107 # people can always --disable-shared, the test was removed, and we
7108 # assume the GNU/Linux dynamic linker is in use.
7109 dynamic_linker='GNU/Linux ld.so'
7116 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7117 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7118 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7119 dynamic_linker='NetBSD (a.out) ld.so'
7121 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7122 soname_spec='${libname}${release}${shared_ext}$major'
7123 dynamic_linker='NetBSD ld.elf_so'
7125 shlibpath_var=LD_LIBRARY_PATH
7126 shlibpath_overrides_runpath=yes
7127 hardcode_into_libs=yes
7132 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7133 shlibpath_var=LD_LIBRARY_PATH
7134 shlibpath_overrides_runpath=yes
7141 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7142 soname_spec='${libname}${release}${shared_ext}$major'
7143 shlibpath_var=LD_LIBRARY_PATH
7144 shlibpath_overrides_runpath=yes
7151 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7152 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7153 shlibpath_var=LD_LIBRARY_PATH
7154 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7156 openbsd2.[[89]] | openbsd2.[[89]].*)
7157 shlibpath_overrides_runpath=no
7160 shlibpath_overrides_runpath=yes
7164 shlibpath_overrides_runpath=yes
7169 libname_spec='$name'
7172 library_names_spec='$libname${shared_ext} $libname.a'
7173 dynamic_linker='OS/2 ld.exe'
7174 shlibpath_var=LIBPATH
7177 osf3* | osf4* | osf5*)
7181 soname_spec='${libname}${release}${shared_ext}$major'
7182 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7183 shlibpath_var=LD_LIBRARY_PATH
7184 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7185 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7190 soname_spec='${libname}${release}${shared_ext}$major'
7191 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7192 shlibpath_var=LD_LIBRARY_PATH
7199 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7200 soname_spec='${libname}${release}${shared_ext}$major'
7201 shlibpath_var=LD_LIBRARY_PATH
7202 shlibpath_overrides_runpath=yes
7203 hardcode_into_libs=yes
7204 # ldd complains unless libraries are executable
7205 postinstall_cmds='chmod +x $lib'
7210 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7211 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7212 shlibpath_var=LD_LIBRARY_PATH
7213 shlibpath_overrides_runpath=yes
7214 if test "$with_gnu_ld" = yes; then
7220 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7222 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7223 soname_spec='${libname}${release}${shared_ext}$major'
7224 shlibpath_var=LD_LIBRARY_PATH
7225 case $host_vendor in
7227 shlibpath_overrides_runpath=no
7229 export_dynamic_flag_spec='${wl}-Blargedynsym'
7230 runpath_var=LD_RUN_PATH
7238 shlibpath_overrides_runpath=no
7239 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7245 if test -d /usr/nec ;then
7247 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7248 soname_spec='$libname${shared_ext}.$major'
7249 shlibpath_var=LD_LIBRARY_PATH
7255 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7256 soname_spec='${libname}${release}${shared_ext}$major'
7257 shlibpath_var=LD_LIBRARY_PATH
7264 AC_MSG_RESULT([$dynamic_linker])
7265 test "$dynamic_linker" = no && can_build_shared=no
7266 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7271 AC_DEFUN([_LT_AC_TAGCONFIG],
7272 [AC_ARG_WITH([tags],
7273 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7274 [include additional configurations @<:@automatic@:>@])],
7275 [tagnames="$withval"])
7277 if test -f "$ltmain" && test -n "$tagnames"; then
7278 if test ! -f "${ofile}"; then
7279 AC_MSG_WARN([output file `$ofile' does not exist])
7282 if test -z "$LTCC"; then
7283 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7284 if test -z "$LTCC"; then
7285 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7287 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7291 # Extract list of available tagged configurations in $ofile.
7292 # Note that this assumes the entire list is on one line.
7293 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7295 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7296 for tagname in $tagnames; do
7298 # Check whether tagname contains only valid characters
7299 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7301 *) AC_MSG_ERROR([invalid tag name: $tagname])
7305 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7307 AC_MSG_ERROR([tag name \"$tagname\" already exists])
7310 # Update the list of available tags.
7311 if test -n "$tagname"; then
7312 echo appending configuration tag \"$tagname\" to $ofile
7316 if test -n "$CXX" && test "X$CXX" != "Xno"; then
7317 AC_LIBTOOL_LANG_CXX_CONFIG
7324 if test -n "$F77" && test "X$F77" != "Xno"; then
7325 AC_LIBTOOL_LANG_F77_CONFIG
7332 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7333 AC_LIBTOOL_LANG_GCJ_CONFIG
7340 AC_LIBTOOL_LANG_RC_CONFIG
7344 AC_MSG_ERROR([Unsupported tag name: $tagname])
7348 # Append the new tag name to the list of available tags.
7349 if test -n "$tagname" ; then
7350 available_tags="$available_tags $tagname"
7356 # Now substitute the updated list of available tags.
7357 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7358 mv "${ofile}T" "$ofile"
7362 AC_MSG_ERROR([unable to update list of available tagged configurations.])
7365 ])# _LT_AC_TAGCONFIG
7370 # enable checks for dlopen support
7371 AC_DEFUN([AC_LIBTOOL_DLOPEN],
7372 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7373 ])# AC_LIBTOOL_DLOPEN
7376 # AC_LIBTOOL_WIN32_DLL
7377 # --------------------
7378 # declare package support for building win32 dll's
7379 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7380 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7381 ])# AC_LIBTOOL_WIN32_DLL
7384 # AC_ENABLE_SHARED([DEFAULT])
7385 # ---------------------------
7386 # implement the --enable-shared flag
7387 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7388 AC_DEFUN([AC_ENABLE_SHARED],
7389 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7390 AC_ARG_ENABLE([shared],
7391 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7392 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7393 [p=${PACKAGE-default}
7395 yes) enable_shared=yes ;;
7396 no) enable_shared=no ;;
7399 # Look at the argument we got. We use all the common list separators.
7400 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7401 for pkg in $enableval; do
7403 if test "X$pkg" = "X$p"; then
7410 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7411 ])# AC_ENABLE_SHARED
7416 #- set the default shared flag to --disable-shared
7417 AC_DEFUN([AC_DISABLE_SHARED],
7418 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7419 AC_ENABLE_SHARED(no)
7420 ])# AC_DISABLE_SHARED
7423 # AC_ENABLE_STATIC([DEFAULT])
7424 # ---------------------------
7425 # implement the --enable-static flag
7426 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7427 AC_DEFUN([AC_ENABLE_STATIC],
7428 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7429 AC_ARG_ENABLE([static],
7430 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7431 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7432 [p=${PACKAGE-default}
7434 yes) enable_static=yes ;;
7435 no) enable_static=no ;;
7438 # Look at the argument we got. We use all the common list separators.
7439 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7440 for pkg in $enableval; do
7442 if test "X$pkg" = "X$p"; then
7449 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7450 ])# AC_ENABLE_STATIC
7455 # set the default static flag to --disable-static
7456 AC_DEFUN([AC_DISABLE_STATIC],
7457 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7458 AC_ENABLE_STATIC(no)
7459 ])# AC_DISABLE_STATIC
7462 # AC_ENABLE_FAST_INSTALL([DEFAULT])
7463 # ---------------------------------
7464 # implement the --enable-fast-install flag
7465 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7466 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7467 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7468 AC_ARG_ENABLE([fast-install],
7469 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7470 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7471 [p=${PACKAGE-default}
7473 yes) enable_fast_install=yes ;;
7474 no) enable_fast_install=no ;;
7476 enable_fast_install=no
7477 # Look at the argument we got. We use all the common list separators.
7478 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7479 for pkg in $enableval; do
7481 if test "X$pkg" = "X$p"; then
7482 enable_fast_install=yes
7488 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7489 ])# AC_ENABLE_FAST_INSTALL
7492 # AC_DISABLE_FAST_INSTALL
7493 # -----------------------
7494 # set the default to --disable-fast-install
7495 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7496 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7497 AC_ENABLE_FAST_INSTALL(no)
7498 ])# AC_DISABLE_FAST_INSTALL
7501 # AC_LIBTOOL_PICMODE([MODE])
7502 # --------------------------
7503 # implement the --with-pic flag
7504 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7505 AC_DEFUN([AC_LIBTOOL_PICMODE],
7506 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7507 pic_mode=ifelse($#,1,$1,default)
7508 ])# AC_LIBTOOL_PICMODE
7513 # This is predefined starting with Autoconf 2.54, so this conditional
7514 # definition can be removed once we require Autoconf 2.54 or later.
7515 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7516 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7517 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7518 then ac_cv_prog_egrep='grep -E'
7519 else ac_cv_prog_egrep='egrep'
7521 EGREP=$ac_cv_prog_egrep
7526 # AC_PATH_TOOL_PREFIX
7527 # -------------------
7528 # find a file program which can recognise shared library
7529 AC_DEFUN([AC_PATH_TOOL_PREFIX],
7530 [AC_REQUIRE([AC_PROG_EGREP])dnl
7531 AC_MSG_CHECKING([for $1])
7532 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7534 [[\\/*] | ?:[\\/]*])
7535 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7538 lt_save_MAGIC_CMD="$MAGIC_CMD"
7539 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7540 dnl $ac_dummy forces splitting on constant user-supplied paths.
7541 dnl POSIX.2 word splitting is done only on the output of word expansions,
7542 dnl not every word. This closes a longstanding sh security hole.
7543 ac_dummy="ifelse([$2], , $PATH, [$2])"
7544 for ac_dir in $ac_dummy; do
7546 test -z "$ac_dir" && ac_dir=.
7547 if test -f $ac_dir/$1; then
7548 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7549 if test -n "$file_magic_test_file"; then
7550 case $deplibs_check_method in
7552 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7553 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7554 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7555 $EGREP "$file_magic_regex" > /dev/null; then
7560 *** Warning: the command libtool uses to detect shared libraries,
7561 *** $file_magic_cmd, produces output that libtool cannot recognize.
7562 *** The result is that libtool may fail to recognize shared libraries
7563 *** as such. This will affect the creation of libtool libraries that
7564 *** depend on shared libraries, but programs linked with such libtool
7565 *** libraries will work regardless of this problem. Nevertheless, you
7566 *** may want to report the problem to your system manager and/or to
7567 *** bug-libtool@gnu.org
7577 MAGIC_CMD="$lt_save_MAGIC_CMD"
7580 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7581 if test -n "$MAGIC_CMD"; then
7582 AC_MSG_RESULT($MAGIC_CMD)
7586 ])# AC_PATH_TOOL_PREFIX
7591 # find a file program which can recognise a shared library
7592 AC_DEFUN([AC_PATH_MAGIC],
7593 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7594 if test -z "$lt_cv_path_MAGIC_CMD"; then
7595 if test -n "$ac_tool_prefix"; then
7596 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7606 # find the pathname to the GNU or non-GNU linker
7607 AC_DEFUN([AC_PROG_LD],
7608 [AC_ARG_WITH([gnu-ld],
7609 [AC_HELP_STRING([--with-gnu-ld],
7610 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7611 [test "$withval" = no || with_gnu_ld=yes],
7613 AC_REQUIRE([LT_AC_PROG_SED])dnl
7614 AC_REQUIRE([AC_PROG_CC])dnl
7615 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7616 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7618 if test "$GCC" = yes; then
7619 # Check if gcc -print-prog-name=ld gives a path.
7620 AC_MSG_CHECKING([for ld used by $CC])
7623 # gcc leaves a trailing carriage return which upsets mingw
7624 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7626 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7629 # Accept absolute paths.
7630 [[\\/]]* | ?:[[\\/]]*)
7631 re_direlt='/[[^/]][[^/]]*/\.\./'
7632 # Canonicalize the pathname of ld
7633 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7634 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7635 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7637 test -z "$LD" && LD="$ac_prog"
7640 # If it fails, then pretend we aren't using GCC.
7644 # If it is relative, then search for the first ld in PATH.
7648 elif test "$with_gnu_ld" = yes; then
7649 AC_MSG_CHECKING([for GNU ld])
7651 AC_MSG_CHECKING([for non-GNU ld])
7653 AC_CACHE_VAL(lt_cv_path_LD,
7654 [if test -z "$LD"; then
7655 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7656 for ac_dir in $PATH; do
7658 test -z "$ac_dir" && ac_dir=.
7659 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7660 lt_cv_path_LD="$ac_dir/$ac_prog"
7661 # Check to see if the program is GNU ld. I'd rather use --version,
7662 # but apparently some GNU ld's only accept -v.
7663 # Break only if it was the GNU/non-GNU ld that we prefer.
7664 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7665 *GNU* | *'with BFD'*)
7666 test "$with_gnu_ld" != no && break
7669 test "$with_gnu_ld" != yes && break
7676 lt_cv_path_LD="$LD" # Let the user override the test with a path.
7679 if test -n "$LD"; then
7684 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7691 AC_DEFUN([AC_PROG_LD_GNU],
7692 [AC_REQUIRE([AC_PROG_EGREP])dnl
7693 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7694 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7695 case `$LD -v 2>&1 </dev/null` in
7696 *GNU* | *'with BFD'*)
7697 lt_cv_prog_gnu_ld=yes
7700 lt_cv_prog_gnu_ld=no
7703 with_gnu_ld=$lt_cv_prog_gnu_ld
7707 # AC_PROG_LD_RELOAD_FLAG
7708 # ----------------------
7709 # find reload flag for linker
7710 # -- PORTME Some linkers may need a different reload flag.
7711 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7712 [AC_CACHE_CHECK([for $LD option to reload object files],
7713 lt_cv_ld_reload_flag,
7714 [lt_cv_ld_reload_flag='-r'])
7715 reload_flag=$lt_cv_ld_reload_flag
7716 case $reload_flag in
7718 *) reload_flag=" $reload_flag" ;;
7720 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7721 ])# AC_PROG_LD_RELOAD_FLAG
7724 # AC_DEPLIBS_CHECK_METHOD
7725 # -----------------------
7726 # how to check for library dependencies
7727 # -- PORTME fill in with the dynamic library characteristics
7728 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7729 [AC_CACHE_CHECK([how to recognise dependent libraries],
7730 lt_cv_deplibs_check_method,
7731 [lt_cv_file_magic_cmd='$MAGIC_CMD'
7732 lt_cv_file_magic_test_file=
7733 lt_cv_deplibs_check_method='unknown'
7734 # Need to set the preceding variable on all platforms that support
7735 # interlibrary dependencies.
7736 # 'none' -- dependencies not supported.
7737 # `unknown' -- same as none, but documents that we really don't know.
7738 # 'pass_all' -- all dependencies passed with no checks.
7739 # 'test_compile' -- check by making test program.
7740 # 'file_magic [[regex]]' -- check by looking for files in library path
7741 # which responds to the $file_magic_cmd with a given extended regex.
7742 # If you have `file' or equivalent on your system and you're not sure
7743 # whether `pass_all' will *always* work, you probably want this one.
7747 lt_cv_deplibs_check_method=pass_all
7751 lt_cv_deplibs_check_method=pass_all
7755 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7756 lt_cv_file_magic_cmd='/usr/bin/file -L'
7757 lt_cv_file_magic_test_file=/shlib/libc.so
7761 lt_cv_deplibs_check_method=pass_all
7765 # win32_libid is a shell function defined in ltmain.sh
7766 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7767 lt_cv_file_magic_cmd='win32_libid'
7770 darwin* | rhapsody*)
7771 # this will be overwritten by pass_all, but leave it in just in case
7772 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7773 lt_cv_file_magic_cmd='/usr/bin/file -L'
7775 rhapsody* | darwin1.[[012]])
7776 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7779 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7782 lt_cv_deplibs_check_method=pass_all
7786 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7789 # Not sure whether the presence of OpenBSD here was a mistake.
7790 # Let's accept both of them until this is cleared up.
7791 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7792 lt_cv_file_magic_cmd=/usr/bin/file
7793 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7797 lt_cv_deplibs_check_method=pass_all
7802 lt_cv_deplibs_check_method=pass_all
7805 hpux10.20* | hpux11*)
7806 lt_cv_file_magic_cmd=/usr/bin/file
7809 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7810 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7813 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
7814 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7817 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7818 lt_cv_file_magic_test_file=/usr/lib/libc.sl
7823 irix5* | irix6* | nonstopux*)
7825 irix5* | nonstopux*)
7826 # this will be overridden with pass_all, but let us keep it just in case
7827 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7831 *-32|*"-32 ") libmagic=32-bit;;
7832 *-n32|*"-n32 ") libmagic=N32;;
7833 *-64|*"-64 ") libmagic=64-bit;;
7834 *) libmagic=never-match;;
7836 # this will be overridden with pass_all, but let us keep it just in case
7837 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7840 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7841 lt_cv_deplibs_check_method=pass_all
7844 # This must be Linux ELF.
7847 alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7848 lt_cv_deplibs_check_method=pass_all ;;
7849 # the debian people say, arm and glibc 2.3.1 works for them with pass_all
7851 lt_cv_deplibs_check_method=pass_all ;;
7853 # glibc up to 2.1.1 does not perform some relocations on ARM
7854 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7856 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7860 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7861 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7863 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7868 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7869 lt_cv_file_magic_cmd=/usr/bin/file
7870 lt_cv_file_magic_test_file=/usr/lib/libnls.so
7874 lt_cv_deplibs_check_method=unknown
7878 lt_cv_file_magic_cmd=/usr/bin/file
7879 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7880 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7881 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7883 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7887 osf3* | osf4* | osf5*)
7888 # this will be overridden with pass_all, but let us keep it just in case
7889 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7890 lt_cv_file_magic_test_file=/shlib/libc.so
7891 lt_cv_deplibs_check_method=pass_all
7895 lt_cv_deplibs_check_method=pass_all
7899 lt_cv_deplibs_check_method=pass_all
7900 lt_cv_file_magic_test_file=/lib/libc.so
7903 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7904 case $host_vendor in
7906 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]]'
7907 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7910 lt_cv_deplibs_check_method=pass_all
7913 lt_cv_file_magic_cmd='/bin/file'
7914 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7917 lt_cv_file_magic_cmd='/bin/file'
7918 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7919 lt_cv_file_magic_test_file=/lib/libc.so
7922 lt_cv_deplibs_check_method=pass_all
7927 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7928 lt_cv_deplibs_check_method=pass_all
7932 file_magic_cmd=$lt_cv_file_magic_cmd
7933 deplibs_check_method=$lt_cv_deplibs_check_method
7934 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7935 ])# AC_DEPLIBS_CHECK_METHOD
7940 # find the pathname to a BSD-compatible name lister
7941 AC_DEFUN([AC_PROG_NM],
7942 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7943 [if test -n "$NM"; then
7944 # Let the user override the test.
7947 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7948 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7950 test -z "$ac_dir" && ac_dir=.
7951 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7952 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7953 # Check to see if the nm accepts a BSD-compat flag.
7954 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7955 # nm: unknown option "B" ignored
7956 # Tru64's nm complains that /dev/null is an invalid object file
7957 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7958 */dev/null* | *'Invalid file or object type'*)
7959 lt_cv_path_NM="$tmp_nm -B"
7963 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7965 lt_cv_path_NM="$tmp_nm -p"
7969 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7970 continue # so that we can try to find one that supports BSD flags
7977 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7985 # check for math library
7986 AC_DEFUN([AC_CHECK_LIBM],
7987 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7990 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
7991 # These system don't have libm, or don't need it
7994 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7995 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7998 AC_CHECK_LIB(m, cos, LIBM="-lm")
8004 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8005 # -----------------------------------
8006 # sets LIBLTDL to the link flags for the libltdl convenience library and
8007 # LTDLINCL to the include flags for the libltdl header and adds
8008 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
8009 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8010 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
8011 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
8012 # '${top_srcdir}/' (note the single quotes!). If your package is not
8013 # flat and you're not using automake, define top_builddir and
8014 # top_srcdir appropriately in the Makefiles.
8015 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8016 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8017 case $enable_ltdl_convenience in
8018 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8019 "") enable_ltdl_convenience=yes
8020 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8022 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8023 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8024 # For backwards non-gettext consistent compatibility...
8026 ])# AC_LIBLTDL_CONVENIENCE
8029 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8030 # -----------------------------------
8031 # sets LIBLTDL to the link flags for the libltdl installable library and
8032 # LTDLINCL to the include flags for the libltdl header and adds
8033 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
8034 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8035 # DIRECTORY is not provided and an installed libltdl is not found, it is
8036 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
8037 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8038 # quotes!). If your package is not flat and you're not using automake,
8039 # define top_builddir and top_srcdir appropriately in the Makefiles.
8040 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8041 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8042 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8043 AC_CHECK_LIB(ltdl, lt_dlinit,
8044 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8045 [if test x"$enable_ltdl_install" = xno; then
8046 AC_MSG_WARN([libltdl not installed, but installation disabled])
8048 enable_ltdl_install=yes
8051 if test x"$enable_ltdl_install" = x"yes"; then
8052 ac_configure_args="$ac_configure_args --enable-ltdl-install"
8053 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8054 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8056 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8060 # For backwards non-gettext consistent compatibility...
8062 ])# AC_LIBLTDL_INSTALLABLE
8067 # enable support for C++ libraries
8068 AC_DEFUN([AC_LIBTOOL_CXX],
8069 [AC_REQUIRE([_LT_AC_LANG_CXX])
8075 AC_DEFUN([_LT_AC_LANG_CXX],
8076 [AC_REQUIRE([AC_PROG_CXX])
8077 AC_REQUIRE([AC_PROG_CXXCPP])
8078 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8084 # enable support for Fortran 77 libraries
8085 AC_DEFUN([AC_LIBTOOL_F77],
8086 [AC_REQUIRE([_LT_AC_LANG_F77])
8092 AC_DEFUN([_LT_AC_LANG_F77],
8093 [AC_REQUIRE([AC_PROG_F77])
8094 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8100 # enable support for GCJ libraries
8101 AC_DEFUN([AC_LIBTOOL_GCJ],
8102 [AC_REQUIRE([_LT_AC_LANG_GCJ])
8108 AC_DEFUN([_LT_AC_LANG_GCJ],
8109 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8110 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8111 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8112 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8113 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8114 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8115 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8121 # enable support for Windows resource files
8122 AC_DEFUN([AC_LIBTOOL_RC],
8123 [AC_REQUIRE([LT_AC_PROG_RC])
8124 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8128 # AC_LIBTOOL_LANG_C_CONFIG
8129 # ------------------------
8130 # Ensure that the configuration vars for the C compiler are
8131 # suitably defined. Those variables are subsequently used by
8132 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8133 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8134 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8138 # Source file extension for C test sources.
8141 # Object file extension for compiled C test sources.
8143 _LT_AC_TAGVAR(objext, $1)=$objext
8145 # Code to be used in simple compile tests
8146 lt_simple_compile_test_code="int some_variable = 0;\n"
8148 # Code to be used in simple link tests
8149 lt_simple_link_test_code='int main(){return(0);}\n'
8154 # Check for any special shared library compilation flags.
8156 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8157 if test "$GCC" = no; then
8160 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8164 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8165 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8166 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
8168 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8169 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8175 # Check to make sure the static flag actually works.
8177 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8178 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8179 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8181 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8185 ## There is no encapsulation within the following macros, do not change
8186 ## the running order or otherwise move them around unless you know exactly
8187 ## what you are doing...
8188 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8189 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8190 AC_LIBTOOL_PROG_CC_C_O($1)
8191 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8192 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8193 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8194 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8195 AC_LIBTOOL_SYS_LIB_STRIP
8196 AC_LIBTOOL_DLOPEN_SELF($1)
8198 # Report which librarie types wil actually be built
8199 AC_MSG_CHECKING([if libtool supports shared libraries])
8200 AC_MSG_RESULT([$can_build_shared])
8202 AC_MSG_CHECKING([whether to build shared libraries])
8203 test "$can_build_shared" = "no" && enable_shared=no
8205 # On AIX, shared libraries and static libraries use the same namespace, and
8206 # are all built from PIC.
8209 test "$enable_shared" = yes && enable_static=no
8210 if test -n "$RANLIB"; then
8211 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8212 postinstall_cmds='$RANLIB $lib'
8217 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8218 test "$enable_shared" = yes && enable_static=no
8221 darwin* | rhapsody*)
8222 if test "$GCC" = yes; then
8223 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8225 rhapsody* | darwin1.[[012]])
8226 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8229 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8230 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8232 case ${MACOSX_DEPLOYMENT_TARGET} in
8234 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8237 allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
8243 output_verbose_link_cmd='echo'
8244 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8245 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8246 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8247 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8248 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8249 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8250 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8251 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8252 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8253 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8255 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8259 AC_MSG_RESULT([$enable_shared])
8261 AC_MSG_CHECKING([whether to build static libraries])
8262 # Make sure either enable_shared or enable_static is yes.
8263 test "$enable_shared" = yes || enable_static=yes
8264 AC_MSG_RESULT([$enable_static])
8266 AC_LIBTOOL_CONFIG($1)
8270 ])# AC_LIBTOOL_LANG_C_CONFIG
8273 # AC_LIBTOOL_LANG_CXX_CONFIG
8274 # --------------------------
8275 # Ensure that the configuration vars for the C compiler are
8276 # suitably defined. Those variables are subsequently used by
8277 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8278 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8279 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8281 AC_REQUIRE([AC_PROG_CXX])
8282 AC_REQUIRE([AC_PROG_CXXCPP])
8284 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8285 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8286 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8287 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8288 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8289 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8290 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8291 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8292 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8293 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8294 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
8295 _LT_AC_TAGVAR(module_cmds, $1)=
8296 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
8297 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8298 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8299 _LT_AC_TAGVAR(no_undefined_flag, $1)=
8300 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8301 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8303 # Dependencies to place before and after the object being linked:
8304 _LT_AC_TAGVAR(predep_objects, $1)=
8305 _LT_AC_TAGVAR(postdep_objects, $1)=
8306 _LT_AC_TAGVAR(predeps, $1)=
8307 _LT_AC_TAGVAR(postdeps, $1)=
8308 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8310 # Source file extension for C++ test sources.
8313 # Object file extension for compiled C++ test sources.
8315 _LT_AC_TAGVAR(objext, $1)=$objext
8317 # Code to be used in simple compile tests
8318 lt_simple_compile_test_code="int some_variable = 0;\n"
8320 # Code to be used in simple link tests
8321 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8323 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8326 # Allow CC to be a program name with arguments.
8331 lt_save_with_gnu_ld=$with_gnu_ld
8332 lt_save_path_LD=$lt_cv_path_LD
8333 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8334 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8336 unset lt_cv_prog_gnu_ld
8338 if test -n "${lt_cv_path_LDCXX+set}"; then
8339 lt_cv_path_LD=$lt_cv_path_LDCXX
8343 test -z "${LDCXX+set}" || LD=$LDCXX
8346 _LT_AC_TAGVAR(compiler, $1)=$CC
8347 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8349 # We don't want -fno-exception wen compiling C++ code, so set the
8350 # no_builtin_flag separately
8351 if test "$GXX" = yes; then
8352 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8354 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8357 if test "$GXX" = yes; then
8358 # Set up default GNU C++ configuration
8362 # Check if GNU C++ uses GNU ld as the underlying linker, since the
8363 # archiving commands below assume that GNU ld is being used.
8364 if test "$with_gnu_ld" = yes; then
8365 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8366 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8369 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8371 # If archive_cmds runs LD, not CC, wlarc should be empty
8372 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8373 # investigate it a little bit more. (MM)
8376 # ancient GNU ld didn't support --whole-archive et. al.
8377 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8378 grep 'no-whole-archive' > /dev/null; then
8379 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8381 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8387 # A generic and very simple default shared library creation
8388 # command for GNU C++ for the case where it uses the native
8389 # linker, instead of GNU ld. If possible, this setting should
8390 # overridden to take advantage of the native linker features on
8391 # the platform it is being used on.
8392 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8395 # Commands to make compiler produce verbose output that lists
8396 # what "hidden" libraries, object files and flags are used when
8397 # linking a shared library.
8398 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8406 # PORTME: fill in a description of your system's C++ link characteristics
8407 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8408 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8411 # FIXME: insert proper C++ library support
8412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8415 if test "$host_cpu" = ia64; then
8416 # On IA64, the linker does run time linking by default, so we don't
8417 # have to do anything special.
8418 aix_use_runtimelinking=no
8419 exp_sym_flag='-Bexport'
8422 # KDE requires run time linking. Make it the default.
8423 aix_use_runtimelinking=yes
8424 exp_sym_flag='-bexport'
8425 no_entry_flag='-bnoentry'
8428 # When large executables or shared objects are built, AIX ld can
8429 # have problems creating the table of contents. If linking a library
8430 # or program results in "error TOC overflow" add -mminimal-toc to
8431 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8432 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8434 _LT_AC_TAGVAR(archive_cmds, $1)=''
8435 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8436 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8437 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8439 if test "$GXX" = yes; then
8440 case $host_os in aix4.[012]|aix4.[012].*)
8441 # We only want to do this on AIX 4.2 and lower, the check
8442 # below for broken collect2 doesn't work under 4.3+
8443 collect2name=`${CC} -print-prog-name=collect2`
8444 if test -f "$collect2name" && \
8445 strings "$collect2name" | grep resolve_lib_name >/dev/null
8447 # We have reworked collect2
8448 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8450 # We have old collect2
8451 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8452 # It fails to find uninstalled libraries when the uninstalled
8453 # path is not listed in the libpath. Setting hardcode_minus_L
8454 # to unsupported forces relinking
8455 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8457 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8460 shared_flag='-shared'
8463 if test "$host_cpu" = ia64; then
8464 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8465 # chokes on -Wl,-G. The following line is correct:
8468 if test "$aix_use_runtimelinking" = yes; then
8469 shared_flag='-qmkshrobj ${wl}-G'
8471 shared_flag='-qmkshrobj'
8476 # Let the compiler handle the export list.
8477 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8478 if test "$aix_use_runtimelinking" = yes; then
8479 # Warning - without using the other runtime loading flags (-brtl),
8480 # -berok will link without error, but may produce a broken library.
8481 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8482 # Determine the default libpath from the value encoded in an empty executable.
8483 _LT_AC_SYS_LIBPATH_AIX
8484 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8486 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8487 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8489 if test "$host_cpu" = ia64; then
8490 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8491 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8492 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8494 # Determine the default libpath from the value encoded in an empty executable.
8495 _LT_AC_SYS_LIBPATH_AIX
8496 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8497 # Warning - without using the other run time loading flags,
8498 # -berok will link without error, but may produce a broken library.
8499 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8500 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8501 # -bexpall does not export symbols beginning with underscore (_)
8502 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8503 # Exported symbols can be pulled into shared objects from archives
8504 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8505 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8506 # This is similar to how AIX traditionally builds it's shared libraries.
8507 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8512 case $cc_basename in
8514 # FIXME: insert proper C++ library support
8515 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8520 cygwin* | mingw* | pw32*)
8521 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8522 # as there is no search path for DLLs.
8523 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8524 _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8525 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8526 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8528 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8529 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8530 # If the export-symbols file already is a .def file (1st line
8531 # is EXPORTS), use it as is; otherwise, prepend...
8532 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8533 cp $export_symbols $output_objdir/$soname.def;
8535 echo EXPORTS > $output_objdir/$soname.def;
8536 cat $export_symbols >> $output_objdir/$soname.def;
8538 $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8540 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8544 darwin* | rhapsody*)
8545 if test "$GXX" = yes; then
8546 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8548 rhapsody* | darwin1.[[012]])
8549 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8552 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8553 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8555 case ${MACOSX_DEPLOYMENT_TARGET} in
8557 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8560 allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
8566 lt_int_apple_cc_single_mod=no
8567 output_verbose_link_cmd='echo'
8568 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8569 lt_int_apple_cc_single_mod=yes
8571 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8572 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8574 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8576 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8578 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8579 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8580 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8582 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8584 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8585 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8586 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8587 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8588 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8589 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8591 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8596 case $cc_basename in
8598 # FIXME: insert proper C++ library support
8599 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8602 # Green Hills C++ Compiler
8603 # FIXME: insert proper C++ library support
8604 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8607 # FIXME: insert proper C++ library support
8608 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8613 # C++ shared libraries reported to be fairly broken before switch to ELF
8614 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8617 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8620 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8622 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8627 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8628 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8629 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8630 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8631 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8632 # but as the default
8633 # location of the library.
8635 case $cc_basename in
8637 # FIXME: insert proper C++ library support
8638 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8641 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8642 # Commands to make compiler produce verbose output that lists
8643 # what "hidden" libraries, object files and flags are used when
8644 # linking a shared library.
8646 # There doesn't appear to be a way to prevent this compiler from
8647 # explicitly linking system object files so we need to strip them
8648 # from the output so that they don't get included in the library
8650 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'
8653 if test "$GXX" = yes; then
8654 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8656 # FIXME: insert proper C++ library support
8657 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8663 if test $with_gnu_ld = no; then
8666 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8668 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8674 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8675 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8676 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8682 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8683 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8686 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8687 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8688 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8689 # but as the default
8690 # location of the library.
8693 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8694 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8695 # but as the default
8696 # location of the library.
8700 case $cc_basename in
8702 # FIXME: insert proper C++ library support
8703 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8708 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8711 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8714 # Commands to make compiler produce verbose output that lists
8715 # what "hidden" libraries, object files and flags are used when
8716 # linking a shared library.
8718 # There doesn't appear to be a way to prevent this compiler from
8719 # explicitly linking system object files so we need to strip them
8720 # from the output so that they don't get included in the library
8722 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8725 if test "$GXX" = yes; then
8726 if test $with_gnu_ld = no; then
8729 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8732 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8737 # FIXME: insert proper C++ library support
8738 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8744 case $cc_basename in
8747 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8749 # Archives containing C++ object files must be created using
8750 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8751 # necessary to make sure instantiated templates are included
8753 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8756 if test "$GXX" = yes; then
8757 if test "$with_gnu_ld" = no; then
8758 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8760 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8763 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8767 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8770 case $cc_basename in
8772 # Kuck and Associates, Inc. (KAI) C++ Compiler
8774 # KCC will only create a shared library if the output file
8775 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8776 # to its proper name (with version) after linking.
8777 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8778 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8779 # Commands to make compiler produce verbose output that lists
8780 # what "hidden" libraries, object files and flags are used when
8781 # linking a shared library.
8783 # There doesn't appear to be a way to prevent this compiler from
8784 # explicitly linking system object files so we need to strip them
8785 # from the output so that they don't get included in the library
8787 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8789 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8790 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8792 # Archives containing C++ object files must be created using
8793 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8794 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8799 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8800 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8801 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8802 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8803 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8804 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8808 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8809 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8811 runpath_var=LD_RUN_PATH
8812 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8813 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8815 # Commands to make compiler produce verbose output that lists
8816 # what "hidden" libraries, object files and flags are used when
8817 # linking a shared library.
8819 # There doesn't appear to be a way to prevent this compiler from
8820 # explicitly linking system object files so we need to strip them
8821 # from the output so that they don't get included in the library
8823 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'
8828 # FIXME: insert proper C++ library support
8829 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8832 # FIXME: insert proper C++ library support
8833 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8836 case $cc_basename in
8838 # FIXME: insert proper C++ library support
8839 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8842 # FIXME: insert proper C++ library support
8843 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8848 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8849 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8852 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8853 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8855 # Workaround some broken pre-1.5 toolchains
8856 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8859 case $cc_basename in
8861 # Kuck and Associates, Inc. (KAI) C++ Compiler
8863 # KCC will only create a shared library if the output file
8864 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8865 # to its proper name (with version) after linking.
8866 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8869 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8871 # Archives containing C++ object files must be created using
8872 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8873 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8877 # Rational C++ 2.4.1
8878 # FIXME: insert proper C++ library support
8879 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8882 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8883 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8886 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8888 # Commands to make compiler produce verbose output that lists
8889 # what "hidden" libraries, object files and flags are used when
8890 # linking a shared library.
8892 # There doesn't appear to be a way to prevent this compiler from
8893 # explicitly linking system object files so we need to strip them
8894 # from the output so that they don't get included in the library
8896 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'
8899 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8900 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8901 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8903 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8904 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8906 # Commands to make compiler produce verbose output that lists
8907 # what "hidden" libraries, object files and flags are used when
8908 # linking a shared library.
8909 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8912 # FIXME: insert proper C++ library support
8913 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8919 case $cc_basename in
8921 # Kuck and Associates, Inc. (KAI) C++ Compiler
8923 # KCC will only create a shared library if the output file
8924 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8925 # to its proper name (with version) after linking.
8926 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8928 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8929 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8931 # Archives containing C++ object files must be created using
8932 # the KAI C++ compiler.
8933 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8936 # Rational C++ 2.4.1
8937 # FIXME: insert proper C++ library support
8938 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8941 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8942 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8943 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8944 echo "-hidden">> $lib.exp~
8945 $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8948 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8949 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8951 # Commands to make compiler produce verbose output that lists
8952 # what "hidden" libraries, object files and flags are used when
8953 # linking a shared library.
8955 # There doesn't appear to be a way to prevent this compiler from
8956 # explicitly linking system object files so we need to strip them
8957 # from the output so that they don't get included in the library
8959 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'
8962 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8963 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8966 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8967 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8969 # Commands to make compiler produce verbose output that lists
8970 # what "hidden" libraries, object files and flags are used when
8971 # linking a shared library.
8972 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8975 # FIXME: insert proper C++ library support
8976 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8982 # FIXME: insert proper C++ library support
8983 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8986 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8987 case $cc_basename in
8989 # FIXME: insert proper C++ library support
8990 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8993 # FIXME: insert proper C++ library support
8994 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8999 case $cc_basename in
9002 # FIXME: insert proper C++ library support
9003 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9007 # FIXME: insert proper C++ library support
9008 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9011 # FIXME: insert proper C++ library support
9012 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9017 case $cc_basename in
9019 # Sun C++ 4.2, 5.x and Centerline C++
9020 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9021 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9022 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9023 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9025 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9026 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9028 solaris2.[0-5] | solaris2.[0-5].*) ;;
9030 # The C++ compiler is used as linker so we must use $wl
9031 # flag to pass the commands to the underlying system
9033 # Supported since Solaris 2.6 (maybe 2.5.1?)
9034 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9037 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9039 # Commands to make compiler produce verbose output that lists
9040 # what "hidden" libraries, object files and flags are used when
9041 # linking a shared library.
9043 # There doesn't appear to be a way to prevent this compiler from
9044 # explicitly linking system object files so we need to strip them
9045 # from the output so that they don't get included in the library
9047 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9049 # Archives containing C++ object files must be created using
9050 # "CC -xar", where "CC" is the Sun C++ compiler. This is
9051 # necessary to make sure instantiated templates are included
9053 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9056 # Green Hills C++ Compiler
9057 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9059 # The C++ compiler must be used to create the archive.
9060 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9063 # GNU C++ compiler with Solaris linker
9064 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9065 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9066 if $CC --version | grep -v '^2\.7' > /dev/null; then
9067 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9068 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9069 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9071 # Commands to make compiler produce verbose output that lists
9072 # what "hidden" libraries, object files and flags are used when
9073 # linking a shared library.
9074 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9076 # g++ 2.7 appears to require `-G' NOT `-shared' on this
9078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9079 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9080 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9082 # Commands to make compiler produce verbose output that lists
9083 # what "hidden" libraries, object files and flags are used when
9084 # linking a shared library.
9085 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9088 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9093 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9094 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9097 case $cc_basename in
9099 # NonStop-UX NCC 3.20
9100 # FIXME: insert proper C++ library support
9101 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9104 # FIXME: insert proper C++ library support
9105 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9110 # FIXME: insert proper C++ library support
9111 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9114 # FIXME: insert proper C++ library support
9115 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9118 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9119 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9121 _LT_AC_TAGVAR(GCC, $1)="$GXX"
9122 _LT_AC_TAGVAR(LD, $1)="$LD"
9125 ## There is no encapsulation within the following macros, do not change
9126 ## the running order or otherwise move them around unless you know exactly
9127 ## what you are doing...
9128 AC_LIBTOOL_POSTDEP_PREDEP($1)
9129 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9130 AC_LIBTOOL_PROG_CC_C_O($1)
9131 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9132 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9133 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9134 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9135 AC_LIBTOOL_SYS_LIB_STRIP
9136 AC_LIBTOOL_DLOPEN_SELF($1)
9138 AC_LIBTOOL_CONFIG($1)
9145 with_gnu_ldcxx=$with_gnu_ld
9146 with_gnu_ld=$lt_save_with_gnu_ld
9147 lt_cv_path_LDCXX=$lt_cv_path_LD
9148 lt_cv_path_LD=$lt_save_path_LD
9149 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9150 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9151 ])# AC_LIBTOOL_LANG_CXX_CONFIG
9153 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9154 # ------------------------
9155 # Figure out "hidden" library dependencies from verbose
9156 # compiler output when linking a shared library.
9157 # Parse the compiler output and extract the necessary
9158 # objects, libraries and library flags.
9159 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9160 dnl we can't use the lt_simple_compile_test_code here,
9161 dnl because it contains code intended for an executable,
9162 dnl not a library. It's possible we should let each
9163 dnl tag define a new lt_????_link_test_code variable,
9164 dnl but it's only used here...
9165 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9167 void foo (void) { a = 0; }
9169 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9173 Foo (void) { a = 0; }
9178 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9186 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9189 public void bar (void) {
9195 dnl Parse the compiler output and extract the necessary
9196 dnl objects, libraries and library flags.
9197 if AC_TRY_EVAL(ac_compile); then
9198 # Parse the compiler output and extract the necessary
9199 # objects, libraries and library flags.
9201 # Sentinel used to keep track of whether or not we are before
9202 # the conftest object file.
9203 pre_test_object_deps_done=no
9205 # The `*' in the case matches for architectures that use `case' in
9206 # $output_verbose_cmd can trigger glob expansion during the loop
9207 # eval without this substitution.
9208 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9210 for p in `eval $output_verbose_link_cmd`; do
9214 # Some compilers place space between "-{L,R}" and the path.
9217 || test $p = "-R"; then
9224 if test "$pre_test_object_deps_done" = no; then
9227 # Internal compiler library paths should come after those
9228 # provided the user. The postdeps already come after the
9229 # user supplied libs so there is no need to process them.
9230 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9231 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9233 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9236 # The "-l" case would never come before the object being
9237 # linked, so don't bother handling this case.
9240 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9241 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9243 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9248 *.$objext|*.$libext)
9249 # This assumes that the test object file only shows up
9250 # once in the compiler output.
9251 if test "$p" = "conftest.$objext"; then
9252 pre_test_object_deps_done=yes
9256 if test "$pre_test_object_deps_done" = no; then
9257 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9258 _LT_AC_TAGVAR(predep_objects, $1)="$p"
9260 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9263 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9264 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9266 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9271 *) ;; # Ignore the rest.
9279 echo "libtool.m4: error: problem compiling $1 test program"
9282 $rm -f confest.$objext
9284 case " $_LT_AC_TAGVAR(postdeps, $1) " in
9285 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9287 ])# AC_LIBTOOL_POSTDEP_PREDEP
9289 # AC_LIBTOOL_LANG_F77_CONFIG
9290 # ------------------------
9291 # Ensure that the configuration vars for the C compiler are
9292 # suitably defined. Those variables are subsequently used by
9293 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9294 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9295 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9296 [AC_REQUIRE([AC_PROG_F77])
9297 AC_LANG_PUSH(Fortran 77)
9299 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9300 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9301 _LT_AC_TAGVAR(always_export_symbols, $1)=no
9302 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9303 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9304 _LT_AC_TAGVAR(hardcode_direct, $1)=no
9305 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9307 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9308 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9309 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
9310 _LT_AC_TAGVAR(module_cmds, $1)=
9311 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
9312 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9313 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9314 _LT_AC_TAGVAR(no_undefined_flag, $1)=
9315 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9316 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9318 # Source file extension for f77 test sources.
9321 # Object file extension for compiled f77 test sources.
9323 _LT_AC_TAGVAR(objext, $1)=$objext
9325 # Code to be used in simple compile tests
9326 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
9328 # Code to be used in simple link tests
9329 lt_simple_link_test_code=" program t\n end\n"
9331 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9334 # Allow CC to be a program name with arguments.
9338 _LT_AC_TAGVAR(compiler, $1)=$CC
9339 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9341 AC_MSG_CHECKING([if libtool supports shared libraries])
9342 AC_MSG_RESULT([$can_build_shared])
9344 AC_MSG_CHECKING([whether to build shared libraries])
9345 test "$can_build_shared" = "no" && enable_shared=no
9347 # On AIX, shared libraries and static libraries use the same namespace, and
9348 # are all built from PIC.
9351 test "$enable_shared" = yes && enable_static=no
9352 if test -n "$RANLIB"; then
9353 archive_cmds="$archive_cmds~\$RANLIB \$lib"
9354 postinstall_cmds='$RANLIB $lib'
9358 test "$enable_shared" = yes && enable_static=no
9361 AC_MSG_RESULT([$enable_shared])
9363 AC_MSG_CHECKING([whether to build static libraries])
9364 # Make sure either enable_shared or enable_static is yes.
9365 test "$enable_shared" = yes || enable_static=yes
9366 AC_MSG_RESULT([$enable_static])
9368 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9370 _LT_AC_TAGVAR(GCC, $1)="$G77"
9371 _LT_AC_TAGVAR(LD, $1)="$LD"
9373 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9374 AC_LIBTOOL_PROG_CC_C_O($1)
9375 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9376 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9377 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9378 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9379 AC_LIBTOOL_SYS_LIB_STRIP
9382 AC_LIBTOOL_CONFIG($1)
9386 ])# AC_LIBTOOL_LANG_F77_CONFIG
9389 # AC_LIBTOOL_LANG_GCJ_CONFIG
9390 # --------------------------
9391 # Ensure that the configuration vars for the C compiler are
9392 # suitably defined. Those variables are subsequently used by
9393 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9394 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9395 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9398 # Source file extension for Java test sources.
9401 # Object file extension for compiled Java test sources.
9403 _LT_AC_TAGVAR(objext, $1)=$objext
9405 # Code to be used in simple compile tests
9406 lt_simple_compile_test_code="class foo {}\n"
9408 # Code to be used in simple link tests
9409 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9411 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9414 # Allow CC to be a program name with arguments.
9418 _LT_AC_TAGVAR(compiler, $1)=$CC
9420 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9421 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9424 ## There is no encapsulation within the following macros, do not change
9425 ## the running order or otherwise move them around unless you know exactly
9426 ## what you are doing...
9427 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9428 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9429 AC_LIBTOOL_PROG_CC_C_O($1)
9430 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9431 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9432 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9433 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9434 AC_LIBTOOL_SYS_LIB_STRIP
9435 AC_LIBTOOL_DLOPEN_SELF($1)
9437 AC_LIBTOOL_CONFIG($1)
9441 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
9444 # AC_LIBTOOL_LANG_RC_CONFIG
9445 # --------------------------
9446 # Ensure that the configuration vars for the Windows resource compiler are
9447 # suitably defined. Those variables are subsequently used by
9448 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9449 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9450 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9453 # Source file extension for RC test sources.
9456 # Object file extension for compiled RC test sources.
9458 _LT_AC_TAGVAR(objext, $1)=$objext
9460 # Code to be used in simple compile tests
9461 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9463 # Code to be used in simple link tests
9464 lt_simple_link_test_code="$lt_simple_compile_test_code"
9466 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9469 # Allow CC to be a program name with arguments.
9473 _LT_AC_TAGVAR(compiler, $1)=$CC
9474 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9476 AC_LIBTOOL_CONFIG($1)
9480 ])# AC_LIBTOOL_LANG_RC_CONFIG
9483 # AC_LIBTOOL_CONFIG([TAGNAME])
9484 # ----------------------------
9485 # If TAGNAME is not passed, then create an initial libtool script
9486 # with a default configuration from the untagged config vars. Otherwise
9487 # add code to config.status for appending the configuration named by
9488 # TAGNAME from the matching tagged config vars.
9489 AC_DEFUN([AC_LIBTOOL_CONFIG],
9490 [# The else clause should only fire when bootstrapping the
9491 # libtool distribution, otherwise you forgot to ship ltmain.sh
9492 # with your package, and you will get complaints that there are
9493 # no rules to generate ltmain.sh.
9494 if test -f "$ltmain"; then
9495 # See if we are running on zsh, and set the options which allow our commands through
9496 # without removal of \ escapes.
9497 if test -n "${ZSH_VERSION+set}" ; then
9498 setopt NO_GLOB_SUBST
9500 # Now quote all the things that may contain metacharacters while being
9501 # careful not to overquote the AC_SUBSTed values. We take copies of the
9502 # variables and quote the copies for generation of the libtool script.
9503 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9504 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9505 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9506 deplibs_check_method reload_flag reload_cmds need_locks \
9507 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9508 lt_cv_sys_global_symbol_to_c_name_address \
9509 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9510 old_postinstall_cmds old_postuninstall_cmds \
9511 _LT_AC_TAGVAR(compiler, $1) \
9512 _LT_AC_TAGVAR(CC, $1) \
9513 _LT_AC_TAGVAR(LD, $1) \
9514 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9515 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9516 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9517 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9518 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9519 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9520 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9521 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9522 _LT_AC_TAGVAR(old_archive_cmds, $1) \
9523 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9524 _LT_AC_TAGVAR(predep_objects, $1) \
9525 _LT_AC_TAGVAR(postdep_objects, $1) \
9526 _LT_AC_TAGVAR(predeps, $1) \
9527 _LT_AC_TAGVAR(postdeps, $1) \
9528 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9529 _LT_AC_TAGVAR(archive_cmds, $1) \
9530 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9531 _LT_AC_TAGVAR(postinstall_cmds, $1) \
9532 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
9533 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9534 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
9535 _LT_AC_TAGVAR(no_undefined_flag, $1) \
9536 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
9537 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9538 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9539 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9540 _LT_AC_TAGVAR(hardcode_automatic, $1) \
9541 _LT_AC_TAGVAR(module_cmds, $1) \
9542 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
9543 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9544 _LT_AC_TAGVAR(exclude_expsyms, $1) \
9545 _LT_AC_TAGVAR(include_expsyms, $1); do
9548 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
9549 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9550 _LT_AC_TAGVAR(archive_cmds, $1) | \
9551 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9552 _LT_AC_TAGVAR(module_cmds, $1) | \
9553 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9554 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9555 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9556 extract_expsyms_cmds | reload_cmds | finish_cmds | \
9557 postinstall_cmds | postuninstall_cmds | \
9558 old_postinstall_cmds | old_postuninstall_cmds | \
9559 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9560 # Double-quote double-evaled strings.
9561 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9564 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9570 *'\[$]0 --fallback-echo"')
9571 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9576 [cfgfile="${ofile}T"
9577 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9579 AC_MSG_NOTICE([creating $ofile])],
9582 cat <<__EOF__ >> "$cfgfile"
9586 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9587 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9588 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
9590 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9591 # Free Software Foundation, Inc.
9593 # This file is part of GNU Libtool:
9594 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9596 # This program is free software; you can redistribute it and/or modify
9597 # it under the terms of the GNU General Public License as published by
9598 # the Free Software Foundation; either version 2 of the License, or
9599 # (at your option) any later version.
9601 # This program is distributed in the hope that it will be useful, but
9602 # WITHOUT ANY WARRANTY; without even the implied warranty of
9603 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9604 # General Public License for more details.
9606 # You should have received a copy of the GNU General Public License
9607 # along with this program; if not, write to the Free Software
9608 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9610 # As a special exception to the GNU General Public License, if you
9611 # distribute this file as part of a program that contains a
9612 # configuration script generated by Autoconf, you may include it under
9613 # the same distribution terms that you use for the rest of that program.
9615 # A sed program that does not truncate output.
9618 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
9619 Xsed="$SED -e s/^X//"
9621 # The HP-UX ksh and POSIX shell print the target directory to stdout
9623 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9625 # The names of the tagged configurations supported by this script.
9628 # ### BEGIN LIBTOOL CONFIG],
9629 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9631 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9633 # Shell to use when invoking shell scripts.
9636 # Whether or not to build shared libraries.
9637 build_libtool_libs=$enable_shared
9639 # Whether or not to build static libraries.
9640 build_old_libs=$enable_static
9642 # Whether or not to add -lc for building shared libraries.
9643 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9645 # Whether or not to disallow shared libs when runtime libs are static
9646 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9648 # Whether or not to optimize for fast installation.
9649 fast_install=$enable_fast_install
9652 host_alias=$host_alias
9655 # An echo program that does not interpret backslashes.
9660 AR_FLAGS=$lt_AR_FLAGS
9665 # A language-specific compiler.
9666 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9668 # Is the compiler the GNU C compiler?
9669 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9674 # The linker used to build libraries.
9675 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9677 # Whether we need hard or soft links.
9680 # A BSD-compatible nm program.
9683 # A symbol stripping program
9686 # Used to examine libraries when file_magic_cmd begins "file"
9687 MAGIC_CMD=$MAGIC_CMD
9689 # Used on cygwin: DLL creation program.
9692 # Used on cygwin: object dumper.
9695 # Used on cygwin: assembler.
9698 # The name of the directory that contains temporary libtool files.
9701 # How to create reloadable object files.
9702 reload_flag=$lt_reload_flag
9703 reload_cmds=$lt_reload_cmds
9705 # How to pass a linker flag through the compiler.
9706 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9708 # Object file suffix (normally "o").
9711 # Old archive suffix (normally "a").
9714 # Shared library suffix (normally ".so").
9717 # Executable file suffix (normally "").
9720 # Additional compiler flags for building library objects.
9721 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9724 # What is the maximum length of a command?
9725 max_cmd_len=$lt_cv_sys_max_cmd_len
9727 # Does compiler simultaneously support -c and -o options?
9728 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9730 # Must we lock files when doing compilation ?
9731 need_locks=$lt_need_locks
9733 # Do we need the lib prefix for modules?
9734 need_lib_prefix=$need_lib_prefix
9736 # Do we need a version for libraries?
9737 need_version=$need_version
9739 # Whether dlopen is supported.
9740 dlopen_support=$enable_dlopen
9742 # Whether dlopen of programs is supported.
9743 dlopen_self=$enable_dlopen_self
9745 # Whether dlopen of statically linked programs is supported.
9746 dlopen_self_static=$enable_dlopen_self_static
9748 # Compiler flag to prevent dynamic linking.
9749 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9751 # Compiler flag to turn off builtin functions.
9752 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9754 # Compiler flag to allow reflexive dlopens.
9755 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9757 # Compiler flag to generate shared objects directly from archives.
9758 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9760 # Compiler flag to generate thread-safe objects.
9761 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9763 # Library versioning type.
9764 version_type=$version_type
9766 # Format of library name prefix.
9767 libname_spec=$lt_libname_spec
9769 # List of archive names. First name is the real one, the rest are links.
9770 # The last name is the one that the linker finds with -lNAME.
9771 library_names_spec=$lt_library_names_spec
9773 # The coded name of the library, if different from the real name.
9774 soname_spec=$lt_soname_spec
9776 # Commands used to build and install an old-style archive.
9778 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9779 old_postinstall_cmds=$lt_old_postinstall_cmds
9780 old_postuninstall_cmds=$lt_old_postuninstall_cmds
9782 # Create an old-style archive from a shared archive.
9783 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9785 # Create a temporary old-style archive to link instead of a shared archive.
9786 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9788 # Commands used to build and install a shared archive.
9789 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9790 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9791 postinstall_cmds=$lt_postinstall_cmds
9792 postuninstall_cmds=$lt_postuninstall_cmds
9794 # Commands used to build a loadable module (assumed same as above if empty)
9795 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9796 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9798 # Commands to strip libraries.
9799 old_striplib=$lt_old_striplib
9800 striplib=$lt_striplib
9802 # Dependencies to place before the objects being linked to create a
9804 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9806 # Dependencies to place after the objects being linked to create a
9808 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9810 # Dependencies to place before the objects being linked to create a
9812 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9814 # Dependencies to place after the objects being linked to create a
9816 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9818 # The library search path used internally by the compiler when linking
9820 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9822 # Method to check whether dependent libraries are shared objects.
9823 deplibs_check_method=$lt_deplibs_check_method
9825 # Command to use when deplibs_check_method == file_magic.
9826 file_magic_cmd=$lt_file_magic_cmd
9828 # Flag that allows shared libraries with undefined symbols to be built.
9829 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9831 # Flag that forces no undefined symbols.
9832 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9834 # Commands used to finish a libtool library installation in a directory.
9835 finish_cmds=$lt_finish_cmds
9837 # Same as above, but a single script fragment to be evaled but not shown.
9838 finish_eval=$lt_finish_eval
9840 # Take the output of nm and produce a listing of raw symbols and C names.
9841 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9843 # Transform the output of nm in a proper C declaration
9844 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9846 # Transform the output of nm in a C name address pair
9847 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9849 # This is the shared library runtime path variable.
9850 runpath_var=$runpath_var
9852 # This is the shared library path variable.
9853 shlibpath_var=$shlibpath_var
9855 # Is shlibpath searched before the hard-coded library search path?
9856 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9858 # How to hardcode a shared library path into an executable.
9859 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9861 # Whether we should hardcode library paths into libraries.
9862 hardcode_into_libs=$hardcode_into_libs
9864 # Flag to hardcode \$libdir into a binary during linking.
9865 # This must work even if \$libdir does not exist.
9866 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9868 # If ld is used when linking, flag to hardcode \$libdir into
9869 # a binary during linking. This must work even if \$libdir does
9871 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9873 # Whether we need a single -rpath flag with a separated argument.
9874 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9876 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9878 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9880 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9882 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9884 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9885 # the resulting binary.
9886 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9888 # Set to yes if building a shared library automatically hardcodes DIR into the library
9889 # and all subsequent libraries and executables linked against it.
9890 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9892 # Variables whose values should be saved in libtool wrapper scripts and
9893 # restored at relink time.
9894 variables_saved_for_relink="$variables_saved_for_relink"
9896 # Whether libtool must link a program against all its dependency libraries.
9897 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9899 # Compile-time system search path for libraries
9900 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9902 # Run-time system search path for libraries
9903 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9905 # Fix the shell variable \$srcfile for the compiler.
9906 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9908 # Set to yes if exported symbols are required.
9909 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9911 # The commands to list exported symbols.
9912 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9914 # The commands to extract the exported symbol list from a shared archive.
9915 extract_expsyms_cmds=$lt_extract_expsyms_cmds
9917 # Symbols that should not be listed in the preloaded symbols.
9918 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9920 # Symbols that must always be exported.
9921 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9924 [# ### END LIBTOOL CONFIG],
9925 [# ### END LIBTOOL TAG CONFIG: $tagname])
9932 cat <<\EOF >> "$cfgfile"
9934 # AIX sometimes has problems with the GCC collect2 program. For some
9935 # reason, if we set the COLLECT_NAMES environment variable, the problems
9936 # vanish in a puff of smoke.
9937 if test "X${COLLECT_NAMES+set}" != Xset; then
9939 export COLLECT_NAMES
9945 # We use sed instead of cat because bash on DJGPP gets confused if
9946 # if finds mixed CR/LF and LF-only lines. Since sed operates in
9947 # text mode, it properly converts lines to CR/LF. This bash problem
9948 # is reportedly fixed, but why not run on old versions too?
9949 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9951 mv -f "$cfgfile" "$ofile" || \
9952 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9956 # If there is no Makefile yet, we rely on a make rule to execute
9957 # `config.status --recheck' to rerun these tests and create the
9958 # libtool script then.
9959 test -f Makefile && make "$ltmain"
9961 ])# AC_LIBTOOL_CONFIG
9964 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9965 # -------------------------------------------
9966 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9967 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9969 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9971 if test "$GCC" = yes; then
9972 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9974 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9975 lt_cv_prog_compiler_rtti_exceptions,
9976 [-fno-rtti -fno-exceptions], [],
9977 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9979 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9982 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9983 # ---------------------------------
9984 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9985 [AC_REQUIRE([AC_CANONICAL_HOST])
9986 AC_REQUIRE([AC_PROG_NM])
9987 AC_REQUIRE([AC_OBJEXT])
9988 # Check for command to grab the raw symbol name followed by C symbol from nm.
9989 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9990 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9992 # These are sane defaults that work on at least a few old systems.
9993 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
9995 # Character class describing NM global symbol codes.
9996 symcode='[[BCDEGRST]]'
9998 # Regexp to match symbols that can be accessed directly from C.
9999 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10001 # Transform the above into a raw symbol and a C symbol.
10002 symxfrm='\1 \2\3 \3'
10004 # Transform an extracted symbol line into a proper C declaration
10005 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10007 # Transform an extracted symbol line into symbol name and symbol address
10008 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'"
10010 # Define system-specific variables.
10015 cygwin* | mingw* | pw32*)
10016 symcode='[[ABCDGISTW]]'
10018 hpux*) # Its linker distinguishes data from code symbols
10019 if test "$host_cpu" = ia64; then
10020 symcode='[[ABCDEGRST]]'
10022 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10023 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'"
10025 irix* | nonstopux*)
10026 symcode='[[BCDEGRST]]'
10029 symcode='[[BCDEGQRST]]'
10035 symcode='[[DFNSTU]]'
10039 # Handle CRLF in mingw tool chain
10043 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10047 # If we're using GNU nm, then use its standard symbol codes.
10048 case `$NM -V 2>&1` in
10049 *GNU* | *'with BFD'*)
10050 symcode='[[ABCDGISTW]]' ;;
10053 # Try without a prefix undercore, then with it.
10054 for ac_symprfx in "" "_"; do
10056 # Write the raw and C identifiers.
10057 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10059 # Check to see that the pipe works correctly.
10063 cat > conftest.$ac_ext <<EOF
10068 void nm_test_func(){}
10072 int main(){nm_test_var='a';nm_test_func();return(0);}
10075 if AC_TRY_EVAL(ac_compile); then
10076 # Now try to grab the symbols.
10078 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10079 # Try sorting and uniquifying the output.
10080 if sort "$nlist" | uniq > "$nlist"T; then
10081 mv -f "$nlist"T "$nlist"
10086 # Make sure that we snagged all the symbols we need.
10087 if grep ' nm_test_var$' "$nlist" >/dev/null; then
10088 if grep ' nm_test_func$' "$nlist" >/dev/null; then
10089 cat <<EOF > conftest.$ac_ext
10095 # Now generate the symbol file.
10096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10098 cat <<EOF >> conftest.$ac_ext
10099 #if defined (__STDC__) && __STDC__
10100 # define lt_ptr_t void *
10102 # define lt_ptr_t char *
10106 /* The mapping between symbol names and symbols. */
10111 lt_preloaded_symbols[[]] =
10114 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10115 cat <<\EOF >> conftest.$ac_ext
10123 # Now try linking the two files.
10124 mv conftest.$ac_objext conftstm.$ac_objext
10125 lt_save_LIBS="$LIBS"
10126 lt_save_CFLAGS="$CFLAGS"
10127 LIBS="conftstm.$ac_objext"
10128 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10129 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10132 LIBS="$lt_save_LIBS"
10133 CFLAGS="$lt_save_CFLAGS"
10135 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10138 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10141 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10144 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10145 cat conftest.$ac_ext >&5
10147 rm -f conftest* conftst*
10149 # Do not use the global_symbol_pipe unless it works.
10150 if test "$pipe_works" = yes; then
10153 lt_cv_sys_global_symbol_pipe=
10157 if test -z "$lt_cv_sys_global_symbol_pipe"; then
10158 lt_cv_sys_global_symbol_to_cdecl=
10160 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10161 AC_MSG_RESULT(failed)
10165 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10168 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10169 # ---------------------------------------
10170 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10171 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10172 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10173 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10175 AC_MSG_CHECKING([for $compiler option to produce PIC])
10176 ifelse([$1],[CXX],[
10177 # C++ specific cases for pic, static, wl, etc.
10178 if test "$GXX" = yes; then
10179 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10180 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10184 # All AIX code is PIC.
10185 if test "$host_cpu" = ia64; then
10186 # AIX 5 now supports IA64 processor
10187 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10191 # FIXME: we need at least 68020 code to build shared libraries, but
10192 # adding the `-m68020' flag to GCC prevents building anything better,
10194 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10196 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10197 # PIC is the default for these OSes.
10199 mingw* | os2* | pw32*)
10200 # This hack is so that the source file can tell whether it is being
10201 # built for inclusion in a dll (and should export symbols for example).
10202 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10204 darwin* | rhapsody*)
10205 # PIC is the default on this platform
10206 # Common symbols not allowed in MH_DYLIB files
10207 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10210 # DJGPP does not support shared libraries at all
10211 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10214 if test -d /usr/nec; then
10215 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10219 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10220 # not for PA HP-UX.
10221 case "$host_cpu" in
10225 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10230 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10236 # All AIX code is PIC.
10237 if test "$host_cpu" = ia64; then
10238 # AIX 5 now supports IA64 processor
10239 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10241 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10245 case $cc_basename in
10247 # Green Hills C++ Compiler
10248 # _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"
10253 case $cc_basename in
10255 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10258 # Green Hills C++ Compiler
10259 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10266 # FreeBSD uses GNU C++
10268 hpux9* | hpux10* | hpux11*)
10269 case $cc_basename in
10271 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10272 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10273 if test "$host_cpu" != ia64; then
10274 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10278 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10279 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10280 case "$host_cpu" in
10285 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10293 irix5* | irix6* | nonstopux*)
10294 case $cc_basename in
10296 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10297 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10298 # CC pic flag -KPIC is the default.
10305 case $cc_basename in
10308 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10309 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10313 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10314 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10315 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10319 # Make sure the PIC flag is empty. It appears that all Alpha
10320 # Linux and Compaq Tru64 Unix objects are PIC.
10321 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10322 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10333 case $cc_basename in
10335 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10343 osf3* | osf4* | osf5*)
10344 case $cc_basename in
10346 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10349 # Rational C++ 2.4.1
10350 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10353 # Digital/Compaq C++
10354 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10355 # Make sure the PIC flag is empty. It appears that all Alpha
10356 # Linux and Compaq Tru64 Unix objects are PIC.
10357 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10358 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10367 case $cc_basename in
10369 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10376 case $cc_basename in
10378 # Sun C++ 4.2, 5.x and Centerline C++
10379 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10380 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10381 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10384 # Green Hills C++ Compiler
10385 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10392 case $cc_basename in
10395 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10396 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10400 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10407 case $cc_basename in
10409 # NonStop-UX NCC 3.20
10410 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10421 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10427 if test "$GCC" = yes; then
10428 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10429 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10433 # All AIX code is PIC.
10434 if test "$host_cpu" = ia64; then
10435 # AIX 5 now supports IA64 processor
10436 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10441 # FIXME: we need at least 68020 code to build shared libraries, but
10442 # adding the `-m68020' flag to GCC prevents building anything better,
10444 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10447 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10448 # PIC is the default for these OSes.
10451 mingw* | pw32* | os2*)
10452 # This hack is so that the source file can tell whether it is being
10453 # built for inclusion in a dll (and should export symbols for example).
10454 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10457 darwin* | rhapsody*)
10458 # PIC is the default on this platform
10459 # Common symbols not allowed in MH_DYLIB files
10460 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10464 # Just because we use GCC doesn't mean we suddenly get shared libraries
10465 # on systems that don't support them.
10466 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10471 if test -d /usr/nec; then
10472 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10477 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10478 # not for PA HP-UX.
10479 case "$host_cpu" in
10484 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10490 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10494 # PORTME Check for flag to pass linker flags through the system compiler.
10497 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10498 if test "$host_cpu" = ia64; then
10499 # AIX 5 now supports IA64 processor
10500 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10502 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10506 mingw* | pw32* | os2*)
10507 # This hack is so that the source file can tell whether it is being
10508 # built for inclusion in a dll (and should export symbols for example).
10509 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10512 hpux9* | hpux10* | hpux11*)
10513 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10514 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10515 # not for PA HP-UX.
10516 case "$host_cpu" in
10521 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10524 # Is there a better lt_prog_compiler_static that works with the bundled CC?
10525 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10528 irix5* | irix6* | nonstopux*)
10529 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10530 # PIC (with -KPIC) is the default.
10531 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10535 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10536 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10542 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10543 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10544 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10547 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10548 # All Alpha code is PIC.
10549 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10554 osf3* | osf4* | osf5*)
10555 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10556 # All OSF/1 code is PIC.
10557 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10561 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10562 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10566 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10567 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10568 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10572 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10573 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10574 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10577 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10578 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10579 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10580 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10584 if test -d /usr/nec ;then
10585 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10586 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10591 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10592 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10596 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10601 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10604 # Check to make sure the PIC flag actually works.
10606 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10607 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10608 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10609 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10610 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10612 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10614 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10615 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10618 # For platforms which do not support PIC, -DPIC is meaningless:
10620 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10623 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10629 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10630 # ------------------------------------
10631 # See if the linker supports building shared libraries.
10632 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10633 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10634 ifelse([$1],[CXX],[
10635 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10638 # If we're using GNU nm, then we don't want the "-C" option.
10639 # -C means demangle to AIX nm, but means don't demangle with GNU nm
10640 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10641 _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'
10643 _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'
10647 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10650 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10653 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10658 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10659 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10660 _LT_AC_TAGVAR(archive_cmds, $1)=
10661 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10662 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10663 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10664 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10665 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10666 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10668 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10669 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10670 _LT_AC_TAGVAR(hardcode_direct, $1)=no
10671 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10672 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10673 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10674 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
10675 _LT_AC_TAGVAR(module_cmds, $1)=
10676 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
10677 _LT_AC_TAGVAR(always_export_symbols, $1)=no
10678 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10679 # include_expsyms should be a list of space-separated symbols to be *always*
10680 # included in the symbol list
10681 _LT_AC_TAGVAR(include_expsyms, $1)=
10682 # exclude_expsyms can be an extended regexp of symbols to exclude
10683 # it will be wrapped by ` (' and `)$', so one must not match beginning or
10684 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10685 # as well as any symbol that contains `d'.
10686 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10687 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10688 # platforms (ab)use it in PIC code, but their linkers get confused if
10689 # the symbol is explicitly referenced. Since portable code cannot
10690 # rely on this symbol name, it's probably fine to never include it in
10691 # preloaded symbol tables.
10692 extract_expsyms_cmds=
10695 cygwin* | mingw* | pw32*)
10696 # FIXME: the MSVC++ port hasn't been tested in a loooong time
10697 # When not using gcc, we currently assume that we are using
10698 # Microsoft Visual C++.
10699 if test "$GCC" != yes; then
10708 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10709 if test "$with_gnu_ld" = yes; then
10710 # If archive_cmds runs LD, not CC, wlarc should be empty
10713 # See if GNU ld supports shared libraries.
10715 aix3* | aix4* | aix5*)
10716 # On AIX/PPC, the GNU linker is very broken
10717 if test "$host_cpu" != ia64; then
10718 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10721 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
10722 *** to be unable to reliably create shared libraries on AIX.
10723 *** Therefore, libtool is disabling shared libraries support. If you
10724 *** really care for shared libraries, you may want to modify your PATH
10725 *** so that a non-GNU linker is found, and then restart.
10732 _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)'
10733 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10734 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10736 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10737 # that the semantics of dynamic libraries on AmigaOS, at least up
10738 # to version 4, is to share data among multiple programs linked
10739 # with the same dynamic library. Since this doesn't match the
10740 # behavior of shared libraries on other platforms, we can't use
10742 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10746 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10747 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10748 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10749 # support --undefined. This deserves some investigation. FIXME
10750 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10752 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10756 cygwin* | mingw* | pw32*)
10757 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10758 # as there is no search path for DLLs.
10759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10760 _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10761 _LT_AC_TAGVAR(always_export_symbols, $1)=no
10762 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10763 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10765 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10766 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10767 # If the export-symbols file already is a .def file (1st line
10768 # is EXPORTS), use it as is; otherwise, prepend...
10769 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10770 cp $export_symbols $output_objdir/$soname.def;
10772 echo EXPORTS > $output_objdir/$soname.def;
10773 cat $export_symbols >> $output_objdir/$soname.def;
10775 $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10782 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10783 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10786 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10787 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10792 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10793 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10796 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10797 *** create shared libraries on Solaris systems. Therefore, libtool
10798 *** is disabling shared libraries support. We urge you to upgrade GNU
10799 *** binutils to release 2.9.1 or newer. Another option is to modify
10800 *** your PATH or compiler configuration so that the native linker is
10801 *** used, and then restart.
10804 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10805 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10806 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10808 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10813 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10815 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10816 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10820 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10821 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10822 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10824 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10829 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10830 runpath_var=LD_RUN_PATH
10831 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10832 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10833 # ancient GNU ld didn't support --whole-archive et. al.
10834 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10835 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10837 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10841 # PORTME fill in a description of your system's linker (not GNU ld)
10844 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10845 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10846 _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'
10847 # Note: this linker hardcodes the directories in LIBPATH if there
10848 # are no directories specified by -L.
10849 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10850 if test "$GCC" = yes && test -z "$link_static_flag"; then
10851 # Neither direct hardcoding nor static linking is supported with a
10853 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10858 if test "$host_cpu" = ia64; then
10859 # On IA64, the linker does run time linking by default, so we don't
10860 # have to do anything special.
10861 aix_use_runtimelinking=no
10862 exp_sym_flag='-Bexport'
10865 # If we're using GNU nm, then we don't want the "-C" option.
10866 # -C means demangle to AIX nm, but means don't demangle with GNU nm
10867 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10868 _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'
10870 _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'
10873 # KDE requires run time linking. Make it the default.
10874 aix_use_runtimelinking=yes
10875 exp_sym_flag='-bexport'
10876 no_entry_flag='-bnoentry'
10879 # When large executables or shared objects are built, AIX ld can
10880 # have problems creating the table of contents. If linking a library
10881 # or program results in "error TOC overflow" add -mminimal-toc to
10882 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10883 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10885 _LT_AC_TAGVAR(archive_cmds, $1)=''
10886 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10887 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10888 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10890 if test "$GCC" = yes; then
10891 case $host_os in aix4.[012]|aix4.[012].*)
10892 # We only want to do this on AIX 4.2 and lower, the check
10893 # below for broken collect2 doesn't work under 4.3+
10894 collect2name=`${CC} -print-prog-name=collect2`
10895 if test -f "$collect2name" && \
10896 strings "$collect2name" | grep resolve_lib_name >/dev/null
10898 # We have reworked collect2
10899 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10901 # We have old collect2
10902 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10903 # It fails to find uninstalled libraries when the uninstalled
10904 # path is not listed in the libpath. Setting hardcode_minus_L
10905 # to unsupported forces relinking
10906 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10907 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10908 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10911 shared_flag='-shared'
10914 if test "$host_cpu" = ia64; then
10915 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10916 # chokes on -Wl,-G. The following line is correct:
10919 if test "$aix_use_runtimelinking" = yes; then
10920 shared_flag='-qmkshrobj ${wl}-G'
10922 shared_flag='-qmkshrobj'
10927 # Let the compiler handle the export list.
10928 _LT_AC_TAGVAR(always_export_symbols, $1)=no
10929 if test "$aix_use_runtimelinking" = yes; then
10930 # Warning - without using the other runtime loading flags (-brtl),
10931 # -berok will link without error, but may produce a broken library.
10932 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10933 # Determine the default libpath from the value encoded in an empty executable.
10934 _LT_AC_SYS_LIBPATH_AIX
10935 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10936 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10937 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10939 if test "$host_cpu" = ia64; then
10940 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10941 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10942 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10944 # Determine the default libpath from the value encoded in an empty executable.
10945 _LT_AC_SYS_LIBPATH_AIX
10946 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10947 # Warning - without using the other run time loading flags,
10948 # -berok will link without error, but may produce a broken library.
10949 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10950 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10951 # -bexpall does not export symbols beginning with underscore (_)
10952 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10953 # Exported symbols can be pulled into shared objects from archives
10954 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10955 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10956 # This is similar to how AIX traditionally builds it's shared libraries.
10957 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10963 _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)'
10964 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10965 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10966 # see comment about different semantics on the GNU ld section
10967 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10971 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10974 cygwin* | mingw* | pw32*)
10975 # When not using gcc, we currently assume that we are using
10976 # Microsoft Visual C++.
10977 # hardcode_libdir_flag_spec is actually meaningless, as there is
10978 # no search path for DLLs.
10979 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10980 _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10981 # Tell ltmain to make .lib files, not .a files.
10983 # Tell ltmain to make .dll files, not .so files.
10985 # FIXME: Setting linknames here is a bad hack.
10986 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10987 # The linker will automatically build a .lib file if we build a DLL.
10988 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10989 # FIXME: Should let the user specify the lib program.
10990 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10991 fix_srcfile_path='`cygpath -w "$srcfile"`'
10992 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10995 darwin* | rhapsody*)
10996 if test "$GXX" = yes ; then
10997 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10999 rhapsody* | darwin1.[[012]])
11000 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
11003 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11004 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11006 case ${MACOSX_DEPLOYMENT_TARGET} in
11008 allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11011 allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup'
11017 lt_int_apple_cc_single_mod=no
11018 output_verbose_link_cmd='echo'
11019 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
11020 lt_int_apple_cc_single_mod=yes
11022 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11023 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
11025 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
11027 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
11028 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
11029 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11030 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11034 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11035 _LT_AC_TAGVAR(hardcode_direct, $1)=no
11036 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11037 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11038 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
11039 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11041 _LT_AC_TAGVAR(ld_shlibs, $1)=no
11046 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11047 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11048 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11052 _LT_AC_TAGVAR(ld_shlibs, $1)=no
11055 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11056 # support. Future versions do this automatically, but an explicit c++rt0.o
11057 # does not break anything, and helps significantly (at the cost of a little
11060 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11061 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11062 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11063 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11066 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11068 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11069 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11070 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11071 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11074 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11076 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11077 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11078 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11079 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11083 if test "$GCC" = yes; then
11084 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11086 _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'
11088 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11089 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11090 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11092 # hardcode_minus_L: Not really in the search PATH,
11093 # but as the default location of the library.
11094 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11095 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11099 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11100 case "$host_cpu" in
11102 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11105 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11109 case "$host_cpu" in
11111 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11114 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11118 if test "$with_gnu_ld" = no; then
11119 case "$host_cpu" in
11121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11122 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11123 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11124 _LT_AC_TAGVAR(hardcode_direct, $1)=no
11125 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11128 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11129 _LT_AC_TAGVAR(hardcode_direct, $1)=no
11130 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11132 # hardcode_minus_L: Not really in the search PATH,
11133 # but as the default location of the library.
11134 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11137 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11138 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11139 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11140 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11142 # hardcode_minus_L: Not really in the search PATH,
11143 # but as the default location of the library.
11144 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11150 irix5* | irix6* | nonstopux*)
11151 if test "$GCC" = yes; then
11152 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11154 _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'
11155 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11158 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11159 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11163 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11164 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11166 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11168 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11169 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11170 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11174 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11175 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11176 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11177 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11178 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11182 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11183 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11185 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11186 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11187 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11190 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11191 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11192 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11195 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11203 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11204 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11205 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11206 _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 $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11207 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11211 if test "$GCC" = yes; then
11212 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11213 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11215 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11216 _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'
11218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11222 osf4* | osf5*) # as osf3* with the addition of -msym flag
11223 if test "$GCC" = yes; then
11224 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11225 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${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'
11226 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11228 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11229 _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'
11230 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
11231 $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'
11233 # Both c and cxx compiler support -rpath directly
11234 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11236 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11240 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11241 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11242 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11243 runpath_var=LD_RUN_PATH
11244 hardcode_runpath_var=yes
11248 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11249 if test "$GCC" = yes; then
11250 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11251 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11252 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11254 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11255 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11256 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11258 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11259 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11261 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11262 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
11263 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11265 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11269 if test "x$host_vendor" = xsequent; then
11270 # Use $CC to link under sequent, because it throws in some extra .o
11271 # files that make .init and .fini sections work.
11272 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11274 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11277 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11278 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11279 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11283 case $host_vendor in
11285 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11286 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11289 ## LD is ld it makes a PLAMLIB
11290 ## CC just makes a GrossModule.
11291 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11292 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11293 _LT_AC_TAGVAR(hardcode_direct, $1)=no
11296 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11297 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11300 runpath_var='LD_RUN_PATH'
11301 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11305 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11306 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11307 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11311 if test -d /usr/nec; then
11312 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11313 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11314 runpath_var=LD_RUN_PATH
11315 hardcode_runpath_var=yes
11316 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11321 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11322 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11323 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11324 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11325 hardcode_runpath_var=yes
11326 runpath_var=LD_RUN_PATH
11329 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
11330 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11331 if test "$GCC" = yes; then
11332 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11334 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11336 runpath_var='LD_RUN_PATH'
11337 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11341 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11342 # $CC -shared without GNU ld will not create a library from C++
11343 # object files and a static libstdc++, better avoid it by now
11344 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11345 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11346 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11347 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11348 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11349 runpath_var='LD_RUN_PATH'
11353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11355 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11359 _LT_AC_TAGVAR(ld_shlibs, $1)=no
11364 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11365 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11367 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11368 if test "$GCC" = yes; then
11369 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11373 # Do we need to explicitly link libc?
11375 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11377 # Assume -lc should be added
11378 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11380 if test "$enable_shared" = yes && test "$GCC" = yes; then
11381 case $_LT_AC_TAGVAR(archive_cmds, $1) in
11383 # FIXME: we may have to deal with multi-command sequences.
11386 # Test whether the compiler implicitly links with -lc since on some
11387 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11388 # to ld, don't add -lc before -lgcc.
11389 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11391 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11393 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11396 libobjs=conftest.$ac_objext
11398 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11404 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11405 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11406 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11408 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11410 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11412 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11414 cat conftest.err 1>&5
11417 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11423 ])# AC_LIBTOOL_PROG_LD_SHLIBS
11426 # _LT_AC_FILE_LTDLL_C
11427 # -------------------
11428 # Be careful that the start marker always follows a newline.
11429 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11430 # /* ltdll.c starts here */
11431 # #define WIN32_LEAN_AND_MEAN
11432 # #include <windows.h>
11433 # #undef WIN32_LEAN_AND_MEAN
11434 # #include <stdio.h>
11436 # #ifndef __CYGWIN__
11437 # # ifdef __CYGWIN32__
11438 # # define __CYGWIN__ __CYGWIN32__
11442 # #ifdef __cplusplus
11445 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11446 # #ifdef __cplusplus
11450 # #ifdef __CYGWIN__
11451 # #include <cygwin/cygwin_dll.h>
11452 # DECLARE_CYGWIN_DLL( DllMain );
11454 # HINSTANCE __hDllInstance_base;
11457 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11459 # __hDllInstance_base = hInst;
11462 # /* ltdll.c ends here */
11463 ])# _LT_AC_FILE_LTDLL_C
11466 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11467 # ---------------------------------
11468 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11472 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11473 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11474 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11475 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11476 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11477 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11478 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11480 # This is just to silence aclocal about the macro not being used
11481 ifelse([AC_DISABLE_FAST_INSTALL])
11483 AC_DEFUN([LT_AC_PROG_GCJ],
11484 [AC_CHECK_TOOL(GCJ, gcj, no)
11485 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11489 AC_DEFUN([LT_AC_PROG_RC],
11490 [AC_CHECK_TOOL(RC, windres, no)
11493 ############################################################
11494 # NOTE: This macro has been submitted for inclusion into #
11495 # GNU Autoconf as AC_PROG_SED. When it is available in #
11496 # a released version of Autoconf we should remove this #
11497 # macro and use it instead. #
11498 ############################################################
11501 # Check for a fully-functional sed program, that truncates
11502 # as few characters as possible. Prefer GNU sed if found.
11503 AC_DEFUN([LT_AC_PROG_SED],
11504 [AC_MSG_CHECKING([for a sed that does not truncate output])
11505 AC_CACHE_VAL(lt_cv_path_SED,
11506 [# Loop through the user's path and test for sed and gsed.
11507 # Then use that list of sed's as ones to test for truncation.
11508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11509 for as_dir in $PATH
11512 test -z "$as_dir" && as_dir=.
11513 for lt_ac_prog in sed gsed; do
11514 for ac_exec_ext in '' $ac_executable_extensions; do
11515 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11516 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11523 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
11524 # along with /bin/sed that truncates output.
11525 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11526 test ! -f $lt_ac_sed && break
11527 cat /dev/null > conftest.in
11529 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11530 # Check for GNU sed and select it if it is found.
11531 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11532 lt_cv_path_SED=$lt_ac_sed
11536 cat conftest.in conftest.in >conftest.tmp
11537 mv conftest.tmp conftest.in
11538 cp conftest.in conftest.nl
11540 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11541 cmp -s conftest.out conftest.nl || break
11542 # 10000 chars as input seems more than enough
11543 test $lt_ac_count -gt 10 && break
11544 lt_ac_count=`expr $lt_ac_count + 1`
11545 if test $lt_ac_count -gt $lt_ac_max; then
11546 lt_ac_max=$lt_ac_count
11547 lt_cv_path_SED=$lt_ac_sed
11552 SED=$lt_cv_path_SED
11553 AC_MSG_RESULT([$SED])