1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 dnl This file is part of the KDE libraries/packages
16 dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
17 dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
19 dnl This file is free software; you can redistribute it and/or
20 dnl modify it under the terms of the GNU Library General Public
21 dnl License as published by the Free Software Foundation; either
22 dnl version 2 of the License, or (at your option) any later version.
24 dnl This library is distributed in the hope that it will be useful,
25 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
26 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 dnl Library General Public License for more details.
29 dnl You should have received a copy of the GNU Library General Public License
30 dnl along with this library; see the file COPYING.LIB. If not, write to
31 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32 dnl Boston, MA 02111-1307, USA.
35 dnl Please do not modify this file unless you expect your modifications to be
36 dnl carried into every other module in the repository.
38 dnl Single-module modifications are best placed in configure.in for kdelibs
39 dnl and kdebase or configure.in.in if present.
41 dnl ------------------------------------------------------------------------
42 dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
43 dnl thanks to Raja R Harinath.
44 dnl ------------------------------------------------------------------------
46 ifdef([_AC_PATH_X_XMKMF],[],
47 [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
48 ifdef([AC_OUTPUT_SUBDIRS],[],
49 [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
52 dnl Internal subroutine of AC_PATH_X.
53 dnl Set ac_x_includes and/or ac_x_libraries.
54 AC_DEFUN(KDE_PATH_X_DIRECT,
56 AC_REQUIRE([KDE_CHECK_LIB64])
58 if test "$ac_x_includes" = NO; then
59 # Guess where to find include files, by looking for this one X11 .h file.
60 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
62 # First, try using that file with no special directory specified.
63 AC_TRY_CPP([#include <$x_direct_test_include>],
64 [# We can compile using X headers with no special include directory.
66 [# Look for the header file in a standard set of common directories.
67 # Check X11 before X11Rn because it is often a symlink to the current release.
79 /usr/local/X11/include \
80 /usr/local/X11R6/include \
81 /usr/local/X11R5/include \
82 /usr/local/X11R4/include \
84 /usr/local/include/X11 \
85 /usr/local/include/X11R6 \
86 /usr/local/include/X11R5 \
87 /usr/local/include/X11R4 \
91 /usr/XFree86/include/X11 \
95 /usr/unsupported/include \
97 /usr/local/x11r5/include \
98 /usr/lpp/Xamples/include \
100 /usr/openwin/include \
101 /usr/openwin/share/include \
104 if test -r "$ac_dir/$x_direct_test_include"; then
105 ac_x_includes=$ac_dir
109 fi # $ac_x_includes = NO
111 if test "$ac_x_libraries" = NO; then
112 # Check for the libraries.
114 test -z "$x_direct_test_library" && x_direct_test_library=Xt
115 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
117 # See if we find them without any special options.
118 # Don't add to $LIBS permanently.
120 LIBS="-l$x_direct_test_library $LIBS"
121 AC_TRY_LINK(, [${x_direct_test_function}()],
122 [LIBS="$ac_save_LIBS"
123 # We can link X programs with no special library path.
125 [LIBS="$ac_save_LIBS"
126 # First see if replacing the include by lib works.
127 # Check X11 before X11Rn because it is often a symlink to the current release.
128 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
129 /usr/X11/lib${kdelibsuff} \
130 /usr/X11R6/lib${kdelibsuff} \
131 /usr/X11R5/lib${kdelibsuff} \
132 /usr/X11R4/lib${kdelibsuff} \
134 /usr/lib${kdelibsuff}/X11 \
135 /usr/lib${kdelibsuff}/X11R6 \
136 /usr/lib${kdelibsuff}/X11R5 \
137 /usr/lib${kdelibsuff}/X11R4 \
139 /usr/local/X11/lib${kdelibsuff} \
140 /usr/local/X11R6/lib${kdelibsuff} \
141 /usr/local/X11R5/lib${kdelibsuff} \
142 /usr/local/X11R4/lib${kdelibsuff} \
144 /usr/local/lib${kdelibsuff}/X11 \
145 /usr/local/lib${kdelibsuff}/X11R6 \
146 /usr/local/lib${kdelibsuff}/X11R5 \
147 /usr/local/lib${kdelibsuff}/X11R4 \
149 /usr/X386/lib${kdelibsuff} \
150 /usr/x386/lib${kdelibsuff} \
151 /usr/XFree86/lib${kdelibsuff}/X11 \
153 /usr/lib${kdelibsuff} \
154 /usr/local/lib${kdelibsuff} \
155 /usr/unsupported/lib${kdelibsuff} \
156 /usr/athena/lib${kdelibsuff} \
157 /usr/local/x11r5/lib${kdelibsuff} \
158 /usr/lpp/Xamples/lib${kdelibsuff} \
159 /lib/usr/lib${kdelibsuff}/X11 \
161 /usr/openwin/lib${kdelibsuff} \
162 /usr/openwin/share/lib${kdelibsuff} \
165 dnl Don't even attempt the hair of trying to link an X program!
166 for ac_extension in a so sl; do
167 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
168 ac_x_libraries=$ac_dir
173 fi # $ac_x_libraries = NO
177 dnl ------------------------------------------------------------------------
178 dnl Find a file (or one of more files in a list of dirs)
179 dnl ------------------------------------------------------------------------
181 AC_DEFUN(AC_FIND_FILE,
188 echo "configure: __oline__: $i/$j" >&AC_FD_CC
189 if test -r "$i/$j"; then
190 echo "taking that" >&AC_FD_CC
198 dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
199 dnl if-not-found, test-parameter)
200 AC_DEFUN(KDE_FIND_PATH,
202 AC_MSG_CHECKING([for $1])
203 if test -n "$$2"; then
206 kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
208 AC_CACHE_VAL(kde_cv_path_$kde_cache,
220 if test -x "$dir/$1"; then
223 evalstr="$dir/$1 $5 2>&1 "
224 if eval $evalstr; then
225 kde_cv_path="$dir/$1"
229 kde_cv_path="$dir/$1"
235 eval "kde_cv_path_$kde_cache=$kde_cv_path"
239 eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
243 if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
244 AC_MSG_RESULT(not found)
247 AC_MSG_RESULT($kde_cv_path)
253 AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
255 AC_MSG_ERROR([No Qt meta object compiler (moc) found!
256 Please check whether you installed Qt correctly.
257 You need to have a running moc binary.
258 configure tried to run $ac_cv_path_moc and the test didn't
259 succeed. If configure shouldn't have tried this one, set
260 the environment variable MOC to the right one before running
265 AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
267 AC_MSG_WARN([No Qt ui compiler (uic) found!
268 Please check whether you installed Qt correctly.
269 You need to have a running uic binary.
270 configure tried to run $ac_cv_path_uic and the test didn't
271 succeed. If configure shouldn't have tried this one, set
272 the environment variable UIC to the right one before running
278 AC_DEFUN(KDE_CHECK_UIC_FLAG,
280 AC_MSG_CHECKING([whether uic supports -$1 ])
281 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
282 AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
284 cat >conftest.ui <<EOT
285 <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
287 ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
288 if AC_TRY_EVAL(ac_uic_testrun); then
289 eval "kde_cv_prog_uic_$kde_cache=yes"
291 eval "kde_cv_prog_uic_$kde_cache=no"
296 if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
308 dnl ------------------------------------------------------------------------
309 dnl Find the meta object compiler and the ui compiler in the PATH,
310 dnl in $QTDIR/bin, and some more usual places
311 dnl ------------------------------------------------------------------------
313 AC_DEFUN(AC_PATH_QT_MOC_UIC,
316 for dir in $kde_qt_dirs; do
317 qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
319 qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
320 if test ! "$ac_qt_bindir" = "NO"; then
321 qt_bindirs="$ac_qt_bindir $qt_bindirs"
324 KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
325 if test -z "$UIC_NOT_NEEDED"; then
326 KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
327 if test -z "$UIC_PATH" ; then
328 KDE_UIC_ERROR_MESSAGE
330 elif test $kde_qtver = 3; then
331 KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
332 KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
335 if test x$ac_uic_supports_libpath = xyes; then
336 UIC="$UIC -L \$(kde_widgetdir)"
338 if test x$ac_uic_supports_nounload = xyes; then
343 UIC="echo uic not available: "
350 if test $kde_qtver = 3; then
357 AC_DEFUN(KDE_1_CHECK_PATHS,
359 KDE_1_CHECK_PATH_HEADERS
363 if test -n "$USE_RPATH"; then
365 if test -n "$kde_libraries"; then
366 KDE_TEST_RPATH="-R $kde_libraries"
369 if test -n "$qt_libraries"; then
370 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
373 if test -n "$x_libraries"; then
374 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
377 KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
380 AC_MSG_CHECKING([for KDE libraries installed])
381 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'
383 if AC_TRY_EVAL(ac_link) && test -s conftest; then
386 AC_MSG_ERROR([your system fails at linking a small KDE application!
387 Check, if your compiler is installed correctly and if you have used the
388 same compiler to compile Qt and kdelibs as you did use now.
389 For more details about this problem, look at the end of config.log.])
392 if eval `KDEDIR= ./conftest 2>&5`; then
398 KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
399 kde_have_all_paths=yes
401 KDE_SET_PATHS($kde_result)
405 AC_DEFUN(KDE_SET_PATHS,
407 kde_cv_all_paths="kde_have_all_paths=\"yes\" \
408 kde_htmldir=\"$kde_htmldir\" \
409 kde_appsdir=\"$kde_appsdir\" \
410 kde_icondir=\"$kde_icondir\" \
411 kde_sounddir=\"$kde_sounddir\" \
412 kde_datadir=\"$kde_datadir\" \
413 kde_locale=\"$kde_locale\" \
414 kde_cgidir=\"$kde_cgidir\" \
415 kde_confdir=\"$kde_confdir\" \
416 kde_mimedir=\"$kde_mimedir\" \
417 kde_toolbardir=\"$kde_toolbardir\" \
418 kde_wallpaperdir=\"$kde_wallpaperdir\" \
419 kde_templatesdir=\"$kde_templatesdir\" \
420 kde_bindir=\"$kde_bindir\" \
421 kde_servicesdir=\"$kde_servicesdir\" \
422 kde_servicetypesdir=\"$kde_servicetypesdir\" \
423 kde_moduledir=\"$kde_moduledir\" \
424 kde_styledir=\"$kde_styledir\" \
425 kde_widgetdir=\"$kde_widgetdir\" \
429 AC_DEFUN(KDE_SET_DEFAULT_PATHS,
431 if test "$1" = "default"; then
433 if test -z "$kde_htmldir"; then
434 kde_htmldir='\${prefix}/share/doc/HTML'
436 if test -z "$kde_appsdir"; then
437 kde_appsdir='\${prefix}/share/applnk'
439 if test -z "$kde_icondir"; then
440 kde_icondir='\${prefix}/share/icons'
442 if test -z "$kde_sounddir"; then
443 kde_sounddir='\${prefix}/share/sounds'
445 if test -z "$kde_datadir"; then
446 kde_datadir='\${prefix}/share/apps'
448 if test -z "$kde_locale"; then
449 kde_locale='\${prefix}/share/locale'
451 if test -z "$kde_cgidir"; then
452 kde_cgidir='\${exec_prefix}/cgi-bin'
454 if test -z "$kde_confdir"; then
455 kde_confdir='\${prefix}/share/config'
457 if test -z "$kde_mimedir"; then
458 kde_mimedir='\${prefix}/share/mimelnk'
460 if test -z "$kde_toolbardir"; then
461 kde_toolbardir='\${prefix}/share/toolbar'
463 if test -z "$kde_wallpaperdir"; then
464 kde_wallpaperdir='\${prefix}/share/wallpapers'
466 if test -z "$kde_templatesdir"; then
467 kde_templatesdir='\${prefix}/share/templates'
469 if test -z "$kde_bindir"; then
470 kde_bindir='\${exec_prefix}/bin'
472 if test -z "$kde_servicesdir"; then
473 kde_servicesdir='\${prefix}/share/services'
475 if test -z "$kde_servicetypesdir"; then
476 kde_servicetypesdir='\${prefix}/share/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'
492 KDE_SET_PATHS(defaults)
496 if test $kde_qtver = 1; then
497 AC_MSG_RESULT([compiling])
500 AC_MSG_ERROR([path checking not yet supported for KDE 2])
506 AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
507 [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
508 test -z "$kde_icondir" || test -z "$kde_sounddir" ||
509 test -z "$kde_datadir" || test -z "$kde_locale" ||
510 test -z "$kde_cgidir" || test -z "$kde_confdir" ||
511 test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
512 test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
513 test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
514 test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
515 test -z "$kde_styledir" || test -z "kde_widgetdir"
516 test "x$kde_have_all_paths" != "xyes"; then
517 kde_have_all_paths=no
521 AC_DEFUN(KDE_MISSING_PROG_ERROR,
523 AC_MSG_ERROR([The important program $1 was not found!
524 Please check whether you installed KDE correctly.
528 AC_DEFUN(KDE_MISSING_ARTS_ERROR,
530 AC_MSG_ERROR([The important program $1 was not found!
531 Please check whether you installed aRts correctly.
535 AC_DEFUN(KDE_SUBST_PROGRAMS,
538 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"
539 test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
540 if test -n "$KDEDIRS"; then
543 for dir in $KDEDIRS; do
544 kde_default_bindirs="$dir/bin $kde_default_bindirs "
548 kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
549 KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
550 KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
551 KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
552 KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
553 KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
554 KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
556 if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
557 kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
558 test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
559 AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
560 if test "$KDE_XSL_STYLESHEET" = "NO"; then
561 KDE_XSL_STYLESHEET=""
563 KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
567 DCOP_DEPENDENCIES='$(DCOPIDL)'
569 AC_SUBST(DCOPIDL2CPP)
570 AC_SUBST(DCOP_DEPENDENCIES)
572 AC_SUBST(ARTSCCONFIG)
575 AC_SUBST(KDE_XSL_STYLESHEET)
577 if test -x "$KDECONFIG"; then # it can be "compiled"
578 kde_libs_prefix=`$KDECONFIG --prefix`
579 if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
580 AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
581 This means it has been moved since you installed it.
582 This won't work. Please recompile kdelibs for the new prefix.
585 kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
587 kde_libs_prefix='$(prefix)'
588 kde_libs_htmldir='$(kde_htmldir)'
590 AC_SUBST(kde_libs_prefix)
591 AC_SUBST(kde_libs_htmldir)
594 AC_DEFUN(AC_CREATE_KFSSTND,
596 AC_REQUIRE([AC_CHECK_RPATH])
598 AC_MSG_CHECKING([for KDE paths])
601 AC_CACHE_VAL(kde_cv_all_paths,
603 KDE_SET_DEFAULT_PATHS($1)
606 eval "$kde_cv_all_paths"
607 KDE_CHECK_PATHS_FOR_COMPLETENESS
608 if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
609 # wrong values were cached, may be, we can set better ones
611 kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
612 kde_datadir= kde_locale= kde_cgidir= kde_confdir=
613 kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
614 kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
618 KDE_SET_DEFAULT_PATHS($1)
619 eval "$kde_cv_all_paths"
620 KDE_CHECK_PATHS_FOR_COMPLETENESS
621 kde_result="$kde_result (cache overridden)"
623 if test "$kde_have_all_paths" = "no"; then
624 AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
625 Since it had compiled and linked before, it must be a strange problem on your system.
626 Look at config.log for details. If you are not able to fix this, look at
627 http://www.kde.org/faq/installation.html or any www.kde.org mirror.
628 (If you're using an egcs version on Linux, you may update binutils!)
632 AC_MSG_RESULT($kde_result)
641 AC_DEFUN(AC_SUBST_KFSSTND,
643 AC_SUBST(kde_htmldir)
644 AC_SUBST(kde_appsdir)
645 AC_SUBST(kde_icondir)
646 AC_SUBST(kde_sounddir)
647 AC_SUBST(kde_datadir)
649 AC_SUBST(kde_confdir)
650 AC_SUBST(kde_mimedir)
651 AC_SUBST(kde_wallpaperdir)
654 AC_SUBST(kde_templatesdir)
655 AC_SUBST(kde_servicesdir)
656 AC_SUBST(kde_servicetypesdir)
657 AC_SUBST(kde_moduledir)
658 AC_SUBST(kde_styledir)
659 AC_SUBST(kde_widgetdir)
660 if test "$kde_qtver" = 1; then
661 kde_minidir="$kde_icondir/mini"
663 # for KDE 1 - this breaks KDE2 apps using minidir, but
664 # that's the plan ;-/
665 kde_minidir="/dev/null"
667 dnl AC_SUBST(kde_minidir)
668 dnl AC_SUBST(kde_cgidir)
669 dnl AC_SUBST(kde_toolbardir)
672 AC_DEFUN(KDE_MISC_TESTS,
675 dnl Checks for libraries.
676 AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
678 AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
681 AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
682 AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
683 AC_MSG_WARN([you have no crypt in either libcrypt or libc.
684 You should install libcrypt from another source or configure with PAM
689 if test $kde_have_crypt = yes; then
690 AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
694 AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
695 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
696 AC_CHECK_LIB(dnet_stub, dnet_ntoa,
697 [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
699 AC_CHECK_FUNC(inet_ntoa)
700 if test $ac_cv_func_inet_ntoa = no; then
701 AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
703 AC_CHECK_FUNC(connect)
704 if test $ac_cv_func_connect = no; then
705 AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
709 AC_CHECK_FUNC(remove)
710 if test $ac_cv_func_remove = no; then
711 AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
714 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
715 AC_CHECK_FUNC(shmat, ,
716 AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
718 # darwin needs this to initialize the environment
719 AC_CHECK_HEADERS(crt_externs.h)
720 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
722 # more headers that need to be explicitly included on darwin
723 AC_CHECK_HEADERS(sys/types.h stdint.h)
725 # darwin requires a poll emulation library
726 AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
728 # CoreAudio framework
729 AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
730 AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
731 FRAMEWORK_COREAUDIO="-framework CoreAudio"
736 AC_SUBST(FRAMEWORK_COREAUDIO)
737 LIBSOCKET="$X_EXTRA_LIBS"
739 AC_SUBST(X_EXTRA_LIBS)
740 AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
743 case $host in dnl this *is* LynxOS specific
745 AC_MSG_CHECKING([LynxOS header file wrappers])
746 [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
747 AC_MSG_RESULT(disabled)
748 AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
755 AH_VERBATIM(_AIX_STRINGS_H_BZERO,
758 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
759 * that defines bzero.
767 AC_CHECK_FUNCS([vsnprintf snprintf])
771 * On HP-UX, the declaration of vsnprintf() is needed every time !
774 #if !defined(HAVE_VSNPRINTF) || defined(hpux)
784 int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
788 int snprintf(char *str, size_t n, char const *fmt, ...);
794 dnl ------------------------------------------------------------------------
795 dnl Find the header files and libraries for X-Windows. Extended the
797 dnl ------------------------------------------------------------------------
801 AC_REQUIRE([KDE_MISC_TESTS])dnl
802 AC_REQUIRE([KDE_CHECK_LIB64])
806 [ --enable-embedded link to Qt-embedded, don't use X],
807 kde_use_qt_emb=$enableval,
813 [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
814 kde_use_qt_emb_palm=$enableval,
815 kde_use_qt_emb_palm=no
818 if test "$kde_use_qt_emb" = "no"; then
820 AC_MSG_CHECKING(for X)
823 AC_CACHE_VAL(kde_cv_have_x,
824 [# One or both of the vars are not set, and there is no cached value.
825 if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
828 kde_x_includes=$x_includes
830 if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
833 kde_x_libraries=$x_libraries
836 # below we use the standard autoconf calls
837 ac_x_libraries=$kde_x_libraries
838 ac_x_includes=$kde_x_includes
841 dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
842 dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
843 dnl location. The correct location is /usr/lib32 or an undefined value
844 dnl (the linker is smart enough to pick the correct default library).
845 dnl Things work just fine if you use just AC_PATH_X_DIRECT.
846 dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
847 dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
848 dnl x_includes should be left alone.
856 if test -z "$ac_x_includes"; then
859 if test -z "$ac_x_libraries"; then
860 ac_x_libraries="/usr/lib${kdelibsuff}"
863 #from now on we use our own again
865 # when the user already gave --x-includes, we ignore
866 # what the standard autoconf macros told us.
867 if test "$kde_x_includes" = NO; then
868 kde_x_includes=$ac_x_includes
871 # for --x-libraries too
872 if test "$kde_x_libraries" = NO; then
873 kde_x_libraries=$ac_x_libraries
876 if test "$kde_x_includes" = NO; then
877 AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
880 if test "$kde_x_libraries" = NO; then
881 AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
884 # Record where we found X for the cache.
885 kde_cv_have_x="have_x=yes \
886 kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
889 eval "$kde_cv_have_x"
891 if test "$have_x" != yes; then
892 AC_MSG_RESULT($have_x)
895 AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
898 if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
900 x_includes="."; dnl better than nothing :-
902 x_includes=$kde_x_includes
903 X_INCLUDES="-I$x_includes"
906 if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
908 x_libraries="/usr/lib"; dnl better than nothing :-
910 x_libraries=$kde_x_libraries
911 X_LDFLAGS="-L$x_libraries"
913 all_includes="$X_INCLUDES"
914 all_libraries="$X_LDFLAGS"
918 AC_SUBST(x_libraries)
921 # Check for libraries that X11R6 Xt/Xaw programs need.
922 ac_save_LDFLAGS="$LDFLAGS"
923 LDFLAGS="$LDFLAGS $X_LDFLAGS"
924 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
925 # check for ICE first), but we must link in the order -lSM -lICE or
926 # we get undefined symbols. So assume we have SM if we have ICE.
927 # These have to be linked with before -lX11, unlike the other
928 # libraries we check for below, so use a different variable.
929 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
930 AC_CHECK_LIB(ICE, IceConnectionNumber,
931 [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
933 LDFLAGS="$ac_save_LDFLAGS"
937 LIB_X11='-lX11 $(LIBSOCKET)'
940 AC_MSG_CHECKING(for libXext)
941 AC_CACHE_VAL(kde_cv_have_libXext,
943 kde_ldflags_safe="$LDFLAGS"
944 kde_libs_safe="$LIBS"
946 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
947 LIBS="-lXext -lX11 $LIBSOCKET"
956 printf("hello Xext\n");
958 kde_cv_have_libXext=yes,
959 kde_cv_have_libXext=no
962 LDFLAGS=$kde_ldflags_safe
966 AC_MSG_RESULT($kde_cv_have_libXext)
968 if test "$kde_cv_have_libXext" = "no"; then
969 AC_MSG_ERROR([We need a working libXext to proceed. Since configure
970 can't find it itself, we stop here assuming that make wouldn't find
974 AC_MSG_CHECKING(for Xinerama)
976 AC_ARG_WITH(xinerama,
977 [ --with-xinerama enable support for Xinerama ],
985 kde_save_LDFLAGS="$LDFLAGS"
986 kde_save_CFLAGS="$CFLAGS"
987 kde_save_LIBS="$LIBS"
988 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
989 CFLAGS="$CFLAGS -I$x_includes"
990 LIBS="-lXinerama -lXext"
992 if test "x$no_xinerama" = "xno"; then
994 AC_CACHE_VAL(ac_cv_have_xinerama,
996 AC_TRY_LINK([#include <X11/Xlib.h>
997 #include <X11/extensions/Xinerama.h>],
998 [XineramaIsActive(NULL);],
999 [ac_cv_have_xinerama="yes"],
1000 [ac_cv_have_xinerama="no"])
1003 ac_cv_have_xinerama=no;
1006 AC_MSG_RESULT($ac_cv_have_xinerama)
1010 if test "$ac_cv_have_xinerama" = "yes"; then
1011 AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
1012 LIBXINERAMA="-lXinerama"
1015 AC_SUBST(LIBXINERAMA)
1017 LDFLAGS="$kde_save_LDFLAGS"
1018 CFLAGS="$kde_save_CFLAGS"
1019 LIBS="$kde_save_LIBS"
1025 dnl We're using QT Embedded
1027 CXXFLAGS="$CXXFLAGS -fno-rtti"
1028 QTE_NORTTI="-fno-rtti -DQWS"
1037 AC_SUBST(X_PRE_LIBS)
1040 AC_SUBST(X_INCLUDES)
1042 AC_SUBST(x_includes)
1043 AC_SUBST(x_libraries)
1045 AC_SUBST(QTE_NORTTI)
1053 AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1055 AC_REQUIRE([KDE_USE_QT])
1056 cat > conftest.$ac_ext <<EOF
1057 #include "confdefs.h"
1058 #include <qglobal.h>
1059 #include <qapplication.h>
1061 if test "$kde_qtver" = "2"; then
1062 cat >> conftest.$ac_ext <<EOF
1064 #include <qstring.h>
1068 if test $kde_qtsubver -gt 0; then
1069 cat >> conftest.$ac_ext <<EOF
1070 #if QT_VERSION < 210
1077 if test "$kde_qtver" = "3"; then
1078 cat >> conftest.$ac_ext <<EOF
1079 #include <qcursor.h>
1080 #include <qstylefactory.h>
1081 #include <private/qucomextra_p.h>
1085 echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1086 cat >> conftest.$ac_ext <<EOF
1092 if test "$kde_qtver" = "2"; then
1093 cat >> conftest.$ac_ext <<EOF
1094 QStringList *t = new QStringList();
1097 if test $kde_qtsubver -gt 0; then
1098 cat >> conftest.$ac_ext <<EOF
1100 s.setLatin1("Elvis is alive", 14);
1104 if test "$kde_qtver" = "3"; then
1105 cat >> conftest.$ac_ext <<EOF
1106 (void)QStyleFactory::create(QString::null);
1107 QCursor c(Qt::WhatsThisCursor);
1110 cat >> conftest.$ac_ext <<EOF
1116 AC_DEFUN(KDE_USE_QT,
1118 if test -z "$1"; then
1119 # Current default Qt version: 3.1
1123 kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1124 # following is the check if subversion isnt found in passed argument
1125 if test "$kde_qtsubver" = "$1"; then
1128 kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1129 if test "$kde_qtver" = "1"; then
1134 if test -z "$2"; then
1135 if test "$kde_qtver" = "2"; then
1136 if test $kde_qtsubver -gt 0; then
1137 kde_qt_minversion=">= Qt 2.2.2"
1139 kde_qt_minversion=">= Qt 2.0.2"
1142 if test "$kde_qtver" = "3"; then
1143 if test $kde_qtsubver -gt 0; then
1144 kde_qt_minversion=">= Qt 3.1 (20021021)"
1146 kde_qt_minversion=">= Qt 3.0"
1149 if test "$kde_qtver" = "1"; then
1150 kde_qt_minversion=">= 1.42 and < 2.0"
1153 kde_qt_minversion=$2
1156 if test -z "$3"; then
1157 if test $kde_qtver = 3; then
1158 if test $kde_qtsubver -gt 0; then
1159 kde_qt_verstring="QT_VERSION >= 0x030100"
1161 kde_qt_verstring="QT_VERSION >= 300"
1164 if test $kde_qtver = 2; then
1165 if test $kde_qtsubver -gt 0; then
1166 kde_qt_verstring="QT_VERSION >= 222"
1168 kde_qt_verstring="QT_VERSION >= 200"
1171 if test $kde_qtver = 1; then
1172 kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1178 if test $kde_qtver = 3; then
1179 kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
1181 if test $kde_qtver = 2; then
1182 kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1184 if test $kde_qtver = 1; then
1185 kde_qt_dirs="$QTDIR /usr/lib/qt"
1189 AC_DEFUN(KDE_CHECK_QT_DIRECT,
1191 AC_REQUIRE([KDE_USE_QT])
1192 AC_MSG_CHECKING([if Qt compiles without flags])
1193 AC_CACHE_VAL(kde_cv_qt_direct,
1197 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1198 ac_LIBRARY_PATH="$LIBRARY_PATH"
1199 ac_cxxflags_safe="$CXXFLAGS"
1200 ac_ldflags_safe="$LDFLAGS"
1201 ac_libs_safe="$LIBS"
1203 CXXFLAGS="$CXXFLAGS -I$qt_includes"
1204 LDFLAGS="$LDFLAGS $X_LDFLAGS"
1205 if test "x$kde_use_qt_emb" != "xyes"; then
1206 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1208 LIBS="$LIBQT $LIBSOCKET"
1211 export LD_LIBRARY_PATH
1215 KDE_PRINT_QT_PROGRAM
1217 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1218 kde_cv_qt_direct="yes"
1220 kde_cv_qt_direct="no"
1221 echo "configure: failed program was:" >&AC_FD_CC
1222 cat conftest.$ac_ext >&AC_FD_CC
1226 CXXFLAGS="$ac_cxxflags_safe"
1227 LDFLAGS="$ac_ldflags_safe"
1228 LIBS="$ac_libs_safe"
1230 LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1231 export LD_LIBRARY_PATH
1232 LIBRARY_PATH="$ac_LIBRARY_PATH"
1237 if test "$kde_cv_qt_direct" = "yes"; then
1246 dnl ------------------------------------------------------------------------
1247 dnl Try to find the Qt headers and libraries.
1248 dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1249 dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1250 dnl ------------------------------------------------------------------------
1252 AC_DEFUN(AC_PATH_QT_1_3,
1254 AC_REQUIRE([K_PATH_X])
1255 AC_REQUIRE([KDE_USE_QT])
1256 AC_REQUIRE([KDE_CHECK_LIB64])
1258 dnl ------------------------------------------------------------------------
1259 dnl Add configure flag to enable linking to MT version of Qt library.
1260 dnl ------------------------------------------------------------------------
1264 [ --disable-mt link to non-threaded Qt (deprecated)],
1265 kde_use_qt_mt=$enableval,
1267 if test $kde_qtver = 3; then
1277 dnl ------------------------------------------------------------------------
1278 dnl If we not get --disable-qt-mt then adjust some vars for the host.
1279 dnl ------------------------------------------------------------------------
1283 if test "x$kde_use_qt_mt" = "xyes"; then
1285 if test "x$kde_use_threading" = "xyes"; then
1286 CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1287 KDE_MT_LDFLAGS="$USE_THREADS"
1288 KDE_MT_LIBS="$LIBPTHREAD"
1293 AC_SUBST(KDE_MT_LDFLAGS)
1294 AC_SUBST(KDE_MT_LIBS)
1296 kde_qt_was_given=yes
1298 dnl ------------------------------------------------------------------------
1299 dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1300 dnl ------------------------------------------------------------------------
1301 if test -z "$LIBQT_GLOB"; then
1302 if test "x$kde_use_qt_emb" = "xyes"; then
1303 LIBQT_GLOB="libqte.*"
1305 LIBQT_GLOB="libqt.*"
1309 if test -z "$LIBQT"; then
1310 dnl ------------------------------------------------------------
1311 dnl If we got --enable-embedded then adjust the Qt library name.
1312 dnl ------------------------------------------------------------
1313 if test "x$kde_use_qt_emb" = "xyes"; then
1319 kde_int_qt="-l$qtlib"
1325 if test -z "$LIBQPE"; then
1326 dnl ------------------------------------------------------------
1327 dnl If we got --enable-palmtop then add -lqpe to the link line
1328 dnl ------------------------------------------------------------
1329 if test "x$kde_use_qt_emb" = "xyes"; then
1330 if test "x$kde_use_qt_emb_palm" = "xyes"; then
1340 dnl ------------------------------------------------------------------------
1341 dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1342 dnl ------------------------------------------------------------------------
1344 if test "x$kde_use_qt_mt" = "xyes"; then
1345 if test -z "$LIBQT"; then
1347 kde_int_qt="-l$qtlib-mt"
1350 kde_int_qt="$qtlib-mt"
1352 LIBQT_GLOB="lib$qtlib-mt.*"
1353 USING_QT_MT="using -mt"
1358 if test $kde_qtver != 1; then
1360 AC_REQUIRE([AC_FIND_PNG])
1361 AC_REQUIRE([AC_FIND_JPEG])
1362 LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1365 if test $kde_qtver = 3; then
1366 AC_REQUIRE([KDE_CHECK_LIBDL])
1367 LIBQT="$LIBQT $LIBDL"
1370 AC_MSG_CHECKING([for Qt])
1372 if test "x$kde_use_qt_emb" != "xyes"; then
1373 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1375 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1379 [ --with-qt-dir=DIR where the root of Qt is installed ],
1380 [ ac_qt_includes="$withval"/include
1381 ac_qt_libraries="$withval"/lib${kdelibsuff}
1382 ac_qt_bindir="$withval"/bin
1385 AC_ARG_WITH(qt-includes,
1386 [ --with-qt-includes=DIR where the Qt includes are. ],
1388 ac_qt_includes="$withval"
1391 kde_qt_libs_given=no
1393 AC_ARG_WITH(qt-libraries,
1394 [ --with-qt-libraries=DIR where the Qt library is installed.],
1395 [ ac_qt_libraries="$withval"
1396 kde_qt_libs_given=yes
1399 AC_CACHE_VAL(ac_cv_have_qt,
1400 [#try to guess Qt locations
1403 for dir in $kde_qt_dirs; do
1404 qt_incdirs="$qt_incdirs $dir/include $dir"
1406 qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
1407 if test ! "$ac_qt_includes" = "NO"; then
1408 qt_incdirs="$ac_qt_includes $qt_incdirs"
1411 if test "$kde_qtver" != "1"; then
1412 kde_qt_header=qstyle.h
1414 kde_qt_header=qglobal.h
1417 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1418 ac_qt_includes="$qt_incdir"
1421 for dir in $kde_qt_dirs; do
1422 qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1424 qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1425 if test ! "$ac_qt_libraries" = "NO"; then
1426 qt_libdir=$ac_qt_libraries
1428 qt_libdirs="$ac_qt_libraries $qt_libdirs"
1429 # if the Qt was given, the chance is too big that libqt.* doesn't exist
1431 for dir in $qt_libdirs; do
1432 try="ls -1 $dir/${LIBQT_GLOB}"
1433 if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1437 ac_qt_libraries="$qt_libdir"
1442 ac_cxxflags_safe="$CXXFLAGS"
1443 ac_ldflags_safe="$LDFLAGS"
1444 ac_libs_safe="$LIBS"
1446 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1447 LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1448 LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1450 KDE_PRINT_QT_PROGRAM
1452 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1455 echo "configure: failed program was:" >&AC_FD_CC
1456 cat conftest.$ac_ext >&AC_FD_CC
1457 ac_qt_libraries="NO"
1460 CXXFLAGS="$ac_cxxflags_safe"
1461 LDFLAGS="$ac_ldflags_safe"
1462 LIBS="$ac_libs_safe"
1465 if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1466 ac_cv_have_qt="have_qt=no"
1469 if test "$ac_qt_includes" = NO; then
1470 if test "$ac_qt_libraries" = NO; then
1471 ac_qt_notfound="(headers and libraries)";
1473 ac_qt_notfound="(headers)";
1476 if test "x$kde_use_qt_mt" = "xyes"; then
1478 Make sure that you have compiled Qt with thread support!"
1479 ac_qt_notfound="(library $qtlib-mt)";
1481 ac_qt_notfound="(library $qtlib)";
1485 AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1486 For more details about this problem, look at the end of config.log.$missing_qt_mt])
1492 eval "$ac_cv_have_qt"
1494 if test "$have_qt" != yes; then
1495 AC_MSG_RESULT([$have_qt]);
1497 ac_cv_have_qt="have_qt=yes \
1498 ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1499 AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1501 qt_libraries="$ac_qt_libraries"
1502 qt_includes="$ac_qt_includes"
1505 if test ! "$kde_qt_libs_given" = "yes"; then
1506 KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1509 AC_SUBST(qt_libraries)
1510 AC_SUBST(qt_includes)
1512 if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1515 QT_INCLUDES="-I$qt_includes"
1516 all_includes="$QT_INCLUDES $all_includes"
1519 if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1522 QT_LDFLAGS="-L$qt_libraries"
1523 all_libraries="$all_libraries $QT_LDFLAGS"
1525 test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1527 AC_SUBST(QT_INCLUDES)
1528 AC_SUBST(QT_LDFLAGS)
1533 if test "x$kde_use_qt_emb" != "xyes"; then
1534 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1536 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
1538 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1546 AC_DEFUN(AC_PATH_QT,
1551 AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
1553 AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1555 if test x$ac_uic_supports_libpath = xyes; then
1557 AC_MSG_CHECKING([if UIC has KDE plugins available])
1558 AC_CACHE_VAL(kde_cv_uic_plugins,
1560 cat > actest.ui << EOF
1561 <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1562 <class>NewConnectionDialog</class>
1563 <widget class="QDialog">
1564 <widget class="KLineEdit">
1565 <property name="name">
1566 <cstring>testInput</cstring>
1575 kde_cv_uic_plugins=no
1576 kde_line="$UIC_PATH -L $kde_widgetdir"
1577 if test x$ac_uic_supports_nounload = xyes; then
1578 kde_line="$kde_line -nounload"
1580 kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1581 if AC_TRY_EVAL(kde_line); then
1582 if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1583 kde_cv_uic_plugins=yes
1586 rm -f actest.ui actest.cpp
1589 if test "$kde_cv_uic_plugins" = yes; then
1590 AC_MSG_RESULT([yes])
1592 AC_MSG_ERROR([not found - you need to install kdelibs first.])
1597 AC_DEFUN(KDE_CHECK_FINAL,
1599 AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1600 kde_use_final=$enableval, kde_use_final=no)
1603 if test "x$kde_use_final" = "xyes"; then
1604 KDE_USE_FINAL_TRUE=""
1605 KDE_USE_FINAL_FALSE="#"
1607 KDE_USE_FINAL_TRUE="#"
1608 KDE_USE_FINAL_FALSE=""
1610 AC_SUBST(KDE_USE_FINAL_TRUE)
1611 AC_SUBST(KDE_USE_FINAL_FALSE)
1613 AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1614 kde_use_closure=$enableval, kde_use_closure=yes)
1616 if test "x$kde_use_closure" = "xyes"; then
1617 KDE_USE_CLOSURE_TRUE=""
1618 KDE_USE_CLOSURE_FALSE="#"
1619 # CXXFLAGS="$CXXFLAGS $REPO"
1621 KDE_USE_CLOSURE_TRUE="#"
1622 KDE_USE_CLOSURE_FALSE=""
1624 AC_SUBST(KDE_USE_CLOSURE_TRUE)
1625 AC_SUBST(KDE_USE_CLOSURE_FALSE)
1628 dnl ------------------------------------------------------------------------
1629 dnl Now, the same with KDE
1630 dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1631 dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1632 dnl ------------------------------------------------------------------------
1634 AC_DEFUN(AC_BASE_PATH_KDE,
1637 AC_REQUIRE([AC_PATH_QT])dnl
1638 AC_REQUIRE([KDE_CHECK_LIB64])
1641 AC_MSG_CHECKING([for KDE])
1643 if test "${prefix}" != NONE; then
1644 kde_includes=${prefix}/include
1645 ac_kde_includes=$prefix/include
1647 if test "${exec_prefix}" != NONE; then
1648 kde_libraries=${libdir}
1649 ac_kde_libraries=$libdir
1650 if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
1651 ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
1654 kde_libraries=${prefix}/lib${kdelibsuff}
1655 ac_kde_libraries=$prefix/lib${kdelibsuff}
1664 AC_CACHE_VAL(ac_cv_have_kde,
1665 [#try to guess kde locations
1667 if test "$kde_qtver" = 1; then
1668 kde_check_header="ksock.h"
1669 kde_check_lib="libkdecore.la"
1671 kde_check_header="ksharedptr.h"
1672 kde_check_lib="libkio.la"
1675 if test -z "$1"; then
1677 kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1678 test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1679 kde_incdirs="$ac_kde_includes $kde_incdirs"
1680 AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1681 ac_kde_includes="$kde_incdir"
1683 if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1685 in the prefix, you've chosen, are no KDE headers installed. This will fail.
1686 So, check this please and use another prefix!])
1689 kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1690 test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1691 kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1692 AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1693 ac_kde_libraries="$kde_libdir"
1696 dnl this might be somewhere else
1697 AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1699 if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1701 in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1702 So, check this please and use another prefix!])
1705 if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1707 I can't find the designer plugins. These are required and should have been installed
1711 if test -n "$kde_widgetdir"; then
1712 kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1716 if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1717 ac_cv_have_kde="have_kde=no"
1719 ac_cv_have_kde="have_kde=yes \
1720 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1725 ac_cv_have_kde="have_kde=no"
1730 eval "$ac_cv_have_kde"
1732 if test "$have_kde" != "yes"; then
1733 if test "${prefix}" = NONE; then
1734 ac_kde_prefix="$ac_default_prefix"
1736 ac_kde_prefix="$prefix"
1738 if test "$exec_prefix" = NONE; then
1739 ac_kde_exec_prefix="$ac_kde_prefix"
1740 AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1742 ac_kde_exec_prefix="$exec_prefix"
1743 AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1746 kde_libraries="${libdir}"
1747 kde_includes=${ac_kde_prefix}/include
1750 ac_cv_have_kde="have_kde=yes \
1751 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1752 AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1754 kde_libraries="$ac_kde_libraries"
1755 kde_includes="$ac_kde_includes"
1757 AC_SUBST(kde_libraries)
1758 AC_SUBST(kde_includes)
1760 if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1763 KDE_INCLUDES="-I$kde_includes"
1764 all_includes="$KDE_INCLUDES $all_includes"
1767 KDE_LDFLAGS="-L$kde_libraries"
1768 if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1769 all_libraries="$all_libraries $KDE_LDFLAGS"
1772 AC_SUBST(KDE_LDFLAGS)
1773 AC_SUBST(KDE_INCLUDES)
1775 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1777 all_libraries="$all_libraries $USER_LDFLAGS"
1778 all_includes="$all_includes $USER_INCLUDES"
1779 AC_SUBST(all_includes)
1780 AC_SUBST(all_libraries)
1782 if test -z "$1"; then
1783 KDE_CHECK_UIC_PLUGINS
1786 ac_kde_libraries="$kde_libdir"
1793 AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1795 AC_MSG_CHECKING(for extra includes)
1796 AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1797 adds non standard include paths],
1798 kde_use_extra_includes="$withval",
1799 kde_use_extra_includes=NONE
1802 if test -n "$kde_use_extra_includes" && \
1803 test "$kde_use_extra_includes" != "NONE"; then
1807 for dir in $kde_use_extra_includes; do
1808 kde_extra_includes="$kde_extra_includes $dir"
1809 USER_INCLUDES="$USER_INCLUDES -I$dir"
1812 kde_use_extra_includes="added"
1814 kde_use_extra_includes="no"
1816 AC_SUBST(USER_INCLUDES)
1818 AC_MSG_RESULT($kde_use_extra_includes)
1821 AC_MSG_CHECKING(for extra libs)
1822 AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1823 kde_use_extra_libs=$withval,
1824 kde_use_extra_libs=NONE
1826 if test -n "$kde_use_extra_libs" && \
1827 test "$kde_use_extra_libs" != "NONE"; then
1831 for dir in $kde_use_extra_libs; do
1832 kde_extra_libs="$kde_extra_libs $dir"
1833 KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1834 USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1837 kde_use_extra_libs="added"
1839 kde_use_extra_libs="no"
1842 AC_SUBST(USER_LDFLAGS)
1844 AC_MSG_RESULT($kde_use_extra_libs)
1848 AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1850 AC_MSG_CHECKING([for KDE headers installed])
1853 cat > conftest.$ac_ext <<EOF
1855 # include <stdlib.h>
1858 #include "confdefs.h"
1862 printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1863 printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1864 printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1865 printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1866 printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1867 printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1868 printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1869 printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1870 printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1871 printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1872 printf("kde_wallpaperdir=\\"%s\\"\n",
1873 KApplication::kde_wallpaperdir().data());
1874 printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1875 printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1876 printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1877 printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1878 printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1879 printf("kde_styledir=\\"/tmp/dummy\\"\n");
1880 printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1885 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1886 if AC_TRY_EVAL(ac_compile); then
1889 AC_MSG_ERROR([your system is not able to compile a small KDE application!
1890 Check, if you installed the KDE header files correctly.
1891 For more details about this problem, look at the end of config.log.])
1897 AC_DEFUN(KDE_CHECK_KDEQTADDON,
1899 AC_MSG_CHECKING(for kde-qt-addon)
1900 AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1902 kde_ldflags_safe="$LDFLAGS"
1903 kde_libs_safe="$LIBS"
1904 kde_cxxflags_safe="$CXXFLAGS"
1906 LIBS="-lkde-qt-addon $LIBQT $LIBS"
1907 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1908 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1916 kde_cv_have_kdeqtaddon=yes,
1917 kde_cv_have_kdeqtaddon=no
1920 LDFLAGS=$kde_ldflags_safe
1922 CXXFLAGS=$kde_cxxflags_safe
1925 AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1927 if test "$kde_cv_have_kdeqtaddon" = "no"; then
1928 AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1929 It is a separate package (and CVS module) named kde-qt-addon.])
1933 AC_DEFUN(KDE_CHECK_KIMGIO,
1935 AC_REQUIRE([AC_BASE_PATH_KDE])
1936 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1937 AC_REQUIRE([AC_FIND_TIFF])
1938 AC_REQUIRE([AC_FIND_JPEG])
1939 AC_REQUIRE([AC_FIND_PNG])
1940 AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1942 if test "$1" = "existance"; then
1945 kde_save_LIBS="$LIBS"
1946 LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1947 AC_CHECK_LIB(kimgio, kimgioRegister, [
1948 LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1949 LIBS="$kde_save_LIBS"
1952 LIBKIMGIO_EXISTS=yes
1955 if test "$LIBKIMGIO_EXISTS" = "yes"; then
1956 LIB_KIMGIO='-lkimgio'
1960 AC_SUBST(LIB_KIMGIO)
1963 AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1965 AC_REQUIRE([KDE_MISC_TESTS])
1966 AC_REQUIRE([KDE_CHECK_LIBDL])
1967 AC_REQUIRE([K_PATH_X])
1969 if test $kde_qtver = 3; then
1970 AC_SUBST(LIB_KDECORE, "-lkdecore")
1971 AC_SUBST(LIB_KDEUI, "-lkdeui")
1972 AC_SUBST(LIB_KIO, "-lkio")
1973 AC_SUBST(LIB_SMB, "-lsmb")
1974 AC_SUBST(LIB_KAB, "-lkab")
1975 AC_SUBST(LIB_KABC, "-lkabc")
1976 AC_SUBST(LIB_KHTML, "-lkhtml")
1977 AC_SUBST(LIB_KSPELL, "-lkspell")
1978 AC_SUBST(LIB_KPARTS, "-lkparts")
1979 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1980 # these are for backward compatibility
1981 AC_SUBST(LIB_KSYCOCA, "-lkio")
1982 AC_SUBST(LIB_KFILE, "-lkio")
1983 elif test $kde_qtver = 2; then
1984 AC_SUBST(LIB_KDECORE, "-lkdecore")
1985 AC_SUBST(LIB_KDEUI, "-lkdeui")
1986 AC_SUBST(LIB_KIO, "-lkio")
1987 AC_SUBST(LIB_KSYCOCA, "-lksycoca")
1988 AC_SUBST(LIB_SMB, "-lsmb")
1989 AC_SUBST(LIB_KFILE, "-lkfile")
1990 AC_SUBST(LIB_KAB, "-lkab")
1991 AC_SUBST(LIB_KHTML, "-lkhtml")
1992 AC_SUBST(LIB_KSPELL, "-lkspell")
1993 AC_SUBST(LIB_KPARTS, "-lkparts")
1994 AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1996 AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
1997 AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
1998 AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
1999 AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2000 AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2004 AC_DEFUN(AC_PATH_KDE,
2007 AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
2009 if test "$enableval" = "no";
2010 then ac_use_path_checking="default"
2011 else ac_use_path_checking=""
2015 if test "$kde_qtver" = 1;
2016 then ac_use_path_checking=""
2017 else ac_use_path_checking="default"
2022 AC_CREATE_KFSSTND($ac_use_path_checking)
2025 KDE_CREATE_LIBS_ALIASES
2028 dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2029 AC_DEFUN(KDE_CHECK_FUNC_EXT,
2031 AC_MSG_CHECKING(for $1)
2032 AC_CACHE_VAL(kde_cv_func_$1,
2036 save_CXXFLAGS="$CXXFLAGS"
2037 kde_safe_LIBS="$LIBS"
2038 LIBS="$LIBS $X_EXTRA_LIBS"
2039 if test "$GXX" = "yes"; then
2040 CXXFLAGS="$CXXFLAGS -pedantic-errors"
2050 CXXFLAGS="$save_CXXFLAGS"
2055 AC_MSG_RESULT($kde_cv_func_$1)
2057 AC_MSG_CHECKING([if $1 needs custom prototype])
2058 AC_CACHE_VAL(kde_cv_proto_$1,
2060 if test "x$kde_cv_func_$1" = xyes; then
2064 setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2065 kde_cv_proto_$1="yes - in libkdefakes"
2068 kde_cv_proto_$1=unknown
2073 if test "x$kde_cv_proto_$1" = xunknown; then
2078 LIBS="$LIBS $X_EXTRA_LIBS"
2087 [ kde_cv_func_$1=yes
2088 kde_cv_proto_$1=yes ],
2089 [kde_cv_proto_$1="$1 unavailable"]
2095 AC_MSG_RESULT($kde_cv_proto_$1)
2097 if test "x$kde_cv_func_$1" = xyes; then
2098 AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2101 if test "x$kde_cv_proto_$1" = xno; then
2102 AC_DEFINE(HAVE_$5_PROTO, 1,
2103 [Define if you have the $1 prototype])
2106 AH_VERBATIM([_HAVE_$5_PROTO],
2108 #if !defined(HAVE_$5_PROTO)
2117 AC_DEFUN(AC_CHECK_SETENV,
2119 KDE_CHECK_FUNC_EXT(setenv, [
2122 [setenv("VAR", "VALUE", 1);],
2123 [int setenv (const char *, const char *, int)],
2127 AC_DEFUN(AC_CHECK_UNSETENV,
2129 KDE_CHECK_FUNC_EXT(unsetenv, [
2133 [void unsetenv (const char *)],
2137 AC_DEFUN(AC_CHECK_GETDOMAINNAME,
2139 KDE_CHECK_FUNC_EXT(getdomainname, [
2145 getdomainname(buffer, 200);
2147 [int getdomainname (char *, unsigned int)],
2151 AC_DEFUN(AC_CHECK_GETHOSTNAME,
2153 KDE_CHECK_FUNC_EXT(gethostname, [
2159 gethostname(buffer, 200);
2161 [int gethostname (char *, unsigned int)],
2165 AC_DEFUN(AC_CHECK_USLEEP,
2167 KDE_CHECK_FUNC_EXT(usleep, [
2173 [int usleep (unsigned int)],
2178 AC_DEFUN(AC_CHECK_RANDOM,
2180 KDE_CHECK_FUNC_EXT(random, [
2186 [long int random(void)],
2189 KDE_CHECK_FUNC_EXT(srandom, [
2195 [void srandom(unsigned int)],
2200 AC_DEFUN(AC_CHECK_INITGROUPS,
2202 KDE_CHECK_FUNC_EXT(initgroups, [
2203 #include <sys/types.h>
2209 initgroups(buffer, 27);
2211 [int initgroups(const char *, gid_t)],
2215 AC_DEFUN(AC_CHECK_MKSTEMP,
2217 KDE_CHECK_FUNC_EXT(mkstemp, [
2221 mkstemp("/tmp/aaaXXXXXX");
2223 [int mkstemp(char *)],
2227 AC_DEFUN(AC_CHECK_MKSTEMPS,
2229 KDE_CHECK_FUNC_EXT(mkstemps, [
2234 mkstemps("/tmp/aaaXXXXXX", 6);
2236 [int mkstemps(char *, int)],
2240 AC_DEFUN(AC_CHECK_RES_INIT,
2242 AC_MSG_CHECKING([if res_init needs -lresolv])
2243 kde_libs_safe="$LIBS"
2244 LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2247 #include <sys/types.h>
2248 #include <netinet/in.h>
2249 #include <arpa/nameser.h>
2256 LIBRESOLV="-lresolv"
2258 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2260 [ AC_MSG_RESULT(no) ]
2265 AC_MSG_CHECKING([if res_init is available])
2268 #include <sys/types.h>
2269 #include <netinet/in.h>
2270 #include <arpa/nameser.h>
2278 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2280 [ AC_MSG_RESULT(no) ]
2284 AC_DEFUN(AC_CHECK_STRLCPY,
2286 KDE_CHECK_FUNC_EXT(strlcpy, [
2290 strlcpy(buf, "KDE function test", sizeof(buf));
2292 [unsigned long strlcpy(char*, const char*, unsigned long)],
2296 AC_DEFUN(AC_CHECK_STRLCAT,
2298 KDE_CHECK_FUNC_EXT(strlcat, [
2303 strlcat(buf, "KDE function test", sizeof(buf));
2305 [unsigned long strlcat(char*, const char*, unsigned long)],
2309 AC_DEFUN(AC_FIND_GIF,
2310 [AC_MSG_CHECKING([for giflib])
2311 AC_CACHE_VAL(ac_cv_lib_gif,
2312 [ac_save_LIBS="$LIBS"
2313 if test "x$kde_use_qt_emb" != "xyes"; then
2314 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2316 LIBS="$all_libraries -lgif"
2323 int GifLastError(void);
2327 /* We use char because int might match the return type of a gcc2
2328 builtin and then its argument prototype would still apply. */
2330 [return GifLastError();],
2331 eval "ac_cv_lib_gif=yes",
2332 eval "ac_cv_lib_gif=no")
2333 LIBS="$ac_save_LIBS"
2335 if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2337 AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2339 AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2343 AC_DEFUN(KDE_FIND_JPEG_HELPER,
2345 AC_MSG_CHECKING([for libjpeg$2])
2346 AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2349 ac_save_LIBS="$LIBS"
2350 LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2351 ac_save_CFLAGS="$CFLAGS"
2352 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2354 [/* Override any gcc2 internal prototype to avoid an error. */
2355 struct jpeg_decompress_struct;
2356 typedef struct jpeg_decompress_struct * j_decompress_ptr;
2361 void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2362 int version, size_t structsize);
2366 /* We use char because int might match the return type of a gcc2
2367 builtin and then its argument prototype would still apply. */
2369 [jpeg_CreateDecompress(0L, 0, 0);],
2370 eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2371 eval "ac_cv_lib_jpeg_$1=no")
2372 LIBS="$ac_save_LIBS"
2373 CFLAGS="$ac_save_CFLAGS"
2376 if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2377 LIBJPEG="$ac_cv_lib_jpeg_$1"
2378 AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2386 AC_DEFUN(AC_FIND_JPEG,
2388 dnl first look for libraries
2389 KDE_FIND_JPEG_HELPER(6b, 6b,
2390 KDE_FIND_JPEG_HELPER(normal, [],
2397 dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2398 dnl requires system dependent includes loaded before it)
2399 jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2400 AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2401 test "x$jpeg_incdir" = xNO && jpeg_incdir=
2403 dnl if headers _and_ libraries are missing, this is no error, and we
2404 dnl continue with a warning (the user will get no jpeg support in khtml)
2405 dnl if only one is missing, it means a configuration error, but we still
2407 if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2408 AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2410 if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2412 There is an installation error in jpeg support. You seem to have only one
2413 of either the headers _or_ the libraries installed. You may need to either
2414 provide correct --with-extra-... options, or the development package of
2415 libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2416 Disabling JPEG support.
2419 AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2426 AH_VERBATIM(_AC_CHECK_JPEG,
2428 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2429 * headers and I'm too lazy to write a configure test as long as only
2430 * unixware is related
2433 #define HAVE_BOOLEAN
2438 AC_DEFUN(KDE_CHECK_QT_JPEG,
2440 AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2441 AC_CACHE_VAL(kde_cv_qt_jpeg,
2445 ac_save_LIBS="$LIBS"
2446 LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2447 LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2448 ac_save_CXXFLAGS="$CXXFLAGS"
2449 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2451 [#include <qapplication.h>],
2455 QApplication app(argc, argv);],
2456 eval "kde_cv_qt_jpeg=no",
2457 eval "kde_cv_qt_jpeg=yes")
2458 LIBS="$ac_save_LIBS"
2459 CXXFLAGS="$ac_save_CXXFLAGS"
2463 if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2465 LIBJPEG_QT='$(LIBJPEG)'
2473 AC_DEFUN(AC_FIND_ZLIB,
2475 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2476 AC_MSG_CHECKING([for libz])
2477 AC_CACHE_VAL(ac_cv_lib_z,
2480 kde_save_LIBS="$LIBS"
2481 LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2482 kde_save_CFLAGS="$CFLAGS"
2483 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2488 [return (zlibVersion() == ZLIB_VERSION); ],
2489 eval "ac_cv_lib_z='-lz'",
2490 eval "ac_cv_lib_z=no")
2491 LIBS="$kde_save_LIBS"
2492 CFLAGS="$kde_save_CFLAGS"
2494 if test ! "$ac_cv_lib_z" = no; then
2495 AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2498 AC_MSG_RESULT($ac_cv_lib_z)
2500 AC_MSG_ERROR(not found. Check your installation and look into config.log)
2506 AC_DEFUN(KDE_TRY_TIFFLIB,
2508 AC_MSG_CHECKING([for libtiff $1])
2510 AC_CACHE_VAL(kde_cv_libtiff_$1,
2514 kde_save_LIBS="$LIBS"
2515 if test "x$kde_use_qt_emb" != "xyes"; then
2516 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2518 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2520 kde_save_CXXFLAGS="$CXXFLAGS"
2521 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2527 [return (TIFFOpen( "", "r") == 0); ],
2529 kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2531 kde_cv_libtiff_$1=no
2534 LIBS="$kde_save_LIBS"
2535 CXXFLAGS="$kde_save_CXXFLAGS"
2539 if test "$kde_cv_libtiff_$1" = "no"; then
2544 LIBTIFF="$kde_cv_libtiff_$1"
2546 AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2552 AC_DEFUN(AC_FIND_TIFF,
2554 AC_REQUIRE([K_PATH_X])
2555 AC_REQUIRE([AC_FIND_ZLIB])
2556 AC_REQUIRE([AC_FIND_JPEG])
2557 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2559 KDE_TRY_TIFFLIB(tiff, [],
2560 KDE_TRY_TIFFLIB(tiff34))
2566 AC_DEFUN(AC_FIND_PNG,
2568 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2569 AC_REQUIRE([AC_FIND_ZLIB])
2570 AC_MSG_CHECKING([for libpng])
2571 AC_CACHE_VAL(ac_cv_lib_png,
2573 kde_save_LIBS="$LIBS"
2574 if test "x$kde_use_qt_emb" != "xyes"; then
2575 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2577 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2579 kde_save_CFLAGS="$CFLAGS"
2580 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2587 png_structp png_ptr = png_create_read_struct( /* image ptr */
2588 PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2589 return( png_ptr != 0 );
2591 eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2592 eval "ac_cv_lib_png=no"
2594 LIBS="$kde_save_LIBS"
2595 CFLAGS="$kde_save_CFLAGS"
2597 if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2598 AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2599 LIBPNG="$ac_cv_lib_png"
2601 AC_MSG_RESULT($ac_cv_lib_png)
2609 AC_DEFUN(AC_CHECK_BOOL,
2611 AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2614 AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2616 AC_MSG_CHECKING(if you need GNU extensions)
2617 AC_CACHE_VAL(ac_cv_gnu_extensions,
2619 cat > conftest.c << EOF
2620 #include <features.h>
2622 #ifdef __GNU_LIBRARY__
2627 if (eval "$ac_cpp conftest.c") 2>&5 |
2628 egrep "yes" >/dev/null 2>&1; then
2630 ac_cv_gnu_extensions=yes
2632 ac_cv_gnu_extensions=no
2636 AC_MSG_RESULT($ac_cv_gnu_extensions)
2637 if test "$ac_cv_gnu_extensions" = "yes"; then
2638 AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2642 AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2644 AC_MSG_CHECKING(whether $CXX supports -$1)
2645 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2646 AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2650 save_CXXFLAGS="$CXXFLAGS"
2651 CXXFLAGS="$CXXFLAGS -$1"
2652 AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2653 CXXFLAGS="$save_CXXFLAGS"
2656 if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2667 dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2668 dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2669 dnl it's all white-space separated
2670 AC_DEFUN(AC_REMOVE_FORBIDDEN,
2673 if test -n "$__val"; then
2679 *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2680 *) # Careful to not add spaces, where there were none, because otherwise
2681 # libtool gets confused, if we change e.g. CXX
2682 if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2690 dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2691 AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2693 if test "x$kde_use_qt_emb" != "xyes"; then
2694 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2695 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2697 AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2698 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2702 AC_DEFUN(AC_CHECK_COMPILERS,
2704 AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2708 kde_use_debug_code="yes"
2709 kde_use_debug_define=no
2712 kde_use_debug_code="full"
2713 kde_use_debug_define=no
2716 kde_use_debug_code="no"
2717 kde_use_debug_define=yes
2721 [kde_use_debug_code="no"
2722 kde_use_debug_define=no
2725 dnl Just for configure --help
2726 AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2728 AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2730 if test $enableval = "no"; then
2731 kde_use_strict_options="no"
2733 kde_use_strict_options="yes"
2735 ], [kde_use_strict_options="no"])
2737 AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2739 if test $enableval = "no"; then
2740 kde_use_warnings="no"
2742 kde_use_warnings="yes"
2744 ], [kde_use_warnings="yes"])
2746 dnl enable warnings for debug build
2747 if test "$kde_use_debug_code" != "no"; then
2748 kde_use_warnings=yes
2751 AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2752 [kde_use_profiling=$enableval],
2753 [kde_use_profiling="no"]
2756 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2763 if test "$GCC" = "yes"; then
2764 if test "$kde_use_debug_code" != "no"; then
2765 if test $kde_use_debug_code = "full"; then
2766 CFLAGS="-g3 $CFLAGS"
2768 CFLAGS="-g -O2 $CFLAGS"
2771 CFLAGS="-O2 $CFLAGS"
2775 if test "$kde_use_debug_define" = "yes"; then
2776 CFLAGS="-DNDEBUG $CFLAGS"
2781 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2782 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2785 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2789 CXXFLAGS=" $CXXFLAGS"
2793 if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2794 if test "$kde_use_debug_code" != "no"; then
2795 if test "$CXX" = "KCC"; then
2796 CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2798 if test "$kde_use_debug_code" = "full"; then
2799 CXXFLAGS="-g3 $CXXFLAGS"
2801 CXXFLAGS="-g -O2 $CXXFLAGS"
2804 KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2806 dnl convenience compiler flags
2807 KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2808 AC_SUBST(WOVERLOADED_VIRTUAL)
2810 if test "$CXX" = "KCC"; then
2811 CXXFLAGS="+K3 $CXXFLAGS"
2813 CXXFLAGS="-O2 $CXXFLAGS"
2818 if test "$kde_use_debug_define" = "yes"; then
2819 CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2822 if test "$kde_use_profiling" = "yes"; then
2823 KDE_CHECK_COMPILER_FLAG(pg,
2825 CFLAGS="-pg $CFLAGS"
2826 CXXFLAGS="-pg $CXXFLAGS"
2830 if test "$kde_use_warnings" = "yes"; then
2831 if test "$GCC" = "yes"; then
2834 CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2835 CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
2838 CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2839 KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2840 KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2841 KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2845 if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
2846 CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2849 if test "$GXX" = "yes"; then
2850 KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2851 KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2852 KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2854 if test "$CXX" = "KCC"; then
2855 dnl unfortunately we currently cannot disable exception support in KCC
2856 dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2857 dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2858 dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2860 AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2862 kde_use_pch=$enableval
2865 if test "$kde_use_pch" = "yes"; then
2866 dnl TODO: support --pch-dir!
2867 KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2868 dnl the below works (but the dir must exist), but it's
2869 dnl useless for a whole package.
2870 dnl The are precompiled headers for each source file, so when compiling
2871 dnl from scratch, it doesn't make a difference, and they take up
2872 dnl around ~5Mb _per_ sourcefile.
2873 dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2874 dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2876 dnl this flag controls inlining. by default KCC inlines in optimisation mode
2877 dnl all implementations that are defined inside the class {} declaration.
2878 dnl because of templates-compatibility with broken gcc compilers, this
2879 dnl can cause excessive inlining. This flag limits it to a sane level
2880 KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2881 KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2882 KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2883 KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2884 dnl Some source files are shared between multiple executables
2885 dnl (or libraries) and some of those need template instantiations.
2886 dnl In that case KCC needs to compile those sources with
2887 dnl --one_instantiation_per_object. To make it easy for us we compile
2888 dnl _all_ objects with that flag (--one_per is a shorthand).
2889 KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2891 AC_SUBST(USE_EXCEPTIONS)
2892 dnl obsolete macro - provided to keep things going
2897 *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2898 *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2899 *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2901 if test "$GXX" = yes; then
2902 libstdcpp=`$CXX -print-file-name=libstdc++.so`
2903 if test ! -f $libstdcpp; then
2904 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])
2910 AC_VALIDIFY_CXXFLAGS
2914 if test "$GCC" = yes; then
2919 AC_SUBST(NOOPT_CXXFLAGS)
2920 AC_SUBST(NOOPT_CFLAGS)
2924 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2927 AC_DEFUN(KDE_ADD_DEPENDENCIES,
2929 [A]M_DEPENDENCIES(CC)
2930 [A]M_DEPENDENCIES(CXX)
2933 dnl just a wrapper to clean up configure.in
2934 AC_DEFUN(KDE_PROG_LIBTOOL,
2936 AC_REQUIRE([AC_CHECK_COMPILERS])
2937 AC_REQUIRE([AC_ENABLE_SHARED])
2938 AC_REQUIRE([AC_ENABLE_STATIC])
2940 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
2941 AC_REQUIRE([KDE_CHECK_LIB64])
2952 LIBTOOL_SHELL="/bin/sh ./libtool"
2953 # LIBTOOL="$LIBTOOL --silent"
2954 KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2955 AC_SUBST(KDE_PLUGIN)
2957 AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
2958 kde_use_objprelink=$enableval, kde_use_objprelink=no)
2959 if test "x$kde_use_objprelink" = "xyes"; then
2961 ------------------------------------------------------------
2962 Configuration option --enable-objprelink is no longer useful.
2963 See http:://objprelink.sourceforge.net for details:
2964 1- Recent binutils are fast enough to do without objprelink.
2965 2- Newer versions of objprelink do not need this option.
2966 ------------------------------------------------------------
2971 AC_DEFUN(KDE_CHECK_LIB64,
2974 AC_ARG_ENABLE(libsuffix,
2975 AC_HELP_STRING([--enable-libsuffix],
2976 [/lib directory suffix (64,32,none)]),
2977 kdelibsuff=$enableval)
2978 if test "$kdelibsuff" = "none"; then
2979 if test -d /lib64 ; then
2985 if test -z "$kdelibsuff"; then
2986 AC_MSG_RESULT([not using lib directory suffix])
2987 AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
2989 if test "$libdir" = '${exec_prefix}/lib'; then
2990 libdir="$libdir${kdelibsuff}"
2991 AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
2993 AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
2994 AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
2998 AC_DEFUN(KDE_CHECK_TYPES,
2999 [ AC_CHECK_SIZEOF(int, 4)dnl
3000 AC_CHECK_SIZEOF(long, 4)dnl
3001 AC_CHECK_SIZEOF(char *, 4)dnl
3002 AC_CHECK_SIZEOF(char, 1)dnl
3005 AC_DEFUN(KDE_DO_IT_ALL,
3009 AM_INIT_AUTOMAKE($1, $2)
3010 AM_DISABLE_LIBRARIES
3011 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3018 AC_DEFUN(AC_CHECK_RPATH,
3020 AC_MSG_CHECKING(for rpath)
3021 AC_ARG_ENABLE(rpath,
3022 [ --disable-rpath do not use the rpath feature of ld],
3023 USE_RPATH=$enableval, USE_RPATH=yes)
3025 if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3027 KDE_RPATH="-R \$(kde_libraries)"
3029 if test -n "$qt_libraries"; then
3030 KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3032 dnl $x_libraries is set to /usr/lib in case
3033 if test -n "$X_LDFLAGS"; then
3034 KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
3036 if test -n "$KDE_EXTRA_RPATH"; then
3037 KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3040 AC_SUBST(KDE_EXTRA_RPATH)
3042 AC_MSG_RESULT($USE_RPATH)
3045 dnl Check for the type of the third argument of getsockname
3046 AC_DEFUN(AC_CHECK_SOCKLEN_T, [
3047 AC_MSG_CHECKING(for socklen_t)
3048 AC_CACHE_VAL(ac_cv_socklen_t, [
3052 #include <sys/types.h>
3053 #include <sys/socket.h>
3056 getsockname(0,(struct sockaddr*)0, &a);
3058 ac_cv_socklen_t=socklen_t,
3060 #include <sys/types.h>
3061 #include <sys/socket.h>
3064 getsockname(0,(struct sockaddr*)0, &a);
3066 ac_cv_socklen_t=int,
3067 ac_cv_socklen_t=size_t
3073 AC_MSG_RESULT($ac_cv_socklen_t)
3074 if test "$ac_cv_socklen_t" != "socklen_t"; then
3075 AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3076 [Define the real type of socklen_t])
3078 AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3082 dnl This is a merge of some macros out of the gettext aclocal.m4
3083 dnl since we don't need anything, I took the things we need
3084 dnl the copyright for them is:
3086 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3087 dnl This Makefile.in is free software; the Free Software Foundation
3088 dnl gives unlimited permission to copy and/or distribute it,
3089 dnl with or without modifications, as long as this notice is preserved.
3091 dnl This program is distributed in the hope that it will be useful,
3092 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3093 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3094 dnl PARTICULAR PURPOSE.
3096 dnl for this file it is relicensed under LGPL
3098 AC_DEFUN(AM_KDE_WITH_NLS,
3100 dnl If we use NLS figure out what method
3102 AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3103 [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3104 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3106 if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3107 AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3114 AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3115 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3117 dnl Test whether we really found GNU xgettext.
3118 if test "$XGETTEXT" != ":"; then
3119 dnl If it is no GNU xgettext we define it as : so that the
3120 dnl Makefiles still can work.
3121 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3125 [found xgettext programs is not GNU xgettext; ignore it])
3133 # Search path for a program which passes the given test.
3134 # Ulrich Drepper <drepper@cygnus.com>, 1996.
3137 # Stephan Kulow: I appended a _KDE against name conflicts
3139 dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3140 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3141 AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
3142 [# Extract the first word of "$2", so it can be a program name with args.
3143 set dummy $2; ac_word=[$]2
3144 AC_MSG_CHECKING([for $ac_word])
3145 AC_CACHE_VAL(ac_cv_path_$1,
3148 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3151 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3152 for ac_dir in ifelse([$5], , $PATH, [$5]); do
3153 test -z "$ac_dir" && ac_dir=.
3154 if test -f $ac_dir/$ac_word; then
3156 ac_cv_path_$1="$ac_dir/$ac_word"
3162 dnl If no 4th arg is given, leave the cache variable unset,
3163 dnl so AC_PATH_PROGS will keep looking.
3164 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3169 if test -n "[$]$1"; then
3170 AC_MSG_RESULT([$]$1)
3178 # Check whether LC_MESSAGES is available in <locale.h>.
3179 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3183 AC_DEFUN(AM_LC_MESSAGES,
3184 [if test $ac_cv_header_locale_h = yes; then
3185 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3186 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3187 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3188 if test $am_cv_val_LC_MESSAGES = yes; then
3189 AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3193 dnl From Jim Meyering.
3194 dnl FIXME: migrate into libit.
3196 AC_DEFUN([AM_FUNC_OBSTACK],
3197 [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3198 [AC_TRY_LINK([#include "obstack.h"],
3199 [struct obstack *mem;obstack_free(mem,(char *) 0)],
3200 am_cv_func_obstack=yes,
3201 am_cv_func_obstack=no)])
3202 if test $am_cv_func_obstack = yes; then
3203 AC_DEFINE(HAVE_OBSTACK)
3205 LIBOBJS="$LIBOBJS obstack.o"
3209 dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3210 dnl FIXME: Migrate into libit
3212 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3213 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3214 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3215 am_cv_lib_error_at_line=yes,
3216 am_cv_lib_error_at_line=no)])
3217 if test $am_cv_lib_error_at_line = no; then
3218 LIBOBJS="$LIBOBJS error.o"
3220 AC_SUBST(LIBOBJS)dnl
3223 # Macro to add for using GNU gettext.
3224 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3227 # Stephan Kulow: I put a KDE in it to avoid name conflicts
3229 AC_DEFUN(AM_KDE_GNU_GETTEXT,
3230 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3231 AC_REQUIRE([AC_PROG_RANLIB])dnl
3232 AC_REQUIRE([AC_HEADER_STDC])dnl
3233 AC_REQUIRE([AC_TYPE_OFF_T])dnl
3234 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3235 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3236 AC_REQUIRE([AC_FUNC_MMAP])dnl
3237 AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3238 AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3239 AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3240 __argz_count __argz_stringify __argz_next])
3242 AC_MSG_CHECKING(for stpcpy)
3243 AC_CACHE_VAL(kde_cv_func_stpcpy,
3245 kde_safe_cxxflags=$CXXFLAGS
3246 CXXFLAGS="-Wmissing-prototypes -Werror"
3254 stpcpy(buffer, buffer);
3256 kde_cv_func_stpcpy=yes,
3257 kde_cv_func_stpcpy=no)
3259 CXXFLAGS=$kde_safe_cxxflags
3261 AC_MSG_RESULT($kde_cv_func_stpcpy)
3262 if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3263 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3268 if test "x$CATOBJEXT" != "x"; then
3269 if test "x$ALL_LINGUAS" = "x"; then
3272 AC_MSG_CHECKING(for catalogs to be installed)
3274 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3275 case "$ALL_LINGUAS" in
3276 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3279 LINGUAS=$NEW_LINGUAS
3280 AC_MSG_RESULT($LINGUAS)
3283 dnl Construct list of names of catalog files to be constructed.
3284 if test -n "$LINGUAS"; then
3285 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3291 AC_DEFUN(AC_HAVE_XPM,
3292 [AC_REQUIRE_CPP()dnl
3293 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3295 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3296 test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3298 AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3299 xpm_test=$withval, xpm_test="yes")
3300 if test "x$xpm_test" = xno; then
3303 AC_MSG_CHECKING(for XPM)
3304 AC_CACHE_VAL(ac_cv_have_xpm,
3307 ac_save_ldflags="$LDFLAGS"
3308 ac_save_cflags="$CFLAGS"
3309 if test "x$kde_use_qt_emb" != "xyes"; then
3310 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3312 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3314 CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3315 test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3316 AC_TRY_LINK([#include <X11/xpm.h>],[],
3317 ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3318 LDFLAGS="$ac_save_ldflags"
3319 CFLAGS="$ac_save_cflags"
3322 if test "$ac_cv_have_xpm" = no; then
3328 AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3329 if test "$XPM_LDFLAGS" = ""; then
3330 XPMLIB='-lXpm $(LIB_X11)'
3332 XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3334 if test "$XPM_INCLUDE" = ""; then
3337 XPMINC="-I$XPM_INCLUDE"
3347 AC_DEFUN(AC_HAVE_DPMS,
3348 [AC_REQUIRE_CPP()dnl
3349 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3351 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3352 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3355 AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3356 dpms_test=$withval, dpms_test="yes")
3357 if test "x$dpms_test" = xno; then
3360 AC_MSG_CHECKING(for DPMS)
3361 dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3362 dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3363 AC_CACHE_VAL(ac_cv_have_dpms,
3365 if test "x$kde_use_qt_emb" = "xyes"; then
3367 ac_cv_have_dpms="no"
3370 ac_save_ldflags="$LDFLAGS"
3371 ac_save_cflags="$CFLAGS"
3372 ac_save_libs="$LIBS"
3373 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3374 CFLAGS="$CFLAGS $X_INCLUDES"
3375 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3377 #include <X11/Xproto.h>
3379 #include <X11/Xlib.h>
3380 #include <X11/extensions/dpms.h>
3382 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3383 ac_cv_have_dpms="yes", [
3384 LDFLAGS="$ac_save_ldflags"
3385 CFLAGS="$ac_save_cflags"
3386 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3387 LIBS="$LIBS -lXdpms"
3388 CFLAGS="$CFLAGS $X_INCLUDES"
3389 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3391 #include <X11/Xproto.h>
3393 #include <X11/Xlib.h>
3394 #include <X11/extensions/dpms.h>
3396 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3398 ac_cv_have_dpms="-lXdpms"
3399 ],ac_cv_have_dpms="no")
3401 LDFLAGS="$ac_save_ldflags"
3402 CFLAGS="$ac_save_cflags"
3403 LIBS="$ac_save_libs"
3407 if test "$ac_cv_have_dpms" = no; then
3413 AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3414 if test "$ac_cv_have_dpms" = "-lXdpms"; then
3417 if test "$DPMS_LDFLAGS" = ""; then
3418 DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3420 DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3422 if test "$DPMS_INCLUDE" = ""; then
3425 DPMSINC="-I$DPMS_INCLUDE"
3435 AC_DEFUN(AC_HAVE_GL,
3436 [AC_REQUIRE_CPP()dnl
3437 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3439 test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3440 test -z "$GL_INCLUDE" && GL_INCLUDE=
3442 AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3443 gl_test=$withval, gl_test="yes")
3444 if test "x$kde_use_qt_emb" = "xyes"; then
3445 # GL and Qt Embedded is a no-go for now.
3447 elif test "x$gl_test" = xno; then
3450 AC_MSG_CHECKING(for GL)
3451 AC_CACHE_VAL(ac_cv_have_gl,
3455 ac_save_ldflags="$LDFLAGS"
3456 ac_save_cxxflags="$CXXFLAGS"
3457 LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3458 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3459 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3460 CXXFLAGS="$CFLAGS $X_INCLUDES"
3461 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3462 AC_TRY_LINK([#include <GL/gl.h>
3465 ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3466 if test "x$ac_cv_have_gl" = "xno"; then
3467 LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3468 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3469 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3470 CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3471 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3472 AC_TRY_LINK([#include <GL/gl.h>
3475 ac_cv_have_gl="yes", ac_cv_have_gl="no")
3478 LDFLAGS="$ac_save_ldflags"
3479 CXXFLAGS="$ac_save_cxxflags"
3482 if test "$ac_cv_have_gl" = "no"; then
3488 AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3489 if test "$GL_LDFLAGS" = ""; then
3490 if test "$ac_cv_have_gl" = "mesa"; then
3491 GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3493 GLLIB='-lGLU -lGL $(LIB_X11)'
3496 if test "$ac_cv_have_gl" = "mesa"; then
3497 GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3499 GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3502 if test "$GL_INCLUDE" = ""; then
3505 GLINC="-I$GL_INCLUDE"
3507 AC_MSG_RESULT($ac_cv_have_gl)
3516 dnl shadow password and PAM magic - maintained by ossi@kde.org
3519 AC_REQUIRE([KDE_CHECK_LIBDL])
3522 [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3523 [ if test "x$withval" = "xyes"; then
3526 elif test "x$withval" = "xno"; then
3530 pam_service=$withval
3532 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3534 AC_CACHE_VAL(ac_cv_path_pam,
3536 AC_CHECK_LIB(pam, pam_start,
3537 [ AC_CHECK_HEADER(security/pam_appl.h,
3541 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3544 eval "$ac_cv_path_pam"
3546 AC_MSG_CHECKING(for PAM)
3547 if test "x$use_pam" = xno; then
3552 AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3553 PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3555 dnl test whether struct pam_message is const (Linux) or not (Sun)
3556 AC_MSG_CHECKING(for const pam_message)
3557 AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
3558 [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
3559 [AC_MSG_RESULT([const: Linux-type PAM])],
3560 [AC_MSG_RESULT([nonconst: Sun-type PAM])
3561 AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3563 [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3569 dnl DEF_PAM_SERVICE(arg name, full name, define name)
3570 AC_DEFUN(DEF_PAM_SERVICE, [
3572 [ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3573 [ if test "x$use_pam" = xyes; then
3574 $3_PAM_SERVICE="$withval"
3576 AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3577 You may want to enforce it by using --with-pam.])
3580 [ if test "x$use_pam" = xyes; then
3581 $3_PAM_SERVICE="$pam_service"
3584 if test -n "$$3_PAM_SERVICE"; then
3585 AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3586 AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3588 AC_SUBST($3_PAM_SERVICE)
3591 AC_DEFUN(KDE_SHADOWPASSWD, [
3592 AC_REQUIRE([KDE_PAM])
3594 AC_CHECK_LIB(shadow, getspent,
3595 [ LIBSHADOW="-lshadow"
3599 AC_CHECK_LIB(gen, getspent,
3603 [ AC_CHECK_FUNC(getspent,
3604 [ ac_use_shadow=yes ],
3605 [ ac_use_shadow=no ])
3611 AC_MSG_CHECKING([for shadow passwords])
3614 [ --with-shadow If you want shadow password support ],
3615 [ if test "x$withval" != "xno"; then
3621 use_shadow="$ac_use_shadow"
3624 if test "x$use_shadow" = xyes; then
3626 AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3633 dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3634 dnl this still applies, if we could use it indirectly through pam.
3635 if test "x$use_shadow" = xyes ||
3636 ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3638 *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3639 SETUIDFLAGS="-m 4755 -o root";;
3641 SETUIDFLAGS="-m 4755";;
3644 AC_SUBST(SETUIDFLAGS)
3648 AC_DEFUN(KDE_PASSWDLIBS, [
3649 AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3650 AC_REQUIRE([KDE_PAM])
3651 AC_REQUIRE([KDE_SHADOWPASSWD])
3653 if test "x$use_pam" = "xyes"; then
3654 PASSWDLIBS="$PAMLIBS"
3656 PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3659 dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3660 dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3661 dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3662 dnl may need to read /etc/master.passwd).
3665 SETUIDFLAGS="-m 4755 -o root"
3671 AC_SUBST(PASSWDLIBS)
3674 AC_DEFUN(KDE_CHECK_LIBDL,
3676 AC_CHECK_LIB(dl, dlopen, [
3678 ac_cv_have_dlfcn=yes
3681 AC_CHECK_LIB(dld, shl_unload, [
3683 ac_cv_have_shload=yes
3689 AC_DEFUN(KDE_CHECK_DLOPEN,
3692 AC_CHECK_HEADERS(dlfcn.h dl.h)
3693 if test "$ac_cv_header_dlfcn_h" = "no"; then
3697 if test "$ac_cv_header_dl_h" = "no"; then
3698 ac_cv_have_shload=no
3701 dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3703 AC_ARG_ENABLE(dlopen,
3704 [ --disable-dlopen link statically [default=no]] ,
3705 enable_dlopen=$enableval,
3708 # override the user's opinion, if we know it better ;)
3709 if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3713 if test "$ac_cv_have_dlfcn" = "yes"; then
3714 AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3717 if test "$ac_cv_have_shload" = "yes"; then
3718 AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3721 if test "$enable_dlopen" = no ; then
3722 test -n "$1" && eval $1
3724 test -n "$2" && eval $2
3729 AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3731 KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3733 AC_MSG_CHECKING([dynamic loading])
3734 eval "`egrep '^build_libtool_libs=' libtool`"
3735 if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3737 AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3741 AC_MSG_RESULT($dynamic_loading)
3742 if test "$dynamic_loading" = "yes"; then
3749 AC_DEFUN(KDE_ADD_INCLUDES,
3751 if test -z "$1"; then
3752 test_include="Pix.h"
3757 AC_MSG_CHECKING([for libg++ ($test_include)])
3759 AC_CACHE_VAL(kde_cv_libgpp_includes,
3761 kde_cv_libgpp_includes=no
3767 /usr/unsupported/include \
3772 if test -r "$ac_dir/$test_include"; then
3773 kde_cv_libgpp_includes=$ac_dir
3779 AC_MSG_RESULT($kde_cv_libgpp_includes)
3780 if test "$kde_cv_libgpp_includes" != "no"; then
3781 all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3787 AC_DEFUN(KDE_CHECK_MICO,
3789 AC_REQUIRE([KDE_CHECK_LIBDL])
3790 AC_REQUIRE([KDE_MISC_TESTS])
3791 AC_MSG_CHECKING(for MICO)
3793 if test -z "$MICODIR"; then
3794 kde_micodir=/usr/local
3796 kde_micodir="$MICODIR"
3799 AC_ARG_WITH(micodir,
3800 [ --with-micodir=micodir where mico is installed ],
3801 kde_micodir=$withval,
3802 kde_micodir=$kde_micodir
3805 AC_CACHE_VAL(kde_cv_mico_incdir,
3807 mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3808 AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3811 kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3813 if test ! -r $kde_micodir/include/CORBA.h; then
3814 AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3817 AC_MSG_RESULT($kde_micodir)
3819 MICO_INCLUDES=-I$kde_micodir/include
3820 AC_SUBST(MICO_INCLUDES)
3821 MICO_LDFLAGS=-L$kde_micodir/lib
3822 AC_SUBST(MICO_LDFLAGS)
3823 micodir=$kde_micodir
3826 AC_MSG_CHECKING([for MICO version])
3827 AC_CACHE_VAL(kde_cv_mico_version,
3830 cat >conftest.$ac_ext <<EOF
3832 #include <mico/version.h>
3835 printf("MICO_VERSION=%s\n",MICO_VERSION);
3839 ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3840 if AC_TRY_EVAL(ac_compile); then
3841 if eval `./conftest 2>&5`; then
3842 kde_cv_mico_version=$MICO_VERSION
3844 AC_MSG_ERROR([your system is not able to execute a small application to
3845 find MICO version! Check $kde_micodir/include/mico/version.h])
3848 AC_MSG_ERROR([your system is not able to compile a small application to
3849 find MICO version! Check $kde_micodir/include/mico/version.h])
3853 dnl installed MICO version
3854 mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3855 mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3856 mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3858 if test "x$1" = "x"; then
3864 dnl required MICO version
3865 req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3866 req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3867 req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3869 if test "$mico_v_maj" -lt "$req_v_maj" || \
3870 ( test "$mico_v_maj" -eq "$req_v_maj" && \
3871 test "$mico_v_mid" -lt "$req_v_mid" ) || \
3872 ( test "$mico_v_mid" -eq "$req_v_mid" && \
3873 test "$mico_v_min" -lt "$req_v_min" )
3876 AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3877 at least is required. You should upgrade MICO.])
3879 AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3882 LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3884 if test -z "$IDL"; then
3885 IDL='$(kde_bindir)/cuteidl'
3888 IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3889 AC_SUBST(IDL_DEPENDENCIES)
3891 idldir="\$(includedir)/idl"
3896 AC_DEFUN(KDE_CHECK_MINI_STL,
3898 AC_REQUIRE([KDE_CHECK_MICO])
3900 AC_MSG_CHECKING(if we use mico's mini-STL)
3901 AC_CACHE_VAL(kde_cv_have_mini_stl,
3905 kde_save_cxxflags="$CXXFLAGS"
3906 CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3909 #include <mico/config.h>
3912 #ifdef HAVE_MINI_STL
3916 kde_cv_have_mini_stl=no,
3917 kde_cv_have_mini_stl=yes)
3918 CXXFLAGS="$kde_save_cxxflags"
3922 if test "x$kde_cv_have_mini_stl" = "xyes"; then
3934 AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3936 AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3937 AC_SUBST(LIBPTHREAD)
3940 AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3942 AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3943 kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3945 if test "$kde_use_kernthreads" = "yes"; then
3946 ac_save_CXXFLAGS="$CXXFLAGS"
3947 ac_save_CFLAGS="$CFLAGS"
3948 CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3949 CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3950 AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3951 CXXFLAGS="$ac_save_CXXFLAGS"
3952 CFLAGS="$ac_save_CFLAGS"
3953 if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3954 kde_use_kernthreads=no
3956 dnl Add proper -I and -l statements
3957 AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3958 if test "x$LIBPTHREAD" = "x"; then
3959 kde_use_kernthreads=no
3961 USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3966 if test -z "$LIBPTHREAD"; then
3967 KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
3971 AH_VERBATIM(__svr_define, [
3972 #if defined(__SVR4) && !defined(__svr4__)
3978 KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3979 CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3982 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3985 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3986 LIBPTHREAD="$LIBPTHREAD -lc_r"
3988 linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3989 if test "$CXX" = "KCC"; then
3990 CXXFLAGS="$CXXFLAGS --thread_safe"
3991 NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3997 AC_SUBST(USE_THREADS)
3998 AC_SUBST(LIBPTHREAD)
4001 AC_DEFUN(KDE_CHECK_THREADING,
4003 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4004 AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4005 dnl default is yes if libpthread is found and no if no libpthread is available
4006 if test -z "$LIBPTHREAD"; then
4007 if test -z "$USE_THREADS"; then
4008 kde_check_threading_default=no
4010 kde_check_threading_default=yes
4013 kde_check_threading_default=yes
4015 AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
4016 kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4017 if test "x$kde_use_threading" = "xyes"; then
4018 AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4022 AC_DEFUN(KDE_TRY_LINK_PYTHON,
4024 if test "$kde_python_link_found" = no; then
4026 if test "$1" = normal; then
4027 AC_MSG_CHECKING(if a Python application links)
4029 AC_MSG_CHECKING(if Python depends on $2)
4032 AC_CACHE_VAL(kde_cv_try_link_python_$1,
4036 kde_save_cflags="$CFLAGS"
4037 CFLAGS="$CFLAGS $PYTHONINC"
4038 kde_save_libs="$LIBS"
4039 LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4040 kde_save_ldflags="$LDFLAGS"
4041 LDFLAGS="$LDFLAGS $PYTHONLIB"
4047 PySys_SetArgv(1, 0);
4049 [kde_cv_try_link_python_$1=yes],
4050 [kde_cv_try_link_python_$1=no]
4052 CFLAGS="$kde_save_cflags"
4053 LIBS="$kde_save_libs"
4054 LDFLAGS="$kde_save_ldflags"
4057 if test "$kde_cv_try_link_python_$1" = "yes"; then
4059 kde_python_link_found=yes
4060 if test ! "$1" = normal; then
4061 LIBPYTHON="$LIBPYTHON $2"
4074 AC_DEFUN(KDE_CHECK_PYTHON_DIR,
4076 AC_MSG_CHECKING([for Python directory])
4078 AC_CACHE_VAL(kde_cv_pythondir,
4080 if test -z "$PYTHONDIR"; then
4081 kde_cv_pythondir=/usr/local
4083 kde_cv_pythondir="$PYTHONDIR"
4087 AC_ARG_WITH(pythondir,
4088 [ --with-pythondir=pythondir use python installed in pythondir ],
4090 ac_python_dir=$withval
4091 ], ac_python_dir=$kde_cv_pythondir
4094 AC_MSG_RESULT($ac_python_dir)
4097 AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
4099 AC_REQUIRE([KDE_CHECK_LIBDL])
4100 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4101 AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4103 if test -z "$1"; then
4109 AC_MSG_CHECKING([for Python$version])
4111 python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4112 AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4113 if test ! -r $python_incdir/Python.h; then
4114 AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4115 python_incdir=$python_incdir/python$version
4116 if test ! -r $python_incdir/Python.h; then
4121 PYTHONINC=-I$python_incdir
4123 python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4124 AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4125 if test ! -r $python_libdir/libpython$version.a; then
4126 AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4127 python_libdir=$python_libdir/python$version/config
4128 if test ! -r $python_libdir/libpython$version.a; then
4133 PYTHONLIB=-L$python_libdir
4134 kde_orig_LIBPYTHON=$LIBPYTHON
4135 if test -z "$LIBPYTHON"; then
4136 LIBPYTHON=-lpython$version
4139 python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4140 AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4141 python_moddir=$python_moddir/python$version
4142 if test ! -r $python_moddir/copy.py; then
4146 PYTHONMODDIR=$python_moddir
4148 AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4150 if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4151 LIBPYTHON=$kde_orig_LIBPYTHON
4152 test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4153 test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4156 dnl Note: this test is very weak
4157 kde_python_link_found=no
4158 KDE_TRY_LINK_PYTHON(normal)
4159 KDE_TRY_LINK_PYTHON(m, -lm)
4160 KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4161 KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4162 KDE_TRY_LINK_PYTHON(db2, -ldb2)
4163 KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4164 KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4165 KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4166 KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4167 KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4168 KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4169 KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4170 [AC_MSG_WARN([it seems, Python depends on another library.
4171 Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4172 and contact the authors to let them know about this problem])
4175 LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4179 AC_SUBST(PYTHONMODDIR)
4180 AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4186 AC_DEFUN(KDE_CHECK_PYTHON,
4188 KDE_CHECK_PYTHON_INTERN("2.2",
4189 [KDE_CHECK_PYTHON_INTERN("2.1",
4190 [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
4194 AC_DEFUN(KDE_CHECK_STL_SGI,
4196 AC_MSG_CHECKING([if STL implementation is SGI like])
4197 AC_CACHE_VAL(kde_cv_stl_type_sgi,
4201 using namespace std;
4203 string astring="Hallo Welt.";
4204 astring.erase(0, 6); // now astring is "Welt"
4206 ], kde_cv_stl_type_sgi=yes,
4207 kde_cv_stl_type_sgi=no)
4210 AC_MSG_RESULT($kde_cv_stl_type_sgi)
4212 if test "$kde_cv_stl_type_sgi" = "yes"; then
4213 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4217 AC_DEFUN(KDE_CHECK_STL_HP,
4219 AC_MSG_CHECKING([if STL implementation is HP like])
4220 AC_CACHE_VAL(kde_cv_stl_type_hp,
4224 using namespace std;
4226 string astring="Hello World";
4227 astring.remove(0, 6); // now astring is "World"
4229 ], kde_cv_stl_type_hp=yes,
4230 kde_cv_stl_type_hp=no)
4232 AC_MSG_RESULT($kde_cv_stl_type_hp)
4234 if test "$kde_cv_stl_type_hp" = "yes"; then
4235 AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
4239 AC_DEFUN(KDE_CHECK_STL,
4243 ac_save_CXXFLAGS="$CXXFLAGS"
4244 CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4247 if test "$kde_cv_stl_type_sgi" = "no"; then
4250 if test "$kde_cv_stl_type_hp" = "no"; then
4251 AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
4255 CXXFLAGS="$ac_save_CXXFLAGS"
4259 AC_DEFUN(AC_FIND_QIMGIO,
4260 [AC_REQUIRE([AC_FIND_JPEG])
4261 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4262 AC_MSG_CHECKING([for qimgio])
4263 AC_CACHE_VAL(ac_cv_lib_qimgio,
4267 ac_save_LIBS="$LIBS"
4268 ac_save_CXXFLAGS="$CXXFLAGS"
4269 LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4270 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4273 #include <qimageio.h>
4274 #include <qstring.h>
4276 QString t = "hallo";
4281 ac_cv_lib_qimgio=yes,
4282 ac_cv_lib_qimgio=no,
4283 ac_cv_lib_qimgio=no)
4284 LIBS="$ac_save_LIBS"
4285 CXXFLAGS="$ac_save_CXXFLAGS"
4288 if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4289 LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4291 AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4294 AC_MSG_RESULT(not found)
4298 AC_DEFUN(KDE_CHECK_ANSI,
4302 AC_DEFUN(KDE_CHECK_INSURE,
4304 AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4306 if test $enableval = "no"; dnl
4307 then ac_use_insure="no"
4308 else ac_use_insure="yes"
4310 ], [ac_use_insure="no"])
4312 AC_MSG_CHECKING(if we will use Insure++ to debug)
4313 AC_MSG_RESULT($ac_use_insure)
4314 if test "$ac_use_insure" = "yes"; dnl
4315 then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4319 AC_DEFUN(AM_DISABLE_LIBRARIES,
4321 AC_PROVIDE([AM_ENABLE_STATIC])
4322 AC_PROVIDE([AM_ENABLE_SHARED])
4328 AC_DEFUN(AC_CHECK_UTMP_FILE,
4330 AC_MSG_CHECKING([for utmp file])
4332 AC_CACHE_VAL(kde_cv_utmp_file,
4343 if test -r "$ac_file"; then
4344 kde_cv_utmp_file=$ac_file
4350 if test "$kde_cv_utmp_file" != "no"; then
4351 AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4353 AC_MSG_RESULT($kde_cv_utmp_file)
4356 AC_MSG_RESULT([non found])
4361 AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4364 DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4366 if test ! -s $srcdir/subdirs; then
4367 dnl Note: Makefile.common creates subdirs, so this is just a fallback
4369 files=`cd $srcdir && ls -1`
4370 dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4372 echo $i >> $srcdir/subdirs
4376 if test -s $srcdir/inst-apps; then
4377 ac_topsubdirs="`cat $srcdir/inst-apps`"
4379 ac_topsubdirs="`cat $srcdir/subdirs`"
4382 for i in $ac_topsubdirs; do
4383 AC_MSG_CHECKING([if $i should be compiled])
4384 if test -d $srcdir/$i; then
4386 for j in $DO_NOT_COMPILE; do
4387 if test $i = $j; then
4394 AC_MSG_RESULT($install_it)
4395 vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4396 if test $install_it = "yes"; then
4397 TOPSUBDIRS="$TOPSUBDIRS $i"
4398 eval "$vari""_SUBDIR_included=yes"
4400 eval "$vari""_SUBDIR_included=no"
4404 AC_SUBST(TOPSUBDIRS)
4407 AC_DEFUN(KDE_CHECK_NAMESPACES,
4409 AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4423 int Foo::Bar::i = 1;
4426 AC_DEFINE(HAVE_NAMESPACES)
4433 AC_DEFUN(KDE_CHECK_NEWLIBS,
4438 dnl ------------------------------------------------------------------------
4439 dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4440 dnl ------------------------------------------------------------------------
4442 AC_DEFUN(AC_CHECK_S_ISSOCK,
4444 AC_MSG_CHECKING(for S_ISSOCK)
4445 AC_CACHE_VAL(ac_cv_have_s_issock,
4451 #include <sys/stat.h>
4455 int b = S_ISSOCK( buff.st_mode );
4457 ac_cv_have_s_issock=yes,
4458 ac_cv_have_s_issock=no)
4461 AC_MSG_RESULT($ac_cv_have_s_issock)
4462 if test "$ac_cv_have_s_issock" = "yes"; then
4463 AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4466 AH_VERBATIM(_ISSOCK,
4468 #ifndef HAVE_S_ISSOCK
4469 #define HAVE_S_ISSOCK
4470 #define S_ISSOCK(mode) (1==0)
4476 dnl ------------------------------------------------------------------------
4477 dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4478 dnl ------------------------------------------------------------------------
4480 AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4482 AC_MSG_CHECKING(for MAXPATHLEN)
4483 AC_CACHE_VAL(ac_cv_maxpathlen,
4486 cat > conftest.$ac_ext <<EOF
4488 # include <stdlib.h>
4491 #include <sys/param.h>
4493 #define MAXPATHLEN 1024
4496 KDE_HELLO MAXPATHLEN
4500 ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4502 if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4503 ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4505 ac_cv_maxpathlen=1024
4511 AC_MSG_RESULT($ac_cv_maxpathlen)
4512 AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4515 dnl -------------------------------------------------------------------------
4516 dnl See if the compiler supports a template repository bero@redhat.de
4517 dnl -------------------------------------------------------------------------
4518 AC_DEFUN(KDE_COMPILER_REPO,
4523 KDE_CHECK_COMPILER_FLAG(frepo,
4529 if test -z "$REPO"; then
4530 KDE_CHECK_COMPILER_FLAG(instances=explicit,
4532 REPO="-instances=explicit"
4533 NOREPO="-instances=extern"
4537 if test -n "$REPO"; then
4538 AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
4539 [C++ compiler supports template repository])
4547 AC_DEFUN(KDE_CHECK_HEADER,
4550 kde_safe_cppflags=$CPPFLAGS
4551 CPPFLAGS="$CPPFLAGS $all_includes"
4553 AC_CHECK_HEADER($1, $2, $3)
4554 CPPFLAGS=$kde_safe_cppflags
4558 AC_DEFUN(KDE_CHECK_HEADERS,
4560 AH_CHECK_HEADERS([$1])
4562 kde_safe_cppflags=$CPPFLAGS
4563 CPPFLAGS="$CPPFLAGS $all_includes"
4565 AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4566 CPPFLAGS=$kde_safe_cppflags
4570 AC_DEFUN(KDE_FAST_CONFIGURE,
4572 dnl makes configure fast (needs perl)
4573 AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4574 with_fast_perl=$enableval, with_fast_perl=yes)
4577 AC_DEFUN(KDE_CONF_FILES,
4580 if test -f $srcdir/configure.files ; then
4581 val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4584 if test -n "$val" ; then
4586 CONF_FILES="$CONF_FILES $i"
4589 AC_SUBST(CONF_FILES)
4592 AC_DEFUN(KDE_SET_PREFIX,
4595 dnl make $KDEDIR the default for the installation
4596 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4598 if test "x$prefix" = "xNONE"; then
4599 prefix=$ac_default_prefix
4600 ac_configure_args="$ac_configure_args --prefix=$prefix"
4602 # And delete superflous '/' to make compares easier
4603 prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4604 exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4609 pushdef([AC_PROG_INSTALL],
4611 dnl our own version, testing for a -p flag
4612 popdef([AC_PROG_INSTALL])
4613 dnl as AC_PROG_INSTALL works as it works we first have
4614 dnl to save if the user didn't specify INSTALL, as the
4615 dnl autoconf one overwrites INSTALL and we have no chance to find
4617 test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4618 test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4619 test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4622 if test -z "$kde_save_INSTALL_given" ; then
4623 # OK, user hasn't given any INSTALL, autoconf found one for us
4624 # now we test, if it supports the -p flag
4625 AC_MSG_CHECKING(for -p flag to install)
4626 rm -f confinst.$$.* > /dev/null 2>&1
4627 echo "Testtest" > confinst.$$.orig
4629 if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4630 if test -f confinst.$$.new ; then
4631 # OK, -p seems to do no harm to install
4632 INSTALL="${INSTALL} -p"
4637 AC_MSG_RESULT($ac_res)
4639 dnl the following tries to resolve some signs and wonders coming up
4640 dnl with different autoconf/automake versions
4642 dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4643 dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4644 dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4645 dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4646 dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4647 dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4648 dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4649 dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4650 dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4651 dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4652 dnl automake (due to broken Makefile.am or whatever) to install programs,
4653 dnl and so does not see the -s flag in automake > 1.4
4654 dnl to clean up that mess we:
4655 dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4656 dnl which cleans KDE's program with automake > 1.4;
4657 dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4658 dnl with automake<=1.4
4659 dnl note that dues to this sometimes two '-s' flags are used (if KDE
4660 dnl properly uses install-@DIR@PROGRAMS, but I don't care
4662 dnl And to all this comes, that I even can't write in comments variable
4663 dnl names used by automake, because it is so stupid to think I wanted to
4664 dnl _use_ them, therefor I have written A_M_... instead of AM_
4665 dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4667 if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4668 INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4670 if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4671 INSTALL_SCRIPT='${INSTALL}'
4675 AC_DEFUN(KDE_LANG_CPLUSPLUS,
4677 ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4678 pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4681 pushdef([AC_LANG_CPLUSPLUS],
4682 [popdef([AC_LANG_CPLUSPLUS])
4686 AC_DEFUN(KDE_CHECK_LONG_LONG,
4688 AC_MSG_CHECKING(for long long)
4689 AC_CACHE_VAL(kde_cv_c_long_long,
4697 kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4700 AC_MSG_RESULT($kde_cv_c_long_long)
4701 if test "$kde_cv_c_long_long" = yes; then
4702 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4706 AC_DEFUN(KDE_CHECK_LIB,
4708 kde_save_LDFLAGS="$LDFLAGS"
4709 dnl AC_CHECK_LIB modifies LIBS, so save it here
4710 kde_save_LIBS="$LIBS"
4711 LDFLAGS="$LDFLAGS $all_libraries"
4713 aix*) LDFLAGS="-brtl $LDFLAGS"
4714 test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4717 AC_CHECK_LIB($1, $2, $3, $4, $5)
4718 LDFLAGS="$kde_save_LDFLAGS"
4719 LIBS="$kde_save_LIBS"
4722 AC_DEFUN(KDE_JAVA_PREFIX,
4725 base=`basename "$1"`
4726 list=`ls -1 $dir 2> /dev/null`
4727 for entry in $list; do
4728 if test -d $dir/$entry/bin; then
4731 javadirs="$javadirs $dir/$entry/bin"
4734 elif test -d $dir/$entry/jre/bin; then
4737 javadirs="$javadirs $dir/$entry/jre/bin"
4744 dnl KDE_CHEC_JAVA_DIR(onlyjre)
4745 AC_DEFUN(KDE_CHECK_JAVA_DIR,
4749 [ --with-java=javadir use java installed in javadir, --without-java disables ],
4750 [ ac_java_dir=$withval
4754 AC_MSG_CHECKING([for Java])
4756 dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4757 if test "x$ac_java_dir" = "xno"; then
4759 kde_java_includedir=no
4760 kde_java_libjvmdir=no
4761 kde_java_libhpidir=no
4763 if test "x$ac_java_dir" = "x"; then
4766 dnl No option set -> look in $PATH
4767 KDE_JAVA_PREFIX(/usr/j2se)
4768 KDE_JAVA_PREFIX(/usr/j*dk*)
4769 KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4770 KDE_JAVA_PREFIX(/opt/j*sdk*)
4771 KDE_JAVA_PREFIX(/usr/lib/java*)
4772 KDE_JAVA_PREFIX(/usr/java*)
4773 KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4774 KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4775 KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4776 KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4777 KDE_JAVA_PREFIX(/opt/java*)
4782 for dir in $PATH; do
4783 javadirs="$javadirs $dir"
4788 for dir in $javadirs; do
4789 if test ! -d $dir; then break; fi
4790 if test -x "$dir/java"; then
4791 libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4792 if test ! -f $libjvmdir/libjvm.so; then continue; fi
4793 jredirs="$jredirs $dir"
4800 for dir in $jredirs; do
4802 kde_java_bindir=$dir
4803 if test -x "$dir/javac"; then
4809 if test -n "$JAVAC"; then
4810 dnl this substitution might not work - well, we test for jni.h below
4811 kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4813 kde_java_includedir=no
4816 dnl config option set
4817 kde_java_bindir=$ac_java_dir/bin
4818 if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4819 kde_java_includedir=no
4821 kde_java_includedir=$ac_java_dir/include
4826 dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4827 if test "x$kde_java_bindir" != "xno"; then
4829 dnl Look for libjvm.so
4830 kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4831 dnl Look for libhpi.so and avoid green threads
4832 kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4834 dnl Now check everything's fine under there
4835 dnl the include dir is our flag for having the JDK
4836 if test -d "$kde_java_includedir"; then
4837 if test ! -x "$kde_java_bindir/javac"; then
4838 AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4840 if test ! -x "$kde_java_bindir/javah"; then
4841 AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4843 if test ! -x "$kde_java_bindir/jar"; then
4844 AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4846 if test ! -r "$kde_java_includedir/jni.h"; then
4847 AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4850 jni_includes="-I$kde_java_includedir"
4851 dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4852 dnl and under linux here..
4853 test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4854 test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4855 test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4862 if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4863 AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4866 if test ! -x "$kde_java_bindir/java"; then
4867 AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4870 if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4871 AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4874 if test -n "$jni_includes"; then
4875 dnl Check for JNI version
4878 ac_cxxflags_safe="$CXXFLAGS"
4879 CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4885 #ifndef JNI_VERSION_1_2
4888 ],[ kde_jni_works=yes ],
4889 [ kde_jni_works=no ])
4891 if test $kde_jni_works = no; then
4892 AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4893 You need to have Java Development Kit (JDK) version 1.2.
4895 Use --with-java to specify another location.
4896 Use --without-java to configure without java support.
4897 Or download a newer JDK and try again.
4898 See e.g. http://java.sun.com/products/jdk/1.2 ])
4901 CXXFLAGS="$ac_cxxflags_safe"
4904 dnl All tests ok, inform and subst the variables
4906 JAVAC=$kde_java_bindir/javac
4907 JAVAH=$kde_java_bindir/javah
4908 JAR=$kde_java_bindir/jar
4909 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4910 JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4911 AC_MSG_RESULT([java JDK in $kde_java_bindir])
4914 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4915 AC_MSG_RESULT([java JRE in $kde_java_bindir])
4918 AC_MSG_RESULT([none found])
4925 AC_SUBST(jni_includes)
4927 # for backward compat
4928 kde_cv_java_includedir=$kde_java_includedir
4929 kde_cv_java_bindir=$kde_java_bindir
4932 dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4933 dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4934 dnl big packages, m4_foreach is dog-slow. So use our own version of
4935 dnl it. (matz@kde.org)
4936 m4_define([mm_foreach],
4937 [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4938 m4_define([mm_car], [[$1]])
4939 m4_define([mm_car2], [[$@]])
4940 m4_define([_mm_foreach],
4941 [m4_if(m4_quote($2), [], [],
4942 [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
4943 mm_car2(m4_shift($2)),
4945 m4_define([AC_FOREACH],
4946 [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4948 AC_DEFUN(KDE_NEED_FLEX,
4951 LIBS="$LIBS $USER_LDFLAGS"
4954 if test -z "$LEXLIB"; then
4955 AC_MSG_ERROR([You need to have flex installed.])
4960 AC_DEFUN(AC_PATH_QTOPIA,
4962 dnl TODO: use AC_CACHE_VAL
4964 if test -z "$1"; then
4969 qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4970 qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4971 qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4974 qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4975 qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4977 AC_REQUIRE([AC_PATH_QT])
4979 AC_MSG_CHECKING([for Qtopia])
4982 AC_SUBST(LIB_QTOPIA)
4984 kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4988 AC_ARG_WITH(qtopia-dir,
4989 [ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
4990 [ ac_qtopia_incdir="$withval"/include] )
4993 for dir in $kde_qtopia_dirs; do
4994 qtopia_incdirs="$qtopia_incdirs $dir/include"
4997 if test ! "$ac_qtopia_incdir" = "NO"; then
4998 qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5002 AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5003 ac_qtopia_incdir="$qtopia_incdir"
5005 if test -z "$qtopia_incdir"; then
5006 AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5009 qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5010 qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5011 qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5013 qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5014 qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5015 if test "$qtopia_ver" -lt "$qtopia_minver"; then
5016 AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5023 ac_cxxflags_safe="$CXXFLAGS"
5024 ac_ldflags_safe="$LDFLAGS"
5025 ac_libs_safe="$LIBS"
5027 CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5028 LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5029 LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5031 cat > conftest.$ac_ext <<EOF
5032 #include "confdefs.h"
5033 #include <qpe/qpeapplication.h>
5034 #include <qpe/version.h>
5036 int main( int argc, char **argv )
5038 QPEApplication app( argc, argv );
5043 if AC_TRY_EVAL(ac_link) && test -s conftest; then
5047 AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5048 the end of config.log])
5051 CXXFLAGS="$ac_cxxflags_safe"
5052 LDFLAGS="$ac_ldflags_safe"
5053 LIBS="$ac_libs_safe"
5057 QTOPIA_INCLUDES="-I$qtopia_incdir"
5058 AC_SUBST(QTOPIA_INCLUDES)
5060 AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5064 AC_DEFUN(KDE_INIT_DOXYGEN,
5066 AC_MSG_CHECKING([for Qt docs])
5068 if test "${with_qt_dir+set}" = set; then
5069 kde_qtdir="$with_qt_dir"
5072 AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc], QTDOCDIR)
5073 AC_MSG_RESULT($QTDOCDIR)
5077 KDE_FIND_PATH(dot, DOT, [], [])
5078 if test -n "$DOT"; then
5083 AC_SUBST(KDE_HAVE_DOT)
5084 KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5087 DOXYGEN_PROJECT_NAME="$1"
5088 DOXYGEN_PROJECT_NUMBER="$2"
5089 AC_SUBST(DOXYGEN_PROJECT_NAME)
5090 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5093 if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5096 AC_SUBST(KDE_HAS_DOXYGEN)
5101 AC_DEFUN(AC_FIND_BZIP2,
5103 AC_MSG_CHECKING([for bzDecompress in libbz2])
5104 AC_CACHE_VAL(ac_cv_lib_bzip2,
5107 kde_save_LIBS="$LIBS"
5108 LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5109 kde_save_CFLAGS="$CFLAGS"
5110 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5116 [ bz_stream s; (void) bzDecompress(&s); ],
5117 eval "ac_cv_lib_bzip2='-lbz2'",
5118 eval "ac_cv_lib_bzip2=no")
5119 LIBS="$kde_save_LIBS"
5120 CFLAGS="$kde_save_CFLAGS"
5122 AC_MSG_RESULT($ac_cv_lib_bzip2)
5124 if test ! "$ac_cv_lib_bzip2" = no; then
5127 LIBBZ2="$ac_cv_lib_bzip2"
5133 KDE_CHECK_COMPILER_FLAG(shared, [
5134 cxx_shared_flag="-shared"
5137 AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5138 AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5141 kde_save_LIBS="$LIBS"
5142 LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET"
5143 kde_save_CFLAGS="$CFLAGS"
5144 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5151 [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5152 eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5153 eval "ac_cv_lib_bzip2_prefix=no")
5154 LIBS="$kde_save_LIBS"
5155 CFLAGS="$kde_save_CFLAGS"
5158 AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5162 if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5165 LIBBZ2="$ac_cv_lib_bzip2_prefix"
5168 AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5169 dnl else, we just ignore this
5173 AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5176 dnl ------------------------------------------------------------------------
5177 dnl Try to find the SSL headers and libraries.
5178 dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5179 dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5180 dnl ------------------------------------------------------------------------
5182 AC_DEFUN(KDE_CHECK_SSL,
5184 LIBSSL="-lssl -lcrypto"
5185 AC_REQUIRE([KDE_CHECK_LIB64])
5187 ac_ssl_includes=NO ac_ssl_libraries=NO
5190 AC_ARG_WITH(ssl-dir,
5191 [ --with-ssl-dir=DIR where the root of OpenSSL is installed],
5192 [ ac_ssl_includes="$withval"/include
5193 ac_ssl_libraries="$withval"/lib$kdelibsuff
5198 [ --without-ssl disable SSL checks],
5199 [want_ssl=$withval])
5201 if test $want_ssl = yes; then
5203 AC_MSG_CHECKING(for OpenSSL)
5205 AC_CACHE_VAL(ac_cv_have_ssl,
5206 [#try to guess OpenSSL locations
5208 ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5209 ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5210 AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5211 ac_ssl_includes="$ssl_incdir"
5213 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"
5214 if test ! "$ac_ssl_libraries" = "NO"; then
5215 ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5220 for dir in $ssl_libdirs; do
5221 try="ls -1 $dir/libssl*"
5222 if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5225 ac_ssl_libraries="$ssl_libdir"
5230 ac_cflags_safe="$CFLAGS"
5231 ac_ldflags_safe="$LDFLAGS"
5232 ac_libs_safe="$LIBS"
5234 CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
5235 LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5236 LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5238 AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5244 CFLAGS="$ac_cflags_safe"
5245 LDFLAGS="$ac_ldflags_safe"
5246 LIBS="$ac_libs_safe"
5250 if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5258 eval "$ac_cv_have_ssl"
5260 AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5262 AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5263 AC_MSG_RESULT($ac_ssl_rsaref)
5265 AC_MSG_CHECKING([for easter eggs])
5266 AC_MSG_RESULT([none found])
5272 if test "$have_ssl" = yes; then
5273 AC_MSG_CHECKING(for OpenSSL version)
5274 dnl Check for SSL version
5275 AC_CACHE_VAL(ac_cv_ssl_version,
5280 cat >conftest.$ac_ext <<EOF
5281 #include <openssl/opensslv.h>
5285 #ifndef OPENSSL_VERSION_NUMBER
5286 printf("ssl_version=\\"error\\"\n");
5288 if (OPENSSL_VERSION_NUMBER < 0x00906000)
5289 printf("ssl_version=\\"old\\"\n");
5291 printf("ssl_version=\\"ok\\"\n");
5297 ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
5298 if AC_TRY_EVAL(ac_compile); then
5300 if eval `./conftest 2>&5`; then
5301 if test $ssl_version = error; then
5302 AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5304 if test $ssl_version = old; then
5305 AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5309 ac_cv_ssl_version="ssl_version=$ssl_version"
5311 AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5312 Check config.log, and if you can't figure it out, send a mail to
5313 David Faure <faure@kde.org>, attaching your config.log])
5317 AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5318 Check config.log, and if you can't figure it out, send a mail to
5319 David Faure <faure@kde.org>, attaching your config.log])
5326 eval "$ac_cv_ssl_version"
5327 AC_MSG_RESULT($ssl_version)
5330 if test "$have_ssl" != yes; then
5333 AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5334 ac_cv_have_ssl="have_ssl=yes \
5335 ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5338 ssl_libraries="$ac_ssl_libraries"
5339 ssl_includes="$ac_ssl_includes"
5341 if test "$ac_ssl_rsaref" = yes; then
5342 LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5345 if test $ssl_version = "old"; then
5346 AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5350 if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
5353 SSL_INCLUDES="-I$ssl_includes"
5356 if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
5359 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5362 AC_SUBST(SSL_INCLUDES)
5363 AC_SUBST(SSL_LDFLAGS)
5367 AC_DEFUN(KDE_CHECK_STRLCPY,
5371 AC_CHECK_SIZEOF(size_t)
5372 AC_CHECK_SIZEOF(unsigned long)
5374 AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
5376 #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5379 ],[AC_MSG_RESULT([yes])],[
5382 Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
5383 does not apply. Please mail kde-devel@kde.org with a description of your system!
5388 AC_DEFUN(AC_CHECK_C_COMPILER,
5390 AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
5392 if test $enableval = "no"; dnl
5394 kde_use_debug_code="no"
5395 kde_use_debug_define=yes
5397 kde_use_debug_code="yes"
5398 kde_use_debug_define=no
5401 [kde_use_debug_code="no"
5402 kde_use_debug_define=no
5405 dnl Just for configure --help
5406 AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
5408 AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
5410 if test $enableval = "no"; then
5411 kde_use_strict_options="no"
5413 kde_use_strict_options="yes"
5415 ], [kde_use_strict_options="no"])
5417 AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
5418 [kde_use_profiling=$enableval],
5419 [kde_use_profiling="no"]
5422 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
5427 if test "$GCC" = "yes"; then
5428 if test "$kde_use_debug_code" = "yes"; then
5429 CFLAGS="-g -O2 $CFLAGS"
5432 CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
5436 CFLAGS="-O2 $CFLAGS"
5440 if test "$kde_use_debug_define" = "yes"; then
5441 CFLAGS="-DNDEBUG $CFLAGS"
5445 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
5446 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
5449 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
5453 if test "$kde_use_profiling" = "yes"; then
5454 KDE_CHECK_COMPILER_FLAG(pg,
5456 CFLAGS="-pg $CFLAGS"
5461 AC_SUBST(USE_EXCEPTIONS)
5462 dnl obsolete macro - provided to keep things going
5468 # the following is to allow programs, that are known to
5469 # have problems when compiled with -O2
5470 if test -n "$CFLAGS"; then
5474 for i in $CFLAGS; do
5479 NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
5486 AC_SUBST(NOOPT_CFLAGS)
5490 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), [])
5493 AC_SUBST(KDE_CXXFLAGS)
5496 AC_DEFUN(KDEV_ADD_DEPENDENCIES,
5498 [A]M_DEPENDENCIES(CC)
5502 dnl just a wrapper to clean up configure.in only for c projects
5503 AC_DEFUN(KDEV_PROG_LIBTOOL,
5505 AC_REQUIRE([AC_CHECK_C_COMPILER])
5506 AC_REQUIRE([AC_ENABLE_SHARED])
5507 AC_REQUIRE([AC_ENABLE_STATIC])
5509 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
5520 LIBTOOL_SHELL="/bin/sh ./libtool"
5521 # LIBTOOL="$LIBTOOL --silent"
5524 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5526 # serial 47 AC_PROG_LIBTOOL
5530 AC_DEFUN([AC_PROG_LIBTOOL],
5531 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5532 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5533 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5534 AC_PROVIDE_IFELSE([AC_PROG_CXX],
5536 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5539 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5540 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5541 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5542 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5544 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5546 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5548 [ifdef([AC_PROG_GCJ],
5549 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5550 ifdef([A][M_PROG_GCJ],
5551 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5552 ifdef([LT_AC_PROG_GCJ],
5553 [define([LT_AC_PROG_GCJ],
5554 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5555 ])])# AC_PROG_LIBTOOL
5560 AC_DEFUN([_AC_PROG_LIBTOOL],
5561 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5562 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5563 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5565 # This can be used to rebuild libtool when needed
5566 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5568 # Always use our own libtool.
5569 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5570 AC_SUBST(LIBTOOL)dnl
5572 # Prevent multiple expansion
5573 define([AC_PROG_LIBTOOL], [])
5574 ])# _AC_PROG_LIBTOOL
5579 AC_DEFUN([AC_LIBTOOL_SETUP],
5581 AC_REQUIRE([AC_ENABLE_SHARED])dnl
5582 AC_REQUIRE([AC_ENABLE_STATIC])dnl
5583 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5584 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5585 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5586 AC_REQUIRE([AC_PROG_CC])dnl
5587 AC_REQUIRE([AC_PROG_LD])dnl
5588 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5589 AC_REQUIRE([AC_PROG_NM])dnl
5590 AC_REQUIRE([LT_AC_PROG_SED])dnl
5592 AC_REQUIRE([AC_PROG_LN_S])dnl
5593 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5594 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5595 AC_REQUIRE([AC_OBJEXT])dnl
5596 AC_REQUIRE([AC_EXEEXT])dnl
5599 AC_LIBTOOL_SYS_MAX_CMD_LEN
5600 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5603 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5604 _LT_AC_PROG_ECHO_BACKSLASH
5608 # AIX sometimes has problems with the GCC collect2 program. For some
5609 # reason, if we set the COLLECT_NAMES environment variable, the problems
5610 # vanish in a puff of smoke.
5611 if test "X${COLLECT_NAMES+set}" != Xset; then
5613 export COLLECT_NAMES
5618 # Sed substitution that helps us do robust quoting. It backslashifies
5619 # metacharacters that are still active within double-quoted strings.
5620 Xsed='sed -e s/^X//'
5621 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5623 # Same as above, but do not quote variable references.
5624 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5626 # Sed substitution to delay expansion of an escaped shell variable in a
5627 # double_quote_subst'ed string.
5628 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5630 # Sed substitution to avoid accidental globbing in evaled expressions
5631 no_glob_subst='s/\*/\\\*/g'
5637 default_ofile=libtool
5638 can_build_shared=yes
5640 # All known linkers require a `.a' archive for static linking (except M$VC,
5641 # which needs '.lib').
5643 ltmain="$ac_aux_dir/ltmain.sh"
5644 ofile="$default_ofile"
5645 with_gnu_ld="$lt_cv_prog_gnu_ld"
5647 AC_CHECK_TOOL(RANLIB, ranlib, :)
5648 AC_CHECK_TOOL(STRIP, strip, :)
5651 old_CFLAGS="$CFLAGS"
5653 # Set sane defaults for various variables
5654 test -z "$AR" && AR=ar
5655 test -z "$AR_FLAGS" && AR_FLAGS=cru
5656 test -z "$AS" && AS=as
5657 test -z "$CC" && CC=cc
5658 test -z "$LTCC" && LTCC=$CC
5659 test -z "$DLLTOOL" && DLLTOOL=dlltool
5660 test -z "$LD" && LD=ld
5661 test -z "$LN_S" && LN_S="ln -s"
5662 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5663 test -z "$NM" && NM=nm
5664 test -z "$SED" && SED=sed
5665 test -z "$OBJDUMP" && OBJDUMP=objdump
5666 test -z "$RANLIB" && RANLIB=:
5667 test -z "$STRIP" && STRIP=:
5668 test -z "$ac_objext" && ac_objext=o
5670 # Determine commands to create old-style static archives.
5671 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5672 old_postinstall_cmds='chmod 644 $oldlib'
5673 old_postuninstall_cmds=
5675 if test -n "$RANLIB"; then
5678 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5681 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5684 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5687 # Only perform the check for file, if the check method requires it
5688 case $deplibs_check_method in
5690 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5696 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5697 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5698 enable_win32_dll=yes, enable_win32_dll=no)
5700 AC_ARG_ENABLE([libtool-lock],
5701 [AC_HELP_STRING([--disable-libtool-lock],
5702 [avoid locking (might break parallel builds)])])
5703 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5706 [AC_HELP_STRING([--with-pic],
5707 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5708 [pic_mode="$withval"],
5710 test -z "$pic_mode" && pic_mode=default
5712 # Use C for the default configuration in the libtool script
5714 AC_LIBTOOL_LANG_C_CONFIG
5716 ])# AC_LIBTOOL_SETUP
5719 # _LT_AC_SYS_COMPILER
5720 # -------------------
5721 AC_DEFUN([_LT_AC_SYS_COMPILER],
5722 [AC_REQUIRE([AC_PROG_CC])dnl
5724 # If no C compiler was specified, use CC.
5727 # Allow CC to be a program name with arguments.
5730 ])# _LT_AC_SYS_COMPILER
5733 # _LT_AC_SYS_LIBPATH_AIX
5734 # ----------------------
5735 # Links a minimal program and checks the executable
5736 # for the system default hardcoded library path. In most cases,
5737 # this is /usr/lib:/lib, but when the MPI compilers are used
5738 # the location of the communication and MPI libs are included too.
5739 # If we don't find anything, use the default library path according
5740 # to the aix ld manual.
5741 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5742 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5743 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5745 # Check for a 64-bit object if we didn't find anything.
5746 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; }
5748 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5749 ])# _LT_AC_SYS_LIBPATH_AIX
5752 # _LT_AC_PROG_ECHO_BACKSLASH
5753 # --------------------------
5754 # Add some code to the start of the generated configure script which
5755 # will find an echo command which doesn't interpret backslashes.
5756 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5757 [ifdef([AC_DIVERSION_NOTICE],
5758 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5759 [AC_DIVERT_PUSH(NOTICE)])
5761 # Check that we are running under the correct shell.
5762 SHELL=${CONFIG_SHELL-/bin/sh}
5766 # Remove one level of quotation (which was required for Make).
5767 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5772 if test "X[$]1" = X--no-reexec; then
5773 # Discard the --no-reexec flag, and continue.
5775 elif test "X[$]1" = X--fallback-echo; then
5776 # Avoid inline document here, it may be left over
5778 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5779 # Yippee, $echo works!
5782 # Restart under the correct shell.
5783 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5786 if test "X[$]1" = X--fallback-echo; then
5787 # used as fallback echo
5795 # The HP-UX ksh and POSIX shell print the target directory to stdout
5797 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5799 if test -z "$ECHO"; then
5800 if test "X${echo_test_string+set}" != Xset; then
5801 # find a string as large as possible, as long as the shell can cope with it
5802 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5803 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5804 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5805 echo_test_string="`eval $cmd`" &&
5806 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5813 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5814 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5815 test "X$echo_testing_string" = "X$echo_test_string"; then
5818 # The Solaris, AIX, and Digital Unix default echo programs unquote
5819 # backslashes. This makes it impossible to quote backslashes using
5820 # echo "$something" | sed 's/\\/\\\\/g'
5822 # So, first we look for a working echo in the user's PATH.
5824 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5825 for dir in $PATH /usr/ucb; do
5827 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5828 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5829 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5830 test "X$echo_testing_string" = "X$echo_test_string"; then
5837 if test "X$echo" = Xecho; then
5838 # We didn't find a better echo, so look for alternatives.
5839 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5840 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5841 test "X$echo_testing_string" = "X$echo_test_string"; then
5842 # This shell has a builtin print -r that does the trick.
5844 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5845 test "X$CONFIG_SHELL" != X/bin/ksh; then
5846 # If we have ksh, try running configure again with it.
5847 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5848 export ORIGINAL_CONFIG_SHELL
5849 CONFIG_SHELL=/bin/ksh
5851 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5855 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5856 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5857 test "X$echo_testing_string" = "X$echo_test_string"; then
5858 # Cool, printf works
5860 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5861 test "X$echo_testing_string" = 'X\t' &&
5862 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5863 test "X$echo_testing_string" = "X$echo_test_string"; then
5864 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5866 SHELL="$CONFIG_SHELL"
5868 echo="$CONFIG_SHELL [$]0 --fallback-echo"
5869 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5870 test "X$echo_testing_string" = 'X\t' &&
5871 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5872 test "X$echo_testing_string" = "X$echo_test_string"; then
5873 echo="$CONFIG_SHELL [$]0 --fallback-echo"
5875 # maybe with a smaller string...
5878 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5879 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5886 if test "$prev" != 'sed 50q "[$]0"'; then
5887 echo_test_string=`eval $prev`
5888 export echo_test_string
5889 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5891 # Oops. We lost completely, so just stick with echo.
5900 # Copy echo and quote the copy suitably for passing to libtool from
5901 # the Makefile, instead of quoting the original, which is used later.
5903 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5904 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5909 ])# _LT_AC_PROG_ECHO_BACKSLASH
5914 AC_DEFUN([_LT_AC_LOCK],
5915 [AC_ARG_ENABLE([libtool-lock],
5916 [AC_HELP_STRING([--disable-libtool-lock],
5917 [avoid locking (might break parallel builds)])])
5918 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5920 # Some flags need to be propagated to the compiler or linker for good
5924 # Find out which ABI we are using.
5925 echo 'int i;' > conftest.$ac_ext
5926 if AC_TRY_EVAL(ac_compile); then
5927 case `/usr/bin/file conftest.$ac_objext` in
5939 # Find out which ABI we are using.
5940 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5941 if AC_TRY_EVAL(ac_compile); then
5942 case `/usr/bin/file conftest.$ac_objext` in
5958 # Test if the compiler is 64bit
5959 echo 'int i;' > conftest.$ac_ext
5960 if AC_TRY_EVAL(ac_compile); then
5961 case `/usr/bin/file conftest.$ac_objext` in
5974 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5975 SAVE_CFLAGS="$CFLAGS"
5976 CFLAGS="$CFLAGS -belf"
5977 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5979 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5981 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5982 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5983 CFLAGS="$SAVE_CFLAGS"
5986 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5987 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5988 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5989 AC_CHECK_TOOL(AS, as, false)
5990 AC_CHECK_TOOL(OBJDUMP, objdump, false)
5992 # recent cygwin and mingw systems supply a stub DllMain which the user
5993 # can override, but on older systems we have to supply one
5994 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5996 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5997 DllMain (0, 0, 0);],
5998 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
6001 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
6002 # old mingw systems require "-dll" to link a DLL, while more recent ones
6004 SAVE_CFLAGS="$CFLAGS"
6005 CFLAGS="$CFLAGS -mdll"
6006 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
6007 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
6008 CFLAGS="$SAVE_CFLAGS" ;;
6009 *-*-cygwin* | *-*-pw32*)
6010 # cygwin systems need to pass --dll to the linker, and not link
6011 # crt.o which will require a WinMain@16 definition.
6012 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
6018 need_locks="$enable_libtool_lock"
6023 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6024 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6025 # ----------------------------------------------------------------
6026 # Check whether the given compiler option works
6027 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6028 [AC_CACHE_CHECK([$1], [$2],
6030 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6031 save_CFLAGS="$CFLAGS"
6033 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6034 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
6035 # The compiler can only warn and ignore the option if not recognized
6036 # So say no if there are warnings
6037 if test -s conftest.err; then
6038 # Append any errors to the config.log.
6039 cat conftest.err 1>&AS_MESSAGE_LOG_FD
6045 CFLAGS="$save_CFLAGS"
6048 if test x"[$]$2" = xyes; then
6049 ifelse([$5], , :, [$5])
6051 ifelse([$6], , :, [$6])
6053 ])# AC_LIBTOOL_COMPILER_OPTION
6056 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6057 # [ACTION-SUCCESS], [ACTION-FAILURE])
6058 # ------------------------------------------------------------
6059 # Check whether the given compiler option works
6060 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6061 [AC_CACHE_CHECK([$1], [$2],
6063 save_LDFLAGS="$LDFLAGS"
6064 LDFLAGS="$LDFLAGS $3"
6065 echo "$lt_simple_link_test_code" > conftest.$ac_ext
6066 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6067 # The compiler can only warn and ignore the option if not recognized
6068 # So say no if there are warnings
6069 if test -s conftest.err; then
6070 # Append any errors to the config.log.
6071 cat conftest.err 1>&AS_MESSAGE_LOG_FD
6077 LDFLAGS="$save_LDFLAGS"
6080 if test x"[$]$2" = xyes; then
6081 ifelse([$4], , :, [$4])
6083 ifelse([$5], , :, [$5])
6085 ])# AC_LIBTOOL_LINKER_OPTION
6088 # AC_LIBTOOL_SYS_MAX_CMD_LEN
6089 # --------------------------
6090 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6091 [# find the maximum length of command line arguments
6092 AC_MSG_CHECKING([the maximum length of command line arguments])
6093 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6099 # On DJGPP, this test can blow up pretty badly due to problems in libc
6100 # (any single argument exceeding 2000 bytes causes a buffer overrun
6101 # during glob expansion). Even if it were fixed, the result of this
6102 # check would be larger than it should be.
6103 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6107 # Under GNU Hurd, this test is not required because there is
6108 # no limit to the length of command line arguments.
6109 # Libtool will interpret -1 as no limit whatsoever
6110 lt_cv_sys_max_cmd_len=-1;
6114 # If test is not a shell built-in, we'll probably end up computing a
6115 # maximum length that is only half of the actual maximum length, but
6117 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6118 = "XX$testring") >/dev/null 2>&1 &&
6119 new_result=`expr "X$testring" : ".*" 2>&1` &&
6120 lt_cv_sys_max_cmd_len=$new_result &&
6121 test $i != 17 # 1/2 MB should be enough
6124 testring=$testring$testring
6127 # Add a significant safety factor because C++ compilers can tack on massive
6128 # amounts of additional arguments before passing them to the linker.
6129 # It appears as though 1/2 is a usable value.
6130 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6134 if test -n $lt_cv_sys_max_cmd_len ; then
6135 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6139 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6142 # _LT_AC_CHECK_DLFCN
6143 # --------------------
6144 AC_DEFUN([_LT_AC_CHECK_DLFCN],
6145 [AC_CHECK_HEADERS(dlfcn.h)dnl
6146 ])# _LT_AC_CHECK_DLFCN
6149 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6150 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6151 # ------------------------------------------------------------------
6152 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6153 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6154 if test "$cross_compiling" = yes; then :
6157 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6158 lt_status=$lt_dlunknown
6159 cat > conftest.$ac_ext <<EOF
6160 [#line __oline__ "configure"
6161 #include "confdefs.h"
6170 # define LT_DLGLOBAL RTLD_GLOBAL
6173 # define LT_DLGLOBAL DL_GLOBAL
6175 # define LT_DLGLOBAL 0
6179 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6180 find out it does not work in some platform. */
6181 #ifndef LT_DLLAZY_OR_NOW
6183 # define LT_DLLAZY_OR_NOW RTLD_LAZY
6186 # define LT_DLLAZY_OR_NOW DL_LAZY
6189 # define LT_DLLAZY_OR_NOW RTLD_NOW
6192 # define LT_DLLAZY_OR_NOW DL_NOW
6194 # define LT_DLLAZY_OR_NOW 0
6202 extern "C" void exit (int);
6205 void fnord() { int i=42;}
6208 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6209 int status = $lt_dlunknown;
6213 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6214 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6215 /* dlclose (self); */
6221 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6222 (./conftest; exit; ) 2>/dev/null
6225 x$lt_dlno_uscore) $1 ;;
6226 x$lt_dlneed_uscore) $2 ;;
6227 x$lt_unknown|x*) $3 ;;
6230 # compilation failed
6235 ])# _LT_AC_TRY_DLOPEN_SELF
6238 # AC_LIBTOOL_DLOPEN_SELF
6239 # -------------------
6240 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6241 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6242 if test "x$enable_dlopen" != xyes; then
6243 enable_dlopen=unknown
6244 enable_dlopen_self=unknown
6245 enable_dlopen_self_static=unknown
6252 lt_cv_dlopen="load_add_on"
6254 lt_cv_dlopen_self=yes
6257 cygwin* | mingw* | pw32*)
6258 lt_cv_dlopen="LoadLibrary"
6263 AC_CHECK_FUNC([shl_load],
6264 [lt_cv_dlopen="shl_load"],
6265 [AC_CHECK_LIB([dld], [shl_load],
6266 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6267 [AC_CHECK_FUNC([dlopen],
6268 [lt_cv_dlopen="dlopen"],
6269 [AC_CHECK_LIB([dl], [dlopen],
6270 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6271 [AC_CHECK_LIB([svld], [dlopen],
6272 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6273 [AC_CHECK_LIB([dld], [dld_link],
6274 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6283 if test "x$lt_cv_dlopen" != xno; then
6289 case $lt_cv_dlopen in
6291 save_CPPFLAGS="$CPPFLAGS"
6292 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6294 save_LDFLAGS="$LDFLAGS"
6295 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6298 LIBS="$lt_cv_dlopen_libs $LIBS"
6300 AC_CACHE_CHECK([whether a program can dlopen itself],
6301 lt_cv_dlopen_self, [dnl
6302 _LT_AC_TRY_DLOPEN_SELF(
6303 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6304 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6307 if test "x$lt_cv_dlopen_self" = xyes; then
6308 LDFLAGS="$LDFLAGS $link_static_flag"
6309 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6310 lt_cv_dlopen_self_static, [dnl
6311 _LT_AC_TRY_DLOPEN_SELF(
6312 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6313 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6317 CPPFLAGS="$save_CPPFLAGS"
6318 LDFLAGS="$save_LDFLAGS"
6323 case $lt_cv_dlopen_self in
6324 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6325 *) enable_dlopen_self=unknown ;;
6328 case $lt_cv_dlopen_self_static in
6329 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6330 *) enable_dlopen_self_static=unknown ;;
6333 ])# AC_LIBTOOL_DLOPEN_SELF
6336 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6337 # ---------------------------------
6338 # Check to see if options -c and -o are simultaneously supported by compiler
6339 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6340 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6341 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6342 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6343 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6344 $rm -r conftest 2>/dev/null
6348 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
6349 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
6350 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
6351 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
6352 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
6353 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
6354 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6356 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6357 # that will create temporary files in the current directory regardless of
6358 # the output directory. Thus, making CWD read-only will cause this test
6359 # to fail, enabling locking or at least warning the user not to do parallel
6363 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
6365 # The compiler can only warn and ignore the option if not recognized
6366 # So say no if there are warnings
6367 if test -s out/conftest.err; then
6368 # Append any errors to the config.log.
6369 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
6371 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6374 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
6375 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
6376 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
6384 ])# AC_LIBTOOL_PROG_CC_C_O
6387 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6388 # -----------------------------------------
6389 # Check to see if we can do hard links to lock some files if needed
6390 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6391 [AC_REQUIRE([_LT_AC_LOCK])dnl
6393 hard_links="nottested"
6394 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6395 # do not overwrite the value of need_locks provided by the user
6396 AC_MSG_CHECKING([if we can lock with hard links])
6399 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6401 ln conftest.a conftest.b 2>&5 || hard_links=no
6402 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6403 AC_MSG_RESULT([$hard_links])
6404 if test "$hard_links" = no; then
6405 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6411 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6416 AC_DEFUN([AC_LIBTOOL_OBJDIR],
6417 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6418 [rm -f .libs 2>/dev/null
6419 mkdir .libs 2>/dev/null
6420 if test -d .libs; then
6423 # MS-DOS does not allow filenames that begin with a dot.
6426 rmdir .libs 2>/dev/null])
6427 objdir=$lt_cv_objdir
6428 ])# AC_LIBTOOL_OBJDIR
6431 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6432 # ----------------------------------------------
6433 # Check hardcoding attributes.
6434 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6435 [AC_MSG_CHECKING([how to hardcode library paths into programs])
6436 _LT_AC_TAGVAR(hardcode_action, $1)=
6437 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6438 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6440 # We can hardcode non-existant directories.
6441 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6442 # If the only mechanism to avoid hardcoding is shlibpath_var, we
6443 # have to relink, otherwise we might link with an installed library
6444 # when we should be linking with a yet-to-be-installed one
6445 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6446 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6447 # Linking always hardcodes the temporary library directory.
6448 _LT_AC_TAGVAR(hardcode_action, $1)=relink
6450 # We can link without hardcoding, and we can hardcode nonexisting dirs.
6451 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
6454 # We cannot hardcode anything, or else we can only hardcode existing
6456 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6458 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6460 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6461 # Fast installation is not supported
6462 enable_fast_install=no
6463 elif test "$shlibpath_overrides_runpath" = yes ||
6464 test "$enable_shared" = no; then
6465 # Fast installation is not necessary
6466 enable_fast_install=needless
6468 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6471 # AC_LIBTOOL_SYS_LIB_STRIP
6472 # ------------------------
6473 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6476 AC_MSG_CHECKING([whether stripping libraries is possible])
6477 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6478 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6479 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6480 AC_MSG_RESULT([yes])
6484 ])# AC_LIBTOOL_SYS_LIB_STRIP
6487 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
6488 # -----------------------------
6489 # PORTME Fill in your ld.so characteristics
6490 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6491 [AC_MSG_CHECKING([dynamic linker characteristics])
6493 libname_spec='lib$name'
6500 shlibpath_overrides_runpath=unknown
6502 dynamic_linker="$host_os ld.so"
6503 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6504 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6505 need_lib_prefix=unknown
6506 hardcode_into_libs=no
6508 # when you set need_version to no, make sure it does not cause -set_version
6509 # flags to be left without arguments
6510 need_version=unknown
6515 library_names_spec='${libname}${release}.so$versuffix $libname.a'
6516 shlibpath_var=LIBPATH
6518 # AIX 3 has no versioning support, so we append a major version to the name.
6519 soname_spec='${libname}${release}.so$major'
6524 if test "$host_cpu" = ia64; then
6525 # AIX 5 supports IA64
6526 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6527 shlibpath_var=LD_LIBRARY_PATH
6529 # With GCC up to 2.95.x, collect2 would create an import file
6530 # for dependence libraries. The import file would start with
6531 # the line `#! .'. This would cause the generated library to
6532 # depend on `.', always an invalid library. This was fixed in
6533 # development snapshots of GCC prior to 3.0.
6535 aix4 | aix4.[[01]] | aix4.[[01]].*)
6536 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6538 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6545 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6546 # soname into executable. Probably we can add versioning support to
6547 # collect2, so additional links can be useful in future.
6548 if test "$aix_use_runtimelinking" = yes; then
6549 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6550 # instead of lib<name>.a to let people know that these are not
6551 # typical AIX shared libraries.
6552 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6554 # We preserve .a as extension for shared libraries through AIX4.2
6555 # and later when we are not doing run time linking.
6556 library_names_spec='${libname}${release}.a $libname.a'
6557 soname_spec='${libname}${release}.so$major'
6559 shlibpath_var=LIBPATH
6564 library_names_spec='$libname.ixlibrary $libname.a'
6565 # Create ${libname}_ixlibrary.a entries in /sys/libs.
6566 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'
6570 library_names_spec='${libname}.so'
6571 dynamic_linker="$host_os ld.so"
6572 shlibpath_var=LIBRARY_PATH
6578 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6579 soname_spec='${libname}${release}.so$major'
6580 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6581 shlibpath_var=LD_LIBRARY_PATH
6582 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6583 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6584 # the default ld.so.conf also contains /usr/contrib/lib and
6585 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6586 # libtool to hard-code these into programs
6589 cygwin* | mingw* | pw32*)
6590 version_type=windows
6593 case $GCC,$host_os in
6595 library_names_spec='$libname.dll.a'
6596 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
6597 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6598 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6599 dldir=$destdir/`dirname \$dlpath`~
6600 test -d \$dldir || mkdir -p \$dldir~
6601 $install_prog .libs/$dlname \$dldir/$dlname'
6602 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6603 dlpath=$dir/\$dldll~
6607 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6608 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
6609 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
6610 # It is most probably a Windows format PATH printed by
6611 # mingw gcc, but we are running on Cygwin. Gcc prints its search
6612 # path with ; separators, and with drive letters. We can handle the
6613 # drive letters (cygwin fileutils understands them), so leave them,
6614 # especially as we might pass files found there to a mingw objdump,
6615 # which wouldn't understand a cygwinified path. Ahh.
6616 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6618 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
6622 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6625 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6628 dynamic_linker='Win32 ld.exe'
6629 # FIXME: first we should search . and the directory the executable is in
6633 darwin* | rhapsody*)
6634 dynamic_linker="$host_os dyld"
6638 # FIXME: Relying on posixy $() will cause problems for
6639 # cross-compilation, but unfortunately the echo tests do not
6640 # yet detect zsh echo's removal of \ escapes.
6641 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6642 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6643 shlibpath_overrides_runpath=yes
6644 shlibpath_var=DYLD_LIBRARY_PATH
6651 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6652 soname_spec='${libname}${release}.so$major'
6653 shlibpath_var=LD_LIBRARY_PATH
6661 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6662 version_type=freebsd-$objformat
6663 case $version_type in
6665 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6670 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6674 shlibpath_var=LD_LIBRARY_PATH
6677 shlibpath_overrides_runpath=yes
6679 freebsd3.[01]* | freebsdelf3.[01]*)
6680 shlibpath_overrides_runpath=yes
6681 hardcode_into_libs=yes
6684 shlibpath_overrides_runpath=no
6685 hardcode_into_libs=yes
6694 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6695 soname_spec='${libname}${release}.so$major'
6696 shlibpath_var=LD_LIBRARY_PATH
6697 hardcode_into_libs=yes
6700 hpux9* | hpux10* | hpux11*)
6701 # Give a soname corresponding to the major version so that dld.sl refuses to
6702 # link against other versions.
6706 if test "$host_cpu" = ia64; then
6707 hardcode_into_libs=yes
6708 dynamic_linker="$host_os dld.so"
6709 shlibpath_var=LD_LIBRARY_PATH
6710 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6711 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6712 soname_spec='${libname}${release}.so$major'
6713 if test "X$HPUX_IA64_MODE" = X32; then
6714 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6716 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6718 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6720 dynamic_linker="$host_os dld.sl"
6721 shlibpath_var=SHLIB_PATH
6722 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6723 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6724 soname_spec='${libname}${release}.sl$major'
6726 # HP-UX runs *really* slowly unless shared libraries are mode 555.
6727 postinstall_cmds='chmod 555 $lib'
6730 irix5* | irix6* | nonstopux*)
6732 nonstopux*) version_type=nonstopux ;;
6733 *) version_type=irix ;;
6737 soname_spec='${libname}${release}.so$major'
6738 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6740 irix5* | nonstopux*)
6744 case $LD in # libtool.m4 will add one of these switches to LD
6745 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6746 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6747 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6748 *) libsuff= shlibsuff= libmagic=never-match;;
6752 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6753 shlibpath_overrides_runpath=no
6754 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6755 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6758 # No shared lib support for Linux oldld, aout, or coff.
6759 linux*oldld* | linux*aout* | linux*coff*)
6763 # This must be Linux ELF.
6768 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6769 soname_spec='${libname}${release}.so$major'
6770 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6772 if test "x$LINUX_64_MODE" = x64; then
6773 # Some platforms are per default 64-bit, so there's no /lib64
6774 if test -d /lib64; then
6778 shlibpath_var=LD_LIBRARY_PATH
6779 shlibpath_overrides_runpath=no
6780 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6781 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6782 # This implies no fast_install, which is unacceptable.
6783 # Some rework will be needed to allow for fast_install
6784 # before this can be enabled.
6785 hardcode_into_libs=yes
6787 # We used to test for /lib/ld.so.1 and disable shared libraries on
6788 # powerpc, because MkLinux only supported shared libraries with the
6789 # GNU dynamic linker. Since this was broken with cross compilers,
6790 # most powerpc-linux boxes support dynamic linking these days and
6791 # people can always --disable-shared, the test was removed, and we
6792 # assume the GNU/Linux dynamic linker is in use.
6793 dynamic_linker='GNU/Linux ld.so'
6800 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6801 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6802 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6803 dynamic_linker='NetBSD (a.out) ld.so'
6805 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6806 soname_spec='${libname}${release}.so$major'
6807 dynamic_linker='NetBSD ld.elf_so'
6809 shlibpath_var=LD_LIBRARY_PATH
6810 shlibpath_overrides_runpath=yes
6811 hardcode_into_libs=yes
6816 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6817 shlibpath_var=LD_LIBRARY_PATH
6818 shlibpath_overrides_runpath=yes
6825 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6826 soname_spec='${libname}${release}.so$major'
6827 shlibpath_var=LD_LIBRARY_PATH
6828 shlibpath_overrides_runpath=yes
6835 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6836 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6837 shlibpath_var=LD_LIBRARY_PATH
6838 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6840 openbsd2.[[89]] | openbsd2.[[89]].*)
6841 shlibpath_overrides_runpath=no
6844 shlibpath_overrides_runpath=yes
6848 shlibpath_overrides_runpath=yes
6853 libname_spec='$name'
6855 library_names_spec='$libname.dll $libname.a'
6856 dynamic_linker='OS/2 ld.exe'
6857 shlibpath_var=LIBPATH
6860 osf3* | osf4* | osf5*)
6864 soname_spec='${libname}${release}.so'
6865 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6866 shlibpath_var=LD_LIBRARY_PATH
6867 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6868 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6873 soname_spec='${libname}${release}.so$major'
6874 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6875 shlibpath_var=LD_LIBRARY_PATH
6882 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6883 soname_spec='${libname}${release}.so$major'
6884 shlibpath_var=LD_LIBRARY_PATH
6885 shlibpath_overrides_runpath=yes
6886 hardcode_into_libs=yes
6887 # ldd complains unless libraries are executable
6888 postinstall_cmds='chmod +x $lib'
6893 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6894 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6895 shlibpath_var=LD_LIBRARY_PATH
6896 shlibpath_overrides_runpath=yes
6897 if test "$with_gnu_ld" = yes; then
6903 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6905 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6906 soname_spec='${libname}${release}.so$major'
6907 shlibpath_var=LD_LIBRARY_PATH
6908 case $host_vendor in
6910 shlibpath_overrides_runpath=no
6915 shlibpath_overrides_runpath=no
6916 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6922 if test -d /usr/nec ;then
6924 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6925 soname_spec='$libname.so.$major'
6926 shlibpath_var=LD_LIBRARY_PATH
6932 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6933 soname_spec='${libname}${release}.so$major'
6934 shlibpath_var=LD_LIBRARY_PATH
6941 AC_MSG_RESULT([$dynamic_linker])
6942 test "$dynamic_linker" = no && can_build_shared=no
6943 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6948 AC_DEFUN([_LT_AC_TAGCONFIG],
6949 [AC_ARG_WITH([tags],
6950 [AC_HELP_STRING([--with-tags=TAGS],
6951 [include additional configurations @<:@CXX,GCJ@:>@])],
6952 [tagnames="$withval"],
6955 mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6958 if test -f "$ltmain" && test -n "$tagnames"; then
6959 if test ! -f "${ofile}"; then
6960 AC_MSG_WARN([output file `$ofile' does not exist])
6963 if test -z "$LTCC"; then
6964 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6965 if test -z "$LTCC"; then
6966 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6968 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6972 # Extract list of available tagged configurations in $ofile.
6973 # Note that this assumes the entire list is on one line.
6974 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6976 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6977 for tagname in $tagnames; do
6979 # Check whether tagname contains only valid characters
6980 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6982 *) AC_MSG_ERROR([invalid tag name: $tagname])
6986 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6988 AC_MSG_ERROR([tag name \"$tagname\" already exists])
6991 # Update the list of available tags.
6992 if test -n "$tagname"; then
6993 echo appending configuration tag \"$tagname\" to $ofile
6997 AC_LIBTOOL_LANG_CXX_CONFIG
7001 AC_LIBTOOL_LANG_GCJ_CONFIG
7005 AC_LIBTOOL_LANG_RC_CONFIG
7009 AC_MSG_ERROR([Unsupported tag name: $tagname])
7013 # Append the new tag name to the list of available tags.
7014 available_tags="$available_tags $tagname"
7019 # Now substitute the updated list of available tags.
7020 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7021 mv "${ofile}T" "$ofile"
7025 AC_MSG_ERROR([unable to update list of available tagged configurations.])
7028 ])# _LT_AC_TAGCONFIG
7033 # enable checks for dlopen support
7034 AC_DEFUN([AC_LIBTOOL_DLOPEN],
7035 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7036 ])# AC_LIBTOOL_DLOPEN
7039 # AC_LIBTOOL_WIN32_DLL
7040 # --------------------
7041 # declare package support for building win32 dll's
7042 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7043 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7044 ])# AC_LIBTOOL_WIN32_DLL
7047 # AC_ENABLE_SHARED([DEFAULT])
7048 # ---------------------------
7049 # implement the --enable-shared flag
7050 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7051 AC_DEFUN([AC_ENABLE_SHARED],
7052 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7053 AC_ARG_ENABLE([shared],
7054 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7055 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7056 [p=${PACKAGE-default}
7058 yes) enable_shared=yes ;;
7059 no) enable_shared=no ;;
7062 # Look at the argument we got. We use all the common list separators.
7063 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7064 for pkg in $enableval; do
7066 if test "X$pkg" = "X$p"; then
7073 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7074 ])# AC_ENABLE_SHARED
7079 #- set the default shared flag to --disable-shared
7080 AC_DEFUN([AC_DISABLE_SHARED],
7081 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7082 AC_ENABLE_SHARED(no)
7083 ])# AC_DISABLE_SHARED
7086 # AC_ENABLE_STATIC([DEFAULT])
7087 # ---------------------------
7088 # implement the --enable-static flag
7089 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7090 AC_DEFUN([AC_ENABLE_STATIC],
7091 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7092 AC_ARG_ENABLE([static],
7093 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7094 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7095 [p=${PACKAGE-default}
7097 yes) enable_static=yes ;;
7098 no) enable_static=no ;;
7101 # Look at the argument we got. We use all the common list separators.
7102 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7103 for pkg in $enableval; do
7105 if test "X$pkg" = "X$p"; then
7112 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7113 ])# AC_ENABLE_STATIC
7118 # set the default static flag to --disable-static
7119 AC_DEFUN([AC_DISABLE_STATIC],
7120 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7121 AC_ENABLE_STATIC(no)
7122 ])# AC_DISABLE_STATIC
7125 # AC_ENABLE_FAST_INSTALL([DEFAULT])
7126 # ---------------------------------
7127 # implement the --enable-fast-install flag
7128 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7129 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7130 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7131 AC_ARG_ENABLE([fast-install],
7132 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7133 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7134 [p=${PACKAGE-default}
7136 yes) enable_fast_install=yes ;;
7137 no) enable_fast_install=no ;;
7139 enable_fast_install=no
7140 # Look at the argument we got. We use all the common list separators.
7141 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7142 for pkg in $enableval; do
7144 if test "X$pkg" = "X$p"; then
7145 enable_fast_install=yes
7151 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7152 ])# AC_ENABLE_FAST_INSTALL
7155 # AC_DISABLE_FAST_INSTALL
7156 # -----------------------
7157 # set the default to --disable-fast-install
7158 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7159 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7160 AC_ENABLE_FAST_INSTALL(no)
7161 ])# AC_DISABLE_FAST_INSTALL
7164 # AC_LIBTOOL_PICMODE([MODE])
7165 # --------------------------
7166 # implement the --with-pic flag
7167 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7168 AC_DEFUN([AC_LIBTOOL_PICMODE],
7169 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7170 pic_mode=ifelse($#,1,$1,default)
7171 ])# AC_LIBTOOL_PICMODE
7174 # AC_PATH_TOOL_PREFIX
7175 # -------------------
7176 # find a file program which can recognise shared library
7177 AC_DEFUN([AC_PATH_TOOL_PREFIX],
7178 [AC_MSG_CHECKING([for $1])
7179 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7181 [[\\/*] | ?:[\\/]*])
7182 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7185 lt_save_MAGIC_CMD="$MAGIC_CMD"
7186 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7187 dnl $ac_dummy forces splitting on constant user-supplied paths.
7188 dnl POSIX.2 word splitting is done only on the output of word expansions,
7189 dnl not every word. This closes a longstanding sh security hole.
7190 ac_dummy="ifelse([$2], , $PATH, [$2])"
7191 for ac_dir in $ac_dummy; do
7193 test -z "$ac_dir" && ac_dir=.
7194 if test -f $ac_dir/$1; then
7195 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7196 if test -n "$file_magic_test_file"; then
7197 case $deplibs_check_method in
7199 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7200 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7201 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7202 egrep "$file_magic_regex" > /dev/null; then
7207 *** Warning: the command libtool uses to detect shared libraries,
7208 *** $file_magic_cmd, produces output that libtool cannot recognize.
7209 *** The result is that libtool may fail to recognize shared libraries
7210 *** as such. This will affect the creation of libtool libraries that
7211 *** depend on shared libraries, but programs linked with such libtool
7212 *** libraries will work regardless of this problem. Nevertheless, you
7213 *** may want to report the problem to your system manager and/or to
7214 *** bug-libtool@gnu.org
7224 MAGIC_CMD="$lt_save_MAGIC_CMD"
7227 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7228 if test -n "$MAGIC_CMD"; then
7229 AC_MSG_RESULT($MAGIC_CMD)
7233 ])# AC_PATH_TOOL_PREFIX
7238 # find a file program which can recognise a shared library
7239 AC_DEFUN([AC_PATH_MAGIC],
7240 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7241 if test -z "$lt_cv_path_MAGIC_CMD"; then
7242 if test -n "$ac_tool_prefix"; then
7243 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7253 # find the path to the GNU or non-GNU linker
7254 AC_DEFUN([AC_PROG_LD],
7255 [AC_ARG_WITH([gnu-ld],
7256 [AC_HELP_STRING([--with-gnu-ld],
7257 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7258 [test "$withval" = no || with_gnu_ld=yes],
7260 AC_REQUIRE([AC_PROG_CC])dnl
7261 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7262 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7264 if test "$GCC" = yes; then
7265 # Check if gcc -print-prog-name=ld gives a path.
7266 AC_MSG_CHECKING([for ld used by GCC])
7269 # gcc leaves a trailing carriage return which upsets mingw
7270 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7272 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7275 # Accept absolute paths.
7276 [[\\/]]* | ?:[[\\/]]*)
7277 re_direlt='/[[^/]][[^/]]*/\.\./'
7278 # Canonicalize the path of ld
7279 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7280 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7281 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7283 test -z "$LD" && LD="$ac_prog"
7286 # If it fails, then pretend we aren't using GCC.
7290 # If it is relative, then search for the first ld in PATH.
7294 elif test "$with_gnu_ld" = yes; then
7295 AC_MSG_CHECKING([for GNU ld])
7297 AC_MSG_CHECKING([for non-GNU ld])
7299 AC_CACHE_VAL(lt_cv_path_LD,
7300 [if test -z "$LD"; then
7301 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7302 for ac_dir in $PATH; do
7304 test -z "$ac_dir" && ac_dir=.
7305 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7306 lt_cv_path_LD="$ac_dir/$ac_prog"
7307 # Check to see if the program is GNU ld. I'd rather use --version,
7308 # but apparently some GNU ld's only accept -v.
7309 # Break only if it was the GNU/non-GNU ld that we prefer.
7310 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7311 test "$with_gnu_ld" != no && break
7313 test "$with_gnu_ld" != yes && break
7319 lt_cv_path_LD="$LD" # Let the user override the test with a path.
7322 if test -n "$LD"; then
7327 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7334 AC_DEFUN([AC_PROG_LD_GNU],
7335 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7336 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7337 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7338 lt_cv_prog_gnu_ld=yes
7340 lt_cv_prog_gnu_ld=no
7342 with_gnu_ld=$lt_cv_prog_gnu_ld
7346 # AC_PROG_LD_RELOAD_FLAG
7347 # ----------------------
7348 # find reload flag for linker
7349 # -- PORTME Some linkers may need a different reload flag.
7350 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7351 [AC_CACHE_CHECK([for $LD option to reload object files],
7352 lt_cv_ld_reload_flag,
7353 [lt_cv_ld_reload_flag='-r'])
7354 reload_flag=$lt_cv_ld_reload_flag
7355 case $reload_flag in
7357 *) reload_flag=" $reload_flag" ;;
7359 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7360 ])# AC_PROG_LD_RELOAD_FLAG
7363 # AC_DEPLIBS_CHECK_METHOD
7364 # -----------------------
7365 # how to check for library dependencies
7366 # -- PORTME fill in with the dynamic library characteristics
7367 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7368 [AC_CACHE_CHECK([how to recognise dependant libraries],
7369 lt_cv_deplibs_check_method,
7370 [lt_cv_file_magic_cmd='$MAGIC_CMD'
7371 lt_cv_file_magic_test_file=
7372 lt_cv_deplibs_check_method='unknown'
7373 # Need to set the preceding variable on all platforms that support
7374 # interlibrary dependencies.
7375 # 'none' -- dependencies not supported.
7376 # `unknown' -- same as none, but documents that we really don't know.
7377 # 'pass_all' -- all dependencies passed with no checks.
7378 # 'test_compile' -- check by making test program.
7379 # 'file_magic [[regex]]' -- check by looking for files in library path
7380 # which responds to the $file_magic_cmd with a given egrep regex.
7381 # If you have `file' or equivalent on your system and you're not sure
7382 # whether `pass_all' will *always* work, you probably want this one.
7386 lt_cv_deplibs_check_method=pass_all
7390 lt_cv_deplibs_check_method=pass_all
7394 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7395 lt_cv_file_magic_cmd='/usr/bin/file -L'
7396 lt_cv_file_magic_test_file=/shlib/libc.so
7399 cygwin* | mingw* | pw32*)
7400 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7401 lt_cv_file_magic_cmd='$OBJDUMP -f'
7404 darwin* | rhapsody*)
7405 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7406 lt_cv_file_magic_cmd='/usr/bin/file -L'
7408 rhapsody* | darwin1.[[012]])
7409 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7412 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7418 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7421 # Not sure whether the presence of OpenBSD here was a mistake.
7422 # Let's accept both of them until this is cleared up.
7423 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7424 lt_cv_file_magic_cmd=/usr/bin/file
7425 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7429 lt_cv_deplibs_check_method=pass_all
7434 lt_cv_deplibs_check_method=pass_all
7437 hpux10.20* | hpux11*)
7438 lt_cv_file_magic_cmd=/usr/bin/file
7439 if test "$host_cpu" = ia64; then
7440 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7441 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7443 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7444 lt_cv_file_magic_test_file=/usr/lib/libc.sl
7448 irix5* | irix6* | nonstopux*)
7450 irix5* | nonstopux*)
7451 # this will be overridden with pass_all, but let us keep it just in case
7452 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7456 *-32|*"-32 ") libmagic=32-bit;;
7457 *-n32|*"-n32 ") libmagic=N32;;
7458 *-64|*"-64 ") libmagic=64-bit;;
7459 *) libmagic=never-match;;
7461 # this will be overridden with pass_all, but let us keep it just in case
7462 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7465 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7466 lt_cv_deplibs_check_method=pass_all
7469 # This must be Linux ELF.
7472 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
7473 lt_cv_deplibs_check_method=pass_all ;;
7475 # glibc up to 2.1.1 does not perform some relocations on ARM
7476 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7478 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7482 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7483 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
7485 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
7490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7491 lt_cv_file_magic_cmd=/usr/bin/file
7492 lt_cv_file_magic_test_file=/usr/lib/libnls.so
7496 lt_cv_deplibs_check_method=unknown
7500 lt_cv_file_magic_cmd=/usr/bin/file
7501 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7502 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7503 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7505 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7509 osf3* | osf4* | osf5*)
7510 # this will be overridden with pass_all, but let us keep it just in case
7511 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7512 lt_cv_file_magic_test_file=/shlib/libc.so
7513 lt_cv_deplibs_check_method=pass_all
7517 lt_cv_deplibs_check_method=pass_all
7521 lt_cv_deplibs_check_method=pass_all
7522 lt_cv_file_magic_test_file=/lib/libc.so
7525 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7526 case $host_vendor in
7528 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]]'
7529 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7532 lt_cv_deplibs_check_method=pass_all
7535 lt_cv_file_magic_cmd='/bin/file'
7536 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7539 lt_cv_file_magic_cmd='/bin/file'
7540 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7541 lt_cv_file_magic_test_file=/lib/libc.so
7546 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7547 lt_cv_deplibs_check_method=pass_all
7551 file_magic_cmd=$lt_cv_file_magic_cmd
7552 deplibs_check_method=$lt_cv_deplibs_check_method
7553 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7554 ])# AC_DEPLIBS_CHECK_METHOD
7559 # find the path to a BSD-compatible name lister
7560 AC_DEFUN([AC_PROG_NM],
7561 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7562 [if test -n "$NM"; then
7563 # Let the user override the test.
7566 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7567 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7569 test -z "$ac_dir" && ac_dir=.
7570 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7571 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7572 # Check to see if the nm accepts a BSD-compat flag.
7573 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
7574 # nm: unknown option "B" ignored
7575 # Tru64's nm complains that /dev/null is an invalid object file
7576 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
7577 lt_cv_path_NM="$tmp_nm -B"
7579 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
7580 lt_cv_path_NM="$tmp_nm -p"
7583 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7584 continue # so that we can try to find one that supports BSD flags
7589 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7597 # check for math library
7598 AC_DEFUN([AC_CHECK_LIBM],
7599 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7602 *-*-beos* | *-*-cygwin* | *-*-pw32*)
7603 # These system don't have libm
7606 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7607 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
7610 AC_CHECK_LIB(m, main, LIBM="-lm")
7616 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7617 # -----------------------------------
7618 # sets LIBLTDL to the link flags for the libltdl convenience library and
7619 # LTDLINCL to the include flags for the libltdl header and adds
7620 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7621 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7622 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7623 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7624 # '${top_srcdir}/' (note the single quotes!). If your package is not
7625 # flat and you're not using automake, define top_builddir and
7626 # top_srcdir appropriately in the Makefiles.
7627 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7628 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7629 case $enable_ltdl_convenience in
7630 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7631 "") enable_ltdl_convenience=yes
7632 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7634 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7635 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7636 # For backwards non-gettext consistent compatibility...
7638 ])# AC_LIBLTDL_CONVENIENCE
7641 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7642 # -----------------------------------
7643 # sets LIBLTDL to the link flags for the libltdl installable library and
7644 # LTDLINCL to the include flags for the libltdl header and adds
7645 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7646 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7647 # DIRECTORY is not provided and an installed libltdl is not found, it is
7648 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7649 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7650 # quotes!). If your package is not flat and you're not using automake,
7651 # define top_builddir and top_srcdir appropriately in the Makefiles.
7652 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7653 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7654 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7655 AC_CHECK_LIB(ltdl, main,
7656 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7657 [if test x"$enable_ltdl_install" = xno; then
7658 AC_MSG_WARN([libltdl not installed, but installation disabled])
7660 enable_ltdl_install=yes
7663 if test x"$enable_ltdl_install" = x"yes"; then
7664 ac_configure_args="$ac_configure_args --enable-ltdl-install"
7665 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7666 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7668 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7672 # For backwards non-gettext consistent compatibility...
7674 ])# AC_LIBLTDL_INSTALLABLE
7677 # If this macro is not defined by Autoconf, define it here.
7678 ifdef([AC_PROVIDE_IFELSE],
7680 [define([AC_PROVIDE_IFELSE],
7681 [ifdef([AC_PROVIDE_$1],
7687 # enable support for C++ libraries
7688 AC_DEFUN([AC_LIBTOOL_CXX],
7689 [AC_REQUIRE([_LT_AC_LANG_CXX])
7695 AC_DEFUN([_LT_AC_LANG_CXX],
7696 [AC_REQUIRE([AC_PROG_CXX])
7697 AC_REQUIRE([AC_PROG_CXXCPP])
7703 # enable support for GCJ libraries
7704 AC_DEFUN([AC_LIBTOOL_GCJ],
7705 [AC_REQUIRE([_LT_AC_LANG_GCJ])
7711 AC_DEFUN([_LT_AC_LANG_GCJ],
7712 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7713 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7714 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7715 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7716 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7717 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7723 # enable support for Windows resource files
7724 AC_DEFUN([AC_LIBTOOL_RC],
7725 [AC_REQUIRE([AC_PROG_RC])
7729 # AC_LIBTOOL_LANG_C_CONFIG
7730 # ------------------------
7731 # Ensure that the configuration vars for the C compiler are
7732 # suitably defined. Those variables are subsequently used by
7733 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7734 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7735 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7739 # Source file extension for C test sources.
7742 # Object file extension for compiled C test sources.
7744 _LT_AC_TAGVAR(objext, $1)=$objext
7746 # Code to be used in simple compile tests
7747 lt_simple_compile_test_code="int some_variable = 0;"
7749 # Code to be used in simple link tests
7750 lt_simple_link_test_code='main(){return(0);}'
7755 # Check for any special shared library compilation flags.
7757 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7758 if test "$GCC" = no; then
7761 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7765 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7766 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7767 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7769 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7770 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7776 # Check to make sure the static flag actually works.
7778 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7779 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7780 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7782 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7785 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7786 AC_LIBTOOL_PROG_COMPILER_PIC($1)
7787 AC_LIBTOOL_PROG_CC_C_O($1)
7788 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7789 AC_LIBTOOL_PROG_LD_SHLIBS($1)
7790 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7791 AC_LIBTOOL_SYS_LIB_STRIP
7792 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7793 AC_LIBTOOL_DLOPEN_SELF($1)
7795 # Report which librarie types wil actually be built
7796 AC_MSG_CHECKING([if libtool supports shared libraries])
7797 AC_MSG_RESULT([$can_build_shared])
7799 AC_MSG_CHECKING([whether to build shared libraries])
7800 test "$can_build_shared" = "no" && enable_shared=no
7802 # On AIX, shared libraries and static libraries use the same namespace, and
7803 # are all built from PIC.
7806 test "$enable_shared" = yes && enable_static=no
7807 if test -n "$RANLIB"; then
7808 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7809 postinstall_cmds='$RANLIB $lib'
7814 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7815 test "$enable_shared" = yes && enable_static=no
7819 AC_MSG_RESULT([$enable_shared])
7821 AC_MSG_CHECKING([whether to build static libraries])
7822 # Make sure either enable_shared or enable_static is yes.
7823 test "$enable_shared" = yes || enable_static=yes
7824 AC_MSG_RESULT([$enable_static])
7826 AC_LIBTOOL_CONFIG($1)
7830 ])# AC_LIBTOOL_LANG_C_CONFIG
7833 # AC_LIBTOOL_LANG_CXX_CONFIG
7834 # --------------------------
7835 # Ensure that the configuration vars for the C compiler are
7836 # suitably defined. Those variables are subsequently used by
7837 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7838 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7839 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7841 AC_REQUIRE([AC_PROG_CXX])
7842 AC_REQUIRE([AC_PROG_CXXCPP])
7844 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7845 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7846 _LT_AC_TAGVAR(always_export_symbols, $1)=no
7847 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7848 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7849 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7850 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7851 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7852 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7853 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7854 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7855 _LT_AC_TAGVAR(no_undefined_flag, $1)=
7856 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7858 # Dependencies to place before and after the object being linked:
7859 _LT_AC_TAGVAR(predep_objects, $1)=
7860 _LT_AC_TAGVAR(postdep_objects, $1)=
7861 _LT_AC_TAGVAR(predeps, $1)=
7862 _LT_AC_TAGVAR(postdeps, $1)=
7863 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7865 # Source file extension for C test sources.
7868 # Object file extension for compiled C test sources.
7870 _LT_AC_TAGVAR(objext, $1)=$objext
7872 # Code to be used in simple compile tests
7873 lt_simple_compile_test_code="int some_variable = 0;"
7875 # Code to be used in simple link tests
7876 lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7878 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7881 # Allow CC to be a program name with arguments.
7886 _LT_AC_TAGVAR(compiler, $1)=$CC
7887 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7889 # We don't want -fno-exception wen compiling C++ code, so set the
7890 # no_builtin_flag separately
7891 if test "$GXX" = yes; then
7892 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7894 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7897 if test "$GXX" = yes; then
7898 # Set up default GNU C++ configuration
7900 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7901 # archiving commands below assume that GNU ld is being used.
7902 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7903 egrep 'GNU ld' > /dev/null; then
7906 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7907 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7909 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7910 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7912 # If archive_cmds runs LD, not CC, wlarc should be empty
7913 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7914 # investigate it a little bit more. (MM)
7917 # ancient GNU ld didn't support --whole-archive et. al.
7918 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7919 egrep 'no-whole-archive' > /dev/null; then
7920 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7922 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7928 # A generic and very simple default shared library creation
7929 # command for GNU C++ for the case where it uses the native
7930 # linker, instead of GNU ld. If possible, this setting should
7931 # overridden to take advantage of the native linker features on
7932 # the platform it is being used on.
7933 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7936 # Commands to make compiler produce verbose output that lists
7937 # what "hidden" libraries, object files and flags are used when
7938 # linking a shared library.
7939 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7947 # PORTME: fill in a description of your system's C++ link characteristics
7948 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7949 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7952 # FIXME: insert proper C++ library support
7953 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7956 if test "$host_cpu" = ia64; then
7957 # On IA64, the linker does run time linking by default, so we don't
7958 # have to do anything special.
7959 aix_use_runtimelinking=no
7960 exp_sym_flag='-Bexport'
7963 # KDE requires run time linking. Make it the default.
7964 aix_use_runtimelinking=yes
7965 exp_sym_flag='-bexport'
7966 no_entry_flag='-bnoentry'
7969 # When large executables or shared objects are built, AIX ld can
7970 # have problems creating the table of contents. If linking a library
7971 # or program results in "error TOC overflow" add -mminimal-toc to
7972 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7973 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7975 _LT_AC_TAGVAR(archive_cmds, $1)=''
7976 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7977 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7978 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7980 if test "$GXX" = yes; then
7981 case $host_os in aix4.[012]|aix4.[012].*)
7982 # We only want to do this on AIX 4.2 and lower, the check
7983 # below for broken collect2 doesn't work under 4.3+
7984 collect2name=`${CC} -print-prog-name=collect2`
7985 if test -f "$collect2name" && \
7986 strings "$collect2name" | grep resolve_lib_name >/dev/null
7988 # We have reworked collect2
7989 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7991 # We have old collect2
7992 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7993 # It fails to find uninstalled libraries when the uninstalled
7994 # path is not listed in the libpath. Setting hardcode_minus_L
7995 # to unsupported forces relinking
7996 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7997 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7998 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8001 shared_flag='-shared'
8004 if test "$host_cpu" = ia64; then
8005 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8006 # chokes on -Wl,-G. The following line is correct:
8009 if test "$aix_use_runtimelinking" = yes; then
8010 shared_flag='-qmkshrobj ${wl}-G'
8012 shared_flag='-qmkshrobj'
8017 # Let the compiler handle the export list.
8018 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8019 if test "$aix_use_runtimelinking" = yes; then
8020 # Warning - without using the other runtime loading flags (-brtl),
8021 # -berok will link without error, but may produce a broken library.
8022 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8023 # Determine the default libpath from the value encoded in an empty executable.
8024 _LT_AC_SYS_LIBPATH_AIX
8025 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8027 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8028 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8030 if test "$host_cpu" = ia64; then
8031 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8032 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8033 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8035 # Determine the default libpath from the value encoded in an empty executable.
8036 _LT_AC_SYS_LIBPATH_AIX
8037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8038 # Warning - without using the other run time loading flags,
8039 # -berok will link without error, but may produce a broken library.
8040 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8041 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8042 # -bexpall does not export symbols beginning with underscore (_)
8043 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8044 # Exported symbols can be pulled into shared objects from archives
8045 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8046 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8047 # This is similar to how AIX traditionally builds it's shared libraries.
8048 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8053 case $cc_basename in
8055 # FIXME: insert proper C++ library support
8056 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8061 case $cc_basename in
8063 # FIXME: insert proper C++ library support
8064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8067 # Green Hills C++ Compiler
8068 # FIXME: insert proper C++ library support
8069 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8072 # FIXME: insert proper C++ library support
8073 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8078 # C++ shared libraries reported to be fairly broken before switch to ELF
8079 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8082 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8085 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8087 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8092 if test $with_gnu_ld = no; then
8093 if test "$host_cpu" = ia64; then
8094 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8096 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8097 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8098 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8101 if test "$host_cpu" = ia64; then
8102 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8103 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8105 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8107 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8108 # but as the default
8109 # location of the library.
8111 case $cc_basename in
8113 # FIXME: insert proper C++ library support
8114 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8119 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8122 if test "$host_cpu" = ia64; then
8123 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8125 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8129 # Commands to make compiler produce verbose output that lists
8130 # what "hidden" libraries, object files and flags are used when
8131 # linking a shared library.
8133 # There doesn't appear to be a way to prevent this compiler from
8134 # explicitly linking system object files so we need to strip them
8135 # from the output so that they don't get included in the library
8137 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'
8140 if test "$GXX" = yes; then
8141 if test $with_gnu_ld = no; then
8144 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8147 if test "$host_cpu" = ia64; then
8148 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8150 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8156 # FIXME: insert proper C++ library support
8157 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8163 case $cc_basename in
8166 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8168 # Archives containing C++ object files must be created using
8169 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
8170 # necessary to make sure instantiated templates are included
8172 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8175 if test "$GXX" = yes; then
8176 if test "$with_gnu_ld" = no; then
8177 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8179 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
8182 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8185 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8186 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8189 case $cc_basename in
8191 # Kuck and Associates, Inc. (KAI) C++ Compiler
8193 # KCC will only create a shared library if the output file
8194 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8195 # to its proper name (with version) after linking.
8196 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8197 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8199 # Commands to make compiler produce verbose output that lists
8200 # what "hidden" libraries, object files and flags are used when
8201 # linking a shared library.
8203 # There doesn't appear to be a way to prevent this compiler from
8204 # explicitly linking system object files so we need to strip them
8205 # from the output so that they don't get included in the library
8207 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8209 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8210 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8212 # Archives containing C++ object files must be created using
8213 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8214 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8218 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8219 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8221 runpath_var=LD_RUN_PATH
8222 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8223 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8225 # Commands to make compiler produce verbose output that lists
8226 # what "hidden" libraries, object files and flags are used when
8227 # linking a shared library.
8229 # There doesn't appear to be a way to prevent this compiler from
8230 # explicitly linking system object files so we need to strip them
8231 # from the output so that they don't get included in the library
8233 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'
8238 # FIXME: insert proper C++ library support
8239 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8242 # FIXME: insert proper C++ library support
8243 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8246 case $cc_basename in
8248 # FIXME: insert proper C++ library support
8249 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8252 # FIXME: insert proper C++ library support
8253 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8258 # NetBSD uses g++ - do we need to do anything?
8261 case $cc_basename in
8263 # Kuck and Associates, Inc. (KAI) C++ Compiler
8265 # KCC will only create a shared library if the output file
8266 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8267 # to its proper name (with version) after linking.
8268 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8270 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8271 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8273 # Archives containing C++ object files must be created using
8274 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8275 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8279 # Rational C++ 2.4.1
8280 # FIXME: insert proper C++ library support
8281 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8284 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8285 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8287 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8288 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8290 # Commands to make compiler produce verbose output that lists
8291 # what "hidden" libraries, object files and flags are used when
8292 # linking a shared library.
8294 # There doesn't appear to be a way to prevent this compiler from
8295 # explicitly linking system object files so we need to strip them
8296 # from the output so that they don't get included in the library
8298 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'
8301 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8302 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8303 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8305 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8306 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8308 # Commands to make compiler produce verbose output that lists
8309 # what "hidden" libraries, object files and flags are used when
8310 # linking a shared library.
8311 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8314 # FIXME: insert proper C++ library support
8315 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8321 case $cc_basename in
8323 # Kuck and Associates, Inc. (KAI) C++ Compiler
8325 # KCC will only create a shared library if the output file
8326 # ends with ".so" (or ".sl" for HP-UX), so rename the library
8327 # to its proper name (with version) after linking.
8328 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8330 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8331 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8333 # Archives containing C++ object files must be created using
8334 # the KAI C++ compiler.
8335 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8338 # Rational C++ 2.4.1
8339 # FIXME: insert proper C++ library support
8340 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8343 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8344 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8345 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
8346 echo "-hidden">> $lib.exp~
8347 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8350 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8351 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8353 # Commands to make compiler produce verbose output that lists
8354 # what "hidden" libraries, object files and flags are used when
8355 # linking a shared library.
8357 # There doesn't appear to be a way to prevent this compiler from
8358 # explicitly linking system object files so we need to strip them
8359 # from the output so that they don't get included in the library
8361 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'
8364 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8365 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8366 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8369 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8371 # Commands to make compiler produce verbose output that lists
8372 # what "hidden" libraries, object files and flags are used when
8373 # linking a shared library.
8374 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8377 # FIXME: insert proper C++ library support
8378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8384 # FIXME: insert proper C++ library support
8385 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8388 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8389 case $cc_basename in
8391 # FIXME: insert proper C++ library support
8392 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8395 # FIXME: insert proper C++ library support
8396 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8401 case $cc_basename in
8404 # FIXME: insert proper C++ library support
8405 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8409 # FIXME: insert proper C++ library support
8410 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8413 # FIXME: insert proper C++ library support
8414 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8419 case $cc_basename in
8421 # Sun C++ 4.2, 5.x and Centerline C++
8422 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8423 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8424 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8425 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8427 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8428 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8430 solaris2.[0-5] | solaris2.[0-5].*) ;;
8432 # The C++ compiler is used as linker so we must use $wl
8433 # flag to pass the commands to the underlying system
8435 # Supported since Solaris 2.6 (maybe 2.5.1?)
8436 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8439 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8441 # Commands to make compiler produce verbose output that lists
8442 # what "hidden" libraries, object files and flags are used when
8443 # linking a shared library.
8445 # There doesn't appear to be a way to prevent this compiler from
8446 # explicitly linking system object files so we need to strip them
8447 # from the output so that they don't get included in the library
8449 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8451 # Archives containing C++ object files must be created using
8452 # "CC -xar", where "CC" is the Sun C++ compiler. This is
8453 # necessary to make sure instantiated templates are included
8455 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8458 # Green Hills C++ Compiler
8459 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8461 # The C++ compiler must be used to create the archive.
8462 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8465 # GNU C++ compiler with Solaris linker
8466 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8467 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8468 if $CC --version | egrep -v '^2\.7' > /dev/null; then
8469 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8470 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8471 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8473 # Commands to make compiler produce verbose output that lists
8474 # what "hidden" libraries, object files and flags are used when
8475 # linking a shared library.
8476 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8478 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8480 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8481 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8482 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8484 # Commands to make compiler produce verbose output that lists
8485 # what "hidden" libraries, object files and flags are used when
8486 # linking a shared library.
8487 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8490 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8495 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8496 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8499 case $cc_basename in
8501 # NonStop-UX NCC 3.20
8502 # FIXME: insert proper C++ library support
8503 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8506 # FIXME: insert proper C++ library support
8507 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8512 # FIXME: insert proper C++ library support
8513 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8516 # FIXME: insert proper C++ library support
8517 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8520 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8521 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8523 # Figure out "hidden" C++ library dependencies from verbose
8524 # compiler output whening linking a shared library.
8525 cat > conftest.$ac_ext <<EOF
8529 Foo (void) { a = 0; }
8536 if AC_TRY_EVAL(ac_compile); then
8537 # Parse the compiler output and extract the necessary
8538 # objects, libraries and library flags.
8540 # Sentinel used to keep track of whether or not we are before
8541 # the conftest object file.
8542 pre_test_object_deps_done=no
8544 # The `*' in the case matches for architectures that use `case' in
8545 # $output_verbose_cmd can trigger glob expansion during the loop
8546 # eval without this substitution.
8547 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8549 for p in `eval $output_verbose_link_cmd`; do
8553 # Some compilers place space between "-{L,R}" and the path.
8556 || test $p = "-R"; then
8563 if test "$pre_test_object_deps_done" = no; then
8566 # Internal compiler library paths should come after those
8567 # provided the user. The postdeps already come after the
8568 # user supplied libs so there is no need to process them.
8569 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8570 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8572 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8575 # The "-l" case would never come before the object being
8576 # linked, so don't bother handling this case.
8579 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8580 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8582 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8587 *.$objext|*.$libext)
8588 # This assumes that the test object file only shows up
8589 # once in the compiler output.
8590 if test "$p" = "conftest.$objext"; then
8591 pre_test_object_deps_done=yes
8595 if test "$pre_test_object_deps_done" = no; then
8596 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8597 _LT_AC_TAGVAR(predep_objects, $1)="$p"
8599 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8602 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8603 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
8605 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8610 *) ;; # Ignore the rest.
8618 echo "libtool.m4: error: problem compiling C++ test program"
8621 $rm -f confest.$objext
8623 case " $_LT_AC_TAGVAR(postdeps, $1) " in
8624 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8625 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
8628 _LT_AC_TAGVAR(GCC, $1)="$GXX"
8629 _LT_AC_TAGVAR(LD, $1)="$LD"
8631 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8632 AC_LIBTOOL_PROG_CC_C_O($1)
8633 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8634 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8635 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8636 AC_LIBTOOL_SYS_LIB_STRIP
8637 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8638 AC_LIBTOOL_DLOPEN_SELF($1)
8640 AC_LIBTOOL_CONFIG($1)
8644 ])# AC_LIBTOOL_LANG_CXX_CONFIG
8647 # AC_LIBTOOL_LANG_GCJ_CONFIG
8648 # --------------------------
8649 # Ensure that the configuration vars for the C compiler are
8650 # suitably defined. Those variables are subsequently used by
8651 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8652 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8653 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8656 # Source file extension for C test sources.
8659 # Object file extension for compiled C test sources.
8661 _LT_AC_TAGVAR(objext, $1)=$objext
8663 # Code to be used in simple compile tests
8664 lt_simple_compile_test_code="class foo {}"
8666 # Code to be used in simple link tests
8667 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8669 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8672 # Allow CC to be a program name with arguments.
8677 _LT_AC_TAGVAR(compiler, $1)=$CC
8679 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8680 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8682 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8683 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8684 AC_LIBTOOL_PROG_CC_C_O($1)
8685 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8686 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8687 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8688 AC_LIBTOOL_SYS_LIB_STRIP
8689 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8690 AC_LIBTOOL_DLOPEN_SELF($1)
8692 AC_LIBTOOL_CONFIG($1)
8696 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
8699 # AC_LIBTOOL_LANG_RC_CONFIG
8700 # --------------------------
8701 # Ensure that the configuration vars for the Windows resource compiler are
8702 # suitably defined. Those variables are subsequently used by
8703 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8704 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8705 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8708 # Source file extension for RC test sources.
8711 # Object file extension for compiled RC test sources.
8713 _LT_AC_TAGVAR(objext, $1)=$objext
8715 # Code to be used in simple compile tests
8716 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8718 # Code to be used in simple link tests
8719 lt_simple_link_test_code="$lt_simple_compile_test_code"
8721 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8724 # Allow CC to be a program name with arguments.
8729 _LT_AC_TAGVAR(compiler, $1)=$CC
8730 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8732 AC_LIBTOOL_CONFIG($1)
8736 ])# AC_LIBTOOL_LANG_RC_CONFIG
8739 # AC_LIBTOOL_CONFIG([TAGNAME])
8740 # ----------------------------
8741 # If TAGNAME is not passed, then create an initial libtool script
8742 # with a default configuration from the untagged config vars. Otherwise
8743 # add code to config.status for appending the configuration named by
8744 # TAGNAME from the matching tagged config vars.
8745 AC_DEFUN([AC_LIBTOOL_CONFIG],
8746 [# The else clause should only fire when bootstrapping the
8747 # libtool distribution, otherwise you forgot to ship ltmain.sh
8748 # with your package, and you will get complaints that there are
8749 # no rules to generate ltmain.sh.
8750 if test -f "$ltmain"; then
8751 # Now quote all the things that may contain metacharacters while being
8752 # careful not to overquote the AC_SUBSTed values. We take copies of the
8753 # variables and quote the copies for generation of the libtool script.
8754 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8755 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8756 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8757 deplibs_check_method reload_flag reload_cmds need_locks \
8758 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8759 lt_cv_sys_global_symbol_to_c_name_address \
8760 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8761 old_postinstall_cmds old_postuninstall_cmds \
8762 _LT_AC_TAGVAR(compiler, $1) \
8763 _LT_AC_TAGVAR(CC, $1) \
8764 _LT_AC_TAGVAR(LD, $1) \
8765 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8767 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8768 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8769 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8770 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8771 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8772 _LT_AC_TAGVAR(old_archive_cmds, $1) \
8773 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8774 _LT_AC_TAGVAR(predep_objects, $1) \
8775 _LT_AC_TAGVAR(postdep_objects, $1) \
8776 _LT_AC_TAGVAR(predeps, $1) \
8777 _LT_AC_TAGVAR(postdeps, $1) \
8778 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8779 _LT_AC_TAGVAR(archive_cmds, $1) \
8780 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8781 _LT_AC_TAGVAR(postinstall_cmds, $1) \
8782 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
8783 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8784 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
8785 _LT_AC_TAGVAR(no_undefined_flag, $1) \
8786 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
8787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8788 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8789 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8790 _LT_AC_TAGVAR(exclude_expsyms, $1) \
8791 _LT_AC_TAGVAR(include_expsyms, $1); do
8794 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
8795 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8796 _LT_AC_TAGVAR(archive_cmds, $1) | \
8797 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8798 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8799 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8800 extract_expsyms_cmds | reload_cmds | finish_cmds | \
8801 postinstall_cmds | postuninstall_cmds | \
8802 old_postinstall_cmds | old_postuninstall_cmds | \
8803 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8804 # Double-quote double-evaled strings.
8805 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8808 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8814 *'\[$]0 --fallback-echo"')
8815 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8820 [cfgfile="${ofile}T"
8821 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8823 AC_MSG_NOTICE([creating $ofile])],
8826 cat <<__EOF__ >> "$cfgfile"
8830 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8831 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8832 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
8834 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8835 # Free Software Foundation, Inc.
8837 # This file is part of GNU Libtool:
8838 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8840 # This program is free software; you can redistribute it and/or modify
8841 # it under the terms of the GNU General Public License as published by
8842 # the Free Software Foundation; either version 2 of the License, or
8843 # (at your option) any later version.
8845 # This program is distributed in the hope that it will be useful, but
8846 # WITHOUT ANY WARRANTY; without even the implied warranty of
8847 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8848 # General Public License for more details.
8850 # You should have received a copy of the GNU General Public License
8851 # along with this program; if not, write to the Free Software
8852 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8854 # As a special exception to the GNU General Public License, if you
8855 # distribute this file as part of a program that contains a
8856 # configuration script generated by Autoconf, you may include it under
8857 # the same distribution terms that you use for the rest of that program.
8859 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
8860 Xsed="sed -e s/^X//"
8862 # The HP-UX ksh and POSIX shell print the target directory to stdout
8864 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8866 # The names of the tagged configurations supported by this script.
8869 # ### BEGIN LIBTOOL CONFIG],
8870 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8872 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8874 # Shell to use when invoking shell scripts.
8877 # Whether or not to build shared libraries.
8878 build_libtool_libs=$enable_shared
8880 # Whether or not to build static libraries.
8881 build_old_libs=$enable_static
8883 # Whether or not to add -lc for building shared libraries.
8884 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8886 # Whether or not to optimize for fast installation.
8887 fast_install=$enable_fast_install
8890 host_alias=$host_alias
8893 # An echo program that does not interpret backslashes.
8898 AR_FLAGS=$lt_AR_FLAGS
8903 # A language-specific compiler.
8904 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8906 # Is the compiler the GNU C compiler?
8907 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8909 # The linker used to build libraries.
8910 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8912 # Whether we need hard or soft links.
8915 # A BSD-compatible nm program.
8918 # A sed program that does not truncate output.
8921 # A symbol stripping program
8924 # Used to examine libraries when file_magic_cmd begins "file"
8925 MAGIC_CMD=$MAGIC_CMD
8927 # Used on cygwin: DLL creation program.
8930 # Used on cygwin: object dumper.
8933 # Used on cygwin: assembler.
8936 # The name of the directory that contains temporary libtool files.
8939 # How to create reloadable object files.
8940 reload_flag=$lt_reload_flag
8941 reload_cmds=$lt_reload_cmds
8943 # How to pass a linker flag through the compiler.
8944 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8946 # Object file suffix (normally "o").
8949 # Old archive suffix (normally "a").
8952 # Executable file suffix (normally "").
8955 # Additional compiler flags for building library objects.
8956 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8959 # What is the maximum length of a command?
8960 max_cmd_len=$lt_cv_sys_max_cmd_len
8962 # Does compiler simultaneously support -c and -o options?
8963 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8965 # Must we lock files when doing compilation ?
8966 need_locks=$lt_need_locks
8968 # Do we need the lib prefix for modules?
8969 need_lib_prefix=$need_lib_prefix
8971 # Do we need a version for libraries?
8972 need_version=$need_version
8974 # Whether dlopen is supported.
8975 dlopen_support=$enable_dlopen
8977 # Whether dlopen of programs is supported.
8978 dlopen_self=$enable_dlopen_self
8980 # Whether dlopen of statically linked programs is supported.
8981 dlopen_self_static=$enable_dlopen_self_static
8983 # Compiler flag to prevent dynamic linking.
8984 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
8986 # Compiler flag to turn off builtin functions.
8987 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
8989 # Compiler flag to allow reflexive dlopens.
8990 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
8992 # Compiler flag to generate shared objects directly from archives.
8993 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
8995 # Compiler flag to generate thread-safe objects.
8996 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
8998 # Library versioning type.
8999 version_type=$version_type
9001 # Format of library name prefix.
9002 libname_spec=$lt_libname_spec
9004 # List of archive names. First name is the real one, the rest are links.
9005 # The last name is the one that the linker finds with -lNAME.
9006 library_names_spec=$lt_library_names_spec
9008 # The coded name of the library, if different from the real name.
9009 soname_spec=$lt_soname_spec
9011 # Commands used to build and install an old-style archive.
9013 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9014 old_postinstall_cmds=$lt_old_postinstall_cmds
9015 old_postuninstall_cmds=$lt_old_postuninstall_cmds
9017 # Create an old-style archive from a shared archive.
9018 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9020 # Create a temporary old-style archive to link instead of a shared archive.
9021 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9023 # Commands used to build and install a shared archive.
9024 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9025 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9026 postinstall_cmds=$lt_postinstall_cmds
9027 postuninstall_cmds=$lt_postuninstall_cmds
9029 # Commands to strip libraries.
9030 old_striplib=$lt_old_striplib
9031 striplib=$lt_striplib
9033 # Dependencies to place before the objects being linked to create a
9035 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9037 # Dependencies to place after the objects being linked to create a
9039 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9041 # Dependencies to place before the objects being linked to create a
9043 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9045 # Dependencies to place after the objects being linked to create a
9047 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9049 # The library search path used internally by the compiler when linking
9051 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9053 # Method to check whether dependent libraries are shared objects.
9054 deplibs_check_method=$lt_deplibs_check_method
9056 # Command to use when deplibs_check_method == file_magic.
9057 file_magic_cmd=$lt_file_magic_cmd
9059 # Flag that allows shared libraries with undefined symbols to be built.
9060 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9062 # Flag that forces no undefined symbols.
9063 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9065 # Commands used to finish a libtool library installation in a directory.
9066 finish_cmds=$lt_finish_cmds
9068 # Same as above, but a single script fragment to be evaled but not shown.
9069 finish_eval=$lt_finish_eval
9071 # Take the output of nm and produce a listing of raw symbols and C names.
9072 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9074 # Transform the output of nm in a proper C declaration
9075 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9077 # Transform the output of nm in a C name address pair
9078 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9080 # This is the shared library runtime path variable.
9081 runpath_var=$runpath_var
9083 # This is the shared library path variable.
9084 shlibpath_var=$shlibpath_var
9086 # Is shlibpath searched before the hard-coded library search path?
9087 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9089 # How to hardcode a shared library path into an executable.
9090 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9092 # Whether we should hardcode library paths into libraries.
9093 hardcode_into_libs=$hardcode_into_libs
9095 # Flag to hardcode \$libdir into a binary during linking.
9096 # This must work even if \$libdir does not exist.
9097 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9099 # Whether we need a single -rpath flag with a separated argument.
9100 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9102 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9104 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9106 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9108 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9110 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9111 # the resulting binary.
9112 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9114 # Variables whose values should be saved in libtool wrapper scripts and
9115 # restored at relink time.
9116 variables_saved_for_relink="$variables_saved_for_relink"
9118 # Whether libtool must link a program against all its dependency libraries.
9119 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9121 # Compile-time system search path for libraries
9122 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9124 # Run-time system search path for libraries
9125 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9127 # Fix the shell variable \$srcfile for the compiler.
9128 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9130 # Set to yes if exported symbols are required.
9131 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9133 # The commands to list exported symbols.
9134 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9136 # The commands to extract the exported symbol list from a shared archive.
9137 extract_expsyms_cmds=$lt_extract_expsyms_cmds
9139 # Symbols that should not be listed in the preloaded symbols.
9140 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9142 # Symbols that must always be exported.
9143 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9146 [# ### END LIBTOOL CONFIG],
9147 [# ### END LIBTOOL TAG CONFIG: $tagname])
9154 cat <<\EOF >> "$cfgfile"
9156 # AIX sometimes has problems with the GCC collect2 program. For some
9157 # reason, if we set the COLLECT_NAMES environment variable, the problems
9158 # vanish in a puff of smoke.
9159 if test "X${COLLECT_NAMES+set}" != Xset; then
9161 export COLLECT_NAMES
9166 cygwin* | mingw* | pw32* | os2*)
9167 cat <<'EOF' >> "$cfgfile"
9168 # This is a source program that is used to create dlls on Windows
9169 # Don't remove nor modify the starting and closing comments
9171 # This is a source program that is used to create import libraries
9172 # on Windows for dlls which lack them. Don't remove nor modify the
9173 # starting and closing comments
9174 _LT_AC_FILE_IMPGEN_C
9179 # We use sed instead of cat because bash on DJGPP gets confused if
9180 # if finds mixed CR/LF and LF-only lines. Since sed operates in
9181 # text mode, it properly converts lines to CR/LF. This bash problem
9182 # is reportedly fixed, but why not run on old versions too?
9183 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9185 mv -f "$cfgfile" "$ofile" || \
9186 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9190 # If there is no Makefile yet, we rely on a make rule to execute
9191 # `config.status --recheck' to rerun these tests and create the
9192 # libtool script then.
9193 test -f Makefile && make "$ltmain"
9195 ])# AC_LIBTOOL_CONFIG
9198 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9199 # -------------------------------------------
9200 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9201 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9203 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9205 if test "$GCC" = yes; then
9206 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9208 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9209 lt_cv_prog_compiler_rtti_exceptions,
9210 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
9211 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9213 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9216 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9217 # ---------------------------------
9218 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9219 [AC_REQUIRE([AC_CANONICAL_HOST])
9220 AC_REQUIRE([AC_PROG_NM])
9221 AC_REQUIRE([AC_OBJEXT])
9222 # Check for command to grab the raw symbol name followed by C symbol from nm.
9223 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9224 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9226 # These are sane defaults that work on at least a few old systems.
9227 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
9229 # Character class describing NM global symbol codes.
9230 symcode='[[BCDEGRST]]'
9232 # Regexp to match symbols that can be accessed directly from C.
9233 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9235 # Transform the above into a raw symbol and a C symbol.
9236 symxfrm='\1 \2\3 \3'
9238 # Transform an extracted symbol line into a proper C declaration
9239 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9241 # Transform an extracted symbol line into symbol name and symbol address
9242 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'"
9244 # Define system-specific variables.
9249 cygwin* | mingw* | pw32*)
9250 symcode='[[ABCDGISTW]]'
9252 hpux*) # Its linker distinguishes data from code symbols
9253 if test "$host_cpu" = ia64; then
9254 symcode='[[ABCDEGRST]]'
9256 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9257 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'"
9260 symcode='[[BCDEGRST]]'
9266 symcode='[[DFNSTU]]'
9270 # Handle CRLF in mingw tool chain
9274 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9278 # If we're using GNU nm, then use its standard symbol codes.
9279 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
9280 symcode='[[ABCDGISTW]]'
9283 # Try without a prefix undercore, then with it.
9284 for ac_symprfx in "" "_"; do
9286 # Write the raw and C identifiers.
9287 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9289 # Check to see that the pipe works correctly.
9293 cat > conftest.$ac_ext <<EOF
9298 void nm_test_func(){}
9302 int main(){nm_test_var='a';nm_test_func();return(0);}
9305 if AC_TRY_EVAL(ac_compile); then
9306 # Now try to grab the symbols.
9308 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9309 # Try sorting and uniquifying the output.
9310 if sort "$nlist" | uniq > "$nlist"T; then
9311 mv -f "$nlist"T "$nlist"
9316 # Make sure that we snagged all the symbols we need.
9317 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
9318 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
9319 cat <<EOF > conftest.$ac_ext
9325 # Now generate the symbol file.
9326 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9328 cat <<EOF >> conftest.$ac_ext
9329 #if defined (__STDC__) && __STDC__
9330 # define lt_ptr_t void *
9332 # define lt_ptr_t char *
9336 /* The mapping between symbol names and symbols. */
9341 lt_preloaded_symbols[[]] =
9344 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9345 cat <<\EOF >> conftest.$ac_ext
9353 # Now try linking the two files.
9354 mv conftest.$ac_objext conftstm.$ac_objext
9355 lt_save_LIBS="$LIBS"
9356 lt_save_CFLAGS="$CFLAGS"
9357 LIBS="conftstm.$ac_objext"
9358 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9359 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9362 LIBS="$lt_save_LIBS"
9363 CFLAGS="$lt_save_CFLAGS"
9365 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9368 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9371 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9374 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9375 cat conftest.$ac_ext >&5
9377 rm -f conftest* conftst*
9379 # Do not use the global_symbol_pipe unless it works.
9380 if test "$pipe_works" = yes; then
9383 lt_cv_sys_global_symbol_pipe=
9387 if test -z "$lt_cv_sys_global_symbol_pipe"; then
9388 lt_cv_sys_global_symbol_to_cdecl=
9390 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9391 AC_MSG_RESULT(failed)
9395 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9398 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9399 # ---------------------------------------
9400 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9401 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9402 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9403 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9405 AC_MSG_CHECKING([for $compiler option to produce PIC])
9407 # C++ specific cases for pic, static, wl, etc.
9408 if test "$GXX" = yes; then
9409 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9410 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9414 # All AIX code is PIC.
9415 if test "$host_cpu" = ia64; then
9416 # AIX 5 now supports IA64 processor
9417 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9421 # FIXME: we need at least 68020 code to build shared libraries, but
9422 # adding the `-m68020' flag to GCC prevents building anything better,
9424 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9426 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9427 # PIC is the default for these OSes.
9429 cygwin* | mingw* | os2*)
9430 # This hack is so that the source file can tell whether it is being
9431 # built for inclusion in a dll (and should export symbols for example).
9432 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9434 darwin* | rhapsody*)
9435 # PIC is the default on this platform
9436 # Common symbols not allowed in MH_DYLIB files
9437 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9440 # DJGPP does not support shared libraries at all
9441 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9444 if test -d /usr/nec; then
9445 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9449 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9450 if test "$host_cpu" != ia64; then
9451 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9455 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9461 # All AIX code is PIC.
9462 if test "$host_cpu" = ia64; then
9463 # AIX 5 now supports IA64 processor
9464 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9466 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9470 case $cc_basename in
9472 # Green Hills C++ Compiler
9473 # _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"
9478 case $cc_basename in
9480 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9483 # Green Hills C++ Compiler
9484 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9491 # FreeBSD uses GNU C++
9493 hpux9* | hpux10* | hpux11*)
9494 case $cc_basename in
9496 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9497 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9498 if test "$host_cpu" != ia64; then
9499 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9503 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9504 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9505 if test "$host_cpu" != ia64; then
9506 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9513 irix5* | irix6* | nonstopux*)
9514 case $cc_basename in
9516 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9517 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9518 # CC pic flag -KPIC is the default.
9525 case $cc_basename in
9528 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9529 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9533 # Make sure the PIC flag is empty. It appears that all Alpha
9534 # Linux and Compaq Tru64 Unix objects are PIC.
9535 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9536 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9547 case $cc_basename in
9549 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9557 osf3* | osf4* | osf5*)
9558 case $cc_basename in
9560 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9563 # Rational C++ 2.4.1
9564 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9567 # Digital/Compaq C++
9568 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9569 # Make sure the PIC flag is empty. It appears that all Alpha
9570 # Linux and Compaq Tru64 Unix objects are PIC.
9571 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9572 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9581 case $cc_basename in
9583 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9590 case $cc_basename in
9592 # Sun C++ 4.2, 5.x and Centerline C++
9593 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9594 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9595 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9598 # Green Hills C++ Compiler
9599 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9606 case $cc_basename in
9609 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9610 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9621 case $cc_basename in
9623 # NonStop-UX NCC 3.20
9624 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9635 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9641 if test "$GCC" = yes; then
9642 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9643 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9647 # All AIX code is PIC.
9648 if test "$host_cpu" = ia64; then
9649 # AIX 5 now supports IA64 processor
9650 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9655 # FIXME: we need at least 68020 code to build shared libraries, but
9656 # adding the `-m68020' flag to GCC prevents building anything better,
9658 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9661 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9662 # PIC is the default for these OSes.
9665 cygwin* | mingw* | pw32* | os2*)
9666 # This hack is so that the source file can tell whether it is being
9667 # built for inclusion in a dll (and should export symbols for example).
9668 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9671 darwin* | rhapsody*)
9672 # PIC is the default on this platform
9673 # Common symbols not allowed in MH_DYLIB files
9674 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9678 # Just because we use GCC doesn't mean we suddenly get shared libraries
9679 # on systems that don't support them.
9680 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9685 if test -d /usr/nec; then
9686 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9691 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9692 if test "$host_cpu" != ia64; then
9693 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9698 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9702 # PORTME Check for flag to pass linker flags through the system compiler.
9705 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9706 if test "$host_cpu" = ia64; then
9707 # AIX 5 now supports IA64 processor
9708 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9710 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9714 cygwin* | mingw* | pw32* | os2*)
9715 # This hack is so that the source file can tell whether it is being
9716 # built for inclusion in a dll (and should export symbols for example).
9717 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9720 hpux9* | hpux10* | hpux11*)
9721 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9722 if test "$host_cpu" != ia64; then
9723 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9725 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9726 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9729 irix5* | irix6* | nonstopux*)
9730 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9731 # PIC (with -KPIC) is the default.
9732 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9736 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9737 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9740 osf3* | osf4* | osf5*)
9741 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9742 # All OSF/1 code is PIC.
9743 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9747 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9748 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9752 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9753 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9754 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9758 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9760 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9763 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9764 if test "x$host_vendor" = xsni; then
9765 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9767 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9769 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9770 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9774 if test -d /usr/nec ;then
9775 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9776 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9781 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9782 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9786 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9791 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9794 # Check to make sure the PIC flag actually works.
9796 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9797 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9798 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9799 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9800 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9802 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9804 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9805 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9808 # For platforms which do not support PIC, -DPIC is meaningless:
9810 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9813 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9819 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9820 # ------------------------------------
9821 # See if the linker supports building shared libraries.
9822 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9823 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9825 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9828 # If we're using GNU nm, then we don't want the "-C" option.
9829 # -C means demangle to AIX nm, but means don't demangle with GNU nm
9830 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9831 _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'
9833 _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'
9836 cygwin* | mingw* | pw32*)
9837 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9840 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9845 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9847 _LT_AC_TAGVAR(archive_cmds, $1)=
9848 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9849 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9850 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9851 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9852 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9853 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9854 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9855 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9856 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9857 _LT_AC_TAGVAR(hardcode_direct, $1)=no
9858 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9859 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9860 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9861 _LT_AC_TAGVAR(always_export_symbols, $1)=no
9862 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9863 # include_expsyms should be a list of space-separated symbols to be *always*
9864 # included in the symbol list
9865 _LT_AC_TAGVAR(include_expsyms, $1)=
9866 # exclude_expsyms can be an egrep regular expression of symbols to exclude
9867 # it will be wrapped by ` (' and `)$', so one must not match beginning or
9868 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9869 # as well as any symbol that contains `d'.
9870 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9871 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9872 # platforms (ab)use it in PIC code, but their linkers get confused if
9873 # the symbol is explicitly referenced. Since portable code cannot
9874 # rely on this symbol name, it's probably fine to never include it in
9875 # preloaded symbol tables.
9876 extract_expsyms_cmds=
9879 cygwin* | mingw* | pw32*)
9880 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9881 # When not using gcc, we currently assume that we are using
9882 # Microsoft Visual C++.
9883 if test "$GCC" != yes; then
9892 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
9893 if test "$with_gnu_ld" = yes; then
9894 # If archive_cmds runs LD, not CC, wlarc should be empty
9897 # See if GNU ld supports shared libraries.
9899 aix3* | aix4* | aix5*)
9900 # On AIX/PPC, the GNU linker is very broken
9901 if test "$host_cpu" != ia64; then
9902 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9905 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9906 *** to be unable to reliably create shared libraries on AIX.
9907 *** Therefore, libtool is disabling shared libraries support. If you
9908 *** really care for shared libraries, you may want to modify your PATH
9909 *** so that a non-GNU linker is found, and then restart.
9916 _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)'
9917 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9918 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9920 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9921 # that the semantics of dynamic libraries on AmigaOS, at least up
9922 # to version 4, is to share data among multiple programs linked
9923 # with the same dynamic library. Since this doesn't match the
9924 # behavior of shared libraries on other platforms, we can't use
9926 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9930 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9931 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9932 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9933 # support --undefined. This deserves some investigation. FIXME
9934 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9936 _LT_AC_TAGVAR(ld_shlibs, $1)=no
9940 cygwin* | mingw* | pw32*)
9941 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9942 # no search path for DLLs.
9943 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9944 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9945 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
9947 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9948 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9949 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9950 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9951 else $CC -o impgen impgen.c ; fi)~
9952 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9954 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9956 # cygwin and mingw dlls have different entry points and sets of symbols
9958 # FIXME: what about values for MSVC?
9959 dll_entry=__cygwin_dll_entry@12
9960 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9964 dll_entry=_DllMainCRTStartup@12
9965 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
9969 # mingw and cygwin differ, and it's simplest to just exclude the union
9970 # of the two symbol sets.
9971 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
9973 # recent cygwin and mingw systems supply a stub DllMain which the user
9974 # can override, but on older systems we have to supply one (in ltdll.c)
9975 if test "x$lt_cv_need_dllmain" = "xyes"; then
9976 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
9977 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
9978 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
9984 # Extract the symbol export list from an `--export-all' def file,
9985 # then regenerate the def file from the symbol export list, so that
9986 # the compiled dll only exports the symbol export list.
9987 # Be careful not to strip the DATA tag left by newer dlltools.
9988 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
9989 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
9990 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
9992 # If the export-symbols file already is a .def file (1st line
9993 # is EXPORTS), use it as is.
9994 # If DATA tags from a recent dlltool are present, honour them!
9995 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
9996 cp $export_symbols $output_objdir/$soname-def;
9998 echo EXPORTS > $output_objdir/$soname-def;
10000 cat $export_symbols | while read symbol; do
10001 set dummy \$symbol;
10003 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
10004 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
10006 _lt_hint=`expr 1 + \$_lt_hint`;
10010 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
10011 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
10012 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
10013 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
10014 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
10018 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10019 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10022 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10023 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10028 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
10029 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10032 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10033 *** create shared libraries on Solaris systems. Therefore, libtool
10034 *** is disabling shared libraries support. We urge you to upgrade GNU
10035 *** binutils to release 2.9.1 or newer. Another option is to modify
10036 *** your PATH or compiler configuration so that the native linker is
10037 *** used, and then restart.
10040 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10041 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10042 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10049 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10051 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10052 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10056 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10057 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10058 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10060 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10065 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10066 runpath_var=LD_RUN_PATH
10067 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10068 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10070 cygwin* | mingw* | pw32*)
10071 # dlltool doesn't understand --whole-archive et. al.
10072 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10075 # ancient GNU ld didn't support --whole-archive et. al.
10076 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
10077 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10079 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10085 # PORTME fill in a description of your system's linker (not GNU ld)
10088 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10089 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10090 _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'
10091 # Note: this linker hardcodes the directories in LIBPATH if there
10092 # are no directories specified by -L.
10093 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10094 if test "$GCC" = yes && test -z "$link_static_flag"; then
10095 # Neither direct hardcoding nor static linking is supported with a
10097 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10102 if test "$host_cpu" = ia64; then
10103 # On IA64, the linker does run time linking by default, so we don't
10104 # have to do anything special.
10105 aix_use_runtimelinking=no
10106 exp_sym_flag='-Bexport'
10109 # If we're using GNU nm, then we don't want the "-C" option.
10110 # -C means demangle to AIX nm, but means don't demangle with GNU nm
10111 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
10112 _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'
10114 _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'
10117 # KDE requires run time linking. Make it the default.
10118 aix_use_runtimelinking=yes
10119 exp_sym_flag='-bexport'
10120 no_entry_flag='-bnoentry'
10123 # When large executables or shared objects are built, AIX ld can
10124 # have problems creating the table of contents. If linking a library
10125 # or program results in "error TOC overflow" add -mminimal-toc to
10126 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10127 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10129 _LT_AC_TAGVAR(archive_cmds, $1)=''
10130 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10131 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10132 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10134 if test "$GCC" = yes; then
10135 case $host_os in aix4.[012]|aix4.[012].*)
10136 # We only want to do this on AIX 4.2 and lower, the check
10137 # below for broken collect2 doesn't work under 4.3+
10138 collect2name=`${CC} -print-prog-name=collect2`
10139 if test -f "$collect2name" && \
10140 strings "$collect2name" | grep resolve_lib_name >/dev/null
10142 # We have reworked collect2
10143 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10145 # We have old collect2
10146 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10147 # It fails to find uninstalled libraries when the uninstalled
10148 # path is not listed in the libpath. Setting hardcode_minus_L
10149 # to unsupported forces relinking
10150 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10151 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10152 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10155 shared_flag='-shared'
10158 if test "$host_cpu" = ia64; then
10159 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10160 # chokes on -Wl,-G. The following line is correct:
10163 if test "$aix_use_runtimelinking" = yes; then
10164 shared_flag='-qmkshrobj ${wl}-G'
10166 shared_flag='-qmkshrobj'
10171 # Let the compiler handle the export list.
10172 _LT_AC_TAGVAR(always_export_symbols, $1)=no
10173 if test "$aix_use_runtimelinking" = yes; then
10174 # Warning - without using the other runtime loading flags (-brtl),
10175 # -berok will link without error, but may produce a broken library.
10176 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10177 # Determine the default libpath from the value encoded in an empty executable.
10178 _LT_AC_SYS_LIBPATH_AIX
10179 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10180 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10181 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10183 if test "$host_cpu" = ia64; then
10184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10185 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10186 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10188 # Determine the default libpath from the value encoded in an empty executable.
10189 _LT_AC_SYS_LIBPATH_AIX
10190 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10191 # Warning - without using the other run time loading flags,
10192 # -berok will link without error, but may produce a broken library.
10193 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10194 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10195 # -bexpall does not export symbols beginning with underscore (_)
10196 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
10197 # Exported symbols can be pulled into shared objects from archives
10198 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10199 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10200 # This is similar to how AIX traditionally builds it's shared libraries.
10201 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10207 _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)'
10208 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10209 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10210 # see comment about different semantics on the GNU ld section
10211 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10215 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10218 cygwin* | mingw* | pw32*)
10219 # When not using gcc, we currently assume that we are using
10220 # Microsoft Visual C++.
10221 # hardcode_libdir_flag_spec is actually meaningless, as there is
10222 # no search path for DLLs.
10223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10224 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10225 # Tell ltmain to make .lib files, not .a files.
10227 # FIXME: Setting linknames here is a bad hack.
10228 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
10229 # The linker will automatically build a .lib file if we build a DLL.
10230 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10231 # FIXME: Should let the user specify the lib program.
10232 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10233 fix_srcfile_path='`cygpath -w "$srcfile"`'
10236 darwin* | rhapsody*)
10238 rhapsody* | darwin1.[[012]])
10239 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10242 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10246 # FIXME: Relying on posixy $() will cause problems for
10247 # cross-compilation, but unfortunately the echo tests do not
10248 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
10249 # `"' quotes if we put them in here... so don't!
10250 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
10251 # We need to add '_' to the symbols in $export_symbols first
10252 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
10253 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10254 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10255 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10259 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10260 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10261 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10265 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10268 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10269 # support. Future versions do this automatically, but an explicit c++rt0.o
10270 # does not break anything, and helps significantly (at the cost of a little
10273 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10274 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10275 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10276 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10279 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10281 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10282 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10283 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10284 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10287 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10289 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10290 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10291 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10292 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10295 hpux9* | hpux10* | hpux11*)
10296 if test "$GCC" = yes; then
10299 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10302 if test "$host_cpu" = ia64; then
10303 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10305 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10312 _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'
10315 if test "$host_cpu" = ia64; then
10316 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10318 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10323 if test "$host_cpu" = ia64; then
10324 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10325 _LT_AC_TAGVAR(hardcode_direct, $1)=no
10326 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10328 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10329 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10330 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10332 # hardcode_minus_L: Not really in the search PATH,
10333 # but as the default location of the library.
10334 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10335 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10338 irix5* | irix6* | nonstopux*)
10339 if test "$GCC" = yes; then
10340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10342 _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'
10344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10345 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10346 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10350 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10351 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10355 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10356 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10357 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10361 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10362 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10363 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10364 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10365 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10369 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10370 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10372 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10373 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10374 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10375 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10378 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10379 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10380 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10383 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10384 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10391 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10392 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10393 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10394 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
10395 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10399 if test "$GCC" = yes; then
10400 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10401 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10403 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10404 _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'
10406 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10407 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10410 osf4* | osf5*) # as osf3* with the addition of -msym flag
10411 if test "$GCC" = yes; then
10412 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10413 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10416 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10417 _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'
10418 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
10419 $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'
10421 # Both c and cxx compiler support -rpath directly
10422 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10424 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10428 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10429 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10430 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10431 runpath_var=LD_RUN_PATH
10432 hardcode_runpath_var=yes
10436 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10437 if test "$GCC" = yes; then
10438 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10439 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10440 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10442 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10443 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10444 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10446 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10447 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10449 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10450 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
10451 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10453 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10457 if test "x$host_vendor" = xsequent; then
10458 # Use $CC to link under sequent, because it throws in some extra .o
10459 # files that make .init and .fini sections work.
10460 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10462 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10464 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10465 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10466 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10467 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10471 if test "x$host_vendor" = xsni; then
10472 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
10473 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10475 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10476 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10478 runpath_var='LD_RUN_PATH'
10479 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10483 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10484 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10485 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10489 if test -d /usr/nec; then
10490 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10491 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10492 runpath_var=LD_RUN_PATH
10493 hardcode_runpath_var=yes
10494 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
10499 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10500 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10501 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10502 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10503 hardcode_runpath_var=yes
10504 runpath_var=LD_RUN_PATH
10507 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10508 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10509 if test "$GCC" = yes; then
10510 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10512 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10514 runpath_var='LD_RUN_PATH'
10515 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10519 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10520 # $CC -shared without GNU ld will not create a library from C++
10521 # object files and a static libstdc++, better avoid it by now
10522 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10523 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10524 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10525 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10526 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10527 runpath_var='LD_RUN_PATH'
10531 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10532 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10533 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10537 _LT_AC_TAGVAR(ld_shlibs, $1)=no
10542 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10543 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10545 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10546 if test "$GCC" = yes; then
10547 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10551 # Do we need to explicitly link libc?
10553 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10554 if test "$enable_shared" = yes && test "$GCC" = yes; then
10555 case $_LT_AC_TAGVAR(archive_cmds, $1) in
10557 # FIXME: we may have to deal with multi-command sequences.
10560 # Test whether the compiler implicitly links with -lc since on some
10561 # systems, -lgcc has to come before -lc. If gcc already passes -lc
10562 # to ld, don't add -lc before -lgcc.
10563 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
10565 echo 'static int dummy;' > conftest.$ac_ext
10567 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10570 libobjs=conftest.$ac_objext
10572 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10578 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
10579 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10580 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
10582 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10584 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10586 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10588 cat conftest.err 1>&5
10591 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
10595 ])# AC_LIBTOOL_PROG_LD_SHLIBS
10598 # _LT_AC_FILE_LTDLL_C
10599 # -------------------
10600 # Be careful that the start marker always follows a newline.
10601 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
10602 # /* ltdll.c starts here */
10603 # #define WIN32_LEAN_AND_MEAN
10604 # #include <windows.h>
10605 # #undef WIN32_LEAN_AND_MEAN
10606 # #include <stdio.h>
10608 # #ifndef __CYGWIN__
10609 # # ifdef __CYGWIN32__
10610 # # define __CYGWIN__ __CYGWIN32__
10614 # #ifdef __cplusplus
10617 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
10618 # #ifdef __cplusplus
10622 # #ifdef __CYGWIN__
10623 # #include <cygwin/cygwin_dll.h>
10624 # DECLARE_CYGWIN_DLL( DllMain );
10626 # HINSTANCE __hDllInstance_base;
10629 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
10631 # __hDllInstance_base = hInst;
10634 # /* ltdll.c ends here */
10635 ])# _LT_AC_FILE_LTDLL_C
10638 # _LT_AC_FILE_IMPGEN_C
10639 # --------------------
10640 # Be careful that the start marker always follows a newline.
10641 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10642 # /* impgen.c starts here */
10643 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10645 # This file is part of GNU libtool.
10647 # This program is free software; you can redistribute it and/or modify
10648 # it under the terms of the GNU General Public License as published by
10649 # the Free Software Foundation; either version 2 of the License, or
10650 # (at your option) any later version.
10652 # This program is distributed in the hope that it will be useful,
10653 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10654 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10655 # GNU General Public License for more details.
10657 # You should have received a copy of the GNU General Public License
10658 # along with this program; if not, write to the Free Software
10659 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10662 # #include <stdio.h> /* for printf() */
10663 # #include <unistd.h> /* for open(), lseek(), read() */
10664 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
10665 # #include <string.h> /* for strdup() */
10667 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
10669 # #define O_BINARY 0
10672 # static unsigned int
10673 # pe_get16 (fd, offset)
10677 # unsigned char b[2];
10678 # lseek (fd, offset, SEEK_SET);
10680 # return b[0] + (b[1]<<8);
10683 # static unsigned int
10684 # pe_get32 (fd, offset)
10688 # unsigned char b[4];
10689 # lseek (fd, offset, SEEK_SET);
10691 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10694 # static unsigned int
10698 # unsigned char *b = ptr;
10699 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10703 # main (argc, argv)
10708 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10709 # unsigned long export_rva, export_size, nsections, secptr, expptr;
10710 # unsigned long name_rvas, nexp;
10711 # unsigned char *expdata, *erva;
10712 # char *filename, *dll_name;
10714 # filename = argv[1];
10716 # dll = open(filename, O_RDONLY|O_BINARY);
10720 # dll_name = filename;
10722 # for (i=0; filename[i]; i++)
10723 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
10724 # dll_name = filename + i +1;
10726 # pe_header_offset = pe_get32 (dll, 0x3c);
10727 # opthdr_ofs = pe_header_offset + 4 + 20;
10728 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
10730 # if (num_entries < 1) /* no exports */
10733 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
10734 # export_size = pe_get32 (dll, opthdr_ofs + 100);
10735 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10736 # secptr = (pe_header_offset + 4 + 20 +
10737 # pe_get16 (dll, pe_header_offset + 4 + 16));
10740 # for (i = 0; i < nsections; i++)
10743 # unsigned long secptr1 = secptr + 40 * i;
10744 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10745 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10746 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10747 # lseek(dll, secptr1, SEEK_SET);
10748 # read(dll, sname, 8);
10749 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
10751 # expptr = fptr + (export_rva - vaddr);
10752 # if (export_rva + export_size > vaddr + vsize)
10753 # export_size = vsize - (export_rva - vaddr);
10758 # expdata = (unsigned char*)malloc(export_size);
10759 # lseek (dll, expptr, SEEK_SET);
10760 # read (dll, expdata, export_size);
10761 # erva = expdata - export_rva;
10763 # nexp = pe_as32 (expdata+24);
10764 # name_rvas = pe_as32 (expdata+32);
10766 # printf ("EXPORTS\n");
10767 # for (i = 0; i<nexp; i++)
10769 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10770 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10775 # /* impgen.c ends here */
10776 ])# _LT_AC_FILE_IMPGEN_C
10778 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10779 # ---------------------------------
10780 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10784 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
10785 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10786 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10787 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10788 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10789 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
10790 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
10792 # This is just to silence aclocal about the macro not being used
10793 ifelse([AC_DISABLE_FAST_INSTALL])
10795 AC_DEFUN([LT_AC_PROG_GCJ],
10796 [AC_CHECK_TOOL(GCJ, gcj, no)
10797 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10801 AC_DEFUN([LT_AC_PROG_RC],
10802 [AC_CHECK_TOOL(RC, windres, no)
10805 # NOTE: This macro has been submitted for inclusion into #
10806 # GNU Autoconf as AC_PROG_SED. When it is available in #
10807 # a released version of Autoconf we should remove this #
10808 # macro and use it instead. #
10811 # Check for a fully-functional sed program, that truncates
10812 # as few characters as possible. Prefer GNU sed if found.
10813 AC_DEFUN([LT_AC_PROG_SED],
10814 [AC_MSG_CHECKING([for a sed that does not truncate output])
10815 AC_CACHE_VAL(lt_cv_path_SED,
10816 [# Loop through the user's path and test for sed and gsed.
10817 # Then use that list of sed's as ones to test for truncation.
10818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10819 for as_dir in $PATH
10822 test -z "$as_dir" && as_dir=.
10823 for ac_prog in sed gsed; do
10824 for ac_exec_ext in '' $ac_executable_extensions; do
10825 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10826 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10832 # Create a temporary directory, and hook for its removal unless debugging.
10835 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10836 trap '{ (exit 1); exit 1; }' 1 2 13 15
10839 # Create a (secure) tmp directory for tmp files.
10842 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10843 test -n "$tmp" && test -d "$tmp"
10846 tmp=$TMPDIR/sed$$-$RANDOM
10847 (umask 077 && mkdir $tmp)
10850 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10851 { (exit 1); exit 1; }
10855 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
10856 # along with /bin/sed that truncates output.
10857 for _sed in $_sed_list /usr/xpg4/bin/sed; do
10858 test ! -f ${_sed} && break
10859 cat /dev/null > "$tmp/sed.in"
10861 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10862 # Check for GNU sed and select it if it is found.
10863 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10864 lt_cv_path_SED=${_sed}
10868 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10869 mv "$tmp/sed.tmp" "$tmp/sed.in"
10870 cp "$tmp/sed.in" "$tmp/sed.nl"
10871 echo >>"$tmp/sed.nl"
10872 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10873 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10874 # 10000 chars as input seems more than enough
10875 test $_count -gt 10 && break
10876 _count=`expr $_count + 1`
10877 if test $_count -gt $_max; then
10879 lt_cv_path_SED=$_sed
10885 AC_MSG_RESULT([$SED])
10888 # Do all the work for Automake. This macro actually does too much --
10889 # some checks are only needed if your package does certain things.
10890 # But this isn't really a big deal.
10894 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10895 # written in clear, in which case automake, when reading aclocal.m4,
10896 # will think it sees a *use*, and therefore will trigger all it's
10897 # C support machinery. Also note that it means that autoscan, seeing
10898 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10901 # We require 2.13 because we rely on SHELL being computed by configure.
10904 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
10905 # -----------------------------------------------------------
10906 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
10907 # The purpose of this macro is to provide the user with a means to
10908 # check macros which are provided without letting her know how the
10909 # information is coded.
10910 # If this macro is not defined by Autoconf, define it here.
10911 ifdef([AC_PROVIDE_IFELSE],
10913 [define([AC_PROVIDE_IFELSE],
10914 [ifdef([AC_PROVIDE_$1],
10918 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
10919 # ----------------------------------------------
10920 AC_DEFUN([AM_INIT_AUTOMAKE],
10921 [AC_REQUIRE([AC_PROG_INSTALL])dnl
10922 # test to see if srcdir already configured
10923 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
10924 test -f $srcdir/config.status; then
10925 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
10928 # Define the identity of the package.
10930 AC_SUBST(PACKAGE)dnl
10932 AC_SUBST(VERSION)dnl
10934 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10935 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
10937 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
10938 # the ones we care about.
10939 ifdef([m4_pattern_allow],
10940 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
10942 # Autoconf 2.50 always computes EXEEXT. However we need to be
10943 # compatible with 2.13, for now. So we always define EXEEXT, but we
10944 # don't compute it.
10946 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
10947 # requests that it be used. This is a bit dumb.
10951 # Some tools Automake needs.
10952 AC_REQUIRE([AM_SANITY_CHECK])dnl
10953 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10954 AM_MISSING_PROG(ACLOCAL, aclocal)
10955 AM_MISSING_PROG(AUTOCONF, autoconf)
10956 AM_MISSING_PROG(AUTOMAKE, automake)
10957 AM_MISSING_PROG(AUTOHEADER, autoheader)
10958 AM_MISSING_PROG(MAKEINFO, makeinfo)
10959 AM_MISSING_PROG(AMTAR, tar)
10961 AM_PROG_INSTALL_STRIP
10962 # We need awk for the "check" target. The system "awk" is bad on
10964 AC_REQUIRE([AC_PROG_AWK])dnl
10965 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10966 AC_REQUIRE([AM_DEP_TRACK])dnl
10967 AC_REQUIRE([AM_SET_DEPDIR])dnl
10968 AC_PROVIDE_IFELSE([AC_PROG_][CC],
10969 [_AM_DEPENDENCIES(CC)],
10970 [define([AC_PROG_][CC],
10971 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
10972 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
10973 [_AM_DEPENDENCIES(CXX)],
10974 [define([AC_PROG_][CXX],
10975 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10979 # Check to make sure that the build environment is sane.
10986 AC_DEFUN([AM_SANITY_CHECK],
10987 [AC_MSG_CHECKING([whether build environment is sane])
10990 echo timestamp > conftest.file
10991 # Do `set' in a subshell so we don't clobber the current shell's
10992 # arguments. Must try -L first in case configure is actually a
10993 # symlink; some systems play weird games with the mod time of symlinks
10994 # (eg FreeBSD returns the mod time of the symlink's containing
10997 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
10998 if test "$[*]" = "X"; then
11000 set X `ls -t $srcdir/configure conftest.file`
11002 rm -f conftest.file
11003 if test "$[*]" != "X $srcdir/configure conftest.file" \
11004 && test "$[*]" != "X conftest.file $srcdir/configure"; then
11006 # If neither matched, then we have a broken ls. This can happen
11007 # if, for instance, CONFIG_SHELL is bash and it inherits a
11008 # broken ls alias from the environment. This has actually
11009 # happened. Such a system could not be considered "sane".
11010 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11011 alias in your environment])
11014 test "$[2]" = conftest.file
11020 AC_MSG_ERROR([newly created file is older than distributed files!
11021 Check your system clock])
11023 AC_MSG_RESULT(yes)])
11028 # AM_MISSING_PROG(NAME, PROGRAM)
11029 # ------------------------------
11030 AC_DEFUN([AM_MISSING_PROG],
11031 [AC_REQUIRE([AM_MISSING_HAS_RUN])
11032 $1=${$1-"${am_missing_run}$2"}
11036 # AM_MISSING_HAS_RUN
11037 # ------------------
11038 # Define MISSING if not defined so far and test if it supports --run.
11039 # If it does, set am_missing_run to use it, otherwise, to nothing.
11040 AC_DEFUN([AM_MISSING_HAS_RUN],
11041 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11042 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11043 # Use eval to expand $SHELL
11044 if eval "$MISSING --run true"; then
11045 am_missing_run="$MISSING --run "
11049 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
11053 # AM_AUX_DIR_EXPAND
11055 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11056 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
11057 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
11059 # Of course, Automake must honor this variable whenever it calls a
11060 # tool from the auxiliary directory. The problem is that $srcdir (and
11061 # therefore $ac_aux_dir as well) can be either absolute or relative,
11062 # depending on how configure is run. This is pretty annoying, since
11063 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
11064 # source directory, any form will work fine, but in subdirectories a
11065 # relative path needs to be adjusted first.
11067 # $ac_aux_dir/missing
11068 # fails when called from a subdirectory if $ac_aux_dir is relative
11069 # $top_srcdir/$ac_aux_dir/missing
11070 # fails if $ac_aux_dir is absolute,
11071 # fails when called from a subdirectory in a VPATH build with
11072 # a relative $ac_aux_dir
11074 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
11075 # are both prefixed by $srcdir. In an in-source build this is usually
11076 # harmless because $srcdir is `.', but things will broke when you
11077 # start a VPATH build or use an absolute $srcdir.
11079 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11080 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
11081 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11082 # and then we would define $MISSING as
11083 # MISSING="\${SHELL} $am_aux_dir/missing"
11084 # This will work as long as MISSING is not called from configure, because
11085 # unfortunately $(top_srcdir) has no meaning in configure.
11086 # However there are other variables, like CC, which are often used in
11087 # configure, and could therefore not use this "fixed" $ac_aux_dir.
11089 # Another solution, used here, is to always expand $ac_aux_dir to an
11090 # absolute PATH. The drawback is that using absolute paths prevent a
11091 # configured tree to be moved without reconfiguration.
11093 AC_DEFUN([AM_AUX_DIR_EXPAND], [
11094 # expand $ac_aux_dir to an absolute path
11095 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
11098 # AM_PROG_INSTALL_SH
11099 # ------------------
11100 # Define $install_sh.
11101 AC_DEFUN([AM_PROG_INSTALL_SH],
11102 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11103 install_sh=${install_sh-"$am_aux_dir/install-sh"}
11104 AC_SUBST(install_sh)])
11106 # One issue with vendor `install' (even GNU) is that you can't
11107 # specify the program used to strip binaries. This is especially
11108 # annoying in cross-compiling environments, where the build's strip
11109 # is unlikely to handle the host's binaries.
11110 # Fortunately install-sh will honor a STRIPPROG variable, so we
11111 # always use install-sh in `make install-strip', and initialize
11112 # STRIPPROG with the value of the STRIP variable (set by the user).
11113 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11114 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11115 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
11116 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11118 # serial 4 -*- Autoconf -*-
11122 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11123 # written in clear, in which case automake, when reading aclocal.m4,
11124 # will think it sees a *use*, and therefore will trigger all it's
11125 # C support machinery. Also note that it means that autoscan, seeing
11126 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11130 # _AM_DEPENDENCIES(NAME)
11131 # ---------------------
11132 # See how the compiler implements dependency checking.
11133 # NAME is "CC", "CXX" or "OBJC".
11134 # We try a few techniques and use that to set a single cache variable.
11136 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
11137 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
11138 # dependency, and given that the user is not expected to run this macro,
11139 # just rely on AC_PROG_CC.
11140 AC_DEFUN([_AM_DEPENDENCIES],
11141 [AC_REQUIRE([AM_SET_DEPDIR])dnl
11142 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
11143 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
11144 AC_REQUIRE([AM_DEP_TRACK])dnl
11146 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
11147 [$1], CXX, [depcc="$CXX" am_compiler_list=],
11148 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
11149 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
11150 [depcc="$$1" am_compiler_list=])
11152 AC_CACHE_CHECK([dependency style of $depcc],
11153 [am_cv_$1_dependencies_compiler_type],
11154 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11155 # We make a subdir and do the tests there. Otherwise we can end up
11156 # making bogus files that we don't know about and never remove. For
11157 # instance it was reported that on HP-UX the gcc test will end up
11158 # making a dummy file named `D' -- because `-MD' means `put the output
11161 # Copy depcomp to subdir because otherwise we won't find it if we're
11162 # using a relative directory.
11163 cp "$am_depcomp" conftest.dir
11166 am_cv_$1_dependencies_compiler_type=none
11167 if test "$am_compiler_list" = ""; then
11168 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
11170 for depmode in $am_compiler_list; do
11171 # We need to recreate these files for each test, as the compiler may
11172 # overwrite some of them when testing with obscure command lines.
11173 # This happens at least with the AIX C compiler.
11174 echo '#include "conftest.h"' > conftest.c
11175 echo 'int i;' > conftest.h
11176 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
11180 # after this tag, mechanisms are not by side-effect, so they'll
11181 # only be used when explicitly requested
11182 if test "x$enable_dependency_tracking" = xyes; then
11190 # We check with `-c' and `-o' for the sake of the "dashmstdout"
11191 # mode. It turns out that the SunPro C++ compiler does not properly
11192 # handle `-M -o', and we need to detect this.
11193 if depmode=$depmode \
11194 source=conftest.c object=conftest.o \
11195 depfile=conftest.Po tmpdepfile=conftest.TPo \
11196 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
11197 grep conftest.h conftest.Po > /dev/null 2>&1 &&
11198 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11199 am_cv_$1_dependencies_compiler_type=$depmode
11205 rm -rf conftest.dir
11207 am_cv_$1_dependencies_compiler_type=none
11210 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
11211 AC_SUBST([$1DEPMODE])
11217 # Choose a directory name for dependency files.
11218 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
11219 AC_DEFUN([AM_SET_DEPDIR],
11220 [rm -f .deps 2>/dev/null
11221 mkdir .deps 2>/dev/null
11222 if test -d .deps; then
11225 # MS-DOS does not allow filenames that begin with a dot.
11228 rmdir .deps 2>/dev/null
11235 AC_DEFUN([AM_DEP_TRACK],
11236 [AC_ARG_ENABLE(dependency-tracking,
11237 [ --disable-dependency-tracking Speeds up one-time builds
11238 --enable-dependency-tracking Do not reject slow dependency extractors])
11239 if test "x$enable_dependency_tracking" != xno; then
11240 am_depcomp="$ac_aux_dir/depcomp"
11243 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
11244 pushdef([subst], defn([AC_SUBST]))
11245 subst(AMDEPBACKSLASH)
11249 # Generate code to set up dependency tracking.
11250 # This macro should only be invoked once -- use via AC_REQUIRE.
11252 # AM_OUTPUT_DEPENDENCY_COMMANDS
11255 # This code is only required when automatic dependency tracking
11256 # is enabled. FIXME. This creates each `.P' file that we will
11257 # need in order to bootstrap the dependency handling code.
11258 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
11259 AC_OUTPUT_COMMANDS([
11260 test x"$AMDEP_TRUE" != x"" ||
11261 for mf in $CONFIG_FILES; do
11263 Makefile) dirpart=.;;
11264 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
11267 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
11268 # Extract the definition of DEP_FILES from the Makefile without
11270 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
11271 test -z "$DEPDIR" && continue
11272 # When using ansi2knr, U may be empty or an underscore; expand it
11273 U=`sed -n -e '/^U = / s///p' < "$mf"`
11274 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
11275 # We invoke sed twice because it is the simplest approach to
11276 # changing $(DEPDIR) to its actual value in the expansion.
11277 for file in `sed -n -e '
11278 /^DEP_FILES = .*\\\\$/ {
11287 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
11288 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
11289 # Make sure the directory exists.
11290 test -f "$dirpart/$file" && continue
11291 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
11292 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
11293 # echo "creating $dirpart/$file"
11294 echo '# dummy' > "$dirpart/$file"
11297 ], [AMDEP_TRUE="$AMDEP_TRUE"
11298 ac_aux_dir="$ac_aux_dir"])])
11300 # AM_MAKE_INCLUDE()
11301 # -----------------
11302 # Check to see how make treats includes.
11303 AC_DEFUN([AM_MAKE_INCLUDE],
11304 [am_make=${MAKE-make}
11305 cat > confinc << 'END'
11309 # If we don't find an include directive, just comment out the code.
11310 AC_MSG_CHECKING([for style of include used by $am_make])
11314 # First try GNU make style include.
11315 echo "include confinc" > confmf
11316 # We grep out `Entering directory' and `Leaving directory'
11317 # messages which can occur if `w' ends up in MAKEFLAGS.
11318 # In particular we don't look at `^make:' because GNU make might
11319 # be invoked under some other name (usually "gmake"), in which
11320 # case it prints its new name instead of `make'.
11321 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
11322 am__include=include
11326 # Now try BSD make style include.
11327 if test "$am__include" = "#"; then
11328 echo '.include "confinc"' > confmf
11329 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
11330 am__include=.include
11335 AC_SUBST(am__include)
11336 AC_SUBST(am__quote)
11337 AC_MSG_RESULT($_am_result)
11338 rm -f confinc confmf
11343 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
11344 # -------------------------------------
11345 # Define a conditional.
11347 # FIXME: Once using 2.50, use this:
11348 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
11349 AC_DEFUN([AM_CONDITIONAL],
11350 [ifelse([$1], [TRUE],
11351 [errprint(__file__:__line__: [$0: invalid condition: $1
11354 ifelse([$1], [FALSE],
11355 [errprint(__file__:__line__: [$0: invalid condition: $1
11358 AC_SUBST([$1_TRUE])
11359 AC_SUBST([$1_FALSE])
11370 # Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
11371 AC_DEFUN([AM_PROG_LEX],
11372 [AC_REQUIRE([AM_MISSING_HAS_RUN])
11373 AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
11377 # Like AC_CONFIG_HEADER, but automatically create stamp file.
11381 # When config.status generates a header, we must update the stamp-h file.
11382 # This file resides in the same directory as the config header
11383 # that is generated. We must strip everything past the first ":",
11384 # and everything past the last "/".
11388 AC_DEFUN([AM_CONFIG_HEADER],
11389 [ifdef([AC_FOREACH],dnl
11390 [dnl init our file count if it isn't already
11391 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
11392 dnl prepare to store our destination file list for use in config.status
11393 AC_FOREACH([_AM_File], [$1],
11394 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
11395 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
11396 dnl and add it to the list of files AC keeps track of, along
11398 AC_CONFIG_HEADERS(_AM_File,
11399 dnl COMMANDS, [, INIT-CMDS]
11400 [# update the timestamp
11401 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
11402 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
11403 m4_popdef([_AM_Dest])])],dnl
11404 [AC_CONFIG_HEADER([$1])
11405 AC_OUTPUT_COMMANDS(
11406 ifelse(patsubst([$1], [[^ ]], []),
11408 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
11409 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
11411 for am_file in $1; do
11412 case " \$CONFIG_HEADERS " in
11414 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
11415 if test -n "\$am_dir"; then
11416 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
11417 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
11418 am_tmpdir=\$am_tmpdir\$am_subdir/
11419 if test ! -d \$am_tmpdir; then
11424 echo timestamp > "\$am_dir"stamp-h\$am_indx
11427 am_indx=\`expr \$am_indx + 1\`
11429 ])]) # AM_CONFIG_HEADER
11431 # _AM_DIRNAME(PATH)
11432 # -----------------
11433 # Like AS_DIRNAME, only do it during macro expansion
11434 AC_DEFUN([_AM_DIRNAME],
11435 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
11436 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
11437 m4_if(m4_regexp([$1], [^/.*]), -1,
11439 m4_patsubst([$1], [^\(/\).*], [\1])),
11440 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
11441 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl