Copy local state in AudioRegionView copy constructor. Fixes #4047.
[ardour2.git] / libs / taglib / acinclude.m4
blob0f0ca180b30059d063c8cdced1806799a074810a
1 ##   -*- autoconf -*-
3 dnl    This file is part of the KDE libraries/packages
4 dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5 dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
7 dnl    This file is free software; you can redistribute it and/or
8 dnl    modify it under the terms of the GNU Library General Public
9 dnl    License as published by the Free Software Foundation; either
10 dnl    version 2 of the License, or (at your option) any later version.
12 dnl    This library is distributed in the hope that it will be useful,
13 dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 dnl    Library General Public License for more details.
17 dnl    You should have received a copy of the GNU Library General Public License
18 dnl    along with this library; see the file COPYING.LIB.  If not, write to
19 dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 dnl    Boston, MA 02110-1301, USA.
22 dnl IMPORTANT NOTE:
23 dnl Please do not modify this file unless you expect your modifications to be
24 dnl carried into every other module in the repository. 
25 dnl
26 dnl Single-module modifications are best placed in configure.in for kdelibs
27 dnl and kdebase or configure.in.in if present.
29 # KDE_PATH_X_DIRECT
30 dnl Internal subroutine of AC_PATH_X.
31 dnl Set ac_x_includes and/or ac_x_libraries.
32 AC_DEFUN([KDE_PATH_X_DIRECT],
34 AC_REQUIRE([KDE_CHECK_LIB64])
36 if test "$ac_x_includes" = NO; then
37   # Guess where to find include files, by looking for this one X11 .h file.
38   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
40   # First, try using that file with no special directory specified.
41 AC_TRY_CPP([#include <$x_direct_test_include>],
42 [# We can compile using X headers with no special include directory.
43 ac_x_includes=],
44 [# Look for the header file in a standard set of common directories.
45 # Check X11 before X11Rn because it is often a symlink to the current release.
46   for ac_dir in               \
47     /usr/X11/include          \
48     /usr/X11R6/include        \
49     /usr/X11R5/include        \
50     /usr/X11R4/include        \
51                               \
52     /usr/include/X11          \
53     /usr/include/X11R6        \
54     /usr/include/X11R5        \
55     /usr/include/X11R4        \
56                               \
57     /usr/local/X11/include    \
58     /usr/local/X11R6/include  \
59     /usr/local/X11R5/include  \
60     /usr/local/X11R4/include  \
61                               \
62     /usr/local/include/X11    \
63     /usr/local/include/X11R6  \
64     /usr/local/include/X11R5  \
65     /usr/local/include/X11R4  \
66                               \
67     /usr/X386/include         \
68     /usr/x386/include         \
69     /usr/XFree86/include/X11  \
70                               \
71     /usr/include              \
72     /usr/local/include        \
73     /usr/unsupported/include  \
74     /usr/athena/include       \
75     /usr/local/x11r5/include  \
76     /usr/lpp/Xamples/include  \
77                               \
78     /usr/openwin/include      \
79     /usr/openwin/share/include \
80     ; \
81   do
82     if test -r "$ac_dir/$x_direct_test_include"; then
83       ac_x_includes=$ac_dir
84       break
85     fi
86   done])
87 fi # $ac_x_includes = NO
89 if test "$ac_x_libraries" = NO; then
90   # Check for the libraries.
92   test -z "$x_direct_test_library" && x_direct_test_library=Xt
93   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
95   # See if we find them without any special options.
96   # Don't add to $LIBS permanently.
97   ac_save_LIBS="$LIBS"
98   LIBS="-l$x_direct_test_library $LIBS"
99 AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
100 [LIBS="$ac_save_LIBS"
101 # We can link X programs with no special library path.
102 ac_x_libraries=],
103 [LIBS="$ac_save_LIBS"
104 # First see if replacing the include by lib works.
105 # Check X11 before X11Rn because it is often a symlink to the current release.
106 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
107     /usr/X11/lib${kdelibsuff}           \
108     /usr/X11R6/lib${kdelibsuff}         \
109     /usr/X11R5/lib${kdelibsuff}         \
110     /usr/X11R4/lib${kdelibsuff}         \
111                                         \
112     /usr/lib${kdelibsuff}/X11           \
113     /usr/lib${kdelibsuff}/X11R6         \
114     /usr/lib${kdelibsuff}/X11R5         \
115     /usr/lib${kdelibsuff}/X11R4         \
116                                         \
117     /usr/local/X11/lib${kdelibsuff}     \
118     /usr/local/X11R6/lib${kdelibsuff}   \
119     /usr/local/X11R5/lib${kdelibsuff}   \
120     /usr/local/X11R4/lib${kdelibsuff}   \
121                                         \
122     /usr/local/lib${kdelibsuff}/X11     \
123     /usr/local/lib${kdelibsuff}/X11R6   \
124     /usr/local/lib${kdelibsuff}/X11R5   \
125     /usr/local/lib${kdelibsuff}/X11R4   \
126                                         \
127     /usr/X386/lib${kdelibsuff}          \
128     /usr/x386/lib${kdelibsuff}          \
129     /usr/XFree86/lib${kdelibsuff}/X11   \
130                                         \
131     /usr/lib${kdelibsuff}               \
132     /usr/local/lib${kdelibsuff}         \
133     /usr/unsupported/lib${kdelibsuff}   \
134     /usr/athena/lib${kdelibsuff}        \
135     /usr/local/x11r5/lib${kdelibsuff}   \
136     /usr/lpp/Xamples/lib${kdelibsuff}   \
137     /lib/usr/lib${kdelibsuff}/X11       \
138                                         \
139     /usr/openwin/lib${kdelibsuff}       \
140     /usr/openwin/share/lib${kdelibsuff} \
141     ; \
143 dnl Don't even attempt the hair of trying to link an X program!
144   for ac_extension in a so sl; do
145     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
146       ac_x_libraries=$ac_dir
147       break 2
148     fi
149   done
150 done])
151 fi # $ac_x_libraries = NO
155 dnl ------------------------------------------------------------------------
156 dnl Find a file (or one of more files in a list of dirs)
157 dnl ------------------------------------------------------------------------
159 AC_DEFUN([AC_FIND_FILE],
161 $3=NO
162 for i in $2;
164   for j in $1;
165   do
166     echo "configure: __oline__: $i/$j" >&AC_FD_CC
167     if test -r "$i/$j"; then
168       echo "taking that" >&AC_FD_CC
169       $3=$i
170       break 2
171     fi
172   done
173 done
176 dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
177 dnl     if-not-found, test-parameter, prepend-path)
179 dnl Look for program-name in list-of-dirs+$PATH.
180 dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
181 dnl If found, $variable-name is set. If not, if-not-found is evaluated.
182 dnl test-parameter: if set, the program is executed with this arg,
183 dnl                 and only a successful exit code is required.
184 AC_DEFUN([KDE_FIND_PATH],
186    AC_MSG_CHECKING([for $1])
187    if test -n "$$2"; then
188         kde_cv_path="$$2";
189    else
190         kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
192         AC_CACHE_VAL(kde_cv_path_$kde_cache,
193         [
194         kde_cv_path="NONE"
195         kde_save_IFS=$IFS
196         IFS=':'
197         dirs=""
198         for dir in $PATH; do
199           dirs="$dirs $dir"
200         done
201         if test -z "$6"; then  dnl Append dirs in PATH (default)
202           dirs="$3 $dirs"
203         else  dnl Prepend dirs in PATH (if 6th arg is set)
204           dirs="$dirs $3"
205         fi
206         IFS=$kde_save_IFS
208         for dir in $dirs; do
209           if test -x "$dir/$1"; then
210             if test -n "$5"
211             then
212               evalstr="$dir/$1 $5 2>&1 "
213               if eval $evalstr; then
214                 kde_cv_path="$dir/$1"
215                 break
216               fi
217             else
218                 kde_cv_path="$dir/$1"
219                 break
220             fi
221           fi
222         done
224         eval "kde_cv_path_$kde_cache=$kde_cv_path"
226         ])
228       eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
230    fi
232    if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
233       AC_MSG_RESULT(not found)
234       $4
235    else
236       AC_MSG_RESULT($kde_cv_path)
237       $2=$kde_cv_path
239    fi
242 AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
244     AC_MSG_ERROR([No Qt meta object compiler (moc) found!
245 Please check whether you installed Qt correctly.
246 You need to have a running moc binary.
247 configure tried to run $ac_cv_path_moc and the test didn't
248 succeed. If configure shouldn't have tried this one, set
249 the environment variable MOC to the right one before running
250 configure.
254 AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
256     AC_MSG_WARN([No Qt ui compiler (uic) found!
257 Please check whether you installed Qt correctly.
258 You need to have a running uic binary.
259 configure tried to run $ac_cv_path_uic and the test didn't
260 succeed. If configure shouldn't have tried this one, set
261 the environment variable UIC to the right one before running
262 configure.
267 AC_DEFUN([KDE_CHECK_UIC_FLAG],
269     AC_MSG_CHECKING([whether uic supports -$1 ])
270     kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
271     AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
272     [
273         cat >conftest.ui <<EOT
274         <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
276         ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
277         if AC_TRY_EVAL(ac_uic_testrun); then
278             eval "kde_cv_prog_uic_$kde_cache=yes"
279         else
280             eval "kde_cv_prog_uic_$kde_cache=no"
281         fi
282         rm -f conftest*
283     ])
285     if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
286         AC_MSG_RESULT([yes])
287         :
288         $3
289     else
290         AC_MSG_RESULT([no])
291         :
292         $4
293     fi
297 dnl ------------------------------------------------------------------------
298 dnl Find the meta object compiler and the ui compiler in the PATH,
299 dnl in $QTDIR/bin, and some more usual places
300 dnl ------------------------------------------------------------------------
302 AC_DEFUN([AC_PATH_QT_MOC_UIC],
304    AC_REQUIRE([KDE_CHECK_PERL])
305    qt_bindirs=""
306    for dir in $kde_qt_dirs; do
307       qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
308    done
309    qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
310    if test ! "$ac_qt_bindir" = "NO"; then
311       qt_bindirs="$ac_qt_bindir $qt_bindirs"
312    fi
314    KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
315    if test -z "$UIC_NOT_NEEDED"; then
316      KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
317      if test -z "$UIC_PATH" ; then
318        KDE_UIC_ERROR_MESSAGE
319        exit 1
320      else
321        UIC=$UIC_PATH
323        if test $kde_qtver = 3; then
324          KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
325          KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
327          if test x$ac_uic_supports_libpath = xyes; then
328              UIC="$UIC -L \$(kde_widgetdir)"
329          fi
330          if test x$ac_uic_supports_nounload = xyes; then
331              UIC="$UIC -nounload"
332          fi
333        fi
334      fi
335    else
336      UIC="echo uic not available: "
337    fi
339    AC_SUBST(MOC)
340    AC_SUBST(UIC)
342    UIC_TR="i18n"
343    if test $kde_qtver = 3; then
344      UIC_TR="tr2i18n"
345    fi
347    AC_SUBST(UIC_TR)
350 AC_DEFUN([KDE_1_CHECK_PATHS],
352   KDE_1_CHECK_PATH_HEADERS
354   KDE_TEST_RPATH=
356   if test -n "$USE_RPATH"; then
358      if test -n "$kde_libraries"; then
359        KDE_TEST_RPATH="-R $kde_libraries"
360      fi
362      if test -n "$qt_libraries"; then
363        KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
364      fi
366      if test -n "$x_libraries"; then
367        KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
368      fi
370      KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
371   fi
373 AC_MSG_CHECKING([for KDE libraries installed])
374 ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
376 if AC_TRY_EVAL(ac_link) && test -s conftest; then
377   AC_MSG_RESULT(yes)
378 else
379   AC_MSG_ERROR([your system fails at linking a small KDE application!
380 Check, if your compiler is installed correctly and if you have used the
381 same compiler to compile Qt and kdelibs as you did use now.
382 For more details about this problem, look at the end of config.log.])
385 if eval `KDEDIR= ./conftest 2>&5`; then
386   kde_result=done
387 else
388   kde_result=problems
391 KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
392 kde_have_all_paths=yes
394 KDE_SET_PATHS($kde_result)
398 AC_DEFUN([KDE_SET_PATHS],
400   kde_cv_all_paths="kde_have_all_paths=\"yes\" \
401         kde_htmldir=\"$kde_htmldir\" \
402         kde_appsdir=\"$kde_appsdir\" \
403         kde_icondir=\"$kde_icondir\" \
404         kde_sounddir=\"$kde_sounddir\" \
405         kde_datadir=\"$kde_datadir\" \
406         kde_locale=\"$kde_locale\" \
407         kde_cgidir=\"$kde_cgidir\" \
408         kde_confdir=\"$kde_confdir\" \
409         kde_kcfgdir=\"$kde_kcfgdir\" \
410         kde_mimedir=\"$kde_mimedir\" \
411         kde_toolbardir=\"$kde_toolbardir\" \
412         kde_wallpaperdir=\"$kde_wallpaperdir\" \
413         kde_templatesdir=\"$kde_templatesdir\" \
414         kde_bindir=\"$kde_bindir\" \
415         kde_servicesdir=\"$kde_servicesdir\" \
416         kde_servicetypesdir=\"$kde_servicetypesdir\" \
417         kde_moduledir=\"$kde_moduledir\" \
418         kde_styledir=\"$kde_styledir\" \
419         kde_widgetdir=\"$kde_widgetdir\" \
420         xdg_appsdir=\"$xdg_appsdir\" \
421         xdg_menudir=\"$xdg_menudir\" \
422         xdg_directorydir=\"$xdg_directorydir\" \
423         kde_result=$1"
426 AC_DEFUN([KDE_SET_DEFAULT_PATHS],
428 if test "$1" = "default"; then
430   if test -z "$kde_htmldir"; then
431     kde_htmldir='\${datadir}/doc/HTML'
432   fi
433   if test -z "$kde_appsdir"; then
434     kde_appsdir='\${datadir}/applnk'
435   fi
436   if test -z "$kde_icondir"; then
437     kde_icondir='\${datadir}/icons'
438   fi
439   if test -z "$kde_sounddir"; then
440     kde_sounddir='\${datadir}/sounds'
441   fi
442   if test -z "$kde_datadir"; then
443     kde_datadir='\${datadir}/apps'
444   fi
445   if test -z "$kde_locale"; then
446     kde_locale='\${datadir}/locale'
447   fi
448   if test -z "$kde_cgidir"; then
449     kde_cgidir='\${exec_prefix}/cgi-bin'
450   fi
451   if test -z "$kde_confdir"; then
452     kde_confdir='\${datadir}/config'
453   fi
454   if test -z "$kde_kcfgdir"; then
455     kde_kcfgdir='\${datadir}/config.kcfg'
456   fi
457   if test -z "$kde_mimedir"; then
458     kde_mimedir='\${datadir}/mimelnk'
459   fi
460   if test -z "$kde_toolbardir"; then
461     kde_toolbardir='\${datadir}/toolbar'
462   fi
463   if test -z "$kde_wallpaperdir"; then
464     kde_wallpaperdir='\${datadir}/wallpapers'
465   fi
466   if test -z "$kde_templatesdir"; then
467     kde_templatesdir='\${datadir}/templates'
468   fi
469   if test -z "$kde_bindir"; then
470     kde_bindir='\${exec_prefix}/bin'
471   fi
472   if test -z "$kde_servicesdir"; then
473     kde_servicesdir='\${datadir}/services'
474   fi
475   if test -z "$kde_servicetypesdir"; then
476     kde_servicetypesdir='\${datadir}/servicetypes'
477   fi
478   if test -z "$kde_moduledir"; then
479     if test "$kde_qtver" = "2"; then
480       kde_moduledir='\${libdir}/kde2'
481     else
482       kde_moduledir='\${libdir}/kde3'
483     fi
484   fi
485   if test -z "$kde_styledir"; then
486     kde_styledir='\${libdir}/kde3/plugins/styles'
487   fi
488   if test -z "$kde_widgetdir"; then
489     kde_widgetdir='\${libdir}/kde3/plugins/designer'
490   fi
491   if test -z "$xdg_appsdir"; then
492     xdg_appsdir='\${datadir}/applications/kde'
493   fi
494   if test -z "$xdg_menudir"; then
495     xdg_menudir='\${sysconfdir}/xdg/menus'
496   fi
497   if test -z "$xdg_directorydir"; then
498     xdg_directorydir='\${datadir}/desktop-directories'
499   fi
501   KDE_SET_PATHS(defaults)
503 else
505   if test $kde_qtver = 1; then
506      AC_MSG_RESULT([compiling])
507      KDE_1_CHECK_PATHS
508   else
509      AC_MSG_ERROR([path checking not yet supported for KDE 2])
510   fi
515 AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
516 [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
517    test -z "$kde_icondir" || test -z "$kde_sounddir" ||
518    test -z "$kde_datadir" || test -z "$kde_locale"  ||
519    test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
520    test -z "$kde_kcfgdir" ||
521    test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
522    test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
523    test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
524    test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
525    test -z "$kde_styledir" || test -z "kde_widgetdir" ||
526    test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
527    test "x$kde_have_all_paths" != "xyes"; then
528      kde_have_all_paths=no
529   fi
532 AC_DEFUN([KDE_MISSING_PROG_ERROR],
534     AC_MSG_ERROR([The important program $1 was not found!
535 Please check whether you installed KDE correctly.
539 AC_DEFUN([KDE_MISSING_ARTS_ERROR],
541     AC_MSG_ERROR([The important program $1 was not found!
542 Please check whether you installed aRts correctly or use
543 --without-arts to compile without aRts support (this will remove functionality).
547 AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
549     kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
550     test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
551     if test -n "$KDEDIRS"; then
552        kde_save_IFS=$IFS
553        IFS=:
554        for dir in $KDEDIRS; do
555             kde_default_bindirs="$dir/bin $kde_default_bindirs "
556        done
557        IFS=$kde_save_IFS
558     fi
561 AC_DEFUN([KDE_SUBST_PROGRAMS],
563     AC_ARG_WITH(arts,
564         AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
565         [build_arts=$withval],
566         [build_arts=yes]
567     )
568     AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
569     if test "$build_arts" = "no"; then
570         AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
571     fi
573         KDE_SET_DEFAULT_BINDIRS
574         kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
575         KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
576         KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
577         if test "$build_arts" '!=' "no"; then
578           KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
579           KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
580         fi
581         KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
583         kde32ornewer=1
584         kde33ornewer=1
585         if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
586             kde32ornewer=
587             kde33ornewer=
588         else
589             if test "$kde_qtver" = "3"; then
590               if test "$kde_qtsubver" -le 1; then
591                 kde32ornewer=
592               fi
593               if test "$kde_qtsubver" -le 2; then
594                 kde33ornewer=
595               fi
596               if test "$KDECONFIG" != "compiled"; then
597                 if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
598                   kde33ornewer=
599                 fi
600               fi
601             fi
602         fi
604         if test -n "$kde32ornewer"; then
605             KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
606             KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
607         fi
608         if test -n "$kde33ornewer"; then
609             KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
610             AC_SUBST(MAKEKDEWIDGETS)
611         fi
612         KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
614         if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
615             kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
616             test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
617             AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
618             if test "$KDE_XSL_STYLESHEET" = "NO"; then
619                 KDE_XSL_STYLESHEET=""
620             else
621                 KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
622             fi
623         fi
625         DCOP_DEPENDENCIES='$(DCOPIDL)'
626         if test -n "$kde32ornewer"; then
627             KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
628             DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
629             AC_SUBST(KCONFIG_COMPILER)
630             AC_SUBST(KCFG_DEPENDENCIES)
631             AC_SUBST(DCOPIDLNG)
632         fi
633         AC_SUBST(DCOPIDL)
634         AC_SUBST(DCOPIDL2CPP)
635         AC_SUBST(DCOP_DEPENDENCIES)
636         AC_SUBST(MCOPIDL)
637         AC_SUBST(ARTSCCONFIG)
638         AC_SUBST(MEINPROC)
639         AC_SUBST(KDE_XSL_STYLESHEET)
640         AC_SUBST(XMLLINT)
641 ])dnl
643 AC_DEFUN([AC_CREATE_KFSSTND],
645 AC_REQUIRE([AC_CHECK_RPATH])
647 AC_MSG_CHECKING([for KDE paths])
648 kde_result=""
649 kde_cached_paths=yes
650 AC_CACHE_VAL(kde_cv_all_paths,
652   KDE_SET_DEFAULT_PATHS($1)
653   kde_cached_paths=no
655 eval "$kde_cv_all_paths"
656 KDE_CHECK_PATHS_FOR_COMPLETENESS
657 if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
658   # wrong values were cached, may be, we can set better ones
659   kde_result=
660   kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
661   kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
662   kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
663   kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
664   kde_have_all_paths=
665   kde_styledir=
666   kde_widgetdir=
667   xdg_appsdir = xdg_menudir= xdg_directorydir= 
668   KDE_SET_DEFAULT_PATHS($1)
669   eval "$kde_cv_all_paths"
670   KDE_CHECK_PATHS_FOR_COMPLETENESS
671   kde_result="$kde_result (cache overridden)"
673 if test "$kde_have_all_paths" = "no"; then
674   AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
675 Since it had compiled and linked before, it must be a strange problem on your system.
676 Look at config.log for details. If you are not able to fix this, look at
677 http://www.kde.org/faq/installation.html or any www.kde.org mirror.
678 (If you're using an egcs version on Linux, you may update binutils!)
680 else
681   rm -f conftest*
682   AC_MSG_RESULT($kde_result)
685 bindir=$kde_bindir
687 KDE_SUBST_PROGRAMS
691 AC_DEFUN([AC_SUBST_KFSSTND],
693 AC_SUBST(kde_htmldir)
694 AC_SUBST(kde_appsdir)
695 AC_SUBST(kde_icondir)
696 AC_SUBST(kde_sounddir)
697 AC_SUBST(kde_datadir)
698 AC_SUBST(kde_locale)
699 AC_SUBST(kde_confdir)
700 AC_SUBST(kde_kcfgdir)
701 AC_SUBST(kde_mimedir)
702 AC_SUBST(kde_wallpaperdir)
703 AC_SUBST(kde_bindir)
704 dnl X Desktop Group standards
705 AC_SUBST(xdg_appsdir)
706 AC_SUBST(xdg_menudir)
707 AC_SUBST(xdg_directorydir)
708 dnl for KDE 2
709 AC_SUBST(kde_templatesdir)
710 AC_SUBST(kde_servicesdir)
711 AC_SUBST(kde_servicetypesdir)
712 AC_SUBST(kde_moduledir)
713 AC_SUBST(kdeinitdir, '$(kde_moduledir)')
714 AC_SUBST(kde_styledir)
715 AC_SUBST(kde_widgetdir)
716 if test "$kde_qtver" = 1; then
717   kde_minidir="$kde_icondir/mini"
718 else
719 # for KDE 1 - this breaks KDE2 apps using minidir, but
720 # that's the plan ;-/
721   kde_minidir="/dev/null"
723 dnl AC_SUBST(kde_minidir)
724 dnl AC_SUBST(kde_cgidir)
725 dnl AC_SUBST(kde_toolbardir)
728 AC_DEFUN([KDE_MISC_TESTS],
730    dnl Checks for libraries.
731    AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
732    AC_SUBST(LIBUTIL)
733    AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
734    AC_SUBST(LIBCOMPAT)
735    kde_have_crypt=
736    AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
737       AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
738         AC_MSG_WARN([you have no crypt in either libcrypt or libc.
739 You should install libcrypt from another source or configure with PAM
740 support])
741         kde_have_crypt=no
742       ]))
743    AC_SUBST(LIBCRYPT)
744    if test $kde_have_crypt = yes; then
745       AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
746    fi
747    AC_CHECK_SOCKLEN_T
748    AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
749    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
750       AC_CHECK_LIB(dnet_stub, dnet_ntoa,
751         [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
752    fi
753    AC_CHECK_FUNC(inet_ntoa)
754    if test $ac_cv_func_inet_ntoa = no; then
755      AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
756    fi
757    AC_CHECK_FUNC(connect)
758    if test $ac_cv_func_connect = no; then
759       AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
760         $X_EXTRA_LIBS)
761    fi
763    AC_CHECK_FUNC(remove)
764    if test $ac_cv_func_remove = no; then
765       AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
766    fi
768    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
769    AC_CHECK_FUNC(shmat, ,
770      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
771    
772    # more headers that need to be explicitly included on darwin
773    AC_CHECK_HEADERS(sys/types.h stdint.h)
775    # sys/bitypes.h is needed for uint32_t and friends on Tru64
776    AC_CHECK_HEADERS(sys/bitypes.h)
778    # darwin requires a poll emulation library
779    AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
781    # for some image handling on Mac OS X
782    AC_CHECK_HEADERS(Carbon/Carbon.h)
784    # CoreAudio framework
785    AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
786      AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
787      FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
788    ])
790    AC_CHECK_RES_INIT
791    AC_SUBST(LIB_POLL)
792    AC_SUBST(FRAMEWORK_COREAUDIO)
793    LIBSOCKET="$X_EXTRA_LIBS"
794    AC_SUBST(LIBSOCKET)
795    AC_SUBST(X_EXTRA_LIBS)
796    AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
797    AC_SUBST(LIBUCB)
799    case $host in  dnl this *is* LynxOS specific
800    *-*-lynxos* )
801         AC_MSG_CHECKING([LynxOS header file wrappers])
802         [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
803         AC_MSG_RESULT(disabled)
804         AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
805          ;;
806     esac
808    KDE_CHECK_TYPES
809    KDE_CHECK_LIBDL
810    KDE_CHECK_STRLCPY
811    KDE_CHECK_PIE_SUPPORT
813 # darwin needs this to initialize the environment
814 AC_CHECK_HEADERS(crt_externs.h)
815 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
817 AH_VERBATIM(_DARWIN_ENVIRON,
819 #if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
820 # include <sys/time.h>
821 # include <crt_externs.h>
822 # define environ (*_NSGetEnviron())
823 #endif
826 AH_VERBATIM(_AIX_STRINGS_H_BZERO,
829  * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
830  * that defines bzero.
831  */
833 #if defined(_AIX)
834 #include <strings.h>
835 #endif
838 AC_CHECK_FUNCS([vsnprintf snprintf])
840 AH_VERBATIM(_TRU64,[
842  * On HP-UX, the declaration of vsnprintf() is needed every time !
843  */
845 #if !defined(HAVE_VSNPRINTF) || defined(hpux)
846 #if __STDC__
847 #include <stdarg.h>
848 #include <stdlib.h>
849 #else
850 #include <varargs.h>
851 #endif
852 #ifdef __cplusplus
853 extern "C"
854 #endif
855 int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
856 #ifdef __cplusplus
857 extern "C"
858 #endif
859 int snprintf(char *str, size_t n, char const *fmt, ...);
860 #endif
865 dnl ------------------------------------------------------------------------
866 dnl Find the header files and libraries for X-Windows. Extended the
867 dnl macro AC_PATH_X
868 dnl ------------------------------------------------------------------------
870 AC_DEFUN([K_PATH_X],
872 AC_REQUIRE([KDE_MISC_TESTS])dnl
873 AC_REQUIRE([KDE_CHECK_LIB64])
875 AC_ARG_ENABLE(
876   embedded,
877   AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
878   kde_use_qt_emb=$enableval,
879   kde_use_qt_emb=no
882 AC_ARG_ENABLE(
883   qtopia,
884   AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
885   kde_use_qt_emb_palm=$enableval,
886   kde_use_qt_emb_palm=no
889 AC_ARG_ENABLE(
890   mac,
891   AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
892   kde_use_qt_mac=$enableval,
893   kde_use_qt_mac=no
896 # used to disable x11-specific stuff on special platforms
897 AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
899 if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
901 AC_MSG_CHECKING(for X)
903 AC_CACHE_VAL(kde_cv_have_x,
904 [# One or both of the vars are not set, and there is no cached value.
905 if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
906    kde_x_includes=NO
907 else
908    kde_x_includes=$x_includes
910 if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
911    kde_x_libraries=NO
912 else
913    kde_x_libraries=$x_libraries
916 # below we use the standard autoconf calls
917 ac_x_libraries=$kde_x_libraries
918 ac_x_includes=$kde_x_includes
920 KDE_PATH_X_DIRECT
921 dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
922 dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
923 dnl location. The correct location is /usr/lib32 or an undefined value
924 dnl (the linker is smart enough to pick the correct default library).
925 dnl Things work just fine if you use just AC_PATH_X_DIRECT.
926 dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
927 dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
928 dnl x_includes should be left alone.
929 case "$host" in
930 mips-sgi-irix6*)
931   ;;
932 *-*-solaris*)
933   ;;
935   _AC_PATH_X_XMKMF
936   if test -z "$ac_x_includes"; then
937     ac_x_includes="."
938   fi
939   if test -z "$ac_x_libraries"; then
940     ac_x_libraries="/usr/lib${kdelibsuff}"
941   fi
942 esac
943 #from now on we use our own again
945 # when the user already gave --x-includes, we ignore
946 # what the standard autoconf macros told us.
947 if test "$kde_x_includes" = NO; then
948   kde_x_includes=$ac_x_includes
951 # for --x-libraries too
952 if test "$kde_x_libraries" = NO; then
953   kde_x_libraries=$ac_x_libraries
956 if test "$kde_x_includes" = NO; then
957   AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
960 if test "$kde_x_libraries" = NO; then
961   AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
964 # Record where we found X for the cache.
965 kde_cv_have_x="have_x=yes \
966          kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
967 ])dnl
969 eval "$kde_cv_have_x"
971 if test "$have_x" != yes; then
972   AC_MSG_RESULT($have_x)
973   no_x=yes
974 else
975   AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
978 if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
979   X_INCLUDES=""
980   x_includes="."; dnl better than nothing :-
981  else
982   x_includes=$kde_x_includes
983   X_INCLUDES="-I$x_includes"
986 if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE || test "$kde_x_libraries" = "/usr/lib"; then
987   X_LDFLAGS=""
988   x_libraries="/usr/lib"; dnl better than nothing :-
989  else
990   x_libraries=$kde_x_libraries
991   X_LDFLAGS="-L$x_libraries"
993 all_includes="$X_INCLUDES"
994 all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
996 # Check for libraries that X11R6 Xt/Xaw programs need.
997 ac_save_LDFLAGS="$LDFLAGS"
998 LDFLAGS="$LDFLAGS $X_LDFLAGS"
999 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1000 # check for ICE first), but we must link in the order -lSM -lICE or
1001 # we get undefined symbols.  So assume we have SM if we have ICE.
1002 # These have to be linked with before -lX11, unlike the other
1003 # libraries we check for below, so use a different variable.
1004 #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1005 AC_CHECK_LIB(ICE, IceConnectionNumber,
1006   [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1007 LDFLAGS="$ac_save_LDFLAGS"
1009 LIB_X11='-lX11 $(LIBSOCKET)'
1011 AC_MSG_CHECKING(for libXext)
1012 AC_CACHE_VAL(kde_cv_have_libXext,
1014 kde_ldflags_safe="$LDFLAGS"
1015 kde_libs_safe="$LIBS"
1017 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1018 LIBS="-lXext -lX11 $LIBSOCKET"
1020 AC_TRY_LINK([
1021 #include <stdio.h>
1022 #ifdef STDC_HEADERS
1023 # include <stdlib.h>
1024 #endif
1027 printf("hello Xext\n");
1029 kde_cv_have_libXext=yes,
1030 kde_cv_have_libXext=no
1033 LDFLAGS=$kde_ldflags_safe
1034 LIBS=$kde_libs_safe
1037 AC_MSG_RESULT($kde_cv_have_libXext)
1039 if test "$kde_cv_have_libXext" = "no"; then
1040   AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1041 can't find it itself, we stop here assuming that make wouldn't find
1042 them either.])
1045 LIB_XEXT="-lXext"
1046 QTE_NORTTI=""
1048 elif test "$kde_use_qt_emb" = "yes"; then
1049   dnl We're using QT Embedded
1050   CPPFLAGS=-DQWS
1051   CXXFLAGS="$CXXFLAGS -fno-rtti"
1052   QTE_NORTTI="-fno-rtti -DQWS"
1053   X_PRE_LIBS=""
1054   LIB_X11=""
1055   LIB_XEXT=""
1056   LIB_XRENDER=""
1057   LIBSM=""
1058   X_INCLUDES=""
1059   X_LDFLAGS=""
1060   x_includes=""
1061   x_libraries=""
1062 elif test "$kde_use_qt_mac" = "yes"; then
1063   dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1064   dnl be included to get the information) --Sam
1065   CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1066   CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1067   X_PRE_LIBS=""
1068   LIB_X11=""
1069   LIB_XEXT=""
1070   LIB_XRENDER=""
1071   LIBSM=""
1072   X_INCLUDES=""
1073   X_LDFLAGS=""
1074   x_includes=""
1075   x_libraries=""
1077 AC_SUBST(X_PRE_LIBS)
1078 AC_SUBST(LIB_X11)
1079 AC_SUBST(LIB_XRENDER)
1080 AC_SUBST(LIBSM)
1081 AC_SUBST(X_INCLUDES)
1082 AC_SUBST(X_LDFLAGS)
1083 AC_SUBST(x_includes)
1084 AC_SUBST(x_libraries)
1085 AC_SUBST(QTE_NORTTI)
1086 AC_SUBST(LIB_XEXT)
1090 AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1092 AC_REQUIRE([KDE_USE_QT])
1093 cat > conftest.$ac_ext <<EOF
1094 #include "confdefs.h"
1095 #include <qglobal.h>
1096 #include <qapplication.h>
1098 if test "$kde_qtver" = "2"; then
1099 cat >> conftest.$ac_ext <<EOF
1100 #include <qevent.h>
1101 #include <qstring.h>
1102 #include <qstyle.h>
1105 if test $kde_qtsubver -gt 0; then
1106 cat >> conftest.$ac_ext <<EOF
1107 #if QT_VERSION < 210
1108 #error 1
1109 #endif
1114 if test "$kde_qtver" = "3"; then
1115 cat >> conftest.$ac_ext <<EOF
1116 #include <qcursor.h>
1117 #include <qstylefactory.h>
1118 #include <private/qucomextra_p.h>
1122 echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1123 cat >> conftest.$ac_ext <<EOF
1124 #error 1
1125 #endif
1127 int main() {
1129 if test "$kde_qtver" = "2"; then
1130 cat >> conftest.$ac_ext <<EOF
1131     QStringList *t = new QStringList();
1132     Q_UNUSED(t);
1134 if test $kde_qtsubver -gt 0; then
1135 cat >> conftest.$ac_ext <<EOF
1136     QString s;
1137     s.setLatin1("Elvis is alive", 14);
1141 if test "$kde_qtver" = "3"; then
1142 cat >> conftest.$ac_ext <<EOF
1143     (void)QStyleFactory::create(QString::null);
1144     QCursor c(Qt::WhatsThisCursor);
1147 cat >> conftest.$ac_ext <<EOF
1148     return 0;
1153 AC_DEFUN([KDE_USE_QT],
1155 if test -z "$1"; then
1156   # Current default Qt version: 3.3
1157   kde_qtver=3
1158   kde_qtsubver=3
1159 else
1160   kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1161   # following is the check if subversion isnt found in passed argument
1162   if test "$kde_qtsubver" = "$1"; then
1163     kde_qtsubver=1
1164   fi
1165   kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1166   if test "$kde_qtver" = "1"; then
1167     kde_qtsubver=42
1168   fi
1171 if test -z "$2"; then
1172   if test "$kde_qtver" = "2"; then
1173     if test $kde_qtsubver -gt 0; then
1174       kde_qt_minversion=">= Qt 2.2.2"
1175     else
1176       kde_qt_minversion=">= Qt 2.0.2"
1177     fi
1178   fi
1179   if test "$kde_qtver" = "3"; then
1180     if test $kde_qtsubver -gt 0; then
1181          if test $kde_qtsubver -gt 1; then
1182             if test $kde_qtsubver -gt 2; then
1183                 kde_qt_minversion=">= Qt 3.3 and < 4.0"
1184             else
1185                 kde_qt_minversion=">= Qt 3.2 and < 4.0"
1186             fi
1187          else
1188             kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1189          fi
1190     else
1191       kde_qt_minversion=">= Qt 3.0 and < 4.0"
1192     fi
1193   fi
1194   if test "$kde_qtver" = "1"; then
1195     kde_qt_minversion=">= 1.42 and < 2.0"
1196   fi
1197 else
1198    kde_qt_minversion="$2"
1201 if test -z "$3"; then
1202    if test $kde_qtver = 3; then
1203      if test $kde_qtsubver -gt 0; then
1204        kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1205        qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1206        kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1207      else
1208        kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1209      fi
1210    fi
1211    if test $kde_qtver = 2; then
1212      if test $kde_qtsubver -gt 0; then
1213        kde_qt_verstring="QT_VERSION >= 222"
1214      else
1215        kde_qt_verstring="QT_VERSION >= 200"
1216      fi
1217    fi
1218    if test $kde_qtver = 1; then
1219     kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1220    fi
1221 else
1222    kde_qt_verstring="$3"
1225 if test $kde_qtver = 4; then
1226   kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
1228 if test $kde_qtver = 3; then
1229   kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3 /usr/lib${kdelibsuff}/qt-3.3"
1230   if test -z "$PKG_CONFIG"; then
1231       AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1232   fi
1233   if test "$PKG_CONFIG" != "no" ; then
1234     if $PKG_CONFIG --exists qt-mt ; then
1235        kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix qt-mt`"
1236     fi
1237   fi
1239 if test $kde_qtver = 2; then
1240    kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1242 if test $kde_qtver = 1; then
1243    kde_qt_dirs="$QTDIR /usr/lib/qt"
1247 AC_DEFUN([KDE_CHECK_QT_DIRECT],
1249 AC_REQUIRE([KDE_USE_QT])
1250 AC_MSG_CHECKING([if Qt compiles without flags])
1251 AC_CACHE_VAL(kde_cv_qt_direct,
1253 AC_LANG_SAVE
1254 AC_LANG_CPLUSPLUS
1255 ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1256 ac_LIBRARY_PATH="$LIBRARY_PATH"
1257 ac_cxxflags_safe="$CXXFLAGS"
1258 ac_ldflags_safe="$LDFLAGS"
1259 ac_libs_safe="$LIBS"
1261 CXXFLAGS="$CXXFLAGS -I$qt_includes"
1262 LDFLAGS="$LDFLAGS $X_LDFLAGS"
1263 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1264 LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1265 else
1266 LIBS="$LIBQT $LIBSOCKET"
1268 LD_LIBRARY_PATH=
1269 export LD_LIBRARY_PATH
1270 LIBRARY_PATH=
1271 export LIBRARY_PATH
1273 KDE_PRINT_QT_PROGRAM
1275 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1276   kde_cv_qt_direct="yes"
1277 else
1278   kde_cv_qt_direct="no"
1279   echo "configure: failed program was:" >&AC_FD_CC
1280   cat conftest.$ac_ext >&AC_FD_CC
1283 rm -f conftest*
1284 CXXFLAGS="$ac_cxxflags_safe"
1285 LDFLAGS="$ac_ldflags_safe"
1286 LIBS="$ac_libs_safe"
1288 LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1289 export LD_LIBRARY_PATH
1290 LIBRARY_PATH="$ac_LIBRARY_PATH"
1291 export LIBRARY_PATH
1292 AC_LANG_RESTORE
1295 if test "$kde_cv_qt_direct" = "yes"; then
1296   AC_MSG_RESULT(yes)
1297   $1
1298 else
1299   AC_MSG_RESULT(no)
1300   $2
1304 dnl ------------------------------------------------------------------------
1305 dnl Try to find the Qt headers and libraries.
1306 dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1307 dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1308 dnl ------------------------------------------------------------------------
1310 AC_DEFUN([AC_PATH_QT_1_3],
1312 AC_REQUIRE([K_PATH_X])
1313 AC_REQUIRE([KDE_USE_QT])
1314 AC_REQUIRE([KDE_CHECK_LIB64])
1316 dnl ------------------------------------------------------------------------
1317 dnl Add configure flag to enable linking to MT version of Qt library.
1318 dnl ------------------------------------------------------------------------
1320 AC_ARG_ENABLE(
1321   mt,
1322   AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1323   kde_use_qt_mt=$enableval,
1324   [
1325     if test $kde_qtver = 3; then
1326       kde_use_qt_mt=yes
1327     else
1328       kde_use_qt_mt=no
1329     fi
1330   ]
1333 USING_QT_MT=""
1335 dnl ------------------------------------------------------------------------
1336 dnl If we not get --disable-qt-mt then adjust some vars for the host.
1337 dnl ------------------------------------------------------------------------
1339 KDE_MT_LDFLAGS=
1340 KDE_MT_LIBS=
1341 if test "x$kde_use_qt_mt" = "xyes"; then
1342   KDE_CHECK_THREADING
1343   if test "x$kde_use_threading" = "xyes"; then
1344     CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1345     KDE_MT_LDFLAGS="$USE_THREADS"
1346     KDE_MT_LIBS="$LIBPTHREAD"
1347   else
1348     kde_use_qt_mt=no
1349   fi
1351 AC_SUBST(KDE_MT_LDFLAGS)
1352 AC_SUBST(KDE_MT_LIBS)
1354 kde_qt_was_given=yes
1356 dnl ------------------------------------------------------------------------
1357 dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1358 dnl ------------------------------------------------------------------------
1359 if test -z "$LIBQT_GLOB"; then
1360   if test "x$kde_use_qt_emb" = "xyes"; then
1361     LIBQT_GLOB="libqte.*"
1362   else
1363     LIBQT_GLOB="libqt.*"
1364   fi
1367 dnl ------------------------------------------------------------
1368 dnl If we got --enable-embedded then adjust the Qt library name.
1369 dnl ------------------------------------------------------------
1370 if test "x$kde_use_qt_emb" = "xyes"; then
1371   qtlib="qte"
1372 else
1373   qtlib="qt"
1376 kde_int_qt="-l$qtlib"
1378 if test -z "$LIBQPE"; then
1379 dnl ------------------------------------------------------------
1380 dnl If we got --enable-palmtop then add -lqpe to the link line
1381 dnl ------------------------------------------------------------
1382   if test "x$kde_use_qt_emb" = "xyes"; then
1383     if test "x$kde_use_qt_emb_palm" = "xyes"; then
1384       LIB_QPE="-lqpe"
1385     else
1386       LIB_QPE=""
1387     fi
1388   else
1389     LIB_QPE=""
1390   fi
1393 dnl ------------------------------------------------------------------------
1394 dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1395 dnl ------------------------------------------------------------------------
1397 if test "x$kde_use_qt_mt" = "xyes"; then
1398   LIBQT="-l$qtlib-mt"
1399   kde_int_qt="-l$qtlib-mt"
1400   LIBQT_GLOB="lib$qtlib-mt.*"
1401   USING_QT_MT="using -mt"
1402 else
1403   LIBQT="-l$qtlib"
1406 if test $kde_qtver != 1; then
1408   AC_REQUIRE([AC_FIND_PNG])
1409   AC_REQUIRE([AC_FIND_JPEG])
1410   LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1413 if test $kde_qtver = 3; then
1414   AC_REQUIRE([KDE_CHECK_LIBDL])
1415   LIBQT="$LIBQT $LIBDL"
1418 AC_MSG_CHECKING([for Qt])
1420 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1421 LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1423 ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1424 qt_libraries=""
1425 qt_includes=""
1426 AC_ARG_WITH(qt-dir,
1427     AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1428     [  ac_qt_includes="$withval"/include
1429        ac_qt_libraries="$withval"/lib${kdelibsuff}
1430        ac_qt_bindir="$withval"/bin
1431     ])
1433 AC_ARG_WITH(qt-includes,
1434     AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1435     [
1436        ac_qt_includes="$withval"
1437     ])
1439 kde_qt_libs_given=no
1441 AC_ARG_WITH(qt-libraries,
1442     AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1443     [  ac_qt_libraries="$withval"
1444        kde_qt_libs_given=yes
1445     ])
1447 AC_CACHE_VAL(ac_cv_have_qt,
1448 [#try to guess Qt locations
1450 qt_incdirs=""
1451 for dir in $kde_qt_dirs; do
1452    qt_incdirs="$qt_incdirs $dir/include $dir"
1453 done
1454 if test -z "$PKG_CONFIG"; then
1455     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1457 if test "$PKG_CONFIG" != "no" ; then
1458   if $PKG_CONFIG --exists qt-mt ; then
1459       qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir qt-mt`"
1460   fi
1462 qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
1463 if test ! "$ac_qt_includes" = "NO"; then
1464    qt_incdirs="$ac_qt_includes $qt_incdirs"
1467 if test "$kde_qtver" != "1"; then
1468   kde_qt_header=qstyle.h
1469 else
1470   kde_qt_header=qglobal.h
1473 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1474 ac_qt_includes="$qt_incdir"
1476 qt_libdirs=""
1477 for dir in $kde_qt_dirs; do
1478    qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir/lib $dir"
1479 done
1480 if test -z "$PKG_CONFIG"; then
1481     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1483 if test "$PKG_CONFIG" != "no" ; then
1484   if $PKG_CONFIG --exists qt-mt ; then
1485       qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir qt-mt`"
1486   fi
1488 qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1489 if test ! "$ac_qt_libraries" = "NO"; then
1490   qt_libdir=$ac_qt_libraries
1491 else
1492   qt_libdirs="$ac_qt_libraries $qt_libdirs"
1493   # if the Qt was given, the chance is too big that libqt.* doesn't exist
1494   qt_libdir=NONE
1495   for dir in $qt_libdirs; do
1496     try="ls -1 $dir/${LIBQT_GLOB}"
1497     if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1498   done
1500 for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1501   if test -e "$a"; then
1502     LIBQT="$LIBQT ${kde_int_qt}_incremental"
1503     break
1504   fi
1505 done
1507 ac_qt_libraries="$qt_libdir"
1509 AC_LANG_SAVE
1510 AC_LANG_CPLUSPLUS
1512 ac_cxxflags_safe="$CXXFLAGS"
1513 ac_ldflags_safe="$LDFLAGS"
1514 ac_libs_safe="$LIBS"
1516 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1517 LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1518 LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1520 KDE_PRINT_QT_PROGRAM
1522 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1523   rm -f conftest*
1524 else
1525   echo "configure: failed program was:" >&AC_FD_CC
1526   cat conftest.$ac_ext >&AC_FD_CC
1527   ac_qt_libraries="NO"
1529 rm -f conftest*
1530 CXXFLAGS="$ac_cxxflags_safe"
1531 LDFLAGS="$ac_ldflags_safe"
1532 LIBS="$ac_libs_safe"
1534 AC_LANG_RESTORE
1535 if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1536   ac_cv_have_qt="have_qt=no"
1537   ac_qt_notfound=""
1538   missing_qt_mt=""
1539   if test "$ac_qt_includes" = NO; then
1540     if test "$ac_qt_libraries" = NO; then
1541       ac_qt_notfound="(headers and libraries)";
1542     else
1543       ac_qt_notfound="(headers)";
1544     fi
1545   else
1546     if test "x$kde_use_qt_mt" = "xyes"; then
1547        missing_qt_mt="
1548 Make sure that you have compiled Qt with thread support!"
1549        ac_qt_notfound="(library $qtlib-mt)";
1550     else
1551        ac_qt_notfound="(library $qtlib)";
1552     fi
1553   fi
1555   AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1556 For more details about this problem, look at the end of config.log.$missing_qt_mt])
1557 else
1558   have_qt="yes"
1562 eval "$ac_cv_have_qt"
1564 if test "$have_qt" != yes; then
1565   AC_MSG_RESULT([$have_qt]);
1566 else
1567   ac_cv_have_qt="have_qt=yes \
1568     ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1569   AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1571   qt_libraries="$ac_qt_libraries"
1572   qt_includes="$ac_qt_includes"
1575 if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1576      KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1579 AC_SUBST(qt_libraries)
1580 AC_SUBST(qt_includes)
1582 if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1583  QT_INCLUDES=""
1584 else
1585  QT_INCLUDES="-I$qt_includes"
1586  all_includes="$QT_INCLUDES $all_includes"
1589 if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1590  QT_LDFLAGS=""
1591 else
1592  QT_LDFLAGS="-L$qt_libraries"
1593  all_libraries="$QT_LDFLAGS $all_libraries"
1595 test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1597 AC_SUBST(QT_INCLUDES)
1598 AC_SUBST(QT_LDFLAGS)
1599 AC_PATH_QT_MOC_UIC
1601 KDE_CHECK_QT_JPEG
1603 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1604 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1605 else
1606 LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1608 test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1609 for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1610   if test -e "$a"; then
1611      LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1612      break
1613   fi
1614 done
1616 AC_SUBST(LIB_QT)
1617 AC_SUBST(LIB_QPE)
1619 AC_SUBST(kde_qtver)
1622 AC_DEFUN([AC_PATH_QT],
1624 AC_PATH_QT_1_3
1627 AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1629 AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1631 if test x$ac_uic_supports_libpath = xyes; then
1633 AC_MSG_CHECKING([if UIC has KDE plugins available])
1634 AC_CACHE_VAL(kde_cv_uic_plugins,
1636 cat > actest.ui << EOF
1637 <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1638 <class>NewConnectionDialog</class>
1639 <widget class="QDialog">
1640    <widget class="KLineEdit">
1641         <property name="name">
1642            <cstring>testInput</cstring>
1643         </property>
1644    </widget>
1645 </widget>
1646 </UI>
1648        
1651 kde_cv_uic_plugins=no
1652 kde_line="$UIC_PATH -L $kde_widgetdir"
1653 if test x$ac_uic_supports_nounload = xyes; then
1654    kde_line="$kde_line -nounload"
1656 kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1657 if AC_TRY_EVAL(kde_line); then
1658         # if you're trying to debug this check and think it's incorrect,
1659         # better check your installation. The check _is_ correct - your
1660         # installation is not.
1661         if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1662                 kde_cv_uic_plugins=yes
1663         fi
1665 rm -f actest.ui actest.cpp
1668 AC_MSG_RESULT([$kde_cv_uic_plugins])
1669 if test "$kde_cv_uic_plugins" != yes; then
1670         AC_MSG_ERROR([
1671 you need to install kdelibs first.
1673 If you did install kdelibs, then the Qt version that is picked up by
1674 this configure is not the same version you used to compile kdelibs. 
1675 The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
1676 _same Qt version_, compiled with the _same compiler_ and the same Qt
1677 configuration settings.
1683 AC_DEFUN([KDE_CHECK_FINAL],
1685   AC_ARG_ENABLE(final,
1686         AC_HELP_STRING([--enable-final],
1687                        [build size optimized apps (experimental - needs lots of memory)]),
1688         kde_use_final=$enableval, kde_use_final=no)
1690   if test "x$kde_use_final" = "xyes"; then
1691       KDE_USE_FINAL_TRUE=""
1692       KDE_USE_FINAL_FALSE="#"
1693    else
1694       KDE_USE_FINAL_TRUE="#"
1695       KDE_USE_FINAL_FALSE=""
1696   fi
1697   AC_SUBST(KDE_USE_FINAL_TRUE)
1698   AC_SUBST(KDE_USE_FINAL_FALSE)
1701 AC_DEFUN([KDE_CHECK_CLOSURE],
1703   AC_ARG_ENABLE(closure,
1704                 AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1705         kde_use_closure=$enableval, kde_use_closure=no)
1707   KDE_NO_UNDEFINED=""
1708   if test "x$kde_use_closure" = "xyes"; then
1709        KDE_USE_CLOSURE_TRUE=""
1710        KDE_USE_CLOSURE_FALSE="#"
1711 #       CXXFLAGS="$CXXFLAGS $REPO"
1712   else
1713        KDE_USE_CLOSURE_TRUE="#"
1714        KDE_USE_CLOSURE_FALSE=""
1715        KDE_NO_UNDEFINED=""
1716        case $host in 
1717          *-*-linux-gnu)
1718            KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1719                 [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1720                 [KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1721                 [KDE_NO_UNDEFINED=""])],
1722             [KDE_NO_UNDEFINED=""])
1723            ;;
1724        esac
1725   fi
1726   AC_SUBST(KDE_USE_CLOSURE_TRUE)
1727   AC_SUBST(KDE_USE_CLOSURE_FALSE)
1728   AC_SUBST(KDE_NO_UNDEFINED)
1731 dnl Check if the linker supports --enable-new-dtags and --as-needed
1732 AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1734   AC_ARG_ENABLE(new_ldflags,
1735                 AC_HELP_STRING([--enable-new-ldflags],
1736                 [enable the new linker flags]),
1737         kde_use_new_ldflags=$enableval, 
1738         kde_use_new_ldflags=no)
1740   LDFLAGS_AS_NEEDED=""
1741   LDFLAGS_NEW_DTAGS=""
1742   if test "x$kde_use_new_ldflags" = "xyes"; then
1743        LDFLAGS_NEW_DTAGS=""
1744        KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1745                 [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1747        KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1748                 [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1749   fi
1750   AC_SUBST(LDFLAGS_AS_NEEDED)
1751   AC_SUBST(LDFLAGS_NEW_DTAGS)
1754 AC_DEFUN([KDE_CHECK_NMCHECK],
1756   AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1757         kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1759   if test "$kde_use_nmcheck" = "yes"; then
1760       KDE_USE_NMCHECK_TRUE=""
1761       KDE_USE_NMCHECK_FALSE="#"
1762    else
1763       KDE_USE_NMCHECK_TRUE="#"
1764       KDE_USE_NMCHECK_FALSE=""
1765   fi
1766   AC_SUBST(KDE_USE_NMCHECK_TRUE)
1767   AC_SUBST(KDE_USE_NMCHECK_FALSE)
1770 AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1771 savex=$exec_prefix
1772 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1773 tmp=$$2
1774 while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1775 exec_prefix=$savex
1778 dnl ------------------------------------------------------------------------
1779 dnl Now, the same with KDE
1780 dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1781 dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1782 dnl ------------------------------------------------------------------------
1784 AC_DEFUN([AC_BASE_PATH_KDE],
1786 AC_REQUIRE([KDE_CHECK_STL])
1787 AC_REQUIRE([AC_PATH_QT])dnl
1788 AC_REQUIRE([KDE_CHECK_LIB64])
1790 AC_CHECK_RPATH
1791 AC_MSG_CHECKING([for KDE])
1793 if test "${prefix}" != NONE; then
1794   kde_includes=${includedir}
1795   KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1797   kde_libraries=${libdir}
1798   KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1800 else
1801   ac_kde_includes=
1802   ac_kde_libraries=
1803   kde_libraries=""
1804   kde_includes=""
1807 AC_CACHE_VAL(ac_cv_have_kde,
1808 [#try to guess kde locations
1810 if test "$kde_qtver" = 1; then
1811   kde_check_header="ksock.h"
1812   kde_check_lib="libkdecore.la"
1813 else
1814   kde_check_header="ksharedptr.h"
1815   kde_check_lib="libkio.la"
1818 if test -z "$1"; then
1820 kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1821 test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1822 kde_incdirs="$ac_kde_includes $kde_incdirs"
1823 AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1824 ac_kde_includes="$kde_incdir"
1826 if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1827   AC_MSG_ERROR([
1828 in the prefix, you've chosen, are no KDE headers installed. This will fail.
1829 So, check this please and use another prefix!])
1832 kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1833 test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1834 kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1835 AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1836 ac_kde_libraries="$kde_libdir"
1838 kde_widgetdir=NO
1839 dnl this might be somewhere else
1840 AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1842 if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1843 AC_MSG_ERROR([
1844 in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1845 So, check this please and use another prefix!])
1848 if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1849 AC_MSG_ERROR([
1850 I can't find the designer plugins. These are required and should have been installed
1851 by kdelibs])
1854 if test -n "$kde_widgetdir"; then
1855     kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1859 if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1860   ac_cv_have_kde="have_kde=no"
1861 else
1862   ac_cv_have_kde="have_kde=yes \
1863     ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1866 else dnl test -z $1, e.g. from kdelibs
1868   ac_cv_have_kde="have_kde=no"
1871 ])dnl
1873 eval "$ac_cv_have_kde"
1875 if test "$have_kde" != "yes"; then
1876  if test "${prefix}" = NONE; then
1877   ac_kde_prefix="$ac_default_prefix"
1878  else
1879   ac_kde_prefix="$prefix"
1880  fi
1881  if test "$exec_prefix" = NONE; then
1882   ac_kde_exec_prefix="$ac_kde_prefix"
1883   AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1884  else
1885   ac_kde_exec_prefix="$exec_prefix"
1886   AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1887  fi
1889  kde_libraries="${libdir}"
1890  kde_includes="${includedir}"
1892 else
1893   ac_cv_have_kde="have_kde=yes \
1894     ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1895   AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1897   kde_libraries="$ac_kde_libraries"
1898   kde_includes="$ac_kde_includes"
1900 AC_SUBST(kde_libraries)
1901 AC_SUBST(kde_includes)
1903 if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1904  KDE_INCLUDES=""
1905 else
1906  KDE_INCLUDES="-I$kde_includes"
1907  all_includes="$KDE_INCLUDES $all_includes"
1910 KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1912 KDE_LDFLAGS="-L$kde_libraries"
1913 if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1914  all_libraries="$KDE_LDFLAGS $all_libraries"
1917 AC_SUBST(KDE_LDFLAGS)
1918 AC_SUBST(KDE_INCLUDES)
1920 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1922 all_libraries="$all_libraries $USER_LDFLAGS"
1923 all_includes="$all_includes $USER_INCLUDES"
1924 AC_SUBST(all_includes)
1925 AC_SUBST(all_libraries)
1927 if test -z "$1"; then
1928 KDE_CHECK_UIC_PLUGINS
1931 ac_kde_libraries="$kde_libdir"
1933 AC_SUBST(AUTODIRS)
1938 AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1940 AC_MSG_CHECKING(for extra includes)
1941 AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1942   kde_use_extra_includes="$withval",
1943   kde_use_extra_includes=NONE
1945 kde_extra_includes=
1946 if test -n "$kde_use_extra_includes" && \
1947    test "$kde_use_extra_includes" != "NONE"; then
1949    ac_save_ifs=$IFS
1950    IFS=':'
1951    for dir in $kde_use_extra_includes; do
1952      kde_extra_includes="$kde_extra_includes $dir"
1953      USER_INCLUDES="$USER_INCLUDES -I$dir"
1954    done
1955    IFS=$ac_save_ifs
1956    kde_use_extra_includes="added"
1957 else
1958    kde_use_extra_includes="no"
1960 AC_SUBST(USER_INCLUDES)
1962 AC_MSG_RESULT($kde_use_extra_includes)
1964 kde_extra_libs=
1965 AC_MSG_CHECKING(for extra libs)
1966 AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1967   kde_use_extra_libs=$withval,
1968   kde_use_extra_libs=NONE
1970 if test -n "$kde_use_extra_libs" && \
1971    test "$kde_use_extra_libs" != "NONE"; then
1973    ac_save_ifs=$IFS
1974    IFS=':'
1975    for dir in $kde_use_extra_libs; do
1976      kde_extra_libs="$kde_extra_libs $dir"
1977      KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1978      USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1979    done
1980    IFS=$ac_save_ifs
1981    kde_use_extra_libs="added"
1982 else
1983    kde_use_extra_libs="no"
1986 AC_SUBST(USER_LDFLAGS)
1988 AC_MSG_RESULT($kde_use_extra_libs)
1992 AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1994     AC_MSG_CHECKING([for KDE headers installed])
1995     AC_LANG_SAVE
1996     AC_LANG_CPLUSPLUS
1997 cat > conftest.$ac_ext <<EOF
1998 #ifdef STDC_HEADERS
1999 # include <stdlib.h>
2000 #endif
2001 #include <stdio.h>
2002 #include "confdefs.h"
2003 #include <kapp.h>
2005 int main() {
2006     printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
2007     printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
2008     printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
2009     printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
2010     printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
2011     printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
2012     printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
2013     printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
2014     printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
2015     printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
2016     printf("kde_wallpaperdir=\\"%s\\"\n",
2017         KApplication::kde_wallpaperdir().data());
2018     printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
2019     printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
2020     printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
2021     printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
2022     printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2023     printf("kde_styledir=\\"/tmp/dummy\\"\n");
2024     printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2025     printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2026     printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2027     printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2028     printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2029     return 0;
2030     }
2033  ac_save_CPPFLAGS=$CPPFLAGS
2034  CPPFLAGS="$all_includes $CPPFLAGS"
2035  if AC_TRY_EVAL(ac_compile); then
2036    AC_MSG_RESULT(yes)
2037  else
2038    AC_MSG_ERROR([your system is not able to compile a small KDE application!
2039 Check, if you installed the KDE header files correctly.
2040 For more details about this problem, look at the end of config.log.])
2041   fi
2042   CPPFLAGS=$ac_save_CPPFLAGS
2044   AC_LANG_RESTORE
2047 AC_DEFUN([KDE_CHECK_KDEQTADDON],
2049 AC_MSG_CHECKING(for kde-qt-addon)
2050 AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2052  kde_ldflags_safe="$LDFLAGS"
2053  kde_libs_safe="$LIBS"
2054  kde_cxxflags_safe="$CXXFLAGS"
2056  LIBS="-lkde-qt-addon $LIBQT $LIBS"
2057  CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2058  LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2060  AC_TRY_LINK([
2061    #include <qdom.h>
2062  ],
2064    QDomDocument doc;
2065  ],
2066   kde_cv_have_kdeqtaddon=yes,
2067   kde_cv_have_kdeqtaddon=no
2070  LDFLAGS=$kde_ldflags_safe
2071  LIBS=$kde_libs_safe
2072  CXXFLAGS=$kde_cxxflags_safe
2075 AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2077 if test "$kde_cv_have_kdeqtaddon" = "no"; then
2078   AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2079 It is a separate package (and CVS module) named kde-qt-addon.])
2083 AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2085    AC_REQUIRE([KDE_MISC_TESTS])
2086    AC_REQUIRE([KDE_CHECK_LIBDL])
2087    AC_REQUIRE([K_PATH_X])
2089 if test $kde_qtver = 3; then
2090    case $host in 
2091                *cygwin*) lib_kded="-lkdeinit_kded" ;;
2092                *) lib_kded="" ;;
2093        esac
2094    AC_SUBST(LIB_KDED, $lib_kded)
2095    AC_SUBST(LIB_KDECORE, "-lkdecore")
2096    AC_SUBST(LIB_KDEUI, "-lkdeui")
2097    AC_SUBST(LIB_KIO, "-lkio")
2098    AC_SUBST(LIB_KJS, "-lkjs")
2099    AC_SUBST(LIB_SMB, "-lsmb")
2100    AC_SUBST(LIB_KAB, "-lkab")
2101    AC_SUBST(LIB_KABC, "-lkabc")
2102    AC_SUBST(LIB_KHTML, "-lkhtml")
2103    AC_SUBST(LIB_KSPELL, "-lkspell")
2104    AC_SUBST(LIB_KPARTS, "-lkparts")
2105    AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2106    AC_SUBST(LIB_KUTILS, "-lkutils")
2107    AC_SUBST(LIB_KDEPIM, "-lkdepim")
2108    AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2109    AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2110    AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2111    AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2112 # these are for backward compatibility
2113    AC_SUBST(LIB_KSYCOCA, "-lkio")
2114    AC_SUBST(LIB_KFILE, "-lkio")
2115 elif test $kde_qtver = 2; then
2116    AC_SUBST(LIB_KDECORE, "-lkdecore")
2117    AC_SUBST(LIB_KDEUI, "-lkdeui")
2118    AC_SUBST(LIB_KIO, "-lkio")
2119    AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2120    AC_SUBST(LIB_SMB, "-lsmb")
2121    AC_SUBST(LIB_KFILE, "-lkfile")
2122    AC_SUBST(LIB_KAB, "-lkab")
2123    AC_SUBST(LIB_KHTML, "-lkhtml")
2124    AC_SUBST(LIB_KSPELL, "-lkspell")
2125    AC_SUBST(LIB_KPARTS, "-lkparts")
2126    AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2127 else
2128    AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2129    AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2130    AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2131    AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2132    AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2136 AC_DEFUN([AC_PATH_KDE],
2138   AC_BASE_PATH_KDE
2139   AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2140   [
2141   if test "$enableval" = "no";
2142     then ac_use_path_checking="default"
2143     else ac_use_path_checking=""
2144   fi
2145   ],
2146   [
2147   if test "$kde_qtver" = 1;
2148     then ac_use_path_checking=""
2149     else ac_use_path_checking="default"
2150   fi
2151   ]
2152   )
2154   AC_CREATE_KFSSTND($ac_use_path_checking)
2156   AC_SUBST_KFSSTND
2157   KDE_CREATE_LIBS_ALIASES
2160 dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2161 AC_DEFUN([KDE_CHECK_FUNC_EXT],
2163 AC_MSG_CHECKING(for $1)
2164 AC_CACHE_VAL(kde_cv_func_$1,
2166 AC_LANG_SAVE
2167 AC_LANG_CPLUSPLUS
2168 save_CXXFLAGS="$CXXFLAGS"
2169 kde_safe_LIBS="$LIBS"
2170 LIBS="$LIBS $X_EXTRA_LIBS"
2171 if test "$GXX" = "yes"; then
2172 CXXFLAGS="$CXXFLAGS -pedantic-errors"
2174 AC_TRY_COMPILE([
2180 kde_cv_func_$1=yes,
2181 kde_cv_func_$1=no)
2182 CXXFLAGS="$save_CXXFLAGS"
2183 LIBS="$kde_safe_LIBS"
2184 AC_LANG_RESTORE
2187 AC_MSG_RESULT($kde_cv_func_$1)
2189 AC_MSG_CHECKING([if $1 needs custom prototype])
2190 AC_CACHE_VAL(kde_cv_proto_$1,
2192 if test "x$kde_cv_func_$1" = xyes; then
2193   kde_cv_proto_$1=no
2194 else
2195   case "$1" in
2196         setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2197                 kde_cv_proto_$1="yes - in libkdefakes"
2198                 ;;
2199         *)
2200                 kde_cv_proto_$1=unknown
2201                 ;;
2202   esac
2205 if test "x$kde_cv_proto_$1" = xunknown; then
2207 AC_LANG_SAVE
2208 AC_LANG_CPLUSPLUS
2209   kde_safe_libs=$LIBS
2210   LIBS="$LIBS $X_EXTRA_LIBS"
2211   AC_TRY_LINK([
2214 extern "C" $4;
2219 [ kde_cv_func_$1=yes
2220   kde_cv_proto_$1=yes ],
2221   [kde_cv_proto_$1="$1 unavailable"]
2223 LIBS=$kde_safe_libs
2224 AC_LANG_RESTORE
2227 AC_MSG_RESULT($kde_cv_proto_$1)
2229 if test "x$kde_cv_func_$1" = xyes; then
2230   AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2231   $6
2233 if test "x$kde_cv_proto_$1" = xno; then
2234   AC_DEFINE(HAVE_$5_PROTO, 1,
2235   [Define if you have the $1 prototype])
2238 AH_VERBATIM([_HAVE_$5_PROTO],
2240 #if !defined(HAVE_$5_PROTO)
2241 #ifdef __cplusplus
2242 extern "C" {
2243 #endif
2245 #ifdef __cplusplus
2247 #endif
2248 #endif
2252 AC_DEFUN([AC_CHECK_SETENV],
2254         KDE_CHECK_FUNC_EXT(setenv, [
2255 #include <stdlib.h>
2256 ], 
2257                 [setenv("VAR", "VALUE", 1);],
2258                 [int setenv (const char *, const char *, int)],
2259                 [SETENV])
2262 AC_DEFUN([AC_CHECK_UNSETENV],
2264         KDE_CHECK_FUNC_EXT(unsetenv, [
2265 #include <stdlib.h>
2266 ], 
2267                 [unsetenv("VAR");],
2268                 [void unsetenv (const char *)],
2269                 [UNSETENV])
2272 AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2274         KDE_CHECK_FUNC_EXT(getdomainname, [
2275 #include <stdlib.h>
2276 #include <unistd.h>
2277 #include <netdb.h>
2278 ], 
2279                 [
2280 char buffer[200];
2281 getdomainname(buffer, 200);
2282 ],      
2283                 [#include <sys/types.h>
2284                 int getdomainname (char *, size_t)],
2285                 [GETDOMAINNAME])
2288 AC_DEFUN([AC_CHECK_GETHOSTNAME],
2290         KDE_CHECK_FUNC_EXT(gethostname, [
2291 #include <stdlib.h>
2292 #include <unistd.h>
2293 ], 
2294                 [
2295 char buffer[200];
2296 gethostname(buffer, 200);
2297 ],      
2298                 [int gethostname (char *, unsigned int)],
2299                 [GETHOSTNAME])
2302 AC_DEFUN([AC_CHECK_USLEEP],
2304         KDE_CHECK_FUNC_EXT(usleep, [
2305 #include <unistd.h>
2306 ], 
2307                 [
2308 usleep(200);
2309 ],      
2310                 [int usleep (unsigned int)],
2311                 [USLEEP])
2315 AC_DEFUN([AC_CHECK_RANDOM],
2317         KDE_CHECK_FUNC_EXT(random, [
2318 #include <stdlib.h>
2319 ], 
2320                 [
2321 random();
2322 ],      
2323                 [long int random(void)],
2324                 [RANDOM])
2326         KDE_CHECK_FUNC_EXT(srandom, [
2327 #include <stdlib.h>
2328 ], 
2329                 [
2330 srandom(27);
2331 ],      
2332                 [void srandom(unsigned int)],
2333                 [SRANDOM])
2337 AC_DEFUN([AC_CHECK_INITGROUPS],
2339         KDE_CHECK_FUNC_EXT(initgroups, [
2340 #include <sys/types.h>
2341 #include <unistd.h>
2342 #include <grp.h>
2344         [
2345 char buffer[200];
2346 initgroups(buffer, 27);
2348         [int initgroups(const char *, gid_t)],
2349         [INITGROUPS])
2352 AC_DEFUN([AC_CHECK_MKSTEMPS],
2354         KDE_CHECK_FUNC_EXT(mkstemps, [
2355 #include <stdlib.h>
2356 #include <unistd.h>
2358         [
2359 mkstemps("/tmp/aaaXXXXXX", 6);
2361         [int mkstemps(char *, int)],
2362         [MKSTEMPS])
2365 AC_DEFUN([AC_CHECK_MKSTEMP],
2367         KDE_CHECK_FUNC_EXT(mkstemp, [
2368 #include <stdlib.h>
2369 #include <unistd.h>
2371         [
2372 mkstemp("/tmp/aaaXXXXXX");
2374         [int mkstemp(char *)],
2375         [MKSTEMP])
2378 AC_DEFUN([AC_CHECK_MKDTEMP],
2380         KDE_CHECK_FUNC_EXT(mkdtemp, [
2381 #include <stdlib.h>
2382 #include <unistd.h>
2384         [
2385 mkdtemp("/tmp/aaaXXXXXX");
2387         [char *mkdtemp(char *)],
2388         [MKDTEMP])
2392 AC_DEFUN([AC_CHECK_RES_INIT],
2394   AC_MSG_CHECKING([if res_init needs -lresolv])
2395   kde_libs_safe="$LIBS"
2396   LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2397   AC_TRY_LINK(
2398     [
2399 #include <sys/types.h>
2400 #include <netinet/in.h>
2401 #include <arpa/nameser.h>
2402 #include <resolv.h>
2403     ],
2404     [
2405       res_init(); 
2406     ],
2407     [
2408       LIBRESOLV="-lresolv"
2409       AC_MSG_RESULT(yes)
2410       AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2411     ],
2412     [ AC_MSG_RESULT(no) ]
2413   )
2414   LIBS=$kde_libs_safe
2415   AC_SUBST(LIBRESOLV)
2417   KDE_CHECK_FUNC_EXT(res_init,
2418     [
2419 #include <sys/types.h>
2420 #include <netinet/in.h>
2421 #include <arpa/nameser.h>
2422 #include <resolv.h>
2423     ],
2424     [res_init()],
2425     [int res_init(void)],
2426     [RES_INIT])
2429 AC_DEFUN([AC_CHECK_STRLCPY],
2431         KDE_CHECK_FUNC_EXT(strlcpy, [
2432 #include <string.h>
2434 [ char buf[20];
2435   strlcpy(buf, "KDE function test", sizeof(buf));
2437         [unsigned long strlcpy(char*, const char*, unsigned long)],
2438         [STRLCPY])
2441 AC_DEFUN([AC_CHECK_STRLCAT],
2443         KDE_CHECK_FUNC_EXT(strlcat, [
2444 #include <string.h>
2446 [ char buf[20];
2447   buf[0]='\0';
2448   strlcat(buf, "KDE function test", sizeof(buf));
2450         [unsigned long strlcat(char*, const char*, unsigned long)],
2451         [STRLCAT])
2454 AC_DEFUN([AC_CHECK_RES_QUERY],
2456         KDE_CHECK_FUNC_EXT(res_query, [
2457 #include <sys/types.h>
2458 #include <netinet/in.h>
2459 #include <arpa/nameser.h>
2460 #include <resolv.h>
2461 #include <netdb.h>
2464 res_query(NULL, 0, 0, NULL, 0);
2466         [int res_query(const char *, int, int, unsigned char *, int)],
2467         [RES_QUERY])
2470 AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2472         KDE_CHECK_FUNC_EXT(dn_skipname, [
2473 #include <sys/types.h>
2474 #include <netinet/in.h>
2475 #include <arpa/nameser.h>
2476 #include <resolv.h>
2479 dn_skipname (NULL, NULL);
2481         [int dn_skipname (unsigned char *, unsigned char *)],
2482         [DN_SKIPNAME])
2486 AC_DEFUN([AC_FIND_GIF],
2487    [AC_MSG_CHECKING([for giflib])
2488 AC_CACHE_VAL(ac_cv_lib_gif,
2489 [ac_save_LIBS="$LIBS"
2490 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2491 LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2492 else
2493 LIBS="$all_libraries -lgif"
2495 AC_TRY_LINK(dnl
2497 #ifdef __cplusplus
2498 extern "C" {
2499 #endif
2500 int GifLastError(void);
2501 #ifdef __cplusplus
2503 #endif
2504 /* We use char because int might match the return type of a gcc2
2505     builtin and then its argument prototype would still apply.  */
2507             [return GifLastError();],
2508             eval "ac_cv_lib_gif=yes",
2509             eval "ac_cv_lib_gif=no")
2510 LIBS="$ac_save_LIBS"
2511 ])dnl
2512 if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2513   AC_MSG_RESULT(yes)
2514   AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2515 else
2516   AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2520 AC_DEFUN([KDE_FIND_JPEG_HELPER],
2522 AC_MSG_CHECKING([for libjpeg$2])
2523 AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2525 ac_save_LIBS="$LIBS"
2526 LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2527 ac_save_CFLAGS="$CFLAGS"
2528 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2529 AC_TRY_LINK(
2531 #ifdef __cplusplus
2532 extern "C" {
2533 #endif
2534 void jpeg_CreateDecompress();
2535 #ifdef __cplusplus
2537 #endif
2539 [jpeg_CreateDecompress();],
2540             eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2541             eval "ac_cv_lib_jpeg_$1=no")
2542 LIBS="$ac_save_LIBS"
2543 CFLAGS="$ac_save_CFLAGS"
2546 if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2547   LIBJPEG="$ac_cv_lib_jpeg_$1"
2548   AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2549 else
2550   AC_MSG_RESULT(no)
2551   $3
2556 AC_DEFUN([AC_FIND_JPEG],
2558 dnl first look for libraries
2559 KDE_FIND_JPEG_HELPER(6b, 6b,
2560    KDE_FIND_JPEG_HELPER(normal, [],
2561     [
2562        LIBJPEG=
2563     ]
2564    )
2567 dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2568 dnl requires system dependent includes loaded before it)
2569 jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2570 AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2571 test "x$jpeg_incdir" = xNO && jpeg_incdir=
2573 dnl if headers _and_ libraries are missing, this is no error, and we
2574 dnl continue with a warning (the user will get no jpeg support in khtml)
2575 dnl if only one is missing, it means a configuration error, but we still
2576 dnl only warn
2577 if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2578   AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2579 else
2580   if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2581     AC_MSG_WARN([
2582 There is an installation error in jpeg support. You seem to have only one
2583 of either the headers _or_ the libraries installed. You may need to either
2584 provide correct --with-extra-... options, or the development package of
2585 libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2586 Disabling JPEG support.
2588   else
2589     AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2590   fi
2591   jpeg_incdir=
2592   LIBJPEG=
2595 AC_SUBST(LIBJPEG)
2596 AH_VERBATIM(_AC_CHECK_JPEG,
2598  * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2599  * headers and I'm too lazy to write a configure test as long as only
2600  * unixware is related
2601  */
2602 #ifdef _UNIXWARE
2603 #define HAVE_BOOLEAN
2604 #endif
2608 AC_DEFUN([KDE_CHECK_QT_JPEG],
2610 if test -n "$LIBJPEG"; then
2611 AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2612 AC_CACHE_VAL(kde_cv_qt_jpeg,
2614 AC_LANG_SAVE
2615 AC_LANG_CPLUSPLUS
2616 ac_save_LIBS="$LIBS"
2617 LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2618 LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2619 ac_save_CXXFLAGS="$CXXFLAGS"
2620 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2621 AC_TRY_LINK(
2622 [#include <qapplication.h>],
2623             [
2624             int argc;
2625             char** argv;
2626             QApplication app(argc, argv);],
2627             eval "kde_cv_qt_jpeg=no",
2628             eval "kde_cv_qt_jpeg=yes")
2629 LIBS="$ac_save_LIBS"
2630 CXXFLAGS="$ac_save_CXXFLAGS"
2631 AC_LANG_RESTORE
2635 if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2636   AC_MSG_RESULT(yes)
2637   LIBJPEG_QT='$(LIBJPEG)'
2638 else
2639   AC_MSG_RESULT(no)
2640   LIBJPEG_QT=
2645 AC_DEFUN([AC_FIND_ZLIB],
2647 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2648 AC_MSG_CHECKING([for libz])
2649 AC_CACHE_VAL(ac_cv_lib_z,
2651 kde_save_LIBS="$LIBS"
2652 LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2653 kde_save_CFLAGS="$CFLAGS"
2654 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2655 AC_TRY_LINK(dnl
2657 #include<zlib.h>
2658 #include<string.h>
2661   char buf[42];
2662   gzFile f = (gzFile) 0;
2663   /* this would segfault.. but we only link, don't run */
2664   (void) gzgets(f, buf, sizeof(buf));
2666   return (strcmp(zlibVersion(), ZLIB_VERSION) == 0);
2668             eval "ac_cv_lib_z='-lz'",
2669             eval "ac_cv_lib_z=no")
2670 LIBS="$kde_save_LIBS"
2671 CFLAGS="$kde_save_CFLAGS"
2672 ])dnl
2673 if test ! "$ac_cv_lib_z" = no; then
2674   AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2675   LIBZ="$ac_cv_lib_z"
2676   AC_MSG_RESULT($ac_cv_lib_z)
2677 else
2678   AC_MSG_ERROR(not found. 
2679           Possibly configure picks up an outdated version
2680           installed by XFree86. Remove it from your system.
2682           Check your installation and look into config.log)
2683   LIBZ=""
2685 AC_SUBST(LIBZ)
2688 AC_DEFUN([KDE_TRY_TIFFLIB],
2690 AC_MSG_CHECKING([for libtiff $1])
2692 AC_CACHE_VAL(kde_cv_libtiff_$1,
2694 AC_LANG_SAVE
2695 AC_LANG_CPLUSPLUS
2696 kde_save_LIBS="$LIBS"
2697 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2698 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2699 else
2700 LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2702 kde_save_CXXFLAGS="$CXXFLAGS"
2703 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2705 AC_TRY_LINK(dnl
2707 #include<tiffio.h>
2709     [return (TIFFOpen( "", "r") == 0); ],
2711     kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2712 ], [
2713     kde_cv_libtiff_$1=no
2716 LIBS="$kde_save_LIBS"
2717 CXXFLAGS="$kde_save_CXXFLAGS"
2718 AC_LANG_RESTORE
2721 if test "$kde_cv_libtiff_$1" = "no"; then
2722     AC_MSG_RESULT(no)
2723     LIBTIFF=""
2724     $3
2725 else
2726     LIBTIFF="$kde_cv_libtiff_$1"
2727     AC_MSG_RESULT(yes)
2728     AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2729     $2
2734 AC_DEFUN([AC_FIND_TIFF],
2736 AC_REQUIRE([K_PATH_X])
2737 AC_REQUIRE([AC_FIND_ZLIB])
2738 AC_REQUIRE([AC_FIND_JPEG])
2739 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2741 KDE_TRY_TIFFLIB(tiff, [],
2742    KDE_TRY_TIFFLIB(tiff34))
2744 AC_SUBST(LIBTIFF)
2747 AC_DEFUN([KDE_FIND_LIBEXR],
2749 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2750 AC_REQUIRE([AC_FIND_ZLIB])
2751 AC_CACHE_VAL(ac_cv_libexr,
2753   if test -z "$PKG_CONFIG"; then
2754     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2755   fi
2757   AC_MSG_CHECKING([for OpenEXR libraries])
2759   if test "$PKG_CONFIG" = "no" ; then
2760      AC_MSG_RESULT(no)
2761      echo "*** The pkg-config script could not be found. Make sure it is"
2762      echo "*** in your path, or set the PKG_CONFIG environment variable"
2763      echo "*** to the full path to pkg-config."
2764      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
2765   else
2766      if ! $PKG_CONFIG --exists OpenEXR ; then
2767         AC_MSG_RESULT(no)
2768         EXRSTATUS=no
2769      else
2770         if ! $PKG_CONFIG --atleast-version="1.1.1" OpenEXR ; then
2771            AC_MSG_RESULT(no)
2772            EXRSTATUS=old
2773         else
2774            kde_save_LIBS="$LIBS"
2775            LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
2776            AC_LANG_SAVE
2777            AC_LANG_CPLUSPLUS
2778            kde_save_CXXFLAGS="$CXXFLAGS"
2779            EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
2780            CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
2782            AC_TRY_LINK(dnl
2783                [
2784                #include <ImfRgbaFile.h>
2785                ],
2786                [
2787                using namespace Imf;
2788                RgbaInputFile file ("dummy");
2789                return 0;
2790                ],
2791                eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
2792                eval "ac_cv_libexr=no"
2793            )
2794            LIBS="$kde_save_LIBS"
2795            CXXFLAGS="$kde_save_CXXFLAGS"
2796            AC_LANG_RESTORE
2797            ])dnl
2798            if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
2799                AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
2800                LIB_EXR="$ac_cv_libexr"
2801                AC_MSG_RESULT($ac_cv_libexr)
2802            else
2803                AC_MSG_RESULT(no)
2804                LIB_EXR=""
2805            fi
2806         fi
2807      fi
2808   fi
2809   AC_SUBST(LIB_EXR)
2810   AC_SUBST(EXR_FLAGS)
2815 AC_DEFUN([AC_FIND_PNG],
2817 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2818 AC_REQUIRE([AC_FIND_ZLIB])
2819 AC_MSG_CHECKING([for libpng])
2820 AC_CACHE_VAL(ac_cv_lib_png,
2822 kde_save_LIBS="$LIBS"
2823 if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2824 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2825 else
2826 LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2828 kde_save_CFLAGS="$CFLAGS"
2829 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2831 AC_TRY_LINK(dnl
2832     [
2833     #include<png.h>
2834     ],
2835     [
2836     png_structp png_ptr = png_create_read_struct(  /* image ptr */
2837                 PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2838     return( png_ptr != 0 );
2839     ],
2840     eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2841     eval "ac_cv_lib_png=no"
2843 LIBS="$kde_save_LIBS"
2844 CFLAGS="$kde_save_CFLAGS"
2845 ])dnl
2846 if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2847   AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2848   LIBPNG="$ac_cv_lib_png"
2849   AC_SUBST(LIBPNG)
2850   AC_MSG_RESULT($ac_cv_lib_png)
2851 else
2852   AC_MSG_RESULT(no)
2853   LIBPNG=""
2854   AC_SUBST(LIBPNG)
2859 AC_DEFUN([AC_FIND_JASPER],
2861 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2862 AC_REQUIRE([AC_FIND_JPEG])
2863 AC_MSG_CHECKING([for jasper])
2864 AC_CACHE_VAL(ac_cv_jasper,
2866 kde_save_LIBS="$LIBS"
2867 LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2868 kde_save_CFLAGS="$CFLAGS"
2869 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2871 AC_TRY_LINK(dnl
2872     [
2873     #include<jasper/jasper.h>
2874     ],
2875     [
2876     return( jas_init() );
2877     ],
2878     eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2879     eval "ac_cv_jasper=no"
2881 LIBS="$kde_save_LIBS"
2882 CFLAGS="$kde_save_CFLAGS"
2883 ])dnl
2884 if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2885   AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2886   LIB_JASPER="$ac_cv_jasper"
2887   AC_MSG_RESULT($ac_cv_jasper)
2888 else
2889   AC_MSG_RESULT(no)
2890   LIB_JASPER=""
2892 AC_SUBST(LIB_JASPER)
2895 AC_DEFUN([AC_CHECK_BOOL],
2897   AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2900 AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2902 AC_MSG_CHECKING(if you need GNU extensions)
2903 AC_CACHE_VAL(ac_cv_gnu_extensions,
2905 cat > conftest.c << EOF
2906 #include <features.h>
2908 #ifdef __GNU_LIBRARY__
2910 #endif
2913 if (eval "$ac_cpp conftest.c") 2>&5 |
2914   egrep "yes" >/dev/null 2>&1; then
2915   rm -rf conftest*
2916   ac_cv_gnu_extensions=yes
2917 else
2918   ac_cv_gnu_extensions=no
2922 AC_MSG_RESULT($ac_cv_gnu_extensions)
2923 if test "$ac_cv_gnu_extensions" = "yes"; then
2924   AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2928 AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2930 AC_MSG_CHECKING([whether $CXX supports -$1])
2931 kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2932 AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2934   AC_LANG_SAVE
2935   AC_LANG_CPLUSPLUS
2936   save_CXXFLAGS="$CXXFLAGS"
2937   CXXFLAGS="$CXXFLAGS -$1"
2938   AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2939   CXXFLAGS="$save_CXXFLAGS"
2940   AC_LANG_RESTORE
2942 if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2943  AC_MSG_RESULT(yes)
2945  $2
2946 else
2947  AC_MSG_RESULT(no)
2949  $3
2953 AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2955 AC_MSG_CHECKING([whether $CC supports -$1])
2956 kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2957 AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2959   AC_LANG_SAVE
2960   AC_LANG_C
2961   save_CFLAGS="$CFLAGS"
2962   CFLAGS="$CFLAGS -$1"
2963   AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2964   CFLAGS="$save_CFLAGS"
2965   AC_LANG_RESTORE
2967 if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2968  AC_MSG_RESULT(yes)
2970  $2
2971 else
2972  AC_MSG_RESULT(no)
2974  $3
2979 dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2980 dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2981 dnl it's all white-space separated
2982 AC_DEFUN([AC_REMOVE_FORBIDDEN],
2983 [ __val=$$1
2984   __forbid=" $2 "
2985   if test -n "$__val"; then
2986     __new=""
2987     ac_save_IFS=$IFS
2988     IFS="       "
2989     for i in $__val; do
2990       case "$__forbid" in
2991         *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2992         *) # Careful to not add spaces, where there were none, because otherwise
2993            # libtool gets confused, if we change e.g. CXX
2994            if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2995       esac
2996     done
2997     IFS=$ac_save_IFS
2998     $1=$__new
2999   fi
3003 AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
3005   AC_MSG_CHECKING([whether $CC is blacklisted])
3007   dnl In theory we have tu run this test against $CC and $CXX
3008   dnl in C and in C++ mode, because its perfectly legal for
3009   dnl the user to mix compiler versions, since C has a defined
3010   dnl ABI. 
3011   dnl 
3012   dnl For now, we assume the user is not on crack.
3014   AC_TRY_COMPILE([
3015 #ifdef __GNUC__
3016 #if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
3017 choke me
3018 #endif
3019 #endif
3020 ], ,
3021   kde_bad_compiler=no, 
3022   kde_bad_compiler=yes
3025   AC_MSG_RESULT($kde_bad_compiler)
3027 if test "$kde_bad_compiler" = "yes"; then
3028   AC_MSG_ERROR([
3030 This particular compiler version is blacklisted because it
3031 is known to miscompile KDE. Please use a newer version, or
3032 if that is not yet available, choose an older version. 
3034 Please do not report a bug or bother us reporting this
3035 configure error. We know about it, and we introduced
3036 it by intention to avoid untraceable bugs or crashes in KDE.
3044 AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
3046   AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
3047     kde_cv_opt_noinline_match,
3048   [
3049   kde_cv_opt_noinline_match=irrelevant
3050   dnl if we don't use both -O2 and -fno-inline, this check is moot
3051   if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
3052      && echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
3054     ac_cflags_save="$CFLAGS"
3055     CFLAGS="$CFLAGS -D_USE_GNU"
3057     AC_TRY_LINK([
3058   #include <string.h>
3059 ], [  const char *pt, *et;
3060   et = __extension__      ({ char __a0, __a1, __a2;       (__builtin_constant_p (  ";,"  ) && ((size_t)(const void *)((   ";,"   )+ 1) - (size_t)(const void *)(   ";,"   ) == 1)        ? ((__a0 =((__const char  *) (  ";,"  ))[0], __a0 == '\0')     ? ((void) (  pt ),((void *)0) )        : ((__a1 = ((__const char *) (  ";,"  ))[1], __a1== '\0')      ? (__extension__ (__builtin_constant_p (  __a0 ) && ( __a0 ) == '\0'   ? (char *) __rawmemchr (   pt  ,   __a0)       : strchr(   pt  ,   __a0 )))   : ((__a2 = ((__const char *) (  ";,"  ))[2], __a2 == '\0')      ? __strpbrk_c2 (  pt , __a0, __a1)      :(((__const char *) (  ";,"  ))[3] == '\0'     ? __strpbrk_c3 (  pt ,__a0, __a1, __a2): strpbrk (  pt ,   ";,"  ))))) : strpbrk (  pt ,  ";,"  )); }) ;
3062     kde_cv_opt_noinline_match=yes,
3063     kde_cv_opt_noinline_match=no
3064     )
3066     CFLAGS="$ac_cflags_save"
3067   fi
3068   ])
3072 dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
3073 AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
3074 [dnl
3075 if test "x$kde_use_qt_emb" != "xyes"; then
3076  AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
3077  AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
3078 else
3079  AC_REMOVE_FORBIDDEN(CXX, [-rpath])
3080  AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
3084 AC_DEFUN([AC_CHECK_COMPILERS],
3086   AC_ARG_ENABLE(debug,
3087                 AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
3088   [
3089     case $enableval in
3090       yes)
3091         kde_use_debug_code="yes"
3092         kde_use_debug_define=no
3093         ;;
3094       full)
3095         kde_use_debug_code="full"
3096         kde_use_debug_define=no
3097         ;;
3098       *)
3099         kde_use_debug_code="no"
3100         kde_use_debug_define=yes
3101         ;;
3102     esac
3103   ], 
3104     [kde_use_debug_code="no"
3105       kde_use_debug_define=no
3106   ])
3108   dnl Just for configure --help
3109   AC_ARG_ENABLE(dummyoption,
3110                 AC_HELP_STRING([--disable-debug],
3111                                [disables debug output and debug symbols [default=no]]),
3112                 [],[])
3114   AC_ARG_ENABLE(strict,
3115                 AC_HELP_STRING([--enable-strict],
3116                               [compiles with strict compiler options (may not work!)]),
3117    [
3118     if test $enableval = "no"; then
3119          kde_use_strict_options="no"
3120        else
3121          kde_use_strict_options="yes"
3122     fi
3123    ], [kde_use_strict_options="no"])
3125   AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3126    [
3127     if test $enableval = "no"; then
3128          kde_use_warnings="no"
3129        else
3130          kde_use_warnings="yes"
3131     fi
3132    ], [kde_use_warnings="yes"])
3134   dnl enable warnings for debug build
3135   if test "$kde_use_debug_code" != "no"; then
3136     kde_use_warnings=yes
3137   fi
3139   AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3140     [kde_use_profiling=$enableval],
3141     [kde_use_profiling="no"]
3142   )
3144   dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3145   CFLAGS=" $CFLAGS"
3147   AC_PROG_CC 
3149   AC_PROG_CPP
3151   if test "$GCC" = "yes"; then
3152     if test "$kde_use_debug_code" != "no"; then
3153       if test $kde_use_debug_code = "full"; then
3154         CFLAGS="-g3 -fno-inline $CFLAGS"
3155       else
3156         CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
3157       fi
3158     else
3159       CFLAGS="-O2 $CFLAGS"
3160     fi
3161   fi
3163   if test "$kde_use_debug_define" = "yes"; then
3164     CFLAGS="-DNDEBUG $CFLAGS"
3165   fi
3168   case "$host" in
3169   *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3170   *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3171   esac
3173   if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3174      LDFLAGS=""
3175   fi
3177   CXXFLAGS=" $CXXFLAGS"
3179   AC_PROG_CXX
3181   KDE_CHECK_FOR_BAD_COMPILER
3183   if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3184     if test "$kde_use_debug_code" != "no"; then
3185       if test "$CXX" = "KCC"; then
3186         CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3187       else
3188         if test "$kde_use_debug_code" = "full"; then
3189           CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3190         else
3191           CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
3192         fi
3193       fi
3194       KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3196       dnl convenience compiler flags
3197       KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3198       AC_SUBST(WOVERLOADED_VIRTUAL)
3199     else
3200       if test "$CXX" = "KCC"; then
3201         CXXFLAGS="+K3 $CXXFLAGS"
3202       else
3203         CXXFLAGS="-O2 $CXXFLAGS"
3204       fi
3205     fi
3206   fi
3208   if test "$kde_use_debug_define" = "yes"; then
3209     CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3210   fi  
3212   if test "$kde_use_profiling" = "yes"; then
3213     KDE_CHECK_COMPILER_FLAG(pg,
3214     [
3215       CFLAGS="-pg $CFLAGS"
3216       CXXFLAGS="-pg $CXXFLAGS"
3217     ])
3218   fi
3220   if test "$kde_use_warnings" = "yes"; then
3221       if test "$GCC" = "yes"; then
3222         CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3223         case $host in
3224           *-*-linux-gnu)        
3225             CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3226             CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
3227             KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3228             KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3229           ;;
3230         esac
3231         KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3232         KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3233         dnl ### FIXME: revert for KDE 4
3234         KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
3235      fi
3236   fi
3238   if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3239     CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3240   fi
3242   AC_ARG_ENABLE(pch,
3243      AC_HELP_STRING([--enable-pch],
3244                     [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3245     [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3247   HAVE_GCC_VISIBILITY=0
3248   AC_SUBST([HAVE_GCC_VISIBILITY])
3250   if test "$GXX" = "yes"; then
3251     gcc_no_reorder_blocks=NO
3252     KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
3253     if test $kde_use_debug_code != "no" && \
3254        test $kde_use_debug_code != "full" && \
3255        test "YES" = "$gcc_no_reorder_blocks" ; then
3256           CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
3257           CFLAGS="$CFLAGS -fno-reorder-blocks"
3258     fi
3259     KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3260     KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3261     KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3262     KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
3263     ENABLE_PERMISSIVE_FLAG="-fpermissive"
3265     if test "$kde_use_pch" = "yes"; then
3266         AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3267         echo >conftest.h
3268         if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3269             kde_gcc_supports_pch=yes
3270             AC_MSG_RESULT(yes)
3271         else
3272             kde_gcc_supports_pch=no
3273             AC_MSG_RESULT(no)
3274         fi
3275         if test "$kde_gcc_supports_pch" = "yes"; then
3276             AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3277             if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3278                 kde_gcc_supports_pch=yes
3279                 AC_MSG_RESULT(yes)
3280             else
3281                 kde_gcc_supports_pch=no
3282                 AC_MSG_RESULT(no)
3283             fi
3284         fi
3285         rm -f conftest.h conftest.h.gch
3286     fi
3288     KDE_CHECK_FOR_OPT_NOINLINE_MATCH
3289     if test "x$kde_cv_opt_noinline_match" = "xno" ; then
3290        CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
3291     fi
3292   fi
3293   AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3294   if test "$CXX" = "KCC"; then
3295     dnl unfortunately we currently cannot disable exception support in KCC
3296     dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3297     dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3298     dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
3300     if test "$kde_use_pch" = "yes"; then
3301       dnl TODO: support --pch-dir!
3302       KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3303       dnl the below works (but the dir must exist), but it's
3304       dnl useless for a whole package.
3305       dnl The are precompiled headers for each source file, so when compiling
3306       dnl from scratch, it doesn't make a difference, and they take up
3307       dnl around ~5Mb _per_ sourcefile.
3308       dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3309       dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3310     fi
3311     dnl this flag controls inlining. by default KCC inlines in optimisation mode
3312     dnl all implementations that are defined inside the class {} declaration. 
3313     dnl because of templates-compatibility with broken gcc compilers, this
3314     dnl can cause excessive inlining. This flag limits it to a sane level
3315     KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3316     KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3317     KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3318     KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3319     dnl Some source files are shared between multiple executables
3320     dnl (or libraries) and some of those need template instantiations.
3321     dnl In that case KCC needs to compile those sources with
3322     dnl --one_instantiation_per_object.  To make it easy for us we compile
3323     dnl _all_ objects with that flag (--one_per is a shorthand).
3324     KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3325   fi
3326   AC_SUBST(USE_EXCEPTIONS)
3327   dnl obsolete macro - provided to keep things going
3328   USE_RTTI=
3329   AC_SUBST(USE_RTTI)
3331   case "$host" in
3332       *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3333       *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3334       *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3335       *-*-solaris*) 
3336         if test "$GXX" = yes; then
3337           libstdcpp=`$CXX -print-file-name=libstdc++.so`
3338           if test ! -f $libstdcpp; then
3339              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])
3340           fi
3341         fi
3342         ;;
3343   esac
3345   AC_VALIDIFY_CXXFLAGS
3347   AC_PROG_CXXCPP
3349   if test "$GCC" = yes; then
3350      NOOPT_CFLAGS=-O0
3351   fi
3352   KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3354   AC_ARG_ENABLE(coverage,
3355     AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3356       if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3357         ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3358         ac_coverage_linker="-lgcc"
3359       elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3360         ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3361         ac_coverage_linker=""
3362       else
3363         AC_MSG_ERROR([coverage with your compiler is not supported])
3364       fi
3365       CFLAGS="$CFLAGS $ac_coverage_compiler"
3366       CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3367       LDFLAGS="$LDFLAGS $ac_coverage_linker"
3368     ])
3370   AC_SUBST(NOOPT_CXXFLAGS)
3371   AC_SUBST(NOOPT_CFLAGS)
3372   AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3374   KDE_CHECK_NEW_LDFLAGS
3375   KDE_CHECK_FINAL
3376   KDE_CHECK_CLOSURE
3377   KDE_CHECK_NMCHECK
3379   ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3382 AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3383   [
3384     AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3385       [
3386         AC_LANG_SAVE
3387         AC_LANG_CPLUSPLUS
3389         safe_CXXFLAGS=$CXXFLAGS
3390         safe_LDFLAGS=$LDFLAGS
3391         CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3392         LDFLAGS="$LDFLAGS -shared -fPIC"
3394         AC_TRY_LINK(
3395         [
3396           /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3397           #include <string>
3398           int some_function( void ) __attribute__ ((visibility("default")));
3399           int some_function( void )
3400           {
3401             std::string s("blafasel");
3402             return 0;
3403           }
3404         ], [/* elvis is alive */],
3405         kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3407         CXXFLAGS=$safe_CXXFLAGS
3408         LDFLAGS=$safe_LDFLAGS
3409         AC_LANG_RESTORE
3410       ]
3411     )
3413     if test x$kde_cv_val_gcc_visibility_bug = xno; then
3414       CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3415     fi
3416   ]
3419 AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3421   AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3423   AC_MSG_CHECKING([grepping for visibility push/pop in headers])
3425   if test "x$GXX" = "xyes"; then
3426     AC_LANG_SAVE
3427     AC_LANG_CPLUSPLUS
3428     AC_EGREP_CPP(
3429        [GCC visibility push],
3430        [ #include <exception> 
3431        ], 
3432     [
3433       AC_MSG_RESULT(yes)
3434       kde_stdc_visibility_patched=yes ],
3435     [ 
3436       AC_MSG_RESULT(no)
3437       AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
3438                    visibility support. Disabling -fvisibility=hidden])
3440       kde_stdc_visibility_patched=no ])
3442     AC_LANG_RESTORE
3444     kde_have_gcc_visibility=no
3445     KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
3446     [
3447       kde_have_gcc_visibility=yes
3448       dnl the whole toolchain is just a mess, gcc is just too buggy
3449       dnl to handle STL with visibility enabled. Lets reconsider 
3450       dnl when gcc 4.2 is out or when things get fixed in the compiler.
3451       dnl Contact mueller@kde.org for details.
3452       AC_ARG_ENABLE(gcc-hidden-visibility,
3453         AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
3454           [kde_have_gcc_visibility=$enableval],
3455           [kde_have_gcc_visibility=no])
3457       AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3458         [
3459           AC_LANG_SAVE
3460           AC_LANG_CPLUSPLUS
3462           safe_CXXFLAGS=$CXXFLAGS
3463           CXXFLAGS="$CXXFLAGS $all_includes"
3465           AC_TRY_COMPILE(
3466           [
3467 #include <qglobal.h>
3468 #if Q_EXPORT - 0 != 0
3469 /* if this compiles, then Q_EXPORT is undefined */
3470 /* if Q_EXPORT is nonempty, this will break compilation */
3471 #endif
3472           ], [/* elvis is alive */],
3473           kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3475           CXXFLAGS=$safe_CXXFLAGS
3476           AC_LANG_RESTORE
3477         ]
3478       )
3480       if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
3481         CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3482         KDE_CHECK_VISIBILITY_GCC_BUG
3483         HAVE_GCC_VISIBILITY=1
3484         AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3485       fi
3486     ])
3487   fi
3490 AC_DEFUN([KDE_ADD_DEPENDENCIES],
3492    [A]M_DEPENDENCIES(CC)
3493    [A]M_DEPENDENCIES(CXX)
3496 dnl just a wrapper to clean up configure.in
3497 AC_DEFUN([KDE_PROG_LIBTOOL],
3499 AC_REQUIRE([AC_CHECK_COMPILERS])
3500 AC_REQUIRE([AC_ENABLE_SHARED])
3501 AC_REQUIRE([AC_ENABLE_STATIC])
3503 AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3504 AC_REQUIRE([KDE_CHECK_LIB64])
3506 AC_OBJEXT
3507 AC_EXEEXT
3509 AM_PROG_LIBTOOL
3510 AC_LIBTOOL_CXX
3512 LIBTOOL_SHELL="/bin/sh ./libtool"
3513 #  LIBTOOL="$LIBTOOL --silent"
3514 KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3515 AC_SUBST(KDE_PLUGIN)
3517 # This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3518 KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3519 AC_SUBST(KDE_CHECK_PLUGIN)
3521 # we patch configure quite some so we better keep that consistent for incremental runs 
3522 AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3525 AC_DEFUN([KDE_CHECK_LIB64],
3527     AC_ARG_ENABLE(libsuffix,
3528         AC_HELP_STRING([--enable-libsuffix],
3529             [/lib directory suffix (64,32,none,auto[=default])]),
3530             kdelibsuff=$enableval, kdelibsuff="auto")
3531     
3532     if test "$kdelibsuff" = "auto"; then
3533     
3534 cat > conftest.c << EOF
3535 #include <stdio.h>
3536 int main() {
3537  return 0;
3540         kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
3541     s,.*/lib\([[^\/]]*\)/.*,\1, 
3542     p 
3544         rm -rf conftest.*
3545     fi  
3546         
3547     if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
3548        kdelibsuff=
3549     fi
3550     if test -z "$kdelibsuff"; then
3551         AC_MSG_RESULT([not using lib directory suffix])
3552         AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3553     else
3554         if test "$libdir" = '${exec_prefix}/lib'; then
3555             libdir="$libdir${kdelibsuff}"
3556             AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3557         fi
3558         AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3559         AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3560     fi
3563 AC_DEFUN([KDE_CHECK_TYPES],
3564 [  AC_CHECK_SIZEOF(int, 4)dnl
3565    AC_CHECK_SIZEOF(short)dnl
3566   AC_CHECK_SIZEOF(long, 4)dnl
3567   AC_CHECK_SIZEOF(char *, 4)dnl
3568 ])dnl
3570 dnl Not used - kept for compat only?
3571 AC_DEFUN([KDE_DO_IT_ALL],
3573 AC_CANONICAL_SYSTEM
3574 AC_ARG_PROGRAM
3575 AM_INIT_AUTOMAKE($1, $2)
3576 AM_DISABLE_LIBRARIES
3577 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3578 AC_CHECK_COMPILERS
3579 KDE_PROG_LIBTOOL
3580 AM_KDE_WITH_NLS
3581 AC_PATH_KDE
3584 AC_DEFUN([AC_CHECK_RPATH],
3586 AC_MSG_CHECKING(for rpath)
3587 AC_ARG_ENABLE(rpath,
3588       AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3589       USE_RPATH=$enableval, USE_RPATH=yes)
3591 if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3593   KDE_RPATH="-R \$(libdir)"
3595   if test "$kde_libraries" != "$libdir"; then
3596       KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3597   fi
3599   if test -n "$qt_libraries"; then
3600     KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3601   fi
3602   dnl $x_libraries is set to /usr/lib in case
3603   if test -n "$X_LDFLAGS"; then
3604     X_RPATH="-R \$(x_libraries)"
3605     KDE_RPATH="$KDE_RPATH $X_RPATH"
3606   fi
3607   if test -n "$KDE_EXTRA_RPATH"; then
3608     KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3609   fi
3611 AC_SUBST(KDE_EXTRA_RPATH)
3612 AC_SUBST(KDE_RPATH)
3613 AC_SUBST(X_RPATH)
3614 AC_MSG_RESULT($USE_RPATH)
3617 dnl Check for the type of the third argument of getsockname
3618 AC_DEFUN([AC_CHECK_SOCKLEN_T],
3620    AC_MSG_CHECKING(for socklen_t)
3621    AC_CACHE_VAL(kde_cv_socklen_t,
3622    [
3623       AC_LANG_PUSH(C++)
3624       kde_cv_socklen_t=no
3625       AC_TRY_COMPILE([
3626          #include <sys/types.h>
3627          #include <sys/socket.h>
3628       ],
3629       [
3630          socklen_t len;
3631          getpeername(0,0,&len);
3632       ],
3633       [
3634          kde_cv_socklen_t=yes
3635          kde_cv_socklen_t_equiv=socklen_t
3636       ])
3637       AC_LANG_POP(C++)
3638    ])
3639    AC_MSG_RESULT($kde_cv_socklen_t)
3640    if test $kde_cv_socklen_t = no; then
3641       AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3642       AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3643       [
3644          kde_cv_socklen_t_equiv=int
3645          AC_LANG_PUSH(C++)
3646          for t in int size_t unsigned long "unsigned long"; do
3647             AC_TRY_COMPILE([
3648                #include <sys/types.h>
3649                #include <sys/socket.h>
3650             ],
3651             [
3652                $t len;
3653                getpeername(0,0,&len);
3654             ],
3655             [
3656                kde_cv_socklen_t_equiv="$t"
3657                break
3658             ])
3659          done
3660          AC_LANG_POP(C++)
3661       ])
3662       AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3663    fi
3664    AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3665                      [type to use in place of socklen_t if not defined])
3666    AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3667                      [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3670 dnl This is a merge of some macros out of the gettext aclocal.m4
3671 dnl since we don't need anything, I took the things we need
3672 dnl the copyright for them is:
3673 dnl >
3674 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3675 dnl This Makefile.in is free software; the Free Software Foundation
3676 dnl gives unlimited permission to copy and/or distribute it,
3677 dnl with or without modifications, as long as this notice is preserved.
3679 dnl This program is distributed in the hope that it will be useful,
3680 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3681 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3682 dnl PARTICULAR PURPOSE.
3683 dnl >
3684 dnl for this file it is relicensed under LGPL
3686 AC_DEFUN([AM_KDE_WITH_NLS],
3687   [
3688     dnl If we use NLS figure out what method
3690     AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3691         [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3692     AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3694      if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3695         AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3696         GMSGFMT=":"
3697       fi
3698       MSGFMT=$GMSGFMT
3699       AC_SUBST(GMSGFMT)
3700       AC_SUBST(MSGFMT)
3702       AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3703         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3705       dnl Test whether we really found GNU xgettext.
3706       if test "$XGETTEXT" != ":"; then
3707         dnl If it is no GNU xgettext we define it as : so that the
3708         dnl Makefiles still can work.
3709         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3710           : ;
3711         else
3712           AC_MSG_RESULT(
3713             [found xgettext programs is not GNU xgettext; ignore it])
3714           XGETTEXT=":"
3715         fi
3716       fi
3717      AC_SUBST(XGETTEXT)
3719   ])
3721 # Search path for a program which passes the given test.
3722 # Ulrich Drepper <drepper@cygnus.com>, 1996.
3724 # serial 1
3725 # Stephan Kulow: I appended a _KDE against name conflicts
3727 dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3728 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3729 AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3730 [# Extract the first word of "$2", so it can be a program name with args.
3731 set dummy $2; ac_word=[$]2
3732 AC_MSG_CHECKING([for $ac_word])
3733 AC_CACHE_VAL(ac_cv_path_$1,
3734 [case "[$]$1" in
3735   /*)
3736   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3737   ;;
3738   *)
3739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3740   for ac_dir in ifelse([$5], , $PATH, [$5]); do
3741     test -z "$ac_dir" && ac_dir=.
3742     if test -f $ac_dir/$ac_word; then
3743       if [$3]; then
3744         ac_cv_path_$1="$ac_dir/$ac_word"
3745         break
3746       fi
3747     fi
3748   done
3749   IFS="$ac_save_ifs"
3750 dnl If no 4th arg is given, leave the cache variable unset,
3751 dnl so AC_PATH_PROGS will keep looking.
3752 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3753 ])dnl
3754   ;;
3755 esac])dnl
3756 $1="$ac_cv_path_$1"
3757 if test -n "[$]$1"; then
3758   AC_MSG_RESULT([$]$1)
3759 else
3760   AC_MSG_RESULT(no)
3762 AC_SUBST($1)dnl
3766 # Check whether LC_MESSAGES is available in <locale.h>.
3767 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3769 # serial 1
3771 AC_DEFUN([AM_LC_MESSAGES],
3772   [if test $ac_cv_header_locale_h = yes; then
3773     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3774       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3775        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3776     if test $am_cv_val_LC_MESSAGES = yes; then
3777       AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3778     fi
3779   fi])
3781 dnl From Jim Meyering.
3782 dnl FIXME: migrate into libit.
3784 AC_DEFUN([AM_FUNC_OBSTACK],
3785 [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3786  [AC_TRY_LINK([#include "obstack.h"],
3787               [struct obstack *mem;obstack_free(mem,(char *) 0)],
3788               am_cv_func_obstack=yes,
3789               am_cv_func_obstack=no)])
3790  if test $am_cv_func_obstack = yes; then
3791    AC_DEFINE(HAVE_OBSTACK)
3792  else
3793    LIBOBJS="$LIBOBJS obstack.o"
3794  fi
3797 dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
3798 dnl FIXME: Migrate into libit
3800 AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3801 [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3802  [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3803               am_cv_lib_error_at_line=yes,
3804               am_cv_lib_error_at_line=no)])
3805  if test $am_cv_lib_error_at_line = no; then
3806    LIBOBJS="$LIBOBJS error.o"
3807  fi
3808  AC_SUBST(LIBOBJS)dnl
3811 # Macro to add for using GNU gettext.
3812 # Ulrich Drepper <drepper@cygnus.com>, 1995.
3814 # serial 1
3815 # Stephan Kulow: I put a KDE in it to avoid name conflicts
3817 AC_DEFUN([AM_KDE_GNU_GETTEXT],
3818   [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3819    AC_REQUIRE([AC_PROG_RANLIB])dnl
3820    AC_REQUIRE([AC_HEADER_STDC])dnl
3821    AC_REQUIRE([AC_TYPE_OFF_T])dnl
3822    AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3823    AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3824    AC_REQUIRE([AC_FUNC_MMAP])dnl
3825    AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3826    AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3827    AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3828 __argz_count __argz_stringify __argz_next])
3830    AC_MSG_CHECKING(for stpcpy)
3831    AC_CACHE_VAL(kde_cv_func_stpcpy,
3832    [
3833    kde_safe_cxxflags=$CXXFLAGS
3834    CXXFLAGS="-Werror"
3835    AC_LANG_SAVE
3836    AC_LANG_CPLUSPLUS
3837    AC_TRY_COMPILE([
3838    #include <string.h>
3839    ],
3840    [
3841    char buffer[200];
3842    stpcpy(buffer, buffer);
3843    ],
3844    kde_cv_func_stpcpy=yes,
3845    kde_cv_func_stpcpy=no)
3846    AC_LANG_RESTORE
3847    CXXFLAGS=$kde_safe_cxxflags
3848    ])
3849    AC_MSG_RESULT($kde_cv_func_stpcpy)
3850    if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3851      AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3852    fi
3854    AM_LC_MESSAGES
3856    if test "x$CATOBJEXT" != "x"; then
3857      if test "x$ALL_LINGUAS" = "x"; then
3858        LINGUAS=
3859      else
3860        AC_MSG_CHECKING(for catalogs to be installed)
3861        NEW_LINGUAS=
3862        for lang in ${LINGUAS=$ALL_LINGUAS}; do
3863          case "$ALL_LINGUAS" in
3864           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3865          esac
3866        done
3867        LINGUAS=$NEW_LINGUAS
3868        AC_MSG_RESULT($LINGUAS)
3869      fi
3871      dnl Construct list of names of catalog files to be constructed.
3872      if test -n "$LINGUAS"; then
3873        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3874      fi
3875    fi
3877   ])
3879 AC_DEFUN([AC_HAVE_XPM],
3880  [AC_REQUIRE_CPP()dnl
3881   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3883  test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3884  test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3886  AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3887         xpm_test=$withval, xpm_test="yes")
3888  if test "x$xpm_test" = xno; then
3889    ac_cv_have_xpm=no
3890  else
3891    AC_MSG_CHECKING(for XPM)
3892    AC_CACHE_VAL(ac_cv_have_xpm,
3893    [
3894     ac_save_ldflags="$LDFLAGS"
3895     ac_save_cflags="$CFLAGS"
3896     if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3897       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3898     else
3899       LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3900     fi
3901     CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3902     test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3903     AC_TRY_LINK([#include <X11/xpm.h>],[],
3904         ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3905     LDFLAGS="$ac_save_ldflags"
3906     CFLAGS="$ac_save_cflags"
3907    ])dnl
3909   if test "$ac_cv_have_xpm" = no; then
3910     AC_MSG_RESULT(no)
3911     XPM_LDFLAGS=""
3912     XPMINC=""
3913     $2
3914   else
3915     AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3916     if test "$XPM_LDFLAGS" = ""; then
3917        XPMLIB='-lXpm $(LIB_X11)'
3918     else
3919        XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3920     fi
3921     if test "$XPM_INCLUDE" = ""; then
3922        XPMINC=""
3923     else
3924        XPMINC="-I$XPM_INCLUDE"
3925     fi
3926     AC_MSG_RESULT(yes)
3927     $1
3928   fi
3929  fi
3930  AC_SUBST(XPMINC)
3931  AC_SUBST(XPMLIB)
3934 AC_DEFUN([AC_HAVE_DPMS],
3935  [AC_REQUIRE_CPP()dnl
3936   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3938  test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3939  test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3940  DPMS_LIB=
3942  AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3943         dpms_test=$withval, dpms_test="yes")
3944  if test "x$dpms_test" = xno; then
3945    ac_cv_have_dpms=no
3946  else
3947    AC_MSG_CHECKING(for DPMS)
3948    dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3949    dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3950    AC_CACHE_VAL(ac_cv_have_dpms,
3951    [
3952     if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3953       AC_MSG_RESULT(no)
3954       ac_cv_have_dpms="no"
3955     else
3956       ac_save_ldflags="$LDFLAGS"
3957       ac_save_cflags="$CFLAGS"
3958       ac_save_libs="$LIBS"
3959       LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
3960       LIBS="-lX11 -lXext $LIBSOCKET"
3961       CFLAGS="$CFLAGS $X_INCLUDES"
3962       test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3963       AC_TRY_LINK([
3964           #include <X11/Xproto.h>
3965           #include <X11/X.h>
3966           #include <X11/Xlib.h>
3967           #include <X11/extensions/dpms.h>
3968           int foo_test_dpms()
3969           { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3970           ac_cv_have_dpms="yes", [
3971               LIBS="-lXdpms $LIBS"
3972               AC_TRY_LINK([
3973                   #include <X11/Xproto.h>
3974                   #include <X11/X.h>
3975                   #include <X11/Xlib.h>
3976                   #include <X11/extensions/dpms.h>
3977                   int foo_test_dpms()
3978                   { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3979                   [
3980                   ac_cv_have_dpms="-lXdpms"
3981                   ],ac_cv_have_dpms="no")
3982               ])
3983       LDFLAGS="$ac_save_ldflags"
3984       CFLAGS="$ac_save_cflags"
3985       LIBS="$ac_save_libs"
3986     fi
3987    ])dnl
3989   if test "$ac_cv_have_dpms" = no; then
3990     AC_MSG_RESULT(no)
3991     DPMS_LDFLAGS=""
3992     DPMSINC=""
3993     $2
3994   else
3995     AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3996     if test "$ac_cv_have_dpms" = "-lXdpms"; then
3997        DPMS_LIB="-lXdpms"
3998     fi
3999     if test "$DPMS_LDFLAGS" = ""; then
4000        DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
4001     else
4002        DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
4003     fi
4004     if test "$DPMS_INCLUDE" = ""; then
4005        DPMSINC=""
4006     else
4007        DPMSINC="-I$DPMS_INCLUDE"
4008     fi
4009     AC_MSG_RESULT(yes)
4010     $1
4011   fi
4012  fi
4013  ac_save_cflags="$CFLAGS"
4014  CFLAGS="$CFLAGS $X_INCLUDES"
4015  test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
4016  AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
4017    [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
4018  AC_CHECK_DECL(DPMSCapable,
4019    AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
4020    [#include <X11/Xlib.h>
4021    #include <X11/extensions/dpms.h>])
4022  AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
4023    [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
4024  AC_CHECK_DECL(DPMSInfo,
4025    AC_DEFINE(HAVE_DPMSINFO_PROTO),,
4026    [#include <X11/Xlib.h>
4027    #include <X11/extensions/dpms.h>])
4028  CFLAGS="$ac_save_cflags"
4029  AC_SUBST(DPMSINC)
4030  AC_SUBST(DPMSLIB)
4033 AC_DEFUN([AC_HAVE_GL],
4034  [AC_REQUIRE_CPP()dnl
4035   AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4037  test -z "$GL_LDFLAGS" && GL_LDFLAGS=
4038  test -z "$GL_INCLUDE" && GL_INCLUDE=
4040  AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
4041         gl_test=$withval, gl_test="yes")
4042  if test "x$kde_use_qt_emb" = "xyes"; then
4043    # GL and Qt Embedded is a no-go for now.
4044    ac_cv_have_gl=no
4045  elif test "x$gl_test" = xno; then
4046    ac_cv_have_gl=no
4047  else
4048    AC_MSG_CHECKING(for GL)
4049    AC_CACHE_VAL(ac_cv_have_gl,
4050    [
4051     AC_LANG_SAVE
4052     AC_LANG_CPLUSPLUS
4053     ac_save_ldflags=$LDFLAGS
4054     ac_save_cxxflags=$CXXFLAGS
4055     ac_save_libs=$LIBS
4056     LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
4057     LIBS="$LIBS -lGL -lGLU"
4058     test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
4059     LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
4060     CXXFLAGS="$CFLAGS $X_INCLUDES"
4061     test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
4062     AC_TRY_LINK([#include <GL/gl.h>
4063 #include <GL/glu.h>
4064 ], [],
4065         ac_cv_have_gl="yes", ac_cv_have_gl="no")
4066     AC_LANG_RESTORE
4067     LDFLAGS=$ac_save_ldflags
4068     CXXFLAGS=$ac_save_cxxflags
4069     LIBS=$ac_save_libs
4070    ])dnl
4072   if test "$ac_cv_have_gl" = "no"; then
4073     AC_MSG_RESULT(no)
4074     GL_LDFLAGS=""
4075     GLINC=""
4076     $2
4077   else
4078     AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
4079     if test "$GL_LDFLAGS" = ""; then
4080        GLLIB='-lGLU -lGL $(LIB_X11)'
4081     else
4082        GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
4083     fi
4084     if test "$GL_INCLUDE" = ""; then
4085        GLINC=""
4086     else
4087        GLINC="-I$GL_INCLUDE"
4088     fi
4089     AC_MSG_RESULT($ac_cv_have_gl)
4090     $1
4091   fi
4092  fi
4093  AC_SUBST(GLINC)
4094  AC_SUBST(GLLIB)
4098  dnl shadow password and PAM magic - maintained by ossi@kde.org
4100 AC_DEFUN([KDE_PAM], [
4101   AC_REQUIRE([KDE_CHECK_LIBDL])
4103   want_pam=
4104   AC_ARG_WITH(pam,
4105     AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
4106     [ if test "x$withval" = "xyes"; then
4107         want_pam=yes
4108         pam_service=kde
4109       elif test "x$withval" = "xno"; then
4110         want_pam=no
4111       else
4112         want_pam=yes
4113         pam_service=$withval
4114       fi
4115     ], [ pam_service=kde ])
4117   use_pam=
4118   PAMLIBS=
4119   if test "x$want_pam" != xno; then
4120     AC_CHECK_LIB(pam, pam_start, [
4121       AC_CHECK_HEADER(security/pam_appl.h,
4122         [ pam_header=security/pam_appl.h ],
4123         [ AC_CHECK_HEADER(pam/pam_appl.h,
4124             [ pam_header=pam/pam_appl.h ],
4125             [
4126     AC_MSG_WARN([PAM detected, but no headers found!
4127 Make sure you have the necessary development packages installed.])
4128             ]
4129           )
4130         ]
4131       )
4132     ], , $LIBDL)
4133     if test -z "$pam_header"; then
4134       if test "x$want_pam" = xyes; then
4135         AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
4136       fi
4137     else
4138       AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
4139       PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
4140       use_pam=yes
4142       dnl darwin claims to be something special
4143       if test "$pam_header" = "pam/pam_appl.h"; then
4144         AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
4145       fi
4147       dnl test whether struct pam_message is const (Linux) or not (Sun)
4148       AC_MSG_CHECKING(for const pam_message)
4149       AC_EGREP_HEADER([struct pam_message], $pam_header,
4150         [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
4151                           [AC_MSG_RESULT([const: Linux-type PAM])],
4152                           [AC_MSG_RESULT([nonconst: Sun-type PAM])
4153                           AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
4154                           )],
4155         [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
4156     fi
4157   fi
4159   AC_SUBST(PAMLIBS)
4162 dnl DEF_PAM_SERVICE(arg name, full name, define name)
4163 AC_DEFUN([DEF_PAM_SERVICE], [
4164   AC_ARG_WITH($1-pam,
4165     AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
4166     [ if test "x$use_pam" = xyes; then
4167         $3_PAM_SERVICE=$withval
4168       else
4169         AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
4170 You may want to enforce it by using --with-pam.])
4171       fi
4172     ], 
4173     [ if test "x$use_pam" = xyes; then
4174         $3_PAM_SERVICE="$pam_service"
4175       fi
4176     ])
4177     if test -n "$$3_PAM_SERVICE"; then
4178       AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4179       AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4180     fi
4181     AC_SUBST($3_PAM_SERVICE)
4184 AC_DEFUN([KDE_SHADOWPASSWD], [
4185   AC_REQUIRE([KDE_PAM])
4187   AC_CHECK_LIB(shadow, getspent,
4188     [ LIBSHADOW="-lshadow"
4189       ac_use_shadow=yes
4190     ],
4191     [ dnl for UnixWare
4192       AC_CHECK_LIB(gen, getspent, 
4193         [ LIBGEN="-lgen"
4194           ac_use_shadow=yes
4195         ], 
4196         [ AC_CHECK_FUNC(getspent, 
4197             [ ac_use_shadow=yes ],
4198             [ ac_use_shadow=no ])
4199         ])
4200     ])
4201   AC_SUBST(LIBSHADOW)
4202   AC_SUBST(LIBGEN)
4203   
4204   AC_MSG_CHECKING([for shadow passwords])
4206   AC_ARG_WITH(shadow,
4207     AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4208     [ if test "x$withval" != "xno"; then
4209         use_shadow=yes
4210       else
4211         use_shadow=no
4212       fi
4213     ], [
4214       use_shadow="$ac_use_shadow"
4215     ])
4217   if test "x$use_shadow" = xyes; then
4218     AC_MSG_RESULT(yes)
4219     AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4220   else
4221     AC_MSG_RESULT(no)
4222     LIBSHADOW=
4223     LIBGEN=
4224   fi
4226   dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4227   dnl this still applies, if we could use it indirectly through pam.
4228   if test "x$use_shadow" = xyes || 
4229      ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4230       case $host in
4231       *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4232         SETUIDFLAGS="-m 4755 -o root";;
4233       *)
4234         SETUIDFLAGS="-m 4755";;
4235       esac
4236   fi
4237   AC_SUBST(SETUIDFLAGS)
4241 AC_DEFUN([KDE_PASSWDLIBS], [
4242   AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4243   AC_REQUIRE([KDE_PAM])
4244   AC_REQUIRE([KDE_SHADOWPASSWD])
4246   if test "x$use_pam" = "xyes"; then 
4247     PASSWDLIBS="$PAMLIBS"
4248   else
4249     PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4250   fi
4252   dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4253   dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
4254   dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4255   dnl may need to read /etc/master.passwd).
4256   case $host in
4257   *-*-freebsd*)
4258     SETUIDFLAGS="-m 4755 -o root"
4259     ;;
4260   *)
4261     ;;
4262   esac
4264   AC_SUBST(PASSWDLIBS)
4267 AC_DEFUN([KDE_CHECK_LIBDL],
4269 AC_CHECK_LIB(dl, dlopen, [
4270 LIBDL="-ldl"
4271 ac_cv_have_dlfcn=yes
4274 AC_CHECK_LIB(dld, shl_unload, [
4275 LIBDL="-ldld"
4276 ac_cv_have_shload=yes
4279 AC_SUBST(LIBDL)
4282 AC_DEFUN([KDE_CHECK_DLOPEN],
4284 KDE_CHECK_LIBDL
4285 AC_CHECK_HEADERS(dlfcn.h dl.h)
4286 if test "$ac_cv_header_dlfcn_h" = "no"; then
4287   ac_cv_have_dlfcn=no
4290 if test "$ac_cv_header_dl_h" = "no"; then
4291   ac_cv_have_shload=no
4294 dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4295 dnl (MM)
4296 AC_ARG_ENABLE(dlopen,
4297 AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4298 enable_dlopen=$enableval,
4299 enable_dlopen=yes)
4301 # override the user's opinion, if we know it better ;)
4302 if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4303   enable_dlopen=no
4306 if test "$ac_cv_have_dlfcn" = "yes"; then
4307   AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4310 if test "$ac_cv_have_shload" = "yes"; then
4311   AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4314 if test "$enable_dlopen" = no ; then
4315   test -n "$1" && eval $1
4316 else
4317   test -n "$2" && eval $2
4322 AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4324 KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4325 KDE_PROG_LIBTOOL
4326 AC_MSG_CHECKING([dynamic loading])
4327 eval "`egrep '^build_libtool_libs=' libtool`"
4328 if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4329   dynamic_loading=yes
4330   AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4331 else
4332   dynamic_loading=no
4334 AC_MSG_RESULT($dynamic_loading)
4335 if test "$dynamic_loading" = "yes"; then
4336   $1
4337 else
4338   $2
4342 AC_DEFUN([KDE_ADD_INCLUDES],
4344 if test -z "$1"; then
4345   test_include="Pix.h"
4346 else
4347   test_include="$1"
4350 AC_MSG_CHECKING([for libg++ ($test_include)])
4352 AC_CACHE_VAL(kde_cv_libgpp_includes,
4354 kde_cv_libgpp_includes=no
4356    for ac_dir in               \
4357                                \
4358      /usr/include/g++          \
4359      /usr/include              \
4360      /usr/unsupported/include  \
4361      /opt/include              \
4362      $extra_include            \
4363      ; \
4364    do
4365      if test -r "$ac_dir/$test_include"; then
4366        kde_cv_libgpp_includes=$ac_dir
4367        break
4368      fi
4369    done
4372 AC_MSG_RESULT($kde_cv_libgpp_includes)
4373 if test "$kde_cv_libgpp_includes" != "no"; then
4374   all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4379 AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4381   dnl This code is here specifically to handle the
4382   dnl various flavors of threading library on FreeBSD
4383   dnl 4-, 5-, and 6-, and the (weird) rules around it.
4384   dnl There may be an environment PTHREAD_LIBS that 
4385   dnl specifies what to use; otherwise, search for it.
4386   dnl -pthread is special cased and unsets LIBPTHREAD
4387   dnl below if found.
4388   LIBPTHREAD=""
4390   if test -n "$PTHREAD_LIBS"; then
4391     if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4392       LIBPTHREAD="PTHREAD"
4393     else
4394       PTHREAD_LIBS_save="$PTHREAD_LIBS"
4395       PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4396       AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4397       KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4398           LIBPTHREAD="$PTHREAD_LIBS_save"])
4399       PTHREAD_LIBS="$PTHREAD_LIBS_save"
4400     fi
4401   fi
4403   dnl Is this test really needed, in the face of the Tru64 test below?
4404   if test -z "$LIBPTHREAD"; then
4405     AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4406   fi
4408   dnl This is a special Tru64 check, see BR 76171 issue #18.
4409   if test -z "$LIBPTHREAD" ; then
4410     AC_MSG_CHECKING([for pthread_create in -lpthread])
4411     kde_safe_libs=$LIBS
4412     LIBS="$LIBS -lpthread"
4413     AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4414         AC_MSG_RESULT(yes)
4415         LIBPTHREAD="-lpthread"],[
4416         AC_MSG_RESULT(no)])
4417     LIBS=$kde_safe_libs
4418   fi
4420   dnl Un-special-case for FreeBSD.
4421   if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4422     LIBPTHREAD=""
4423   fi
4425   AC_SUBST(LIBPTHREAD)
4428 AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4430       USE_THREADS=""
4431       if test -z "$LIBPTHREAD"; then
4432         KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4433       fi
4435     AH_VERBATIM(__svr_define, [
4436 #if defined(__SVR4) && !defined(__svr4__)
4437 #define __svr4__ 1
4438 #endif
4440     case $host_os in
4441         solaris*)
4442                 KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4443                 CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4444                 ;;
4445         freebsd*)
4446                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4447                 ;;
4448         aix*)
4449                 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4450                 LIBPTHREAD="$LIBPTHREAD -lc_r"
4451                 ;;
4452         linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4453                 if test "$CXX" = "KCC"; then
4454                   CXXFLAGS="$CXXFLAGS --thread_safe"
4455                   NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4456                 fi
4457                 ;;
4458         *)
4459                 ;;
4460     esac
4461     AC_SUBST(USE_THREADS)
4462     AC_SUBST(LIBPTHREAD)
4465 AC_DEFUN([KDE_CHECK_THREADING],
4467   AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4468   AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4469   dnl default is yes if libpthread is found and no if no libpthread is available
4470   if test -z "$LIBPTHREAD"; then
4471     if test -z "$USE_THREADS"; then
4472       kde_check_threading_default=no
4473     else
4474       kde_check_threading_default=yes
4475     fi
4476   else
4477     kde_check_threading_default=yes
4478   fi
4479   AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4480    kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4481   if test "x$kde_use_threading" = "xyes"; then
4482     AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4483   fi
4486 AC_DEFUN([KDE_TRY_LINK_PYTHON],
4488 if test "$kde_python_link_found" = no; then
4490 if test "$1" = normal; then
4491   AC_MSG_CHECKING(if a Python application links)
4492 else
4493   AC_MSG_CHECKING(if Python depends on $2)
4496 AC_CACHE_VAL(kde_cv_try_link_python_$1,
4498 kde_save_cflags="$CFLAGS"
4499 CFLAGS="$CFLAGS $PYTHONINC"
4500 kde_save_libs="$LIBS"
4501 LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4502 kde_save_ldflags="$LDFLAGS"
4503 LDFLAGS="$LDFLAGS $PYTHONLIB"
4505 AC_TRY_LINK(
4507 #include <Python.h>
4509         PySys_SetArgv(1, 0);
4511         [kde_cv_try_link_python_$1=yes],
4512         [kde_cv_try_link_python_$1=no]
4514 CFLAGS="$kde_save_cflags"
4515 LIBS="$kde_save_libs"
4516 LDFLAGS="$kde_save_ldflags"
4519 if test "$kde_cv_try_link_python_$1" = "yes"; then
4520   AC_MSG_RESULT(yes)
4521   kde_python_link_found=yes
4522   if test ! "$1" = normal; then
4523     LIBPYTHON="$LIBPYTHON $2"
4524   fi
4525   $3
4526 else
4527   AC_MSG_RESULT(no)
4528   $4
4535 AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4537 AC_MSG_CHECKING([for Python directory])
4539 AC_CACHE_VAL(kde_cv_pythondir,
4541   if test -z "$PYTHONDIR"; then
4542     kde_cv_pythondir=/usr/local
4543   else
4544     kde_cv_pythondir="$PYTHONDIR"
4545   fi
4548 AC_ARG_WITH(pythondir,
4549 AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4551   ac_python_dir=$withval
4552 ], ac_python_dir=$kde_cv_pythondir
4555 AC_MSG_RESULT($ac_python_dir)
4558 AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4560 AC_REQUIRE([KDE_CHECK_LIBDL])
4561 AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4562 AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4564 if test -z "$1"; then
4565   version="1.5"
4566 else
4567   version="$1"
4570 AC_MSG_CHECKING([for Python$version])
4572 python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4573 AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4574 if test ! -r $python_incdir/Python.h; then
4575   AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4576   python_incdir=$python_incdir/python$version
4577   if test ! -r $python_incdir/Python.h; then
4578     python_incdir=no
4579   fi
4582 PYTHONINC=-I$python_incdir
4584 python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4585 AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4586 if test ! -r $python_libdir/libpython$version.so; then
4587   AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4588   if test ! -r $python_libdir/libpython$version.a; then
4589     AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4590     python_libdir=$python_libdir/python$version/config
4591     if test ! -r $python_libdir/libpython$version.a; then
4592       python_libdir=no
4593     fi
4594   fi
4597 PYTHONLIB=-L$python_libdir
4598 kde_orig_LIBPYTHON=$LIBPYTHON
4599 if test -z "$LIBPYTHON"; then
4600   LIBPYTHON=-lpython$version
4603 AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4604 python_moddir=$python_moddir/python$version
4605 if test ! -r $python_moddir/copy.py; then
4606   python_moddir=no
4609 PYTHONMODDIR=$python_moddir
4611 AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4613 if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
4614    LIBPYTHON=$kde_orig_LIBPYTHON
4615    test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4616    test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4617    $2
4618 else 
4619   dnl Note: this test is very weak
4620   kde_python_link_found=no
4621   KDE_TRY_LINK_PYTHON(normal)
4622   KDE_TRY_LINK_PYTHON(m, -lm)
4623   KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4624   KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4625   KDE_TRY_LINK_PYTHON(db2, -ldb2)
4626   KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4627   KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4628   KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4629   KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4630   KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4631   KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4632   KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4633   KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4634         [AC_MSG_WARN([it seems, Python depends on another library.
4635     Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4636     and contact the authors to let them know about this problem])
4637         ])
4639   LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4640   AC_SUBST(PYTHONINC)
4641   AC_SUBST(PYTHONLIB)
4642   AC_SUBST(LIBPYTHON)
4643   AC_SUBST(PYTHONMODDIR)
4644   AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4650 AC_DEFUN([KDE_CHECK_PYTHON],
4652   KDE_CHECK_PYTHON_INTERN("2.5",
4653     [KDE_CHECK_PYTHON_INTERN("2.4",
4654      [KDE_CHECK_PYTHON_INTERN("2.3", 
4655        [KDE_CHECK_PYTHON_INTERN("2.2", 
4656          [KDE_CHECK_PYTHON_INTERN("2.1", 
4657            [KDE_CHECK_PYTHON_INTERN("2.0", 
4658              [KDE_CHECK_PYTHON_INTERN($1, $2) ])
4659            ])
4660          ])
4661        ])
4662      ])
4663   ])
4666 AC_DEFUN([KDE_CHECK_STL],
4668     AC_LANG_SAVE
4669     AC_LANG_CPLUSPLUS
4670     ac_save_CXXFLAGS="$CXXFLAGS"
4671     CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4673     AC_MSG_CHECKING([if C++ programs can be compiled])
4674     AC_CACHE_VAL(kde_cv_stl_works,
4675     [
4676       AC_TRY_COMPILE([
4677 #include <string>
4678 using namespace std;
4680   string astring="Hallo Welt.";
4681   astring.erase(0, 6); // now astring is "Welt"
4682   return 0;
4683 ], kde_cv_stl_works=yes,
4684    kde_cv_stl_works=no)
4687    AC_MSG_RESULT($kde_cv_stl_works)
4689    if test "$kde_cv_stl_works" = "yes"; then
4690      # back compatible
4691          AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4692    else
4693          AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4694 Check config.log for details - if you're using a Linux distribution you might miss
4695 a package named similar to libstdc++-dev.])
4696    fi
4698    CXXFLAGS="$ac_save_CXXFLAGS"
4699    AC_LANG_RESTORE
4702 AC_DEFUN([AC_FIND_QIMGIO],
4703    [AC_REQUIRE([AC_FIND_JPEG])
4704 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4705 AC_MSG_CHECKING([for qimgio])
4706 AC_CACHE_VAL(ac_cv_lib_qimgio,
4708 AC_LANG_SAVE
4709 AC_LANG_CPLUSPLUS
4710 ac_save_LIBS="$LIBS"
4711 ac_save_CXXFLAGS="$CXXFLAGS"
4712 LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4713 CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4714 AC_TRY_RUN(dnl
4716 #include <qimageio.h>
4717 #include <qstring.h>
4718 int main() {
4719                 QString t = "hallo";
4720                 t.fill('t');
4721                 qInitImageIO();
4724             ac_cv_lib_qimgio=yes,
4725             ac_cv_lib_qimgio=no,
4726             ac_cv_lib_qimgio=no)
4727 LIBS="$ac_save_LIBS"
4728 CXXFLAGS="$ac_save_CXXFLAGS"
4729 AC_LANG_RESTORE
4730 ])dnl
4731 if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4732   LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4733   AC_MSG_RESULT(yes)
4734   AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4735   AC_SUBST(LIBQIMGIO)
4736 else
4737   AC_MSG_RESULT(not found)
4741 AC_DEFUN([AM_DISABLE_LIBRARIES],
4743     AC_PROVIDE([AM_ENABLE_STATIC])
4744     AC_PROVIDE([AM_ENABLE_SHARED])
4745     enable_static=no
4746     enable_shared=yes
4750 AC_DEFUN([AC_CHECK_UTMP_FILE],
4752     AC_MSG_CHECKING([for utmp file])
4754     AC_CACHE_VAL(kde_cv_utmp_file,
4755     [
4756     kde_cv_utmp_file=no
4758     for ac_file in    \
4759                       \
4760         /var/run/utmp \
4761         /var/adm/utmp \
4762         /etc/utmp     \
4763      ; \
4764     do
4765      if test -r "$ac_file"; then
4766        kde_cv_utmp_file=$ac_file
4767        break
4768      fi
4769     done
4770     ])
4772     if test "$kde_cv_utmp_file" != "no"; then
4773         AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4774         $1
4775         AC_MSG_RESULT($kde_cv_utmp_file)
4776     else
4777         $2
4778         AC_MSG_RESULT([non found])
4779     fi
4783 AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4786 DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4787 TOPSUBDIRS=""
4789 if test ! -s $srcdir/subdirs; then
4790   dnl Note: Makefile.common creates subdirs, so this is just a fallback
4791   files=`cd $srcdir && ls -1`
4792   dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4793   for i in $dirs; do
4794     echo $i >> $srcdir/subdirs
4795   done
4798 ac_topsubdirs=
4799 if test -s $srcdir/inst-apps; then
4800   ac_topsubdirs="`cat $srcdir/inst-apps`"
4801 elif test -s $srcdir/subdirs; then
4802   ac_topsubdirs="`cat $srcdir/subdirs`"
4805 for i in $ac_topsubdirs; do
4806   AC_MSG_CHECKING([if $i should be compiled])
4807   if test -d $srcdir/$i; then
4808     install_it="yes"
4809     for j in $DO_NOT_COMPILE; do
4810       if test $i = $j; then
4811         install_it="no"
4812       fi
4813     done
4814   else
4815     install_it="no"
4816   fi
4817   AC_MSG_RESULT($install_it)
4818   vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4819   if test $install_it = "yes"; then
4820     TOPSUBDIRS="$TOPSUBDIRS $i"
4821     eval "$vari""_SUBDIR_included=yes"
4822   else
4823     eval "$vari""_SUBDIR_included=no"
4824   fi
4825 done
4827 AC_SUBST(TOPSUBDIRS)
4830 AC_DEFUN([KDE_CHECK_NAMESPACES],
4832 AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4833 AC_LANG_SAVE
4834 AC_LANG_CPLUSPLUS
4835 AC_TRY_COMPILE([
4838 namespace Foo {
4839   extern int i;
4840   namespace Bar {
4841     extern int i;
4842   }
4845 int Foo::i = 0;
4846 int Foo::Bar::i = 1;
4848   AC_MSG_RESULT(yes)
4849   AC_DEFINE(HAVE_NAMESPACES)
4850 ], [
4851 AC_MSG_RESULT(no)
4853 AC_LANG_RESTORE
4856 dnl ------------------------------------------------------------------------
4857 dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4858 dnl ------------------------------------------------------------------------
4860 AC_DEFUN([AC_CHECK_S_ISSOCK],
4862 AC_MSG_CHECKING(for S_ISSOCK)
4863 AC_CACHE_VAL(ac_cv_have_s_issock,
4865 AC_TRY_LINK(
4867 #include <sys/stat.h>
4870 struct stat buff;
4871 int b = S_ISSOCK( buff.st_mode );
4873 ac_cv_have_s_issock=yes,
4874 ac_cv_have_s_issock=no)
4876 AC_MSG_RESULT($ac_cv_have_s_issock)
4877 if test "$ac_cv_have_s_issock" = "yes"; then
4878   AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4881 AH_VERBATIM(_ISSOCK,
4883 #ifndef HAVE_S_ISSOCK
4884 #define HAVE_S_ISSOCK
4885 #define S_ISSOCK(mode) (1==0)
4886 #endif
4891 dnl ------------------------------------------------------------------------
4892 dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4893 dnl ------------------------------------------------------------------------
4895 AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4897 AC_MSG_CHECKING(for MAXPATHLEN)
4898 AC_CACHE_VAL(ac_cv_maxpathlen,
4900 cat > conftest.$ac_ext <<EOF
4901 #ifdef STDC_HEADERS
4902 # include <stdlib.h>
4903 #endif
4904 #include <stdio.h>
4905 #include <sys/param.h>
4906 #ifndef MAXPATHLEN
4907 #define MAXPATHLEN 1024
4908 #endif
4910 KDE_HELLO MAXPATHLEN
4914 ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4916 if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4917     ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4918 else
4919     ac_cv_maxpathlen=1024
4922 rm conftest.*
4925 AC_MSG_RESULT($ac_cv_maxpathlen)
4926 AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4929 AC_DEFUN([KDE_CHECK_HEADER],
4931    kde_safe_cppflags=$CPPFLAGS
4932    CPPFLAGS="$CPPFLAGS $all_includes"
4933    AC_LANG_SAVE
4934    AC_LANG_CPLUSPLUS
4935    AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4936    AC_LANG_RESTORE
4937    CPPFLAGS=$kde_safe_cppflags
4940 AC_DEFUN([KDE_CHECK_HEADERS],
4942    AH_CHECK_HEADERS([$1])
4943    AC_LANG_SAVE
4944    kde_safe_cppflags=$CPPFLAGS
4945    CPPFLAGS="$CPPFLAGS $all_includes"
4946    AC_LANG_CPLUSPLUS
4947    AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4948    CPPFLAGS=$kde_safe_cppflags
4949    AC_LANG_RESTORE
4952 AC_DEFUN([KDE_FAST_CONFIGURE],
4954   dnl makes configure fast (needs perl)
4955   AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4956       with_fast_perl=$enableval, with_fast_perl=yes)
4959 AC_DEFUN([KDE_CONF_FILES],
4961   val=
4962   if test -f $srcdir/configure.files ; then
4963     val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4964   fi
4965   CONF_FILES=
4966   if test -n "$val" ; then
4967     for i in $val ; do
4968       CONF_FILES="$CONF_FILES $i"
4969     done
4970   fi
4971   AC_SUBST(CONF_FILES)
4972 ])dnl
4974 dnl This sets the prefix, for arts and kdelibs
4975 dnl Do NOT use in any other module.
4976 dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4977 AC_DEFUN([KDE_SET_PREFIX_CORE],
4979   unset CDPATH
4980   dnl make $KDEDIR the default for the installation
4981   AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4983   if test "x$prefix" = "xNONE"; then
4984     prefix=$ac_default_prefix
4985     ac_configure_args="$ac_configure_args --prefix=$prefix"
4986   fi
4987   # And delete superfluous '/' to make compares easier
4988   prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4989   exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4991   kde_libs_prefix='$(prefix)'
4992   kde_libs_htmldir='$(kde_htmldir)'
4993   AC_SUBST(kde_libs_prefix)
4994   AC_SUBST(kde_libs_htmldir)
4995   KDE_FAST_CONFIGURE
4996   KDE_CONF_FILES
5000 AC_DEFUN([KDE_SET_PREFIX],
5002   unset CDPATH
5003   dnl We can't give real code to that macro, only a value.
5004   dnl It only matters for --help, since we set the prefix in this function anyway.
5005   AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
5007   KDE_SET_DEFAULT_BINDIRS
5008   if test "x$prefix" = "xNONE"; then
5009     dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
5010     KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5011   else
5012     dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
5013     kde_save_PATH="$PATH"
5014     PATH="$exec_prefix/bin:$prefix/bin:$PATH"
5015     KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5016     PATH="$kde_save_PATH"
5017   fi
5019   kde_libs_prefix=`$KDECONFIG --prefix`
5020   if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
5021        AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
5022                     This means it has been moved since you installed it.
5023                     This won't work. Please recompile kdelibs for the new prefix.
5024                     ])
5025   fi
5026   kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
5028   AC_MSG_CHECKING([where to install])
5029   if test "x$prefix" = "xNONE"; then
5030     prefix=$kde_libs_prefix
5031     AC_MSG_RESULT([$prefix (as returned by kde-config)])
5032   else
5033     dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
5034     given_prefix=$prefix
5035     AC_MSG_RESULT([$prefix (as requested)])
5036   fi
5038   # And delete superfluous '/' to make compares easier
5039   prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5040   exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5041   given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5043   AC_SUBST(KDECONFIG)
5044   AC_SUBST(kde_libs_prefix)
5045   AC_SUBST(kde_libs_htmldir)
5047   KDE_FAST_CONFIGURE
5048   KDE_CONF_FILES
5051 pushdef([AC_PROG_INSTALL],
5053   dnl our own version, testing for a -p flag
5054   popdef([AC_PROG_INSTALL])
5055   dnl as AC_PROG_INSTALL works as it works we first have
5056   dnl to save if the user didn't specify INSTALL, as the
5057   dnl autoconf one overwrites INSTALL and we have no chance to find
5058   dnl out afterwards
5059   test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
5060   test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
5061   test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
5062   AC_PROG_INSTALL
5064   if test -z "$kde_save_INSTALL_given" ; then
5065     # OK, user hasn't given any INSTALL, autoconf found one for us
5066     # now we test, if it supports the -p flag
5067     AC_MSG_CHECKING(for -p flag to install)
5068     rm -f confinst.$$.* > /dev/null 2>&1
5069     echo "Testtest" > confinst.$$.orig
5070     ac_res=no
5071     if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
5072       if test -f confinst.$$.new ; then
5073         # OK, -p seems to do no harm to install
5074         INSTALL="${INSTALL} -p"
5075         ac_res=yes
5076       fi
5077     fi
5078     rm -f confinst.$$.*
5079     AC_MSG_RESULT($ac_res)
5080   fi
5081   dnl the following tries to resolve some signs and wonders coming up
5082   dnl with different autoconf/automake versions
5083   dnl e.g.:
5084   dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
5085   dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
5086   dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
5087   dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
5088   dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
5089   dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
5090   dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
5091   dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
5092   dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
5093   dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
5094   dnl   automake (due to broken Makefile.am or whatever) to install programs,
5095   dnl   and so does not see the -s flag in automake > 1.4
5096   dnl to clean up that mess we:
5097   dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
5098   dnl   which cleans KDE's program with automake > 1.4;
5099   dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
5100   dnl   with automake<=1.4
5101   dnl  note that dues to this sometimes two '-s' flags are used (if KDE
5102   dnl   properly uses install-@DIR@PROGRAMS, but I don't care
5103   dnl
5104   dnl And to all this comes, that I even can't write in comments variable
5105   dnl  names used by automake, because it is so stupid to think I wanted to
5106   dnl  _use_ them, therefor I have written A_M_... instead of AM_
5107   dnl hmm, I wanted to say something ... ahh yes: Arghhh.
5109   if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
5110     INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
5111   fi
5112   if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
5113     INSTALL_SCRIPT='${INSTALL}'
5114   fi
5115 ])dnl
5117 AC_DEFUN([KDE_LANG_CPLUSPLUS],
5118 [AC_LANG_CPLUSPLUS
5119 ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
5120 pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
5123 pushdef([AC_LANG_CPLUSPLUS],
5124 [popdef([AC_LANG_CPLUSPLUS])
5125 KDE_LANG_CPLUSPLUS
5128 AC_DEFUN([KDE_CHECK_LONG_LONG],
5130 AC_MSG_CHECKING(for long long)
5131 AC_CACHE_VAL(kde_cv_c_long_long,
5133   AC_LANG_SAVE
5134   AC_LANG_CPLUSPLUS
5135   AC_TRY_LINK([], [
5136   long long foo = 0;
5137   foo = foo+1;
5138   ],
5139   kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
5140   AC_LANG_RESTORE
5142 AC_MSG_RESULT($kde_cv_c_long_long)
5143 if test "$kde_cv_c_long_long" = yes; then
5144    AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
5148 AC_DEFUN([KDE_CHECK_LIB],
5150      kde_save_LDFLAGS="$LDFLAGS"
5151      dnl AC_CHECK_LIB modifies LIBS, so save it here
5152      kde_save_LIBS="$LIBS"
5153      LDFLAGS="$LDFLAGS $all_libraries"
5154      case $host_os in
5155       aix*) LDFLAGS="-brtl $LDFLAGS"
5156         test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
5157         ;;
5158      esac
5159      AC_CHECK_LIB($1, $2, $3, $4, $5)
5160      LDFLAGS="$kde_save_LDFLAGS"
5161      LIBS="$kde_save_LIBS"
5164 AC_DEFUN([KDE_JAVA_PREFIX],
5166         dir=`dirname "$1"`
5167         base=`basename "$1"`
5168         list=`ls -1 $dir 2> /dev/null`
5169         for entry in $list; do 
5170                 if test -d $dir/$entry/bin; then
5171                         case $entry in
5172                            $base)
5173                                 javadirs="$javadirs $dir/$entry/bin"
5174                                 ;;
5175                         esac
5176                 elif test -d $dir/$entry/jre/bin; then
5177                         case $entry in
5178                            $base)
5179                                 javadirs="$javadirs $dir/$entry/jre/bin"
5180                                 ;;
5181                         esac
5182                 fi
5183         done
5186 dnl KDE_CHEC_JAVA_DIR(onlyjre)
5187 AC_DEFUN([KDE_CHECK_JAVA_DIR],
5190 AC_ARG_WITH(java,
5191 AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5192 [  ac_java_dir=$withval
5193 ], ac_java_dir=""
5196 AC_MSG_CHECKING([for Java])
5198 dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5199 if test "x$ac_java_dir" = "xno"; then
5200    kde_java_bindir=no
5201    kde_java_includedir=no
5202    kde_java_libjvmdir=no
5203    kde_java_libgcjdir=no
5204    kde_java_libhpidir=no
5205 else
5206   if test "x$ac_java_dir" = "x"; then
5207      
5208      
5209       dnl No option set -> collect list of candidate paths
5210       if test -n "$JAVA_HOME"; then
5211         KDE_JAVA_PREFIX($JAVA_HOME)
5212       fi
5213       KDE_JAVA_PREFIX(/usr/j2se)
5214       KDE_JAVA_PREFIX(/usr/lib/j2se)
5215       KDE_JAVA_PREFIX(/usr/j*dk*)
5216       KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5217       KDE_JAVA_PREFIX(/opt/j*sdk*)
5218       KDE_JAVA_PREFIX(/usr/lib/java*)
5219       KDE_JAVA_PREFIX(/usr/java*)
5220       KDE_JAVA_PREFIX(/usr/java/j*dk*)
5221       KDE_JAVA_PREFIX(/usr/java/j*re*)
5222       KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5223       KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5224       KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5225       KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5226       KDE_JAVA_PREFIX(/opt/java*)
5228       kde_cv_path="NONE"
5229       kde_save_IFS=$IFS
5230       IFS=':'
5231       for dir in $PATH; do
5232           if test -d "$dir"; then
5233               javadirs="$javadirs $dir"
5234           fi
5235       done
5236       IFS=$kde_save_IFS
5237       jredirs=
5239       dnl Now javadirs contains a list of paths that exist, all ending with bin/
5240       for dir in $javadirs; do
5241           dnl Check for the java executable
5242           if test -x "$dir/java"; then
5243               sane_path=$(cd $dir; /bin/pwd)
5244               dnl And also check for a libjvm.so somewhere under there
5245               dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5246               if test "$sane_path" != "/usr/bin"; then
5247                   libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5248                   if test ! -f $libjvmdir/libjvm.so; then continue; fi
5249                   jredirs="$jredirs $dir"
5250               fi
5251           fi
5252       done
5254       dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5255       JAVAC=
5256       JAVA=
5257       kde_java_bindir=no
5258       for dir in $jredirs; do
5259           JAVA="$dir/java"
5260           kde_java_bindir=$dir
5261           if test -x "$dir/javac"; then
5262                 JAVAC="$dir/javac"
5263                 break
5264           fi
5265       done
5267       if test -n "$JAVAC"; then
5268           dnl this substitution might not work - well, we test for jni.h below
5269           kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5270       else
5271           kde_java_includedir=no
5272       fi
5273   else
5274     dnl config option set
5275     kde_java_bindir=$ac_java_dir/bin
5276     if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5277         kde_java_includedir=no
5278     else
5279         kde_java_includedir=$ac_java_dir/include
5280     fi
5281   fi
5284 dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5285 if test "x$kde_java_bindir" != "xno"; then
5287   dnl Look for libjvm.so
5288   kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5289   dnl Look for libgcj.so
5290   kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5291   dnl Look for libhpi.so and avoid green threads
5292   kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5294   dnl Now check everything's fine under there
5295   dnl the include dir is our flag for having the JDK
5296   if test -d "$kde_java_includedir"; then
5297     if test ! -x "$kde_java_bindir/javac"; then
5298       AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5299     fi
5300     if test ! -x "$kde_java_bindir/javah"; then
5301       AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5302     fi
5303     if test ! -x "$kde_java_bindir/jar"; then
5304       AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5305     fi
5306     if test ! -r "$kde_java_includedir/jni.h"; then
5307       AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5308     fi
5310     jni_includes="-I$kde_java_includedir"
5311     dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5312     dnl and under linux here.. 
5313     
5314     dnl not needed for gcj
5316     if test "x$kde_java_libgcjdir" = "x"; then 
5317       test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5318       test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5319       test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5320     fi
5322   else
5323     JAVAC=
5324     jni_includes=
5325   fi
5327   if test "x$kde_java_libgcjdir" = "x"; then 
5328      if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5329         AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5330      fi 
5331   else
5332      if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5333         AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5334      fi 
5335   fi
5337   if test ! -x "$kde_java_bindir/java"; then
5338       AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5339   fi
5341   dnl not needed for gcj compile
5343   if test "x$kde_java_libgcjdir" = "x"; then 
5344       if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5345         AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5346       fi
5347   fi
5349   if test -n "$jni_includes"; then
5350     dnl Check for JNI version
5351     AC_LANG_SAVE
5352     AC_LANG_CPLUSPLUS
5353     ac_cxxflags_safe="$CXXFLAGS"
5354     CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5356     AC_TRY_COMPILE([
5357   #include <jni.h>
5358               ],
5359               [
5360   #ifndef JNI_VERSION_1_2
5361   Syntax Error
5362   #endif
5363               ],[ kde_jni_works=yes ],
5364               [ kde_jni_works=no ])
5366     if test $kde_jni_works = no; then
5367       AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5368                     You need to have Java Development Kit (JDK) version 1.2. 
5370                     Use --with-java to specify another location.
5371                     Use --without-java to configure without java support.
5372                     Or download a newer JDK and try again. 
5373                     See e.g. http://java.sun.com/products/jdk/1.2 ])
5374     fi
5376     CXXFLAGS="$ac_cxxflags_safe"    
5377     AC_LANG_RESTORE
5379     dnl All tests ok, inform and subst the variables
5381     JAVAC=$kde_java_bindir/javac
5382     JAVAH=$kde_java_bindir/javah
5383     JAR=$kde_java_bindir/jar
5384     AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5385     if test "x$kde_java_libgcjdir" = "x"; then 
5386       JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5387     else
5388       JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5389     fi
5390     AC_MSG_RESULT([java JDK in $kde_java_bindir])
5392   else
5393       AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5394       AC_MSG_RESULT([java JRE in $kde_java_bindir])
5395   fi
5396 elif test -d "/Library/Java/Home"; then
5397   kde_java_bindir="/Library/Java/Home/bin"
5398   jni_includes="-I/Library/Java/Home/include"
5400   JAVAC=$kde_java_bindir/javac
5401   JAVAH=$kde_java_bindir/javah
5402   JAR=$kde_java_bindir/jar
5403   JVMLIBS="-Wl,-framework,JavaVM"
5405   AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5406   AC_MSG_RESULT([Apple Java Framework])
5407 else
5408   AC_MSG_RESULT([none found])
5411 AC_SUBST(JAVAC)
5412 AC_SUBST(JAVAH)
5413 AC_SUBST(JAR)
5414 AC_SUBST(JVMLIBS)
5415 AC_SUBST(jni_includes)
5417 # for backward compat
5418 kde_cv_java_includedir=$kde_java_includedir
5419 kde_cv_java_bindir=$kde_java_bindir
5422 dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5423 dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5424 dnl big packages, m4_foreach is dog-slow.  So use our own version of
5425 dnl it.  (matz@kde.org)
5426 m4_define([mm_foreach],
5427 [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5428 m4_define([mm_car], [[$1]])
5429 m4_define([mm_car2], [[$@]])
5430 m4_define([_mm_foreach],
5431 [m4_if(m4_quote($2), [], [],
5432        [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5433                                                    mm_car2(m4_shift($2)),
5434                                                    [$3])])])
5435 m4_define([AC_FOREACH],
5436 [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5438 AC_DEFUN([KDE_NEED_FLEX],
5440 kde_libs_safe=$LIBS
5441 LIBS="$LIBS $USER_LDFLAGS"
5442 AM_PROG_LEX
5443 LIBS=$kde_libs_safe
5444 if test -z "$LEXLIB"; then
5445     AC_MSG_ERROR([You need to have flex installed.])
5447 AC_SUBST(LEXLIB)
5450 AC_DEFUN([AC_PATH_QTOPIA],
5452   dnl TODO: use AC_CACHE_VAL
5454   if test -z "$1"; then
5455     qtopia_minver_maj=1
5456     qtopia_minver_min=5
5457     qtopia_minver_pat=0
5458   else
5459     qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5460     qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5461     qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5462   fi
5464   qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5465   qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5467   AC_REQUIRE([AC_PATH_QT])
5469   AC_MSG_CHECKING([for Qtopia])
5471   LIB_QTOPIA="-lqpe"
5472   AC_SUBST(LIB_QTOPIA)
5474   kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5476   ac_qtopia_incdir=NO
5478   AC_ARG_WITH(qtopia-dir,
5479               AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5480               [  ac_qtopia_incdir="$withval"/include] ) 
5481   
5482   qtopia_incdirs=""
5483   for dir in $kde_qtopia_dirs; do
5484     qtopia_incdirs="$qtopia_incdirs $dir/include"
5485   done
5487   if test ! "$ac_qtopia_incdir" = "NO"; then
5488     qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5489   fi
5491   qtopia_incdir=""
5492   AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5493   ac_qtopia_incdir="$qtopia_incdir"
5495   if test -z "$qtopia_incdir"; then
5496     AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5497   fi
5499   qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5500   qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5501   qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5503   qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5504   qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5505   if test "$qtopia_ver" -lt "$qtopia_minver"; then
5506     AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5507 is required.])
5508   fi
5510   AC_LANG_SAVE
5511   AC_LANG_CPLUSPLUS
5513   ac_cxxflags_safe="$CXXFLAGS"
5514   ac_ldflags_safe="$LDFLAGS"
5515   ac_libs_safe="$LIBS"
5517   CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5518   LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5519   LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5521   cat > conftest.$ac_ext <<EOF
5522 #include "confdefs.h"
5523 #include <qpe/qpeapplication.h>
5524 #include <qpe/version.h>
5526 int main( int argc, char **argv )
5528     QPEApplication app( argc, argv );
5529     return 0;
5533   if AC_TRY_EVAL(ac_link) && test -s conftest; then
5534     rm -f conftest*
5535   else
5536     rm -f conftest*
5537     AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5538 the end of config.log])
5539   fi
5541   CXXFLAGS="$ac_cxxflags_safe"
5542   LDFLAGS="$ac_ldflags_safe"
5543   LIBS="$ac_libs_safe"
5545   AC_LANG_RESTORE
5547   QTOPIA_INCLUDES="-I$qtopia_incdir"
5548   AC_SUBST(QTOPIA_INCLUDES)
5550   AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5554 AC_DEFUN([KDE_INIT_DOXYGEN],
5556 AC_MSG_CHECKING([for Qt docs])
5557 kde_qtdir=
5558 if test "${with_qt_dir+set}" = set; then
5559   kde_qtdir="$with_qt_dir"
5562 AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
5563 AC_MSG_RESULT($QTDOCDIR)
5565 AC_SUBST(QTDOCDIR)
5567 KDE_FIND_PATH(dot, DOT, [], [])
5568 if test -n "$DOT"; then
5569   KDE_HAVE_DOT="YES"
5570 else
5571   KDE_HAVE_DOT="NO"
5573 AC_SUBST(KDE_HAVE_DOT)
5574 KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5575 AC_SUBST(DOXYGEN)
5577 DOXYGEN_PROJECT_NAME="$1"
5578 DOXYGEN_PROJECT_NUMBER="$2"
5579 AC_SUBST(DOXYGEN_PROJECT_NAME)
5580 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5582 KDE_HAS_DOXYGEN=no
5583 if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5584   KDE_HAS_DOXYGEN=yes
5586 AC_SUBST(KDE_HAS_DOXYGEN)
5591 AC_DEFUN([AC_FIND_BZIP2],
5593 AC_MSG_CHECKING([for bzDecompress in libbz2])
5594 AC_CACHE_VAL(ac_cv_lib_bzip2,
5596 AC_LANG_SAVE
5597 AC_LANG_CPLUSPLUS
5598 kde_save_LIBS="$LIBS"
5599 LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5600 kde_save_CXXFLAGS="$CXXFLAGS"
5601 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5602 AC_TRY_LINK(dnl
5604 #define BZ_NO_STDIO
5605 #include<bzlib.h>
5607             [ bz_stream s; (void) bzDecompress(&s); ],
5608             eval "ac_cv_lib_bzip2='-lbz2'",
5609             eval "ac_cv_lib_bzip2=no")
5610 LIBS="$kde_save_LIBS"
5611 CXXFLAGS="$kde_save_CXXFLAGS"
5612 AC_LANG_RESTORE
5613 ])dnl
5614 AC_MSG_RESULT($ac_cv_lib_bzip2)
5616 if test ! "$ac_cv_lib_bzip2" = no; then
5617   BZIP2DIR=bzip2
5619   LIBBZ2="$ac_cv_lib_bzip2"
5620   AC_SUBST(LIBBZ2)
5622 else
5624    cxx_shared_flag=
5625    ld_shared_flag=
5626    KDE_CHECK_COMPILER_FLAG(shared, [
5627         ld_shared_flag="-shared"
5628    ])
5629    KDE_CHECK_COMPILER_FLAG(fPIC, [
5630         cxx_shared_flag="-fPIC"
5631    ])
5633    AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5634    AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5635    [
5636    AC_LANG_SAVE
5637    AC_LANG_CPLUSPLUS
5638    kde_save_LIBS="$LIBS"
5639    LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5640    kde_save_CXXFLAGS="$CXXFLAGS"
5641    CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5643    AC_TRY_LINK(dnl
5644    [
5645    #define BZ_NO_STDIO
5646    #include<bzlib.h>
5647    ],
5648                [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5649                eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5650                eval "ac_cv_lib_bzip2_prefix=no")
5651    LIBS="$kde_save_LIBS"
5652    CXXFLAGS="$kde_save_CXXFLAGS"
5653    AC_LANG_RESTORE
5654    ])dnl
5656    AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5657    
5658    if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5659      BZIP2DIR=bzip2
5660     
5661      LIBBZ2="$ac_cv_lib_bzip2_prefix"
5662      AC_SUBST(LIBBZ2)
5664      AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5665    dnl else, we just ignore this
5666    fi
5669 AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5672 dnl ------------------------------------------------------------------------
5673 dnl Try to find the SSL headers and libraries.
5674 dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5675 dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5676 dnl ------------------------------------------------------------------------
5678 AC_DEFUN([KDE_CHECK_SSL],
5680 LIBSSL="-lssl -lcrypto"
5681 AC_REQUIRE([KDE_CHECK_LIB64])
5683 ac_ssl_includes=NO ac_ssl_libraries=NO
5684 ssl_libraries=""
5685 ssl_includes=""
5686 AC_ARG_WITH(ssl-dir,
5687     AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5688     [  ac_ssl_includes="$withval"/include
5689        ac_ssl_libraries="$withval"/lib$kdelibsuff
5690     ])
5692 want_ssl=yes
5693 AC_ARG_WITH(ssl,
5694     AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5695     [want_ssl=$withval])
5697 if test $want_ssl = yes; then
5699 AC_MSG_CHECKING(for OpenSSL)
5701 AC_CACHE_VAL(ac_cv_have_ssl,
5702 [#try to guess OpenSSL locations
5703   
5704   ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5705   ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5706   AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5707   ac_ssl_includes="$ssl_incdir"
5709   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"
5710   if test ! "$ac_ssl_libraries" = "NO"; then
5711     ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5712   fi
5714   test=NONE
5715   ssl_libdir=NONE
5716   for dir in $ssl_libdirs; do
5717     try="ls -1 $dir/libssl*"
5718     if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5719   done
5721   ac_ssl_libraries="$ssl_libdir"
5723   ac_ldflags_safe="$LDFLAGS"
5724   ac_libs_safe="$LIBS"
5726   LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5727   LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5729   AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5730   ac_ssl_rsaref="yes"
5731   ,
5732   ac_ssl_rsaref="no"
5733   )
5735   LDFLAGS="$ac_ldflags_safe"
5736   LIBS="$ac_libs_safe"
5738   if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5739     have_ssl=no
5740   else
5741     have_ssl=yes;
5742   fi
5744   ])
5746   eval "$ac_cv_have_ssl"
5748   AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5750   AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5751   AC_MSG_RESULT($ac_ssl_rsaref)
5753   AC_MSG_CHECKING([for easter eggs])
5754   AC_MSG_RESULT([none found])
5756 else
5757   have_ssl=no
5760 if test "$have_ssl" = yes; then
5761   AC_MSG_CHECKING(for OpenSSL version)
5762   dnl Check for SSL version
5763   AC_CACHE_VAL(ac_cv_ssl_version,
5764   [
5766     cat >conftest.$ac_ext <<EOF
5767 #include <openssl/opensslv.h>
5768 #include <stdio.h>
5769     int main() {
5771 #ifndef OPENSSL_VERSION_NUMBER
5772       printf("ssl_version=\\"error\\"\n");
5773 #else
5774       if (OPENSSL_VERSION_NUMBER < 0x00906000)
5775         printf("ssl_version=\\"old\\"\n");
5776       else
5777         printf("ssl_version=\\"ok\\"\n");
5778 #endif
5779      return (0);
5780     }
5783     ac_save_CPPFLAGS=$CPPFLAGS
5784     if test "$ac_ssl_includes" != "/usr/include"; then
5785         CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5786     fi
5788     if AC_TRY_EVAL(ac_link); then 
5790       if eval `./conftest 2>&5`; then
5791         if test $ssl_version = error; then
5792           AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5793         else
5794           if test $ssl_version = old; then
5795             AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5796             have_ssl=no
5797           fi
5798         fi
5799         ac_cv_ssl_version="ssl_version=$ssl_version"
5800       else
5801         AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5802         Check config.log, and if you can't figure it out, send a mail to 
5803         David Faure <faure@kde.org>, attaching your config.log])
5804       fi
5806     else
5807       AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5808       Check config.log, and if you can't figure it out, send a mail to 
5809       David Faure <faure@kde.org>, attaching your config.log])
5810     fi 
5811     CPPFLAGS=$ac_save_CPPFLAGS
5813   ])
5815   eval "$ac_cv_ssl_version"
5816   AC_MSG_RESULT($ssl_version)
5819 if test "$have_ssl" != yes; then
5820   LIBSSL="";
5821 else
5822   AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5823   ac_cv_have_ssl="have_ssl=yes \
5824     ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5825   
5826   
5827   ssl_libraries="$ac_ssl_libraries"
5828   ssl_includes="$ac_ssl_includes"
5830   if test "$ac_ssl_rsaref" = yes; then
5831     LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
5832   fi
5834   if test $ssl_version = "old"; then
5835     AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5836   fi
5839 SSL_INCLUDES=
5841 if test "$ssl_includes" = "/usr/include"; then
5842   if test -f /usr/kerberos/include/krb5.h; then
5843         SSL_INCLUDES="-I/usr/kerberos/include"
5844   fi
5845 elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5846   SSL_INCLUDES="-I$ssl_includes"
5849 if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5850  SSL_LDFLAGS=""
5851 else
5852  SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5855 AC_SUBST(SSL_INCLUDES)
5856 AC_SUBST(SSL_LDFLAGS)
5857 AC_SUBST(LIBSSL)
5860 AC_DEFUN([KDE_CHECK_STRLCPY],
5862   AC_REQUIRE([AC_CHECK_STRLCAT])
5863   AC_REQUIRE([AC_CHECK_STRLCPY])
5864   AC_CHECK_SIZEOF(size_t)
5865   AC_CHECK_SIZEOF(unsigned long)
5867   AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5868   AC_TRY_COMPILE(,[
5869     #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5870        choke me
5871     #endif
5872     ],AC_MSG_RESULT([yes]),[
5873       AC_MSG_RESULT(no)
5874       AC_MSG_ERROR([
5875        Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
5876        does not apply. Please mail kde-devel@kde.org with a description of your system!
5877       ])
5878   ])
5881 AC_DEFUN([KDE_CHECK_BINUTILS],
5883   AC_MSG_CHECKING([if ld supports unversioned version maps])
5885   kde_save_LDFLAGS="$LDFLAGS"
5886   LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5887   echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5888   AC_TRY_LINK([int foo;],
5890 #ifdef __INTEL_COMPILER
5891 icc apparently does not support libtools version-info and version-script
5892 at the same time. Dunno where the bug is, but until somebody figured out,
5893 better disable the optional version scripts.
5894 #endif
5896   foo = 42;
5897 ], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5898   LDFLAGS="$kde_save_LDFLAGS"
5899   rm -f conftest.map
5900   AM_CONDITIONAL(include_VERSION_SCRIPT, 
5901     [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5903   AC_MSG_RESULT($kde_supports_versionmaps)
5906 AC_DEFUN([AM_PROG_OBJC],[
5907 AC_CHECK_PROGS(OBJC, gcc, gcc)
5908 test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5909 if test "x${OBJCFLAGS-unset}" = xunset; then
5910    OBJCFLAGS="-g -O2"
5912 AC_SUBST(OBJCFLAGS)
5913 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5916 AC_DEFUN([KDE_CHECK_PERL],
5918         KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5919                     AC_MSG_ERROR([No Perl found in your $PATH.
5920 We need perl to generate some code.])
5921         ])
5922     AC_SUBST(PERL)
5925 AC_DEFUN([KDE_CHECK_LARGEFILE],
5927 AC_SYS_LARGEFILE
5928 if test "$ac_cv_sys_file_offset_bits" != no; then
5929   CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5932 if test "x$ac_cv_sys_large_files" != "xno"; then
5933   CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5938 dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5939 dnl which allows to search for libs that get installed into the KDE prefix.
5941 dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5942 dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5943 dnl also defines KSTUFF_PKG_ERRORS on error
5944 AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5946    PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5947    if test "$prefix" != "$kde_libs_prefix"; then
5948        PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5949    fi
5950    export PKG_CONFIG_PATH
5951    PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
5955 dnl Check for PIE support in the compiler and linker
5956 AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
5958   AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
5959   [
5960     AC_LANG_SAVE
5961     AC_LANG_CPLUSPLUS
5962     safe_CXXFLAGS=$CXXFLAGS
5963     safe_LDFLAGS=$LDFLAGS
5964     CXXFLAGS="$CXXFLAGS -fPIE"
5965     LDFLAGS="$LDFLAGS -pie"
5967     AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
5969     CXXFLAGS=$safe_CXXFLAGS
5970     LDFLAGS=$safe_LDFLAGS
5971     AC_LANG_RESTORE
5972   ])
5974   AC_MSG_CHECKING(if enabling -pie/fPIE support)
5976   AC_ARG_ENABLE(pie,
5977     AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
5978       [kde_has_pie_support=$enableval],
5979       [kde_has_pie_support=detect])
5981   if test "$kde_has_pie_support" = "detect"; then
5982     kde_has_pie_support=$kde_cv_val_pie_support
5983   fi
5985   AC_MSG_RESULT([$kde_has_pie_support])
5987   KDE_USE_FPIE=""
5988   KDE_USE_PIE=""
5990   AC_SUBST([KDE_USE_FPIE])
5991   AC_SUBST([KDE_USE_PIE])
5993   if test "$kde_has_pie_support" = "yes"; then
5994     KDE_USE_FPIE="-fPIE"
5995     KDE_USE_PIE="-pie"
5996   fi
5998 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5999 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
6000 ## Free Software Foundation, Inc.
6001 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6003 ## This program is free software; you can redistribute it and/or modify
6004 ## it under the terms of the GNU General Public License as published by
6005 ## the Free Software Foundation; either version 2 of the License, or
6006 ## (at your option) any later version.
6008 ## This program is distributed in the hope that it will be useful, but
6009 ## WITHOUT ANY WARRANTY; without even the implied warranty of
6010 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6011 ## General Public License for more details.
6013 ## You should have received a copy of the GNU General Public License
6014 ## along with this program; if not, write to the Free Software
6015 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
6017 ## As a special exception to the GNU General Public License, if you
6018 ## distribute this file as part of a program that contains a
6019 ## configuration script generated by Autoconf, you may include it under
6020 ## the same distribution terms that you use for the rest of that program.
6022 # serial 47 AC_PROG_LIBTOOL
6025 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
6026 # -----------------------------------------------------------
6027 # If this macro is not defined by Autoconf, define it here.
6028 m4_ifdef([AC_PROVIDE_IFELSE],
6029          [],
6030          [m4_define([AC_PROVIDE_IFELSE],
6031                  [m4_ifdef([AC_PROVIDE_$1],
6032                            [$2], [$3])])])
6035 # AC_PROG_LIBTOOL
6036 # ---------------
6037 AC_DEFUN([AC_PROG_LIBTOOL],
6038 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
6039 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
6040 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
6041   AC_PROVIDE_IFELSE([AC_PROG_CXX],
6042     [AC_LIBTOOL_CXX],
6043     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
6044   ])])
6045 dnl And a similar setup for Fortran 77 support
6046   AC_PROVIDE_IFELSE([AC_PROG_F77],
6047     [AC_LIBTOOL_F77],
6048     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
6049 ])])
6051 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6052 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
6053 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6054   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6055     [AC_LIBTOOL_GCJ],
6056     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6057       [AC_LIBTOOL_GCJ],
6058       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6059         [AC_LIBTOOL_GCJ],
6060       [ifdef([AC_PROG_GCJ],
6061              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6062        ifdef([A][M_PROG_GCJ],
6063              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6064        ifdef([LT_AC_PROG_GCJ],
6065              [define([LT_AC_PROG_GCJ],
6066                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6067 ])])# AC_PROG_LIBTOOL
6070 # _AC_PROG_LIBTOOL
6071 # ----------------
6072 AC_DEFUN([_AC_PROG_LIBTOOL],
6073 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6074 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6075 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6076 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6078 # This can be used to rebuild libtool when needed
6079 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6081 # Always use our own libtool.
6082 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
6083 AC_SUBST(LIBTOOL)dnl
6085 # Prevent multiple expansion
6086 define([AC_PROG_LIBTOOL], [])
6087 ])# _AC_PROG_LIBTOOL
6090 # AC_LIBTOOL_SETUP
6091 # ----------------
6092 AC_DEFUN([AC_LIBTOOL_SETUP],
6093 [AC_PREREQ(2.50)dnl
6094 AC_REQUIRE([AC_ENABLE_SHARED])dnl
6095 AC_REQUIRE([AC_ENABLE_STATIC])dnl
6096 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6097 AC_REQUIRE([AC_CANONICAL_HOST])dnl
6098 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6099 AC_REQUIRE([AC_PROG_CC])dnl
6100 AC_REQUIRE([AC_PROG_LD])dnl
6101 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6102 AC_REQUIRE([AC_PROG_NM])dnl
6104 AC_REQUIRE([AC_PROG_LN_S])dnl
6105 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6106 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6107 AC_REQUIRE([AC_OBJEXT])dnl
6108 AC_REQUIRE([AC_EXEEXT])dnl
6111 AC_LIBTOOL_SYS_MAX_CMD_LEN
6112 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6113 AC_LIBTOOL_OBJDIR
6115 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6116 _LT_AC_PROG_ECHO_BACKSLASH
6118 case $host_os in
6119 aix3*)
6120   # AIX sometimes has problems with the GCC collect2 program.  For some
6121   # reason, if we set the COLLECT_NAMES environment variable, the problems
6122   # vanish in a puff of smoke.
6123   if test "X${COLLECT_NAMES+set}" != Xset; then
6124     COLLECT_NAMES=
6125     export COLLECT_NAMES
6126   fi
6127   ;;
6128 esac
6130 # Sed substitution that helps us do robust quoting.  It backslashifies
6131 # metacharacters that are still active within double-quoted strings.
6132 Xsed='sed -e s/^X//'
6133 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6135 # Same as above, but do not quote variable references.
6136 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6138 # Sed substitution to delay expansion of an escaped shell variable in a
6139 # double_quote_subst'ed string.
6140 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6142 # Sed substitution to avoid accidental globbing in evaled expressions
6143 no_glob_subst='s/\*/\\\*/g'
6145 # Constants:
6146 rm="rm -f"
6148 # Global variables:
6149 default_ofile=libtool
6150 can_build_shared=yes
6152 # All known linkers require a `.a' archive for static linking (except M$VC,
6153 # which needs '.lib').
6154 libext=a
6155 ltmain="$ac_aux_dir/ltmain.sh"
6156 ofile="$default_ofile"
6157 with_gnu_ld="$lt_cv_prog_gnu_ld"
6159 AC_CHECK_TOOL(AR, ar, false)
6160 AC_CHECK_TOOL(RANLIB, ranlib, :)
6161 AC_CHECK_TOOL(STRIP, strip, :)
6163 old_CC="$CC"
6164 old_CFLAGS="$CFLAGS"
6166 # Set sane defaults for various variables
6167 test -z "$AR" && AR=ar
6168 test -z "$AR_FLAGS" && AR_FLAGS=cru
6169 test -z "$AS" && AS=as
6170 test -z "$CC" && CC=cc
6171 test -z "$LTCC" && LTCC=$CC
6172 test -z "$DLLTOOL" && DLLTOOL=dlltool
6173 test -z "$LD" && LD=ld
6174 test -z "$LN_S" && LN_S="ln -s"
6175 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6176 test -z "$NM" && NM=nm
6177 test -z "$SED" && SED=sed
6178 test -z "$OBJDUMP" && OBJDUMP=objdump
6179 test -z "$RANLIB" && RANLIB=:
6180 test -z "$STRIP" && STRIP=:
6181 test -z "$ac_objext" && ac_objext=o
6183 # Determine commands to create old-style static archives.
6184 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6185 old_postinstall_cmds='chmod 644 $oldlib'
6186 old_postuninstall_cmds=
6188 if test -n "$RANLIB"; then
6189   case $host_os in
6190   openbsd*)
6191     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6192     ;;
6193   *)
6194     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6195     ;;
6196   esac
6197   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6200 # Only perform the check for file, if the check method requires it
6201 case $deplibs_check_method in
6202 file_magic*)
6203   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6204     AC_PATH_MAGIC
6205   fi
6206   ;;
6207 esac
6209 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6210 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6211 enable_win32_dll=yes, enable_win32_dll=no)
6213 AC_ARG_ENABLE([libtool-lock],
6214     [AC_HELP_STRING([--disable-libtool-lock],
6215         [avoid locking (might break parallel builds)])])
6216 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6218 AC_ARG_WITH([pic],
6219     [AC_HELP_STRING([--with-pic],
6220         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6221     [pic_mode="$withval"],
6222     [pic_mode=default])
6223 test -z "$pic_mode" && pic_mode=default
6225 # Use C for the default configuration in the libtool script
6226 tagname=
6227 AC_LIBTOOL_LANG_C_CONFIG
6228 _LT_AC_TAGCONFIG
6229 ])# AC_LIBTOOL_SETUP
6232 # _LT_AC_SYS_COMPILER
6233 # -------------------
6234 AC_DEFUN([_LT_AC_SYS_COMPILER],
6235 [AC_REQUIRE([AC_PROG_CC])dnl
6237 # If no C compiler was specified, use CC.
6238 LTCC=${LTCC-"$CC"}
6240 # Allow CC to be a program name with arguments.
6241 compiler=$CC
6242 ])# _LT_AC_SYS_COMPILER
6245 # _LT_AC_SYS_LIBPATH_AIX
6246 # ----------------------
6247 # Links a minimal program and checks the executable
6248 # for the system default hardcoded library path. In most cases,
6249 # this is /usr/lib:/lib, but when the MPI compilers are used
6250 # the location of the communication and MPI libs are included too.
6251 # If we don't find anything, use the default library path according
6252 # to the aix ld manual.
6253 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6254 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6255 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
6257 # Check for a 64-bit object if we didn't find anything.
6258 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; }
6259 }'`; fi],[])
6260 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6261 ])# _LT_AC_SYS_LIBPATH_AIX
6264 # _LT_AC_SHELL_INIT(ARG)
6265 # ----------------------
6266 AC_DEFUN([_LT_AC_SHELL_INIT],
6267 [ifdef([AC_DIVERSION_NOTICE],
6268              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6269          [AC_DIVERT_PUSH(NOTICE)])
6271 AC_DIVERT_POP
6272 ])# _LT_AC_SHELL_INIT
6275 # _LT_AC_PROG_ECHO_BACKSLASH
6276 # --------------------------
6277 # Add some code to the start of the generated configure script which
6278 # will find an echo command which doesn't interpret backslashes.
6279 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6280 [_LT_AC_SHELL_INIT([
6281 # Check that we are running under the correct shell.
6282 SHELL=${CONFIG_SHELL-/bin/sh}
6284 case X$ECHO in
6285 X*--fallback-echo)
6286   # Remove one level of quotation (which was required for Make).
6287   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6288   ;;
6289 esac
6291 echo=${ECHO-echo}
6292 if test "X[$]1" = X--no-reexec; then
6293   # Discard the --no-reexec flag, and continue.
6294   shift
6295 elif test "X[$]1" = X--fallback-echo; then
6296   # Avoid inline document here, it may be left over
6297   :
6298 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6299   # Yippee, $echo works!
6300   :
6301 else
6302   # Restart under the correct shell.
6303   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6306 if test "X[$]1" = X--fallback-echo; then
6307   # used as fallback echo
6308   shift
6309   cat <<EOF
6310 [$]*
6312   exit 0
6315 # The HP-UX ksh and POSIX shell print the target directory to stdout
6316 # if CDPATH is set.
6317 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6319 if test -z "$ECHO"; then
6320 if test "X${echo_test_string+set}" != Xset; then
6321 # find a string as large as possible, as long as the shell can cope with it
6322   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6323     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6324     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6325        echo_test_string="`eval $cmd`" &&
6326        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6327     then
6328       break
6329     fi
6330   done
6333 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6334    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6335    test "X$echo_testing_string" = "X$echo_test_string"; then
6336   :
6337 else
6338   # The Solaris, AIX, and Digital Unix default echo programs unquote
6339   # backslashes.  This makes it impossible to quote backslashes using
6340   #   echo "$something" | sed 's/\\/\\\\/g'
6341   #
6342   # So, first we look for a working echo in the user's PATH.
6344   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6345   for dir in $PATH /usr/ucb; do
6346     IFS="$lt_save_ifs"
6347     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6348        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6349        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6350        test "X$echo_testing_string" = "X$echo_test_string"; then
6351       echo="$dir/echo"
6352       break
6353     fi
6354   done
6355   IFS="$lt_save_ifs"
6357   if test "X$echo" = Xecho; then
6358     # We didn't find a better echo, so look for alternatives.
6359     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6360        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6361        test "X$echo_testing_string" = "X$echo_test_string"; then
6362       # This shell has a builtin print -r that does the trick.
6363       echo='print -r'
6364     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6365          test "X$CONFIG_SHELL" != X/bin/ksh; then
6366       # If we have ksh, try running configure again with it.
6367       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6368       export ORIGINAL_CONFIG_SHELL
6369       CONFIG_SHELL=/bin/ksh
6370       export CONFIG_SHELL
6371       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6372     else
6373       # Try using printf.
6374       echo='printf %s\n'
6375       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6376          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6377          test "X$echo_testing_string" = "X$echo_test_string"; then
6378         # Cool, printf works
6379         :
6380       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6381            test "X$echo_testing_string" = 'X\t' &&
6382            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6383            test "X$echo_testing_string" = "X$echo_test_string"; then
6384         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6385         export CONFIG_SHELL
6386         SHELL="$CONFIG_SHELL"
6387         export SHELL
6388         echo="$CONFIG_SHELL [$]0 --fallback-echo"
6389       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6390            test "X$echo_testing_string" = 'X\t' &&
6391            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6392            test "X$echo_testing_string" = "X$echo_test_string"; then
6393         echo="$CONFIG_SHELL [$]0 --fallback-echo"
6394       else
6395         # maybe with a smaller string...
6396         prev=:
6398         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6399           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6400           then
6401             break
6402           fi
6403           prev="$cmd"
6404         done
6406         if test "$prev" != 'sed 50q "[$]0"'; then
6407           echo_test_string=`eval $prev`
6408           export echo_test_string
6409           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6410         else
6411           # Oops.  We lost completely, so just stick with echo.
6412           echo=echo
6413         fi
6414       fi
6415     fi
6416   fi
6420 # Copy echo and quote the copy suitably for passing to libtool from
6421 # the Makefile, instead of quoting the original, which is used later.
6422 ECHO=$echo
6423 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6424    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6427 AC_SUBST(ECHO)
6428 ])])# _LT_AC_PROG_ECHO_BACKSLASH
6431 # _LT_AC_LOCK
6432 # -----------
6433 AC_DEFUN([_LT_AC_LOCK],
6434 [AC_ARG_ENABLE([libtool-lock],
6435     [AC_HELP_STRING([--disable-libtool-lock],
6436         [avoid locking (might break parallel builds)])])
6437 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6439 # Some flags need to be propagated to the compiler or linker for good
6440 # libtool support.
6441 case $host in
6442 ia64-*-hpux*)
6443   # Find out which ABI we are using.
6444   echo 'int i;' > conftest.$ac_ext
6445   if AC_TRY_EVAL(ac_compile); then
6446     case `/usr/bin/file conftest.$ac_objext` in
6447     *ELF-32*)
6448       HPUX_IA64_MODE="32"
6449       ;;
6450     *ELF-64*)
6451       HPUX_IA64_MODE="64"
6452       ;;
6453     esac
6454   fi
6455   rm -rf conftest*
6456   ;;
6457 *-*-irix6*)
6458   # Find out which ABI we are using.
6459   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6460   if AC_TRY_EVAL(ac_compile); then
6461    if test "$lt_cv_prog_gnu_ld" = yes; then
6462     case `/usr/bin/file conftest.$ac_objext` in
6463     *32-bit*)
6464       LD="${LD-ld} -melf32bsmip"
6465       ;;
6466     *N32*)
6467       LD="${LD-ld} -melf32bmipn32"
6468       ;;
6469     *64-bit*)
6470       LD="${LD-ld} -melf64bmip"
6471       ;;
6472     esac
6473    else
6474     case `/usr/bin/file conftest.$ac_objext` in
6475     *32-bit*)
6476       LD="${LD-ld} -32"
6477       ;;
6478     *N32*)
6479       LD="${LD-ld} -n32"
6480       ;;
6481     *64-bit*)
6482       LD="${LD-ld} -64"
6483       ;;
6484     esac
6485    fi
6486   fi
6487   rm -rf conftest*
6488   ;;
6490 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6491   # Find out which ABI we are using.
6492   echo 'int i;' > conftest.$ac_ext
6493   if AC_TRY_EVAL(ac_compile); then
6494     case "`/usr/bin/file conftest.o`" in
6495     *32-bit*)
6496       LINUX_64_MODE="32"
6497       case $host in
6498         x86_64-*linux*)
6499           LD="${LD-ld} -m elf_i386"
6500           ;;
6501         ppc64-*linux*)
6502           LD="${LD-ld} -m elf32ppclinux"
6503           ;;
6504         s390x-*linux*)
6505           LD="${LD-ld} -m elf_s390"
6506           ;;
6507         sparc64-*linux*)
6508           LD="${LD-ld} -m elf32_sparc"
6509           ;;
6510       esac
6511       ;;
6512     *64-bit*)
6513       LINUX_64_MODE="64"
6514       case $host in
6515         x86_64-*linux*)
6516           LD="${LD-ld} -m elf_x86_64"
6517           ;;
6518         ppc*-*linux*|powerpc*-*linux*)
6519           LD="${LD-ld} -m elf64ppc"
6520           ;;
6521         s390*-*linux*)
6522           LD="${LD-ld} -m elf64_s390"
6523           ;;
6524         sparc*-*linux*)
6525           LD="${LD-ld} -m elf64_sparc"
6526           ;;
6527       esac
6528       ;;
6529     esac
6530   fi
6531   rm -rf conftest*
6532   ;;
6534 *-*-sco3.2v5*)
6535   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6536   SAVE_CFLAGS="$CFLAGS"
6537   CFLAGS="$CFLAGS -belf"
6538   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6539     [AC_LANG_PUSH(C)
6540      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6541      AC_LANG_POP])
6542   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6543     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6544     CFLAGS="$SAVE_CFLAGS"
6545   fi
6546   ;;
6547 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6548 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6549   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6550   AC_CHECK_TOOL(AS, as, false)
6551   AC_CHECK_TOOL(OBJDUMP, objdump, false)
6552   ;;
6553   ])
6554 esac
6556 need_locks="$enable_libtool_lock"
6558 ])# _LT_AC_LOCK
6561 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6562 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6563 # ----------------------------------------------------------------
6564 # Check whether the given compiler option works
6565 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6566 [AC_REQUIRE([LT_AC_PROG_SED])
6567 AC_CACHE_CHECK([$1], [$2],
6568   [$2=no
6569   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6570    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6571    lt_compiler_flag="$3"
6572    # Insert the option either (1) after the last *FLAGS variable, or
6573    # (2) before a word containing "conftest.", or (3) at the end.
6574    # Note that $ac_compile itself does not contain backslashes and begins
6575    # with a dollar sign (not a hyphen), so the echo should work correctly.
6576    # The option is referenced via a variable to avoid confusing sed.
6577    lt_compile=`echo "$ac_compile" | $SED \
6578    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6579    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6580    -e 's:$: $lt_compiler_flag:'`
6581    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6582    (eval "$lt_compile" 2>conftest.err)
6583    ac_status=$?
6584    cat conftest.err >&AS_MESSAGE_LOG_FD
6585    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6586    if (exit $ac_status) && test -s "$ac_outfile"; then
6587      # The compiler can only warn and ignore the option if not recognized
6588      # So say no if there are warnings
6589      if test ! -s conftest.err; then
6590        $2=yes
6591      fi
6592    fi
6593    $rm conftest*
6596 if test x"[$]$2" = xyes; then
6597     ifelse([$5], , :, [$5])
6598 else
6599     ifelse([$6], , :, [$6])
6601 ])# AC_LIBTOOL_COMPILER_OPTION
6604 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6605 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
6606 # ------------------------------------------------------------
6607 # Check whether the given compiler option works
6608 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6609 [AC_CACHE_CHECK([$1], [$2],
6610   [$2=no
6611    save_LDFLAGS="$LDFLAGS"
6612    LDFLAGS="$LDFLAGS $3"
6613    printf "$lt_simple_link_test_code" > conftest.$ac_ext
6614    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6615      # The compiler can only warn and ignore the option if not recognized
6616      # So say no if there are warnings
6617      if test -s conftest.err; then
6618        # Append any errors to the config.log.
6619        cat conftest.err 1>&AS_MESSAGE_LOG_FD
6620      else
6621        $2=yes
6622      fi
6623    fi
6624    $rm conftest*
6625    LDFLAGS="$save_LDFLAGS"
6628 if test x"[$]$2" = xyes; then
6629     ifelse([$4], , :, [$4])
6630 else
6631     ifelse([$5], , :, [$5])
6633 ])# AC_LIBTOOL_LINKER_OPTION
6636 # AC_LIBTOOL_SYS_MAX_CMD_LEN
6637 # --------------------------
6638 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6639 [# find the maximum length of command line arguments
6640 AC_MSG_CHECKING([the maximum length of command line arguments])
6641 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6642   i=0
6643   testring="ABCD"
6645   case $build_os in
6646   msdosdjgpp*)
6647     # On DJGPP, this test can blow up pretty badly due to problems in libc
6648     # (any single argument exceeding 2000 bytes causes a buffer overrun
6649     # during glob expansion).  Even if it were fixed, the result of this
6650     # check would be larger than it should be.
6651     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6652     ;;
6654   gnu*)
6655     # Under GNU Hurd, this test is not required because there is
6656     # no limit to the length of command line arguments.
6657     # Libtool will interpret -1 as no limit whatsoever
6658     lt_cv_sys_max_cmd_len=-1;
6659     ;;
6661   cygwin* | mingw*)
6662     # On Win9x/ME, this test blows up -- it succeeds, but takes
6663     # about 5 minutes as the teststring grows exponentially.
6664     # Worse, since 9x/ME are not pre-emptively multitasking,
6665     # you end up with a "frozen" computer, even though with patience
6666     # the test eventually succeeds (with a max line length of 256k).
6667     # Instead, let's just punt: use the minimum linelength reported by
6668     # all of the supported platforms: 8192 (on NT/2K/XP).
6669     lt_cv_sys_max_cmd_len=8192;
6670     ;;
6672  *)
6673     # If test is not a shell built-in, we'll probably end up computing a
6674     # maximum length that is only half of the actual maximum length, but
6675     # we can't tell.
6676     while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6677                = "XX$testring") >/dev/null 2>&1 &&
6678             new_result=`expr "X$testring" : ".*" 2>&1` &&
6679             lt_cv_sys_max_cmd_len=$new_result &&
6680             test $i != 17 # 1/2 MB should be enough
6681     do
6682       i=`expr $i + 1`
6683       testring=$testring$testring
6684     done
6685     testring=
6686     # Add a significant safety factor because C++ compilers can tack on massive
6687     # amounts of additional arguments before passing them to the linker.
6688     # It appears as though 1/2 is a usable value.
6689     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6690     ;;
6691   esac
6693 if test -n $lt_cv_sys_max_cmd_len ; then
6694   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6695 else
6696   AC_MSG_RESULT(none)
6698 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6701 # _LT_AC_CHECK_DLFCN
6702 # --------------------
6703 AC_DEFUN([_LT_AC_CHECK_DLFCN],
6704 [AC_CHECK_HEADERS(dlfcn.h)dnl
6705 ])# _LT_AC_CHECK_DLFCN
6708 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6709 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6710 # ------------------------------------------------------------------
6711 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6712 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6713 if test "$cross_compiling" = yes; then :
6714   [$4]
6715 else
6716   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6717   lt_status=$lt_dlunknown
6718   cat > conftest.$ac_ext <<EOF
6719 [#line __oline__ "configure"
6720 #include "confdefs.h"
6722 #if HAVE_DLFCN_H
6723 #include <dlfcn.h>
6724 #endif
6726 #include <stdio.h>
6728 #ifdef RTLD_GLOBAL
6729 #  define LT_DLGLOBAL           RTLD_GLOBAL
6730 #else
6731 #  ifdef DL_GLOBAL
6732 #    define LT_DLGLOBAL         DL_GLOBAL
6733 #  else
6734 #    define LT_DLGLOBAL         0
6735 #  endif
6736 #endif
6738 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6739    find out it does not work in some platform. */
6740 #ifndef LT_DLLAZY_OR_NOW
6741 #  ifdef RTLD_LAZY
6742 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6743 #  else
6744 #    ifdef DL_LAZY
6745 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6746 #    else
6747 #      ifdef RTLD_NOW
6748 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6749 #      else
6750 #        ifdef DL_NOW
6751 #          define LT_DLLAZY_OR_NOW      DL_NOW
6752 #        else
6753 #          define LT_DLLAZY_OR_NOW      0
6754 #        endif
6755 #      endif
6756 #    endif
6757 #  endif
6758 #endif
6760 #ifdef __cplusplus
6761 extern "C" void exit (int);
6762 #endif
6764 void fnord() { int i=42;}
6765 int main ()
6767   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6768   int status = $lt_dlunknown;
6770   if (self)
6771     {
6772       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6773       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6774       /* dlclose (self); */
6775     }
6777     exit (status);
6780   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6781     (./conftest; exit; ) 2>/dev/null
6782     lt_status=$?
6783     case x$lt_status in
6784       x$lt_dlno_uscore) $1 ;;
6785       x$lt_dlneed_uscore) $2 ;;
6786       x$lt_unknown|x*) $3 ;;
6787     esac
6788   else :
6789     # compilation failed
6790     $3
6791   fi
6793 rm -fr conftest*
6794 ])# _LT_AC_TRY_DLOPEN_SELF
6797 # AC_LIBTOOL_DLOPEN_SELF
6798 # -------------------
6799 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6800 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6801 if test "x$enable_dlopen" != xyes; then
6802   enable_dlopen=unknown
6803   enable_dlopen_self=unknown
6804   enable_dlopen_self_static=unknown
6805 else
6806   lt_cv_dlopen=no
6807   lt_cv_dlopen_libs=
6809   case $host_os in
6810   beos*)
6811     lt_cv_dlopen="load_add_on"
6812     lt_cv_dlopen_libs=
6813     lt_cv_dlopen_self=yes
6814     ;;
6816   mingw* | pw32*)
6817     lt_cv_dlopen="LoadLibrary"
6818     lt_cv_dlopen_libs=
6819    ;;
6821   cygwin*)
6822     lt_cv_dlopen="dlopen"
6823     lt_cv_dlopen_libs=
6824    ;;
6826   darwin*)
6827   # if libdl is installed we need to link against it
6828     AC_CHECK_LIB([dl], [dlopen],
6829                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6830     lt_cv_dlopen="dyld"
6831     lt_cv_dlopen_libs=
6832     lt_cv_dlopen_self=yes
6833     ])
6834    ;;
6835     
6836   *)
6837     AC_CHECK_FUNC([shl_load],
6838           [lt_cv_dlopen="shl_load"],
6839       [AC_CHECK_LIB([dld], [shl_load],
6840             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6841         [AC_CHECK_FUNC([dlopen],
6842               [lt_cv_dlopen="dlopen"],
6843           [AC_CHECK_LIB([dl], [dlopen],
6844                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6845             [AC_CHECK_LIB([svld], [dlopen],
6846                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6847               [AC_CHECK_LIB([dld], [dld_link],
6848                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6849               ])
6850             ])
6851           ])
6852         ])
6853       ])
6854     ;;
6855   esac
6857   if test "x$lt_cv_dlopen" != xno; then
6858     enable_dlopen=yes
6859   else
6860     enable_dlopen=no
6861   fi
6863   case $lt_cv_dlopen in
6864   dlopen)
6865     save_CPPFLAGS="$CPPFLAGS"
6866     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6868     save_LDFLAGS="$LDFLAGS"
6869     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6871     save_LIBS="$LIBS"
6872     LIBS="$lt_cv_dlopen_libs $LIBS"
6874     AC_CACHE_CHECK([whether a program can dlopen itself],
6875           lt_cv_dlopen_self, [dnl
6876           _LT_AC_TRY_DLOPEN_SELF(
6877             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6878             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6879     ])
6881     if test "x$lt_cv_dlopen_self" = xyes; then
6882       LDFLAGS="$LDFLAGS $link_static_flag"
6883       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6884           lt_cv_dlopen_self_static, [dnl
6885           _LT_AC_TRY_DLOPEN_SELF(
6886             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6887             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
6888       ])
6889     fi
6891     CPPFLAGS="$save_CPPFLAGS"
6892     LDFLAGS="$save_LDFLAGS"
6893     LIBS="$save_LIBS"
6894     ;;
6895   esac
6897   case $lt_cv_dlopen_self in
6898   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6899   *) enable_dlopen_self=unknown ;;
6900   esac
6902   case $lt_cv_dlopen_self_static in
6903   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6904   *) enable_dlopen_self_static=unknown ;;
6905   esac
6907 ])# AC_LIBTOOL_DLOPEN_SELF
6910 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6911 # ---------------------------------
6912 # Check to see if options -c and -o are simultaneously supported by compiler
6913 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6914 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6915 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6916   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6917   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6918    $rm -r conftest 2>/dev/null
6919    mkdir conftest
6920    cd conftest
6921    mkdir out
6922    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6924    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6925    # that will create temporary files in the current directory regardless of
6926    # the output directory.  Thus, making CWD read-only will cause this test
6927    # to fail, enabling locking or at least warning the user not to do parallel
6928    # builds.
6929    chmod -w .
6931    lt_compiler_flag="-o out/conftest2.$ac_objext"
6932    # Insert the option either (1) after the last *FLAGS variable, or
6933    # (2) before a word containing "conftest.", or (3) at the end.
6934    # Note that $ac_compile itself does not contain backslashes and begins
6935    # with a dollar sign (not a hyphen), so the echo should work correctly.
6936    lt_compile=`echo "$ac_compile" | $SED \
6937    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6938    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6939    -e 's:$: $lt_compiler_flag:'`
6940    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6941    (eval "$lt_compile" 2>out/conftest.err)
6942    ac_status=$?
6943    cat out/conftest.err >&AS_MESSAGE_LOG_FD
6944    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6945    if (exit $ac_status) && test -s out/conftest2.$ac_objext
6946    then
6947      # The compiler can only warn and ignore the option if not recognized
6948      # So say no if there are warnings
6949      if test ! -s out/conftest.err; then
6950        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6951      fi
6952    fi
6953    chmod u+w .
6954    $rm conftest* out/*
6955    rmdir out
6956    cd ..
6957    rmdir conftest
6958    $rm conftest*
6960 ])# AC_LIBTOOL_PROG_CC_C_O
6963 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6964 # -----------------------------------------
6965 # Check to see if we can do hard links to lock some files if needed
6966 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6967 [AC_REQUIRE([_LT_AC_LOCK])dnl
6969 hard_links="nottested"
6970 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6971   # do not overwrite the value of need_locks provided by the user
6972   AC_MSG_CHECKING([if we can lock with hard links])
6973   hard_links=yes
6974   $rm conftest*
6975   ln conftest.a conftest.b 2>/dev/null && hard_links=no
6976   touch conftest.a
6977   ln conftest.a conftest.b 2>&5 || hard_links=no
6978   ln conftest.a conftest.b 2>/dev/null && hard_links=no
6979   AC_MSG_RESULT([$hard_links])
6980   if test "$hard_links" = no; then
6981     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6982     need_locks=warn
6983   fi
6984 else
6985   need_locks=no
6987 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6990 # AC_LIBTOOL_OBJDIR
6991 # -----------------
6992 AC_DEFUN([AC_LIBTOOL_OBJDIR],
6993 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6994 [rm -f .libs 2>/dev/null
6995 mkdir .libs 2>/dev/null
6996 if test -d .libs; then
6997   lt_cv_objdir=.libs
6998 else
6999   # MS-DOS does not allow filenames that begin with a dot.
7000   lt_cv_objdir=_libs
7002 rmdir .libs 2>/dev/null])
7003 objdir=$lt_cv_objdir
7004 ])# AC_LIBTOOL_OBJDIR
7007 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
7008 # ----------------------------------------------
7009 # Check hardcoding attributes.
7010 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
7011 [AC_MSG_CHECKING([how to hardcode library paths into programs])
7012 _LT_AC_TAGVAR(hardcode_action, $1)=
7013 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
7014    test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
7015    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
7017   # We can hardcode non-existant directories.
7018   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
7019      # If the only mechanism to avoid hardcoding is shlibpath_var, we
7020      # have to relink, otherwise we might link with an installed library
7021      # when we should be linking with a yet-to-be-installed one
7022      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
7023      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
7024     # Linking always hardcodes the temporary library directory.
7025     _LT_AC_TAGVAR(hardcode_action, $1)=relink
7026   else
7027     # We can link without hardcoding, and we can hardcode nonexisting dirs.
7028     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
7029   fi
7030 else
7031   # We cannot hardcode anything, or else we can only hardcode existing
7032   # directories.
7033   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
7035 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
7037 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
7038   # Fast installation is not supported
7039   enable_fast_install=no
7040 elif test "$shlibpath_overrides_runpath" = yes ||
7041      test "$enable_shared" = no; then
7042   # Fast installation is not necessary
7043   enable_fast_install=needless
7045 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
7048 # AC_LIBTOOL_SYS_LIB_STRIP
7049 # ------------------------
7050 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
7051 [striplib=
7052 old_striplib=
7053 AC_MSG_CHECKING([whether stripping libraries is possible])
7054 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
7055   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
7056   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
7057   AC_MSG_RESULT([yes])
7058 else
7059 # FIXME - insert some real tests, host_os isn't really good enough
7060   case $host_os in
7061    darwin*)
7062        if test -n "$STRIP" ; then
7063          striplib="$STRIP -x"
7064          AC_MSG_RESULT([yes])
7065        else
7066   AC_MSG_RESULT([no])
7068        ;;
7069    *)
7070   AC_MSG_RESULT([no])
7071     ;;
7072   esac  
7074 ])# AC_LIBTOOL_SYS_LIB_STRIP
7077 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
7078 # -----------------------------
7079 # PORTME Fill in your ld.so characteristics
7080 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
7081 [AC_MSG_CHECKING([dynamic linker characteristics])
7082 library_names_spec=
7083 libname_spec='lib$name'
7084 soname_spec=
7085 shrext=".so"
7086 postinstall_cmds=
7087 postuninstall_cmds=
7088 finish_cmds=
7089 finish_eval=
7090 shlibpath_var=
7091 shlibpath_overrides_runpath=unknown
7092 version_type=none
7093 dynamic_linker="$host_os ld.so"
7094 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7095 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
7096 need_lib_prefix=unknown
7097 hardcode_into_libs=no
7099 # when you set need_version to no, make sure it does not cause -set_version
7100 # flags to be left without arguments
7101 need_version=unknown
7103 case $host_os in
7104 aix3*)
7105   version_type=linux
7106   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
7107   shlibpath_var=LIBPATH
7109   # AIX 3 has no versioning support, so we append a major version to the name.
7110   soname_spec='${libname}${release}${shared_ext}$major'
7111   ;;
7113 aix4* | aix5*)
7114   version_type=linux
7115   need_lib_prefix=no
7116   need_version=no
7117   hardcode_into_libs=yes
7118   if test "$host_cpu" = ia64; then
7119     # AIX 5 supports IA64
7120     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
7121     shlibpath_var=LD_LIBRARY_PATH
7122   else
7123     # With GCC up to 2.95.x, collect2 would create an import file
7124     # for dependence libraries.  The import file would start with
7125     # the line `#! .'.  This would cause the generated library to
7126     # depend on `.', always an invalid library.  This was fixed in
7127     # development snapshots of GCC prior to 3.0.
7128     case $host_os in
7129       aix4 | aix4.[[01]] | aix4.[[01]].*)
7130       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7131            echo ' yes '
7132            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7133         :
7134       else
7135         can_build_shared=no
7136       fi
7137       ;;
7138     esac
7139     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
7140     # soname into executable. Probably we can add versioning support to
7141     # collect2, so additional links can be useful in future.
7142     if test "$aix_use_runtimelinking" = yes; then
7143       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
7144       # instead of lib<name>.a to let people know that these are not
7145       # typical AIX shared libraries.
7146       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7147     else
7148       # We preserve .a as extension for shared libraries through AIX4.2
7149       # and later when we are not doing run time linking.
7150       library_names_spec='${libname}${release}.a $libname.a'
7151       soname_spec='${libname}${release}${shared_ext}$major'
7152     fi
7153     shlibpath_var=LIBPATH
7154   fi
7155   ;;
7157 amigaos*)
7158   library_names_spec='$libname.ixlibrary $libname.a'
7159   # Create ${libname}_ixlibrary.a entries in /sys/libs.
7160   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'
7161   ;;
7163 beos*)
7164   library_names_spec='${libname}${shared_ext}'
7165   dynamic_linker="$host_os ld.so"
7166   shlibpath_var=LIBRARY_PATH
7167   ;;
7169 bsdi4*)
7170   version_type=linux
7171   need_version=no
7172   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7173   soname_spec='${libname}${release}${shared_ext}$major'
7174   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7175   shlibpath_var=LD_LIBRARY_PATH
7176   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7177   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7178   # the default ld.so.conf also contains /usr/contrib/lib and
7179   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7180   # libtool to hard-code these into programs
7181   ;;
7183 cygwin* | mingw* | pw32*)
7184   version_type=windows
7185   shrext=".dll"
7186   need_version=no
7187   need_lib_prefix=no
7189   case $GCC,$host_os in
7190   yes,cygwin* | yes,mingw* | yes,pw32*)
7191     library_names_spec='$libname.dll.a'
7192     # DLL is installed to $(libdir)/../bin by postinstall_cmds
7193     postinstall_cmds='base_file=`basename \${file}`~
7194       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
7195       dldir=$destdir/`dirname \$dlpath`~
7196       test -d \$dldir || mkdir -p \$dldir~
7197       $install_prog $dir/$dlname \$dldir/$dlname'
7198     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
7199       dlpath=$dir/\$dldll~
7200        $rm \$dlpath'
7201     shlibpath_overrides_runpath=yes
7203     case $host_os in
7204     cygwin*)
7205       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
7206       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7207       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
7208       ;;
7209     mingw*)
7210       # MinGW DLLs use traditional 'lib' prefix
7211       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7212       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7213       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
7214         # It is most probably a Windows format PATH printed by
7215         # mingw gcc, but we are running on Cygwin. Gcc prints its search
7216         # path with ; separators, and with drive letters. We can handle the
7217         # drive letters (cygwin fileutils understands them), so leave them,
7218         # especially as we might pass files found there to a mingw objdump,
7219         # which wouldn't understand a cygwinified path. Ahh.
7220         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7221       else
7222         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
7223       fi
7224       ;;
7225     pw32*)
7226       # pw32 DLLs use 'pw' prefix rather than 'lib'
7227       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
7228       ;;
7229     esac
7230     ;;
7232   *)
7233     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
7234     ;;
7235   esac
7236   dynamic_linker='Win32 ld.exe'
7237   # FIXME: first we should search . and the directory the executable is in
7238   shlibpath_var=PATH
7239   ;;
7241 darwin* | rhapsody*)
7242   dynamic_linker="$host_os dyld"
7243   version_type=darwin
7244   need_lib_prefix=no
7245   need_version=no
7246   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7247   soname_spec='${libname}${release}${major}$shared_ext'
7248   shlibpath_overrides_runpath=yes
7249   shlibpath_var=DYLD_LIBRARY_PATH
7250   shrext='$(test .$module = .yes && echo .so || echo .dylib)'
7251   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7252   if test "$GCC" = yes; then
7253     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
7254   else
7255     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7256   fi
7257   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7258   ;;
7260 dgux*)
7261   version_type=linux
7262   need_lib_prefix=no
7263   need_version=no
7264   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7265   soname_spec='${libname}${release}${shared_ext}$major'
7266   shlibpath_var=LD_LIBRARY_PATH
7267   ;;
7269 freebsd1*)
7270   dynamic_linker=no
7271   ;;
7273 kfreebsd*-gnu*)
7274   version_type=linux
7275   need_lib_prefix=no
7276   need_version=no
7277   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7278   soname_spec='${libname}${release}${shared_ext}$major'
7279   shlibpath_var=LD_LIBRARY_PATH
7280   shlibpath_overrides_runpath=no
7281   hardcode_into_libs=yes
7282   dynamic_linker='GNU ld.so'
7283   ;;
7285 freebsd*)
7286   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7287   version_type=freebsd-$objformat
7288   case $version_type in
7289     freebsd-elf*)
7290       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7291       need_version=no
7292       need_lib_prefix=no
7293       ;;
7294     freebsd-*)
7295       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7296       need_version=yes
7297       ;;
7298   esac
7299   shlibpath_var=LD_LIBRARY_PATH
7300   case $host_os in
7301   freebsd2*)
7302     shlibpath_overrides_runpath=yes
7303     ;;
7304   freebsd3.[01]* | freebsdelf3.[01]*)
7305     shlibpath_overrides_runpath=yes
7306     hardcode_into_libs=yes
7307     ;;
7308   *) # from 3.2 on
7309     shlibpath_overrides_runpath=no
7310     hardcode_into_libs=yes
7311     ;;
7312   esac
7313   ;;
7315 gnu*)
7316   version_type=linux
7317   need_lib_prefix=no
7318   need_version=no
7319   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7320   soname_spec='${libname}${release}${shared_ext}$major'
7321   shlibpath_var=LD_LIBRARY_PATH
7322   hardcode_into_libs=yes
7323   ;;
7325 hpux9* | hpux10* | hpux11*)
7326   # Give a soname corresponding to the major version so that dld.sl refuses to
7327   # link against other versions.
7328   version_type=sunos
7329   need_lib_prefix=no
7330   need_version=no
7331   case "$host_cpu" in
7332   ia64*)
7333     shrext='.so'
7334     hardcode_into_libs=yes
7335     dynamic_linker="$host_os dld.so"
7336     shlibpath_var=LD_LIBRARY_PATH
7337     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7338     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7339     soname_spec='${libname}${release}${shared_ext}$major'
7340     if test "X$HPUX_IA64_MODE" = X32; then
7341       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7342     else
7343       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7344     fi
7345     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7346     ;;
7347    hppa*64*)
7348      shrext='.sl'
7349      hardcode_into_libs=yes
7350      dynamic_linker="$host_os dld.sl"
7351      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7352      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7353      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7354      soname_spec='${libname}${release}${shared_ext}$major'
7355      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7356      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7357      ;;
7358    *)
7359     shrext='.sl'
7360     dynamic_linker="$host_os dld.sl"
7361     shlibpath_var=SHLIB_PATH
7362     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7363     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7364     soname_spec='${libname}${release}${shared_ext}$major'
7365     ;;
7366   esac
7367   # HP-UX runs *really* slowly unless shared libraries are mode 555.
7368   postinstall_cmds='chmod 555 $lib'
7369   ;;
7371 irix5* | irix6* | nonstopux*)
7372   case $host_os in
7373     nonstopux*) version_type=nonstopux ;;
7374     *)
7375         if test "$lt_cv_prog_gnu_ld" = yes; then
7376                 version_type=linux
7377         else
7378                 version_type=irix
7379         fi ;;
7380   esac
7381   need_lib_prefix=no
7382   need_version=no
7383   soname_spec='${libname}${release}${shared_ext}$major'
7384   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7385   case $host_os in
7386   irix5* | nonstopux*)
7387     libsuff= shlibsuff=
7388     ;;
7389   *)
7390     case $LD in # libtool.m4 will add one of these switches to LD
7391     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7392       libsuff= shlibsuff= libmagic=32-bit;;
7393     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7394       libsuff=32 shlibsuff=N32 libmagic=N32;;
7395     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7396       libsuff=64 shlibsuff=64 libmagic=64-bit;;
7397     *) libsuff= shlibsuff= libmagic=never-match;;
7398     esac
7399     ;;
7400   esac
7401   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7402   shlibpath_overrides_runpath=no
7403   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7404   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7405   hardcode_into_libs=yes
7406   ;;
7408 # No shared lib support for Linux oldld, aout, or coff.
7409 linux*oldld* | linux*aout* | linux*coff*)
7410   dynamic_linker=no
7411   ;;
7413 # This must be Linux ELF.
7414 linux*)
7415   version_type=linux
7416   need_lib_prefix=no
7417   need_version=no
7418   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7419   soname_spec='${libname}${release}${shared_ext}$major'
7420   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7421   libsuff=
7422   if test "x$LINUX_64_MODE" = x64; then
7423     # Some platforms are per default 64-bit, so there's no /lib64
7424     if test -d /lib64 -a ! -h /lib64; then
7425       libsuff=64
7426     fi
7427   fi
7428   shlibpath_var=LD_LIBRARY_PATH
7429   shlibpath_overrides_runpath=no
7430   sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7431   sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7432   # This implies no fast_install, which is unacceptable.
7433   # Some rework will be needed to allow for fast_install
7434   # before this can be enabled.
7435   hardcode_into_libs=yes
7437   # We used to test for /lib/ld.so.1 and disable shared libraries on
7438   # powerpc, because MkLinux only supported shared libraries with the
7439   # GNU dynamic linker.  Since this was broken with cross compilers,
7440   # most powerpc-linux boxes support dynamic linking these days and
7441   # people can always --disable-shared, the test was removed, and we
7442   # assume the GNU/Linux dynamic linker is in use.
7443   dynamic_linker='GNU/Linux ld.so'
7444   ;;
7446 netbsd*)
7447   version_type=sunos
7448   need_lib_prefix=no
7449   need_version=no
7450   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7451     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7452     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7453     dynamic_linker='NetBSD (a.out) ld.so'
7454   else
7455     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7456     soname_spec='${libname}${release}${shared_ext}$major'
7457     dynamic_linker='NetBSD ld.elf_so'
7458   fi
7459   shlibpath_var=LD_LIBRARY_PATH
7460   shlibpath_overrides_runpath=yes
7461   hardcode_into_libs=yes
7462   ;;
7464 newsos6)
7465   version_type=linux
7466   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7467   shlibpath_var=LD_LIBRARY_PATH
7468   shlibpath_overrides_runpath=yes
7469   ;;
7471 nto-qnx*)
7472   version_type=linux
7473   need_lib_prefix=no
7474   need_version=no
7475   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7476   soname_spec='${libname}${release}${shared_ext}$major'
7477   shlibpath_var=LD_LIBRARY_PATH
7478   shlibpath_overrides_runpath=yes
7479   ;;
7481 openbsd*)
7482   version_type=sunos
7483   need_lib_prefix=no
7484   need_version=no
7485   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7486   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7487   shlibpath_var=LD_LIBRARY_PATH
7488   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7489     case $host_os in
7490       openbsd2.[[89]] | openbsd2.[[89]].*)
7491         shlibpath_overrides_runpath=no
7492         ;;
7493       *)
7494         shlibpath_overrides_runpath=yes
7495         ;;
7496       esac
7497   else
7498     shlibpath_overrides_runpath=yes
7499   fi
7500   ;;
7502 os2*)
7503   libname_spec='$name'
7504   shrext=".dll"
7505   need_lib_prefix=no
7506   library_names_spec='$libname${shared_ext} $libname.a'
7507   dynamic_linker='OS/2 ld.exe'
7508   shlibpath_var=LIBPATH
7509   ;;
7511 osf3* | osf4* | osf5*)
7512   version_type=osf
7513   need_lib_prefix=no
7514   need_version=no
7515   soname_spec='${libname}${release}${shared_ext}$major'
7516   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7517   shlibpath_var=LD_LIBRARY_PATH
7518   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7519   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7520   ;;
7522 sco3.2v5*)
7523   version_type=osf
7524   soname_spec='${libname}${release}${shared_ext}$major'
7525   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7526   shlibpath_var=LD_LIBRARY_PATH
7527   ;;
7529 solaris*)
7530   version_type=linux
7531   need_lib_prefix=no
7532   need_version=no
7533   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7534   soname_spec='${libname}${release}${shared_ext}$major'
7535   shlibpath_var=LD_LIBRARY_PATH
7536   shlibpath_overrides_runpath=yes
7537   hardcode_into_libs=yes
7538   # ldd complains unless libraries are executable
7539   postinstall_cmds='chmod +x $lib'
7540   ;;
7542 sunos4*)
7543   version_type=sunos
7544   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7545   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7546   shlibpath_var=LD_LIBRARY_PATH
7547   shlibpath_overrides_runpath=yes
7548   if test "$with_gnu_ld" = yes; then
7549     need_lib_prefix=no
7550   fi
7551   need_version=yes
7552   ;;
7554 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7555   version_type=linux
7556   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7557   soname_spec='${libname}${release}${shared_ext}$major'
7558   shlibpath_var=LD_LIBRARY_PATH
7559   case $host_vendor in
7560     sni)
7561       shlibpath_overrides_runpath=no
7562       need_lib_prefix=no
7563       export_dynamic_flag_spec='${wl}-Blargedynsym'
7564       runpath_var=LD_RUN_PATH
7565       ;;
7566     siemens)
7567       need_lib_prefix=no
7568       ;;
7569     motorola)
7570       need_lib_prefix=no
7571       need_version=no
7572       shlibpath_overrides_runpath=no
7573       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7574       ;;
7575   esac
7576   ;;
7578 sysv4*MP*)
7579   if test -d /usr/nec ;then
7580     version_type=linux
7581     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7582     soname_spec='$libname${shared_ext}.$major'
7583     shlibpath_var=LD_LIBRARY_PATH
7584   fi
7585   ;;
7587 uts4*)
7588   version_type=linux
7589   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7590   soname_spec='${libname}${release}${shared_ext}$major'
7591   shlibpath_var=LD_LIBRARY_PATH
7592   ;;
7595   dynamic_linker=no
7596   ;;
7597 esac
7598 AC_MSG_RESULT([$dynamic_linker])
7599 test "$dynamic_linker" = no && can_build_shared=no
7600 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7603 # _LT_AC_TAGCONFIG
7604 # ----------------
7605 AC_DEFUN([_LT_AC_TAGCONFIG],
7606 [AC_ARG_WITH([tags],
7607     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7608         [include additional configurations @<:@automatic@:>@])],
7609     [tagnames="$withval"])
7611 if test -f "$ltmain" && test -n "$tagnames"; then
7612   if test ! -f "${ofile}"; then
7613     AC_MSG_WARN([output file `$ofile' does not exist])
7614   fi
7616   if test -z "$LTCC"; then
7617     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7618     if test -z "$LTCC"; then
7619       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7620     else
7621       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7622     fi
7623   fi
7625   # Extract list of available tagged configurations in $ofile.
7626   # Note that this assumes the entire list is on one line.
7627   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7629   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7630   for tagname in $tagnames; do
7631     IFS="$lt_save_ifs"
7632     # Check whether tagname contains only valid characters
7633     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7634     "") ;;
7635     *)  AC_MSG_ERROR([invalid tag name: $tagname])
7636         ;;
7637     esac
7639     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7640     then
7641       AC_MSG_ERROR([tag name \"$tagname\" already exists])
7642     fi
7644     # Update the list of available tags.
7645     if test -n "$tagname"; then
7646       echo appending configuration tag \"$tagname\" to $ofile
7648       case $tagname in
7649       CXX)
7650         if test -n "$CXX" && test "X$CXX" != "Xno"; then
7651           AC_LIBTOOL_LANG_CXX_CONFIG
7652         else
7653           tagname=""
7654         fi
7655         ;;
7657       F77)
7658         if test -n "$F77" && test "X$F77" != "Xno"; then
7659           AC_LIBTOOL_LANG_F77_CONFIG
7660         else
7661           tagname=""
7662         fi
7663         ;;
7665       GCJ)
7666         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7667           AC_LIBTOOL_LANG_GCJ_CONFIG
7668         else
7669           tagname=""
7670         fi
7671         ;;
7673       RC)
7674         AC_LIBTOOL_LANG_RC_CONFIG
7675         ;;
7677       *)
7678         AC_MSG_ERROR([Unsupported tag name: $tagname])
7679         ;;
7680       esac
7682       # Append the new tag name to the list of available tags.
7683       if test -n "$tagname" ; then
7684       available_tags="$available_tags $tagname"
7685     fi
7686     fi
7687   done
7688   IFS="$lt_save_ifs"
7690   # Now substitute the updated list of available tags.
7691   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7692     mv "${ofile}T" "$ofile"
7693     chmod +x "$ofile"
7694   else
7695     rm -f "${ofile}T"
7696     AC_MSG_ERROR([unable to update list of available tagged configurations.])
7697   fi
7699 ])# _LT_AC_TAGCONFIG
7702 # AC_LIBTOOL_DLOPEN
7703 # -----------------
7704 # enable checks for dlopen support
7705 AC_DEFUN([AC_LIBTOOL_DLOPEN],
7706  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7707 ])# AC_LIBTOOL_DLOPEN
7710 # AC_LIBTOOL_WIN32_DLL
7711 # --------------------
7712 # declare package support for building win32 dll's
7713 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7714 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7715 ])# AC_LIBTOOL_WIN32_DLL
7718 # AC_ENABLE_SHARED([DEFAULT])
7719 # ---------------------------
7720 # implement the --enable-shared flag
7721 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7722 AC_DEFUN([AC_ENABLE_SHARED],
7723 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7724 AC_ARG_ENABLE([shared],
7725     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7726         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7727     [p=${PACKAGE-default}
7728     case $enableval in
7729     yes) enable_shared=yes ;;
7730     no) enable_shared=no ;;
7731     *)
7732       enable_shared=no
7733       # Look at the argument we got.  We use all the common list separators.
7734       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7735       for pkg in $enableval; do
7736         IFS="$lt_save_ifs"
7737         if test "X$pkg" = "X$p"; then
7738           enable_shared=yes
7739         fi
7740       done
7741       IFS="$lt_save_ifs"
7742       ;;
7743     esac],
7744     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7745 ])# AC_ENABLE_SHARED
7748 # AC_DISABLE_SHARED
7749 # -----------------
7750 #- set the default shared flag to --disable-shared
7751 AC_DEFUN([AC_DISABLE_SHARED],
7752 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7753 AC_ENABLE_SHARED(no)
7754 ])# AC_DISABLE_SHARED
7757 # AC_ENABLE_STATIC([DEFAULT])
7758 # ---------------------------
7759 # implement the --enable-static flag
7760 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7761 AC_DEFUN([AC_ENABLE_STATIC],
7762 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7763 AC_ARG_ENABLE([static],
7764     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7765         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7766     [p=${PACKAGE-default}
7767     case $enableval in
7768     yes) enable_static=yes ;;
7769     no) enable_static=no ;;
7770     *)
7771      enable_static=no
7772       # Look at the argument we got.  We use all the common list separators.
7773       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7774       for pkg in $enableval; do
7775         IFS="$lt_save_ifs"
7776         if test "X$pkg" = "X$p"; then
7777           enable_static=yes
7778         fi
7779       done
7780       IFS="$lt_save_ifs"
7781       ;;
7782     esac],
7783     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
7784 ])# AC_ENABLE_STATIC
7787 # AC_DISABLE_STATIC
7788 # -----------------
7789 # set the default static flag to --disable-static
7790 AC_DEFUN([AC_DISABLE_STATIC],
7791 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7792 AC_ENABLE_STATIC(no)
7793 ])# AC_DISABLE_STATIC
7796 # AC_ENABLE_FAST_INSTALL([DEFAULT])
7797 # ---------------------------------
7798 # implement the --enable-fast-install flag
7799 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7800 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7801 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7802 AC_ARG_ENABLE([fast-install],
7803     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7804     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7805     [p=${PACKAGE-default}
7806     case $enableval in
7807     yes) enable_fast_install=yes ;;
7808     no) enable_fast_install=no ;;
7809     *)
7810       enable_fast_install=no
7811       # Look at the argument we got.  We use all the common list separators.
7812       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7813       for pkg in $enableval; do
7814         IFS="$lt_save_ifs"
7815         if test "X$pkg" = "X$p"; then
7816           enable_fast_install=yes
7817         fi
7818       done
7819       IFS="$lt_save_ifs"
7820       ;;
7821     esac],
7822     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7823 ])# AC_ENABLE_FAST_INSTALL
7826 # AC_DISABLE_FAST_INSTALL
7827 # -----------------------
7828 # set the default to --disable-fast-install
7829 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7830 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7831 AC_ENABLE_FAST_INSTALL(no)
7832 ])# AC_DISABLE_FAST_INSTALL
7835 # AC_LIBTOOL_PICMODE([MODE])
7836 # --------------------------
7837 # implement the --with-pic flag
7838 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7839 AC_DEFUN([AC_LIBTOOL_PICMODE],
7840 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7841 pic_mode=ifelse($#,1,$1,default)
7842 ])# AC_LIBTOOL_PICMODE
7845 # AC_PROG_EGREP
7846 # -------------
7847 # This is predefined starting with Autoconf 2.54, so this conditional
7848 # definition can be removed once we require Autoconf 2.54 or later.
7849 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7850 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7851    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7852     then ac_cv_prog_egrep='grep -E'
7853     else ac_cv_prog_egrep='egrep'
7854     fi])
7855  EGREP=$ac_cv_prog_egrep
7856  AC_SUBST([EGREP])
7857 ])])
7860 # AC_PATH_TOOL_PREFIX
7861 # -------------------
7862 # find a file program which can recognise shared library
7863 AC_DEFUN([AC_PATH_TOOL_PREFIX],
7864 [AC_REQUIRE([AC_PROG_EGREP])dnl
7865 AC_MSG_CHECKING([for $1])
7866 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7867 [case $MAGIC_CMD in
7868 [[\\/*] |  ?:[\\/]*])
7869   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7870   ;;
7872   lt_save_MAGIC_CMD="$MAGIC_CMD"
7873   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7874 dnl $ac_dummy forces splitting on constant user-supplied paths.
7875 dnl POSIX.2 word splitting is done only on the output of word expansions,
7876 dnl not every word.  This closes a longstanding sh security hole.
7877   ac_dummy="ifelse([$2], , $PATH, [$2])"
7878   for ac_dir in $ac_dummy; do
7879     IFS="$lt_save_ifs"
7880     test -z "$ac_dir" && ac_dir=.
7881     if test -f $ac_dir/$1; then
7882       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7883       if test -n "$file_magic_test_file"; then
7884         case $deplibs_check_method in
7885         "file_magic "*)
7886           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7887           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7888           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7889             $EGREP "$file_magic_regex" > /dev/null; then
7890             :
7891           else
7892             cat <<EOF 1>&2
7894 *** Warning: the command libtool uses to detect shared libraries,
7895 *** $file_magic_cmd, produces output that libtool cannot recognize.
7896 *** The result is that libtool may fail to recognize shared libraries
7897 *** as such.  This will affect the creation of libtool libraries that
7898 *** depend on shared libraries, but programs linked with such libtool
7899 *** libraries will work regardless of this problem.  Nevertheless, you
7900 *** may want to report the problem to your system manager and/or to
7901 *** bug-libtool@gnu.org
7904           fi ;;
7905         esac
7906       fi
7907       break
7908     fi
7909   done
7910   IFS="$lt_save_ifs"
7911   MAGIC_CMD="$lt_save_MAGIC_CMD"
7912   ;;
7913 esac])
7914 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7915 if test -n "$MAGIC_CMD"; then
7916   AC_MSG_RESULT($MAGIC_CMD)
7917 else
7918   AC_MSG_RESULT(no)
7920 ])# AC_PATH_TOOL_PREFIX
7923 # AC_PATH_MAGIC
7924 # -------------
7925 # find a file program which can recognise a shared library
7926 AC_DEFUN([AC_PATH_MAGIC],
7927 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7928 if test -z "$lt_cv_path_MAGIC_CMD"; then
7929   if test -n "$ac_tool_prefix"; then
7930     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7931   else
7932     MAGIC_CMD=:
7933   fi
7935 ])# AC_PATH_MAGIC
7938 # AC_PROG_LD
7939 # ----------
7940 # find the pathname to the GNU or non-GNU linker
7941 AC_DEFUN([AC_PROG_LD],
7942 [AC_ARG_WITH([gnu-ld],
7943     [AC_HELP_STRING([--with-gnu-ld],
7944         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
7945     [test "$withval" = no || with_gnu_ld=yes],
7946     [with_gnu_ld=no])
7947 AC_REQUIRE([LT_AC_PROG_SED])dnl
7948 AC_REQUIRE([AC_PROG_CC])dnl
7949 AC_REQUIRE([AC_CANONICAL_HOST])dnl
7950 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7951 ac_prog=ld
7952 if test "$GCC" = yes; then
7953   # Check if gcc -print-prog-name=ld gives a path.
7954   AC_MSG_CHECKING([for ld used by $CC])
7955   case $host in
7956   *-*-mingw*)
7957     # gcc leaves a trailing carriage return which upsets mingw
7958     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7959   *)
7960     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7961   esac
7962   case $ac_prog in
7963     # Accept absolute paths.
7964     [[\\/]]* | ?:[[\\/]]*)
7965       re_direlt='/[[^/]][[^/]]*/\.\./'
7966       # Canonicalize the pathname of ld
7967       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7968       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7969         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7970       done
7971       test -z "$LD" && LD="$ac_prog"
7972       ;;
7973   "")
7974     # If it fails, then pretend we aren't using GCC.
7975     ac_prog=ld
7976     ;;
7977   *)
7978     # If it is relative, then search for the first ld in PATH.
7979     with_gnu_ld=unknown
7980     ;;
7981   esac
7982 elif test "$with_gnu_ld" = yes; then
7983   AC_MSG_CHECKING([for GNU ld])
7984 else
7985   AC_MSG_CHECKING([for non-GNU ld])
7987 AC_CACHE_VAL(lt_cv_path_LD,
7988 [if test -z "$LD"; then
7989   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7990   for ac_dir in $PATH; do
7991     IFS="$lt_save_ifs"
7992     test -z "$ac_dir" && ac_dir=.
7993     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7994       lt_cv_path_LD="$ac_dir/$ac_prog"
7995       # Check to see if the program is GNU ld.  I'd rather use --version,
7996       # but apparently some GNU ld's only accept -v.
7997       # Break only if it was the GNU/non-GNU ld that we prefer.
7998       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7999       *GNU* | *'with BFD'*)
8000         test "$with_gnu_ld" != no && break
8001         ;;
8002       *)
8003         test "$with_gnu_ld" != yes && break
8004         ;;
8005       esac
8006     fi
8007   done
8008   IFS="$lt_save_ifs"
8009 else
8010   lt_cv_path_LD="$LD" # Let the user override the test with a path.
8011 fi])
8012 LD="$lt_cv_path_LD"
8013 if test -n "$LD"; then
8014   AC_MSG_RESULT($LD)
8015 else
8016   AC_MSG_RESULT(no)
8018 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8019 AC_PROG_LD_GNU
8020 ])# AC_PROG_LD
8023 # AC_PROG_LD_GNU
8024 # --------------
8025 AC_DEFUN([AC_PROG_LD_GNU],
8026 [AC_REQUIRE([AC_PROG_EGREP])dnl
8027 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
8028 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
8029 case `$LD -v 2>&1 </dev/null` in
8030 *GNU* | *'with BFD'*)
8031   lt_cv_prog_gnu_ld=yes
8032   ;;
8034   lt_cv_prog_gnu_ld=no
8035   ;;
8036 esac])
8037 with_gnu_ld=$lt_cv_prog_gnu_ld
8038 ])# AC_PROG_LD_GNU
8041 # AC_PROG_LD_RELOAD_FLAG
8042 # ----------------------
8043 # find reload flag for linker
8044 #   -- PORTME Some linkers may need a different reload flag.
8045 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
8046 [AC_CACHE_CHECK([for $LD option to reload object files],
8047   lt_cv_ld_reload_flag,
8048   [lt_cv_ld_reload_flag='-r'])
8049 reload_flag=$lt_cv_ld_reload_flag
8050 case $reload_flag in
8051 "" | " "*) ;;
8052 *) reload_flag=" $reload_flag" ;;
8053 esac
8054 reload_cmds='$LD$reload_flag -o $output$reload_objs'
8055 ])# AC_PROG_LD_RELOAD_FLAG
8058 # AC_DEPLIBS_CHECK_METHOD
8059 # -----------------------
8060 # how to check for library dependencies
8061 #  -- PORTME fill in with the dynamic library characteristics
8062 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
8063 [AC_CACHE_CHECK([how to recognise dependent libraries],
8064 lt_cv_deplibs_check_method,
8065 [lt_cv_file_magic_cmd='$MAGIC_CMD'
8066 lt_cv_file_magic_test_file=
8067 lt_cv_deplibs_check_method='unknown'
8068 # Need to set the preceding variable on all platforms that support
8069 # interlibrary dependencies.
8070 # 'none' -- dependencies not supported.
8071 # `unknown' -- same as none, but documents that we really don't know.
8072 # 'pass_all' -- all dependencies passed with no checks.
8073 # 'test_compile' -- check by making test program.
8074 # 'file_magic [[regex]]' -- check by looking for files in library path
8075 # which responds to the $file_magic_cmd with a given extended regex.
8076 # If you have `file' or equivalent on your system and you're not sure
8077 # whether `pass_all' will *always* work, you probably want this one.
8079 case $host_os in
8080 aix4* | aix5*)
8081   lt_cv_deplibs_check_method=pass_all
8082   ;;
8084 beos*)
8085   lt_cv_deplibs_check_method=pass_all
8086   ;;
8088 bsdi4*)
8089   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
8090   lt_cv_file_magic_cmd='/usr/bin/file -L'
8091   lt_cv_file_magic_test_file=/shlib/libc.so
8092   ;;
8094 cygwin*)
8095   lt_cv_deplibs_check_method=pass_all
8096   ;;
8097   
8098 mingw* | pw32*)
8099   # win32_libid is a shell function defined in ltmain.sh
8100   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8101   lt_cv_file_magic_cmd='win32_libid'
8102   ;;
8104 darwin* | rhapsody*)
8105   # this will be overwritten by pass_all, but leave it in just in case
8106   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
8107   lt_cv_file_magic_cmd='/usr/bin/file -L'
8108   case "$host_os" in
8109   rhapsody* | darwin1.[[012]])
8110     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
8111     ;;
8112   *) # Darwin 1.3 on
8113     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
8114     ;;
8115   esac
8116   lt_cv_deplibs_check_method=pass_all
8117   ;;
8119 freebsd* | kfreebsd*-gnu)
8120   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8121     case $host_cpu in
8122     i*86 )
8123       # Not sure whether the presence of OpenBSD here was a mistake.
8124       # Let's accept both of them until this is cleared up.
8125       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
8126       lt_cv_file_magic_cmd=/usr/bin/file
8127       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8128       ;;
8129     esac
8130   else
8131     lt_cv_deplibs_check_method=pass_all
8132   fi
8133   ;;
8135 gnu*)
8136   lt_cv_deplibs_check_method=pass_all
8137   ;;
8139 hpux10.20* | hpux11*)
8140   lt_cv_file_magic_cmd=/usr/bin/file
8141   case "$host_cpu" in
8142   ia64*)
8143     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
8144     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8145     ;;
8146   hppa*64*)
8147     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
8148     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8149     ;;
8150   *)
8151     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
8152     lt_cv_file_magic_test_file=/usr/lib/libc.sl
8153     ;;
8154   esac
8155   ;;
8157 irix5* | irix6* | nonstopux*)
8158   case $host_os in
8159   irix5* | nonstopux*)
8160     # this will be overridden with pass_all, but let us keep it just in case
8161     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
8162     ;;
8163   *)
8164     case $LD in
8165     *-32|*"-32 ") libmagic=32-bit;;
8166     *-n32|*"-n32 ") libmagic=N32;;
8167     *-64|*"-64 ") libmagic=64-bit;;
8168     *) libmagic=never-match;;
8169     esac
8170     # this will be overridden with pass_all, but let us keep it just in case
8171     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
8172     ;;
8173   esac
8174   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
8175   lt_cv_deplibs_check_method=pass_all
8176   ;;
8178 # This must be Linux ELF.
8179 linux*)
8180   case $host_cpu in
8181   alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
8182     lt_cv_deplibs_check_method=pass_all ;;
8183   # the debian people say, arm and glibc 2.3.1 works for them with pass_all
8184   arm* )
8185     lt_cv_deplibs_check_method=pass_all ;;
8186   *)
8187     # glibc up to 2.1.1 does not perform some relocations on ARM
8188     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
8189   esac
8190   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
8191   ;;
8193 netbsd*)
8194   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8195     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8196   else
8197     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
8198   fi
8199   ;;
8201 newos6*)
8202   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
8203   lt_cv_file_magic_cmd=/usr/bin/file
8204   lt_cv_file_magic_test_file=/usr/lib/libnls.so
8205   ;;
8207 nto-qnx*)
8208   lt_cv_deplibs_check_method=unknown
8209   ;;
8211 openbsd*)
8212   lt_cv_file_magic_cmd=/usr/bin/file
8213   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8214   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8215     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
8216   else
8217     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
8218   fi
8219   ;;
8221 osf3* | osf4* | osf5*)
8222   # this will be overridden with pass_all, but let us keep it just in case
8223   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
8224   lt_cv_file_magic_test_file=/shlib/libc.so
8225   lt_cv_deplibs_check_method=pass_all
8226   ;;
8228 sco3.2v5*)
8229   lt_cv_deplibs_check_method=pass_all
8230   ;;
8232 solaris*)
8233   lt_cv_deplibs_check_method=pass_all
8234   lt_cv_file_magic_test_file=/lib/libc.so
8235   ;;
8237 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8238   case $host_vendor in
8239   motorola)
8240     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]]'
8241     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8242     ;;
8243   ncr)
8244     lt_cv_deplibs_check_method=pass_all
8245     ;;
8246   sequent)
8247     lt_cv_file_magic_cmd='/bin/file'
8248     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8249     ;;
8250   sni)
8251     lt_cv_file_magic_cmd='/bin/file'
8252     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8253     lt_cv_file_magic_test_file=/lib/libc.so
8254     ;;
8255   siemens)
8256     lt_cv_deplibs_check_method=pass_all
8257     ;;
8258   esac
8259   ;;
8261 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
8262   lt_cv_deplibs_check_method=pass_all
8263   ;;
8264 esac
8266 file_magic_cmd=$lt_cv_file_magic_cmd
8267 deplibs_check_method=$lt_cv_deplibs_check_method
8268 test -z "$deplibs_check_method" && deplibs_check_method=unknown
8269 ])# AC_DEPLIBS_CHECK_METHOD
8272 # AC_PROG_NM
8273 # ----------
8274 # find the pathname to a BSD-compatible name lister
8275 AC_DEFUN([AC_PROG_NM],
8276 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8277 [if test -n "$NM"; then
8278   # Let the user override the test.
8279   lt_cv_path_NM="$NM"
8280 else
8281   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8282   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
8283     IFS="$lt_save_ifs"
8284     test -z "$ac_dir" && ac_dir=.
8285     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
8286     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8287       # Check to see if the nm accepts a BSD-compat flag.
8288       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
8289       #   nm: unknown option "B" ignored
8290       # Tru64's nm complains that /dev/null is an invalid object file
8291       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8292       */dev/null* | *'Invalid file or object type'*)
8293         lt_cv_path_NM="$tmp_nm -B"
8294         break
8295         ;;
8296       *)
8297         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8298         */dev/null*)
8299           lt_cv_path_NM="$tmp_nm -p"
8300           break
8301           ;;
8302         *)
8303           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8304           continue # so that we can try to find one that supports BSD flags
8305           ;;
8306         esac
8307       esac
8308     fi
8309   done
8310   IFS="$lt_save_ifs"
8311   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8312 fi])
8313 NM="$lt_cv_path_NM"
8314 ])# AC_PROG_NM
8317 # AC_CHECK_LIBM
8318 # -------------
8319 # check for math library
8320 AC_DEFUN([AC_CHECK_LIBM],
8321 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8322 LIBM=
8323 case $host in
8324 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8325   # These system don't have libm, or don't need it
8326   ;;
8327 *-ncr-sysv4.3*)
8328   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8329   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8330   ;;
8332   AC_CHECK_LIB(m, cos, LIBM="-lm")
8333   ;;
8334 esac
8335 ])# AC_CHECK_LIBM
8338 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8339 # -----------------------------------
8340 # sets LIBLTDL to the link flags for the libltdl convenience library and
8341 # LTDLINCL to the include flags for the libltdl header and adds
8342 # --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
8343 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
8344 # DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
8345 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
8346 # '${top_srcdir}/' (note the single quotes!).  If your package is not
8347 # flat and you're not using automake, define top_builddir and
8348 # top_srcdir appropriately in the Makefiles.
8349 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8350 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8351   case $enable_ltdl_convenience in
8352   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8353   "") enable_ltdl_convenience=yes
8354       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8355   esac
8356   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8357   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8358   # For backwards non-gettext consistent compatibility...
8359   INCLTDL="$LTDLINCL"
8360 ])# AC_LIBLTDL_CONVENIENCE
8363 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8364 # -----------------------------------
8365 # sets LIBLTDL to the link flags for the libltdl installable library and
8366 # LTDLINCL to the include flags for the libltdl header and adds
8367 # --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
8368 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
8369 # DIRECTORY is not provided and an installed libltdl is not found, it is
8370 # assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
8371 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8372 # quotes!).  If your package is not flat and you're not using automake,
8373 # define top_builddir and top_srcdir appropriately in the Makefiles.
8374 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8375 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8376 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8377   AC_CHECK_LIB(ltdl, lt_dlinit,
8378   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8379   [if test x"$enable_ltdl_install" = xno; then
8380      AC_MSG_WARN([libltdl not installed, but installation disabled])
8381    else
8382      enable_ltdl_install=yes
8383    fi
8384   ])
8385   if test x"$enable_ltdl_install" = x"yes"; then
8386     ac_configure_args="$ac_configure_args --enable-ltdl-install"
8387     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8388     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8389   else
8390     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8391     LIBLTDL="-lltdl"
8392     LTDLINCL=
8393   fi
8394   # For backwards non-gettext consistent compatibility...
8395   INCLTDL="$LTDLINCL"
8396 ])# AC_LIBLTDL_INSTALLABLE
8399 # AC_LIBTOOL_CXX
8400 # --------------
8401 # enable support for C++ libraries
8402 AC_DEFUN([AC_LIBTOOL_CXX],
8403 [AC_REQUIRE([_LT_AC_LANG_CXX])
8404 ])# AC_LIBTOOL_CXX
8407 # _LT_AC_LANG_CXX
8408 # ---------------
8409 AC_DEFUN([_LT_AC_LANG_CXX],
8410 [AC_REQUIRE([AC_PROG_CXX])
8411 AC_REQUIRE([AC_PROG_CXXCPP])
8412 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8413 ])# _LT_AC_LANG_CXX
8416 # AC_LIBTOOL_F77
8417 # --------------
8418 # enable support for Fortran 77 libraries
8419 AC_DEFUN([AC_LIBTOOL_F77],
8420 [AC_REQUIRE([_LT_AC_LANG_F77])
8421 ])# AC_LIBTOOL_F77
8424 # _LT_AC_LANG_F77
8425 # ---------------
8426 AC_DEFUN([_LT_AC_LANG_F77],
8427 [AC_REQUIRE([AC_PROG_F77])
8428 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8429 ])# _LT_AC_LANG_F77
8432 # AC_LIBTOOL_GCJ
8433 # --------------
8434 # enable support for GCJ libraries
8435 AC_DEFUN([AC_LIBTOOL_GCJ],
8436 [AC_REQUIRE([_LT_AC_LANG_GCJ])
8437 ])# AC_LIBTOOL_GCJ
8440 # _LT_AC_LANG_GCJ
8441 # ---------------
8442 AC_DEFUN([_LT_AC_LANG_GCJ],
8443 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8444   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8445     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8446       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8447          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8448            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8449 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8450 ])# _LT_AC_LANG_GCJ
8453 # AC_LIBTOOL_RC
8454 # --------------
8455 # enable support for Windows resource files
8456 AC_DEFUN([AC_LIBTOOL_RC],
8457 [AC_REQUIRE([LT_AC_PROG_RC])
8458 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8459 ])# AC_LIBTOOL_RC
8462 # AC_LIBTOOL_LANG_C_CONFIG
8463 # ------------------------
8464 # Ensure that the configuration vars for the C compiler are
8465 # suitably defined.  Those variables are subsequently used by
8466 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8467 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8468 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8469 [lt_save_CC="$CC"
8470 AC_LANG_PUSH(C)
8472 # Source file extension for C test sources.
8473 ac_ext=c
8475 # Object file extension for compiled C test sources.
8476 objext=o
8477 _LT_AC_TAGVAR(objext, $1)=$objext
8479 # Code to be used in simple compile tests
8480 lt_simple_compile_test_code="int some_variable = 0;\n"
8482 # Code to be used in simple link tests
8483 lt_simple_link_test_code='int main(){return(0);}\n'
8485 _LT_AC_SYS_COMPILER
8488 # Check for any special shared library compilation flags.
8490 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8491 if test "$GCC" = no; then
8492   case $host_os in
8493   sco3.2v5*)
8494     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8495     ;;
8496   esac
8498 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8499   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8500   if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
8501   else
8502     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8503     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8504   fi
8509 # Check to make sure the static flag actually works.
8511 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8512   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8513   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8514   [],
8515   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8518 ## CAVEAT EMPTOR:
8519 ## There is no encapsulation within the following macros, do not change
8520 ## the running order or otherwise move them around unless you know exactly
8521 ## what you are doing...
8522 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8523 AC_LIBTOOL_PROG_COMPILER_PIC($1)
8524 AC_LIBTOOL_PROG_CC_C_O($1)
8525 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8526 AC_LIBTOOL_PROG_LD_SHLIBS($1)
8527 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8528 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8529 AC_LIBTOOL_SYS_LIB_STRIP
8530 AC_LIBTOOL_DLOPEN_SELF($1)
8532 # Report which librarie types wil actually be built
8533 AC_MSG_CHECKING([if libtool supports shared libraries])
8534 AC_MSG_RESULT([$can_build_shared])
8536 AC_MSG_CHECKING([whether to build shared libraries])
8537 test "$can_build_shared" = "no" && enable_shared=no
8539 # On AIX, shared libraries and static libraries use the same namespace, and
8540 # are all built from PIC.
8541 case "$host_os" in
8542 aix3*)
8543   test "$enable_shared" = yes && enable_static=no
8544   if test -n "$RANLIB"; then
8545     archive_cmds="$archive_cmds~\$RANLIB \$lib"
8546     postinstall_cmds='$RANLIB $lib'
8547   fi
8548   ;;
8550 aix4*)
8551   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8552     test "$enable_shared" = yes && enable_static=no
8553   fi
8554   ;;
8555   darwin* | rhapsody*)
8556   if test "$GCC" = yes; then
8557     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8558     case "$host_os" in
8559     rhapsody* | darwin1.[[012]])
8560       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8561       ;;
8562     *) # Darwin 1.3 on
8563       if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8564         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8565       else
8566         case ${MACOSX_DEPLOYMENT_TARGET} in
8567           10.[012])
8568             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8569             ;;
8570           10.*)
8571             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8572             ;;
8573         esac
8574       fi
8575       ;;
8576     esac
8577     output_verbose_link_cmd='echo'
8578     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8579     _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8580     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8581     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8582     _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8583     _LT_AC_TAGVAR(hardcode_direct, $1)=no
8584     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8585     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8586     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8587     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8588   else
8589     _LT_AC_TAGVAR(ld_shlibs, $1)=no
8590   fi  
8591     ;;  
8592 esac
8593 AC_MSG_RESULT([$enable_shared])
8595 AC_MSG_CHECKING([whether to build static libraries])
8596 # Make sure either enable_shared or enable_static is yes.
8597 test "$enable_shared" = yes || enable_static=yes
8598 AC_MSG_RESULT([$enable_static])
8600 AC_LIBTOOL_CONFIG($1)
8602 AC_LANG_POP
8603 CC="$lt_save_CC"
8604 ])# AC_LIBTOOL_LANG_C_CONFIG
8607 # AC_LIBTOOL_LANG_CXX_CONFIG
8608 # --------------------------
8609 # Ensure that the configuration vars for the C compiler are
8610 # suitably defined.  Those variables are subsequently used by
8611 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8612 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8613 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8614 [AC_LANG_PUSH(C++)
8615 AC_REQUIRE([AC_PROG_CXX])
8616 AC_REQUIRE([AC_PROG_CXXCPP])
8618 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8619 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8620 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8621 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8622 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8623 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8624 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8626 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8627 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8628 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
8629 _LT_AC_TAGVAR(module_cmds, $1)=
8630 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
8631 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8632 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8633 _LT_AC_TAGVAR(no_undefined_flag, $1)=
8634 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8635 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8637 # Dependencies to place before and after the object being linked:
8638 _LT_AC_TAGVAR(predep_objects, $1)=
8639 _LT_AC_TAGVAR(postdep_objects, $1)=
8640 _LT_AC_TAGVAR(predeps, $1)=
8641 _LT_AC_TAGVAR(postdeps, $1)=
8642 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8644 # Source file extension for C++ test sources.
8645 ac_ext=cc
8647 # Object file extension for compiled C++ test sources.
8648 objext=o
8649 _LT_AC_TAGVAR(objext, $1)=$objext
8651 # Code to be used in simple compile tests
8652 lt_simple_compile_test_code="int some_variable = 0;\n"
8654 # Code to be used in simple link tests
8655 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8657 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8658 _LT_AC_SYS_COMPILER
8660 # Allow CC to be a program name with arguments.
8661 lt_save_CC=$CC
8662 lt_save_LD=$LD
8663 lt_save_GCC=$GCC
8664 GCC=$GXX
8665 lt_save_with_gnu_ld=$with_gnu_ld
8666 lt_save_path_LD=$lt_cv_path_LD
8667 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8668   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8669 else
8670   unset lt_cv_prog_gnu_ld
8672 if test -n "${lt_cv_path_LDCXX+set}"; then
8673   lt_cv_path_LD=$lt_cv_path_LDCXX
8674 else
8675   unset lt_cv_path_LD
8677 test -z "${LDCXX+set}" || LD=$LDCXX
8678 CC=${CXX-"c++"}
8679 compiler=$CC
8680 _LT_AC_TAGVAR(compiler, $1)=$CC
8681 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8683 # We don't want -fno-exception wen compiling C++ code, so set the
8684 # no_builtin_flag separately
8685 if test "$GXX" = yes; then
8686   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8687 else
8688   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8691 if test "$GXX" = yes; then
8692   # Set up default GNU C++ configuration
8694   AC_PROG_LD
8696   # Check if GNU C++ uses GNU ld as the underlying linker, since the
8697   # archiving commands below assume that GNU ld is being used.
8698   if test "$with_gnu_ld" = yes; then
8699     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8700     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8702     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8703     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8705     # If archive_cmds runs LD, not CC, wlarc should be empty
8706     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8707     #     investigate it a little bit more. (MM)
8708     wlarc='${wl}'
8710     # ancient GNU ld didn't support --whole-archive et. al.
8711     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8712         grep 'no-whole-archive' > /dev/null; then
8713       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8714     else
8715       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8716     fi
8717   else
8718     with_gnu_ld=no
8719     wlarc=
8721     # A generic and very simple default shared library creation
8722     # command for GNU C++ for the case where it uses the native
8723     # linker, instead of GNU ld.  If possible, this setting should
8724     # overridden to take advantage of the native linker features on
8725     # the platform it is being used on.
8726     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8727   fi
8729   # Commands to make compiler produce verbose output that lists
8730   # what "hidden" libraries, object files and flags are used when
8731   # linking a shared library.
8732   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8734 else
8735   GXX=no
8736   with_gnu_ld=no
8737   wlarc=
8740 # PORTME: fill in a description of your system's C++ link characteristics
8741 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8742 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8743 case $host_os in
8744   aix3*)
8745     # FIXME: insert proper C++ library support
8746     _LT_AC_TAGVAR(ld_shlibs, $1)=no
8747     ;;
8748   aix4* | aix5*)
8749     if test "$host_cpu" = ia64; then
8750       # On IA64, the linker does run time linking by default, so we don't
8751       # have to do anything special.
8752       aix_use_runtimelinking=no
8753       exp_sym_flag='-Bexport'
8754       no_entry_flag=""
8755     else
8756       # KDE requires run time linking.  Make it the default.
8757       aix_use_runtimelinking=yes
8758       exp_sym_flag='-bexport'
8759       no_entry_flag='-bnoentry'
8760     fi
8762     # When large executables or shared objects are built, AIX ld can
8763     # have problems creating the table of contents.  If linking a library
8764     # or program results in "error TOC overflow" add -mminimal-toc to
8765     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8766     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8768     _LT_AC_TAGVAR(archive_cmds, $1)=''
8769     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8770     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8771     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8773     if test "$GXX" = yes; then
8774       case $host_os in aix4.[012]|aix4.[012].*)
8775       # We only want to do this on AIX 4.2 and lower, the check
8776       # below for broken collect2 doesn't work under 4.3+
8777         collect2name=`${CC} -print-prog-name=collect2`
8778         if test -f "$collect2name" && \
8779            strings "$collect2name" | grep resolve_lib_name >/dev/null
8780         then
8781           # We have reworked collect2
8782           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8783         else
8784           # We have old collect2
8785           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8786           # It fails to find uninstalled libraries when the uninstalled
8787           # path is not listed in the libpath.  Setting hardcode_minus_L
8788           # to unsupported forces relinking
8789           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8790           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8791           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8792         fi
8793       esac
8794       shared_flag='-shared'
8795     else
8796       # not using gcc
8797       if test "$host_cpu" = ia64; then
8798         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8799         # chokes on -Wl,-G. The following line is correct:
8800         shared_flag='-G'
8801       else
8802         if test "$aix_use_runtimelinking" = yes; then
8803           shared_flag='-qmkshrobj ${wl}-G'
8804         else
8805           shared_flag='-qmkshrobj'
8806         fi
8807       fi
8808     fi
8810     # Let the compiler handle the export list.
8811     _LT_AC_TAGVAR(always_export_symbols, $1)=no
8812     if test "$aix_use_runtimelinking" = yes; then
8813       # Warning - without using the other runtime loading flags (-brtl),
8814       # -berok will link without error, but may produce a broken library.
8815       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8816       # Determine the default libpath from the value encoded in an empty executable.
8817       _LT_AC_SYS_LIBPATH_AIX
8818       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8820       _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8821       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8822      else
8823       if test "$host_cpu" = ia64; then
8824         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8825         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8826         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8827       else
8828         # Determine the default libpath from the value encoded in an empty executable.
8829         _LT_AC_SYS_LIBPATH_AIX
8830         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8831         # Warning - without using the other run time loading flags,
8832         # -berok will link without error, but may produce a broken library.
8833         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8834         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8835         # -bexpall does not export symbols beginning with underscore (_)
8836         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8837         # Exported symbols can be pulled into shared objects from archives
8838         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8839         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8840         # This is similar to how AIX traditionally builds it's shared libraries.
8841         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8842       fi
8843     fi
8844     ;;
8845   chorus*)
8846     case $cc_basename in
8847       *)
8848         # FIXME: insert proper C++ library support
8849         _LT_AC_TAGVAR(ld_shlibs, $1)=no
8850         ;;
8851     esac
8852     ;;
8854   cygwin* | mingw* | pw32*)
8855     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8856     # as there is no search path for DLLs.
8857     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8858     _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8859     _LT_AC_TAGVAR(always_export_symbols, $1)=no
8860     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8862     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8863       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8864       # If the export-symbols file already is a .def file (1st line
8865       # is EXPORTS), use it as is; otherwise, prepend...
8866       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8867         cp $export_symbols $output_objdir/$soname.def;
8868       else
8869         echo EXPORTS > $output_objdir/$soname.def;
8870         cat $export_symbols >> $output_objdir/$soname.def;
8871       fi~
8872       $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8873     else
8874       _LT_AC_TAGVAR(ld_shlibs, $1)=no
8875     fi
8876   ;;
8878   darwin* | rhapsody*)
8879   if test "$GXX" = yes; then
8880     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8881     case "$host_os" in
8882     rhapsody* | darwin1.[[012]])
8883       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8884       ;;
8885     *) # Darwin 1.3 on
8886       if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8887         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8888       else
8889         case ${MACOSX_DEPLOYMENT_TARGET} in
8890           10.[012])
8891             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8892             ;;
8893           10.*)
8894             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8895             ;;
8896         esac
8897       fi
8898       ;;
8899     esac
8900     lt_int_apple_cc_single_mod=no
8901     output_verbose_link_cmd='echo'
8902     if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8903       lt_int_apple_cc_single_mod=yes
8904     fi
8905     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8906       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8907     else
8908       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8909     fi
8910     _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8912     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8913     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8914       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8915     else
8916       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8917     fi
8918     _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8919     _LT_AC_TAGVAR(hardcode_direct, $1)=no
8920     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8921     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8922     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8923     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8924   else
8925     _LT_AC_TAGVAR(ld_shlibs, $1)=no
8926   fi
8927     ;;
8929   dgux*)
8930     case $cc_basename in
8931       ec++)
8932         # FIXME: insert proper C++ library support
8933         _LT_AC_TAGVAR(ld_shlibs, $1)=no
8934         ;;
8935       ghcx)
8936         # Green Hills C++ Compiler
8937         # FIXME: insert proper C++ library support
8938         _LT_AC_TAGVAR(ld_shlibs, $1)=no
8939         ;;
8940       *)
8941         # FIXME: insert proper C++ library support
8942         _LT_AC_TAGVAR(ld_shlibs, $1)=no
8943         ;;
8944     esac
8945     ;;
8946   freebsd[12]*)
8947     # C++ shared libraries reported to be fairly broken before switch to ELF
8948     _LT_AC_TAGVAR(ld_shlibs, $1)=no
8949     ;;
8950   freebsd-elf*)
8951     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8952     ;;
8953   freebsd* | kfreebsd*-gnu)
8954     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8955     # conventions
8956     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8957     ;;
8958   gnu*)
8959     ;;
8960   hpux9*)
8961     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8962     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8963     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8964     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8965     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8966                                 # but as the default
8967                                 # location of the library.
8969     case $cc_basename in
8970     CC)
8971       # FIXME: insert proper C++ library support
8972       _LT_AC_TAGVAR(ld_shlibs, $1)=no
8973       ;;
8974     aCC)
8975       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8976       # Commands to make compiler produce verbose output that lists
8977       # what "hidden" libraries, object files and flags are used when
8978       # linking a shared library.
8979       #
8980       # There doesn't appear to be a way to prevent this compiler from
8981       # explicitly linking system object files so we need to strip them
8982       # from the output so that they don't get included in the library
8983       # dependencies.
8984       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'
8985       ;;
8986     *)
8987       if test "$GXX" = yes; then
8988         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8989       else
8990         # FIXME: insert proper C++ library support
8991         _LT_AC_TAGVAR(ld_shlibs, $1)=no
8992       fi
8993       ;;
8994     esac
8995     ;;
8996   hpux10*|hpux11*)
8997     if test $with_gnu_ld = no; then
8998       case "$host_cpu" in
8999       hppa*64*)
9000         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9001         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
9002         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9003         ;;
9004       ia64*)
9005         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9006         ;;
9007       *)
9008         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9009         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9010         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9011         ;;
9012       esac
9013     fi
9014     case "$host_cpu" in
9015     hppa*64*)
9016       _LT_AC_TAGVAR(hardcode_direct, $1)=no
9017       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9018       ;;
9019     ia64*)
9020       _LT_AC_TAGVAR(hardcode_direct, $1)=no
9021       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9022       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9023                                               # but as the default
9024                                               # location of the library.
9025       ;;
9026     *)
9027       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9028       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9029                                               # but as the default
9030                                               # location of the library.
9031       ;;
9032     esac
9034     case $cc_basename in
9035       CC)
9036         # FIXME: insert proper C++ library support
9037         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9038         ;;
9039       aCC)
9040         case "$host_cpu" in
9041         hppa*64*|ia64*)
9042           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
9043           ;;
9044         *)
9045           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9046           ;;
9047         esac
9048         # Commands to make compiler produce verbose output that lists
9049         # what "hidden" libraries, object files and flags are used when
9050         # linking a shared library.
9051         #
9052         # There doesn't appear to be a way to prevent this compiler from
9053         # explicitly linking system object files so we need to strip them
9054         # from the output so that they don't get included in the library
9055         # dependencies.
9056         output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9057         ;;
9058       *)
9059         if test "$GXX" = yes; then
9060           if test $with_gnu_ld = no; then
9061             case "$host_cpu" in
9062             ia64*|hppa*64*)
9063               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
9064               ;;
9065             *)
9066               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9067               ;;
9068             esac
9069           fi
9070         else
9071           # FIXME: insert proper C++ library support
9072           _LT_AC_TAGVAR(ld_shlibs, $1)=no
9073         fi
9074         ;;
9075     esac
9076     ;;
9077   irix5* | irix6*)
9078     case $cc_basename in
9079       CC)
9080         # SGI C++
9081         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9083         # Archives containing C++ object files must be created using
9084         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
9085         # necessary to make sure instantiated templates are included
9086         # in the archive.
9087         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9088         ;;
9089       *)
9090         if test "$GXX" = yes; then
9091           if test "$with_gnu_ld" = no; then
9092             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9093           else
9094             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
9095           fi
9096         fi
9097         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9098         ;;
9099     esac
9100     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9101     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9102     ;;
9103   linux*)
9104     case $cc_basename in
9105       KCC)
9106         # Kuck and Associates, Inc. (KAI) C++ Compiler
9108         # KCC will only create a shared library if the output file
9109         # ends with ".so" (or ".sl" for HP-UX), so rename the library
9110         # to its proper name (with version) after linking.
9111         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9112         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
9113         # Commands to make compiler produce verbose output that lists
9114         # what "hidden" libraries, object files and flags are used when
9115         # linking a shared library.
9116         #
9117         # There doesn't appear to be a way to prevent this compiler from
9118         # explicitly linking system object files so we need to strip them
9119         # from the output so that they don't get included in the library
9120         # dependencies.
9121         output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9123         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
9124         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9126         # Archives containing C++ object files must be created using
9127         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9128         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9129         ;;
9130       icpc)
9131         # Intel C++
9132         with_gnu_ld=yes
9133         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9134         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
9135         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9136         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9137         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9138         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9139         ;;
9140       cxx)
9141         # Compaq C++
9142         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
9143         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
9145         runpath_var=LD_RUN_PATH
9146         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9147         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9149         # Commands to make compiler produce verbose output that lists
9150         # what "hidden" libraries, object files and flags are used when
9151         # linking a shared library.
9152         #
9153         # There doesn't appear to be a way to prevent this compiler from
9154         # explicitly linking system object files so we need to strip them
9155         # from the output so that they don't get included in the library
9156         # dependencies.
9157         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'
9158         ;;
9159     esac
9160     ;;
9161   lynxos*)
9162     # FIXME: insert proper C++ library support
9163     _LT_AC_TAGVAR(ld_shlibs, $1)=no
9164     ;;
9165   m88k*)
9166     # FIXME: insert proper C++ library support
9167     _LT_AC_TAGVAR(ld_shlibs, $1)=no
9168     ;;
9169   mvs*)
9170     case $cc_basename in
9171       cxx)
9172         # FIXME: insert proper C++ library support
9173         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9174         ;;
9175       *)
9176         # FIXME: insert proper C++ library support
9177         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9178         ;;
9179     esac
9180     ;;
9181   netbsd*)
9182     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9183       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9184       wlarc=
9185       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9186       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
9187       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9188     fi
9189     # Workaround some broken pre-1.5 toolchains
9190     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9191     ;;
9192   osf3*)
9193     case $cc_basename in
9194       KCC)
9195         # Kuck and Associates, Inc. (KAI) C++ Compiler
9197         # KCC will only create a shared library if the output file
9198         # ends with ".so" (or ".sl" for HP-UX), so rename the library
9199         # to its proper name (with version) after linking.
9200         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9202         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9203         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9205         # Archives containing C++ object files must be created using
9206         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9207         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9209         ;;
9210       RCC)
9211         # Rational C++ 2.4.1
9212         # FIXME: insert proper C++ library support
9213         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9214         ;;
9215       cxx)
9216         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9217         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9219         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9220         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9222         # Commands to make compiler produce verbose output that lists
9223         # what "hidden" libraries, object files and flags are used when
9224         # linking a shared library.
9225         #
9226         # There doesn't appear to be a way to prevent this compiler from
9227         # explicitly linking system object files so we need to strip them
9228         # from the output so that they don't get included in the library
9229         # dependencies.
9230         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'
9231         ;;
9232       *)
9233         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9234           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9235           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9237           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9238           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9240           # Commands to make compiler produce verbose output that lists
9241           # what "hidden" libraries, object files and flags are used when
9242           # linking a shared library.
9243           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9245         else
9246           # FIXME: insert proper C++ library support
9247           _LT_AC_TAGVAR(ld_shlibs, $1)=no
9248         fi
9249         ;;
9250     esac
9251     ;;
9252   osf4* | osf5*)
9253     case $cc_basename in
9254       KCC)
9255         # Kuck and Associates, Inc. (KAI) C++ Compiler
9257         # KCC will only create a shared library if the output file
9258         # ends with ".so" (or ".sl" for HP-UX), so rename the library
9259         # to its proper name (with version) after linking.
9260         _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9262         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9263         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9265         # Archives containing C++ object files must be created using
9266         # the KAI C++ compiler.
9267         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9268         ;;
9269       RCC)
9270         # Rational C++ 2.4.1
9271         # FIXME: insert proper C++ library support
9272         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9273         ;;
9274       cxx)
9275         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9276         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9277         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9278           echo "-hidden">> $lib.exp~
9279           $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
9280           $rm $lib.exp'
9282         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9283         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9285         # Commands to make compiler produce verbose output that lists
9286         # what "hidden" libraries, object files and flags are used when
9287         # linking a shared library.
9288         #
9289         # There doesn't appear to be a way to prevent this compiler from
9290         # explicitly linking system object files so we need to strip them
9291         # from the output so that they don't get included in the library
9292         # dependencies.
9293         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'
9294         ;;
9295       *)
9296         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9297           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9298          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9300           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9301           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9303           # Commands to make compiler produce verbose output that lists
9304           # what "hidden" libraries, object files and flags are used when
9305           # linking a shared library.
9306           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9308         else
9309           # FIXME: insert proper C++ library support
9310           _LT_AC_TAGVAR(ld_shlibs, $1)=no
9311         fi
9312         ;;
9313     esac
9314     ;;
9315   psos*)
9316     # FIXME: insert proper C++ library support
9317     _LT_AC_TAGVAR(ld_shlibs, $1)=no
9318     ;;
9319   sco*)
9320     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9321     case $cc_basename in
9322       CC)
9323         # FIXME: insert proper C++ library support
9324         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9325         ;;
9326       *)
9327         # FIXME: insert proper C++ library support
9328         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9329         ;;
9330     esac
9331     ;;
9332   sunos4*)
9333     case $cc_basename in
9334       CC)
9335         # Sun C++ 4.x
9336         # FIXME: insert proper C++ library support
9337         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9338         ;;
9339       lcc)
9340         # Lucid
9341         # FIXME: insert proper C++ library support
9342         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9343         ;;
9344       *)
9345         # FIXME: insert proper C++ library support
9346         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9347         ;;
9348     esac
9349     ;;
9350   solaris*)
9351     case $cc_basename in
9352       CC)
9353         # Sun C++ 4.2, 5.x and Centerline C++
9354         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9355         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9356         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9357         $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9359         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9360         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9361         case $host_os in
9362           solaris2.[0-5] | solaris2.[0-5].*) ;;
9363           *)
9364             # The C++ compiler is used as linker so we must use $wl
9365             # flag to pass the commands to the underlying system
9366             # linker.
9367             # Supported since Solaris 2.6 (maybe 2.5.1?)
9368             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9369             ;;
9370         esac
9371         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9373         # Commands to make compiler produce verbose output that lists
9374         # what "hidden" libraries, object files and flags are used when
9375         # linking a shared library.
9376         #
9377         # There doesn't appear to be a way to prevent this compiler from
9378         # explicitly linking system object files so we need to strip them
9379         # from the output so that they don't get included in the library
9380         # dependencies.
9381         output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9383         # Archives containing C++ object files must be created using
9384         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9385         # necessary to make sure instantiated templates are included
9386         # in the archive.
9387         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9388         ;;
9389       gcx)
9390         # Green Hills C++ Compiler
9391         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9393         # The C++ compiler must be used to create the archive.
9394         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9395         ;;
9396       *)
9397         # GNU C++ compiler with Solaris linker
9398         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9399           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9400           if $CC --version | grep -v '^2\.7' > /dev/null; then
9401             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9402             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9403                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9405             # Commands to make compiler produce verbose output that lists
9406             # what "hidden" libraries, object files and flags are used when
9407             # linking a shared library.
9408             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9409           else
9410             # g++ 2.7 appears to require `-G' NOT `-shared' on this
9411             # platform.
9412             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9413             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9414                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9416             # Commands to make compiler produce verbose output that lists
9417             # what "hidden" libraries, object files and flags are used when
9418             # linking a shared library.
9419             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9420           fi
9422           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9423         fi
9424         ;;
9425     esac
9426     ;;
9427   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9428     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9429     ;;
9430   tandem*)
9431     case $cc_basename in
9432       NCC)
9433         # NonStop-UX NCC 3.20
9434         # FIXME: insert proper C++ library support
9435         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9436         ;;
9437       *)
9438         # FIXME: insert proper C++ library support
9439         _LT_AC_TAGVAR(ld_shlibs, $1)=no
9440         ;;
9441     esac
9442     ;;
9443   vxworks*)
9444     # FIXME: insert proper C++ library support
9445     _LT_AC_TAGVAR(ld_shlibs, $1)=no
9446     ;;
9447   *)
9448     # FIXME: insert proper C++ library support
9449     _LT_AC_TAGVAR(ld_shlibs, $1)=no
9450     ;;
9451 esac
9452 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9453 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9455 _LT_AC_TAGVAR(GCC, $1)="$GXX"
9456 _LT_AC_TAGVAR(LD, $1)="$LD"
9458 ## CAVEAT EMPTOR:
9459 ## There is no encapsulation within the following macros, do not change
9460 ## the running order or otherwise move them around unless you know exactly
9461 ## what you are doing...
9462 AC_LIBTOOL_POSTDEP_PREDEP($1)
9463 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9464 AC_LIBTOOL_PROG_CC_C_O($1)
9465 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9466 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9467 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9468 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9469 AC_LIBTOOL_SYS_LIB_STRIP
9470 AC_LIBTOOL_DLOPEN_SELF($1)
9472 AC_LIBTOOL_CONFIG($1)
9474 AC_LANG_POP
9475 CC=$lt_save_CC
9476 LDCXX=$LD
9477 LD=$lt_save_LD
9478 GCC=$lt_save_GCC
9479 with_gnu_ldcxx=$with_gnu_ld
9480 with_gnu_ld=$lt_save_with_gnu_ld
9481 lt_cv_path_LDCXX=$lt_cv_path_LD
9482 lt_cv_path_LD=$lt_save_path_LD
9483 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9484 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9485 ])# AC_LIBTOOL_LANG_CXX_CONFIG
9487 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9488 # ------------------------
9489 # Figure out "hidden" library dependencies from verbose
9490 # compiler output when linking a shared library.
9491 # Parse the compiler output and extract the necessary
9492 # objects, libraries and library flags.
9493 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9494 dnl we can't use the lt_simple_compile_test_code here,
9495 dnl because it contains code intended for an executable,
9496 dnl not a library.  It's possible we should let each
9497 dnl tag define a new lt_????_link_test_code variable,
9498 dnl but it's only used here...
9499 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9500 int a;
9501 void foo (void) { a = 0; }
9503 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9504 class Foo
9506 public:
9507   Foo (void) { a = 0; }
9508 private:
9509   int a;
9512 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9513       subroutine foo
9514       implicit none
9515       integer*4 a
9516       a=0
9517       return
9518       end
9520 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9521 public class foo {
9522   private int a;
9523   public void bar (void) {
9524     a = 0;
9525   }
9529 dnl Parse the compiler output and extract the necessary
9530 dnl objects, libraries and library flags.
9531 if AC_TRY_EVAL(ac_compile); then
9532   # Parse the compiler output and extract the necessary
9533   # objects, libraries and library flags.
9535   # Sentinel used to keep track of whether or not we are before
9536   # the conftest object file.
9537   pre_test_object_deps_done=no
9539   # The `*' in the case matches for architectures that use `case' in
9540   # $output_verbose_cmd can trigger glob expansion during the loop
9541   # eval without this substitution.
9542   output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9544   for p in `eval $output_verbose_link_cmd`; do
9545     case $p in
9547     -L* | -R* | -l*)
9548        # Some compilers place space between "-{L,R}" and the path.
9549        # Remove the space.
9550        if test $p = "-L" \
9551           || test $p = "-R"; then
9552          prev=$p
9553          continue
9554        else
9555          prev=
9556        fi
9558        if test "$pre_test_object_deps_done" = no; then
9559          case $p in
9560          -L* | -R*)
9561            # Internal compiler library paths should come after those
9562            # provided the user.  The postdeps already come after the
9563            # user supplied libs so there is no need to process them.
9564            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9565              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9566            else
9567              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9568            fi
9569            ;;
9570          # The "-l" case would never come before the object being
9571          # linked, so don't bother handling this case.
9572          esac
9573        else
9574          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9575            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9576          else
9577            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9578          fi
9579        fi
9580        ;;
9582     *.$objext|*.$libext)
9583        # This assumes that the test object file only shows up
9584        # once in the compiler output.
9585        if test "$p" = "conftest.$objext"; then
9586          pre_test_object_deps_done=yes
9587          continue
9588        fi
9590        if test "$pre_test_object_deps_done" = no; then
9591          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9592            _LT_AC_TAGVAR(predep_objects, $1)="$p"
9593          else
9594            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9595          fi
9596        else
9597          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9598            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
9599          else
9600            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9601          fi
9602        fi
9603        ;;
9605     *) ;; # Ignore the rest.
9607     esac
9608   done
9610   # Clean up.
9611   rm -f a.out a.exe
9612 else
9613   echo "libtool.m4: error: problem compiling $1 test program"
9616 $rm -f confest.$objext
9618 case " $_LT_AC_TAGVAR(postdeps, $1) " in
9619 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9620 esac
9621 ])# AC_LIBTOOL_POSTDEP_PREDEP
9623 # AC_LIBTOOL_LANG_F77_CONFIG
9624 # ------------------------
9625 # Ensure that the configuration vars for the C compiler are
9626 # suitably defined.  Those variables are subsequently used by
9627 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9628 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9629 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9630 [AC_REQUIRE([AC_PROG_F77])
9631 AC_LANG_PUSH(Fortran 77)
9633 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9634 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
9635 _LT_AC_TAGVAR(always_export_symbols, $1)=no
9636 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9637 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9638 _LT_AC_TAGVAR(hardcode_direct, $1)=no
9639 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9640 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9641 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9642 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9643 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
9644 _LT_AC_TAGVAR(module_cmds, $1)=
9645 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
9646 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9647 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9648 _LT_AC_TAGVAR(no_undefined_flag, $1)=
9649 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9650 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9652 # Source file extension for f77 test sources.
9653 ac_ext=f
9655 # Object file extension for compiled f77 test sources.
9656 objext=o
9657 _LT_AC_TAGVAR(objext, $1)=$objext
9659 # Code to be used in simple compile tests
9660 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
9662 # Code to be used in simple link tests
9663 lt_simple_link_test_code="      program t\n      end\n"
9665 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9666 _LT_AC_SYS_COMPILER
9668 # Allow CC to be a program name with arguments.
9669 lt_save_CC="$CC"
9670 CC=${F77-"f77"}
9671 compiler=$CC
9672 _LT_AC_TAGVAR(compiler, $1)=$CC
9673 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9675 AC_MSG_CHECKING([if libtool supports shared libraries])
9676 AC_MSG_RESULT([$can_build_shared])
9678 AC_MSG_CHECKING([whether to build shared libraries])
9679 test "$can_build_shared" = "no" && enable_shared=no
9681 # On AIX, shared libraries and static libraries use the same namespace, and
9682 # are all built from PIC.
9683 case "$host_os" in
9684 aix3*)
9685   test "$enable_shared" = yes && enable_static=no
9686   if test -n "$RANLIB"; then
9687     archive_cmds="$archive_cmds~\$RANLIB \$lib"
9688     postinstall_cmds='$RANLIB $lib'
9689   fi
9690   ;;
9691 aix4*)
9692   test "$enable_shared" = yes && enable_static=no
9693   ;;
9694 esac
9695 AC_MSG_RESULT([$enable_shared])
9697 AC_MSG_CHECKING([whether to build static libraries])
9698 # Make sure either enable_shared or enable_static is yes.
9699 test "$enable_shared" = yes || enable_static=yes
9700 AC_MSG_RESULT([$enable_static])
9702 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9704 _LT_AC_TAGVAR(GCC, $1)="$G77"
9705 _LT_AC_TAGVAR(LD, $1)="$LD"
9707 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9708 AC_LIBTOOL_PROG_CC_C_O($1)
9709 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9710 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9711 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9712 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9713 AC_LIBTOOL_SYS_LIB_STRIP
9716 AC_LIBTOOL_CONFIG($1)
9718 AC_LANG_POP
9719 CC="$lt_save_CC"
9720 ])# AC_LIBTOOL_LANG_F77_CONFIG
9723 # AC_LIBTOOL_LANG_GCJ_CONFIG
9724 # --------------------------
9725 # Ensure that the configuration vars for the C compiler are
9726 # suitably defined.  Those variables are subsequently used by
9727 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9728 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9729 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9730 [AC_LANG_SAVE
9732 # Source file extension for Java test sources.
9733 ac_ext=java
9735 # Object file extension for compiled Java test sources.
9736 objext=o
9737 _LT_AC_TAGVAR(objext, $1)=$objext
9739 # Code to be used in simple compile tests
9740 lt_simple_compile_test_code="class foo {}\n"
9742 # Code to be used in simple link tests
9743 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9745 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9746 _LT_AC_SYS_COMPILER
9748 # Allow CC to be a program name with arguments.
9749 lt_save_CC="$CC"
9750 CC=${GCJ-"gcj"}
9751 compiler=$CC
9752 _LT_AC_TAGVAR(compiler, $1)=$CC
9754 # GCJ did not exist at the time GCC didn't implicitly link libc in.
9755 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9757 ## CAVEAT EMPTOR:
9758 ## There is no encapsulation within the following macros, do not change
9759 ## the running order or otherwise move them around unless you know exactly
9760 ## what you are doing...
9761 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9762 AC_LIBTOOL_PROG_COMPILER_PIC($1)
9763 AC_LIBTOOL_PROG_CC_C_O($1)
9764 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9765 AC_LIBTOOL_PROG_LD_SHLIBS($1)
9766 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9767 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9768 AC_LIBTOOL_SYS_LIB_STRIP
9769 AC_LIBTOOL_DLOPEN_SELF($1)
9771 AC_LIBTOOL_CONFIG($1)
9773 AC_LANG_RESTORE
9774 CC="$lt_save_CC"
9775 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
9778 # AC_LIBTOOL_LANG_RC_CONFIG
9779 # --------------------------
9780 # Ensure that the configuration vars for the Windows resource compiler are
9781 # suitably defined.  Those variables are subsequently used by
9782 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9783 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9784 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9785 [AC_LANG_SAVE
9787 # Source file extension for RC test sources.
9788 ac_ext=rc
9790 # Object file extension for compiled RC test sources.
9791 objext=o
9792 _LT_AC_TAGVAR(objext, $1)=$objext
9794 # Code to be used in simple compile tests
9795 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9797 # Code to be used in simple link tests
9798 lt_simple_link_test_code="$lt_simple_compile_test_code"
9800 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9801 _LT_AC_SYS_COMPILER
9803 # Allow CC to be a program name with arguments.
9804 lt_save_CC="$CC"
9805 CC=${RC-"windres"}
9806 compiler=$CC
9807 _LT_AC_TAGVAR(compiler, $1)=$CC
9808 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9810 AC_LIBTOOL_CONFIG($1)
9812 AC_LANG_RESTORE
9813 CC="$lt_save_CC"
9814 ])# AC_LIBTOOL_LANG_RC_CONFIG
9817 # AC_LIBTOOL_CONFIG([TAGNAME])
9818 # ----------------------------
9819 # If TAGNAME is not passed, then create an initial libtool script
9820 # with a default configuration from the untagged config vars.  Otherwise
9821 # add code to config.status for appending the configuration named by
9822 # TAGNAME from the matching tagged config vars.
9823 AC_DEFUN([AC_LIBTOOL_CONFIG],
9824 [# The else clause should only fire when bootstrapping the
9825 # libtool distribution, otherwise you forgot to ship ltmain.sh
9826 # with your package, and you will get complaints that there are
9827 # no rules to generate ltmain.sh.
9828 if test -f "$ltmain"; then
9829   # See if we are running on zsh, and set the options which allow our commands through
9830   # without removal of \ escapes.
9831   if test -n "${ZSH_VERSION+set}" ; then
9832     setopt NO_GLOB_SUBST
9833   fi  
9834   # Now quote all the things that may contain metacharacters while being
9835   # careful not to overquote the AC_SUBSTed values.  We take copies of the
9836   # variables and quote the copies for generation of the libtool script.
9837   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9838     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9839     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9840     deplibs_check_method reload_flag reload_cmds need_locks \
9841     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9842     lt_cv_sys_global_symbol_to_c_name_address \
9843     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9844     old_postinstall_cmds old_postuninstall_cmds \
9845     _LT_AC_TAGVAR(compiler, $1) \
9846     _LT_AC_TAGVAR(CC, $1) \
9847     _LT_AC_TAGVAR(LD, $1) \
9848     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9849     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9850     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9851     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9852     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9853     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9854     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9855     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9856     _LT_AC_TAGVAR(old_archive_cmds, $1) \
9857     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9858     _LT_AC_TAGVAR(predep_objects, $1) \
9859     _LT_AC_TAGVAR(postdep_objects, $1) \
9860     _LT_AC_TAGVAR(predeps, $1) \
9861     _LT_AC_TAGVAR(postdeps, $1) \
9862     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9863     _LT_AC_TAGVAR(archive_cmds, $1) \
9864     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9865     _LT_AC_TAGVAR(postinstall_cmds, $1) \
9866     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
9867     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9868     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
9869     _LT_AC_TAGVAR(no_undefined_flag, $1) \
9870     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
9871     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9872     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9873     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9874     _LT_AC_TAGVAR(hardcode_automatic, $1) \
9875     _LT_AC_TAGVAR(module_cmds, $1) \
9876     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
9877     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9878     _LT_AC_TAGVAR(exclude_expsyms, $1) \
9879     _LT_AC_TAGVAR(include_expsyms, $1); do
9881     case $var in
9882     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
9883     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9884     _LT_AC_TAGVAR(archive_cmds, $1) | \
9885     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9886     _LT_AC_TAGVAR(module_cmds, $1) | \
9887     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
9888     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9889     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9890     extract_expsyms_cmds | reload_cmds | finish_cmds | \
9891     postinstall_cmds | postuninstall_cmds | \
9892     old_postinstall_cmds | old_postuninstall_cmds | \
9893     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9894       # Double-quote double-evaled strings.
9895       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9896       ;;
9897     *)
9898       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9899       ;;
9900     esac
9901   done
9903   case $lt_echo in
9904   *'\[$]0 --fallback-echo"')
9905     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9906     ;;
9907   esac
9909 ifelse([$1], [],
9910   [cfgfile="${ofile}T"
9911   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9912   $rm -f "$cfgfile"
9913   AC_MSG_NOTICE([creating $ofile])],
9914   [cfgfile="$ofile"])
9916   cat <<__EOF__ >> "$cfgfile"
9917 ifelse([$1], [],
9918 [#! $SHELL
9920 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9921 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9922 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
9924 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9925 # Free Software Foundation, Inc.
9927 # This file is part of GNU Libtool:
9928 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9930 # This program is free software; you can redistribute it and/or modify
9931 # it under the terms of the GNU General Public License as published by
9932 # the Free Software Foundation; either version 2 of the License, or
9933 # (at your option) any later version.
9935 # This program is distributed in the hope that it will be useful, but
9936 # WITHOUT ANY WARRANTY; without even the implied warranty of
9937 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9938 # General Public License for more details.
9940 # You should have received a copy of the GNU General Public License
9941 # along with this program; if not, write to the Free Software
9942 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9944 # As a special exception to the GNU General Public License, if you
9945 # distribute this file as part of a program that contains a
9946 # configuration script generated by Autoconf, you may include it under
9947 # the same distribution terms that you use for the rest of that program.
9949 # A sed program that does not truncate output.
9950 SED=$lt_SED
9952 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
9953 Xsed="$SED -e s/^X//"
9955 # The HP-UX ksh and POSIX shell print the target directory to stdout
9956 # if CDPATH is set.
9957 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9959 # The names of the tagged configurations supported by this script.
9960 available_tags=
9962 # ### BEGIN LIBTOOL CONFIG],
9963 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9965 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9967 # Shell to use when invoking shell scripts.
9968 SHELL=$lt_SHELL
9970 # Whether or not to build shared libraries.
9971 build_libtool_libs=$enable_shared
9973 # Whether or not to build static libraries.
9974 build_old_libs=$enable_static
9976 # Whether or not to add -lc for building shared libraries.
9977 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9979 # Whether or not to disallow shared libs when runtime libs are static
9980 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9982 # Whether or not to optimize for fast installation.
9983 fast_install=$enable_fast_install
9985 # The host system.
9986 host_alias=$host_alias
9987 host=$host
9989 # An echo program that does not interpret backslashes.
9990 echo=$lt_echo
9992 # The archiver.
9993 AR=$lt_AR
9994 AR_FLAGS=$lt_AR_FLAGS
9996 # A C compiler.
9997 LTCC=$lt_LTCC
9999 # A language-specific compiler.
10000 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
10002 # Is the compiler the GNU C compiler?
10003 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
10005 # An ERE matcher.
10006 EGREP=$lt_EGREP
10008 # The linker used to build libraries.
10009 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
10011 # Whether we need hard or soft links.
10012 LN_S=$lt_LN_S
10014 # A BSD-compatible nm program.
10015 NM=$lt_NM
10017 # A symbol stripping program
10018 STRIP=$STRIP
10020 # Used to examine libraries when file_magic_cmd begins "file"
10021 MAGIC_CMD=$MAGIC_CMD
10023 # Used on cygwin: DLL creation program.
10024 DLLTOOL="$DLLTOOL"
10026 # Used on cygwin: object dumper.
10027 OBJDUMP="$OBJDUMP"
10029 # Used on cygwin: assembler.
10030 AS="$AS"
10032 # The name of the directory that contains temporary libtool files.
10033 objdir=$objdir
10035 # How to create reloadable object files.
10036 reload_flag=$lt_reload_flag
10037 reload_cmds=$lt_reload_cmds
10039 # How to pass a linker flag through the compiler.
10040 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10042 # Object file suffix (normally "o").
10043 objext="$ac_objext"
10045 # Old archive suffix (normally "a").
10046 libext="$libext"
10048 # Shared library suffix (normally ".so").
10049 shrext='$shrext'
10051 # Executable file suffix (normally "").
10052 exeext="$exeext"
10054 # Additional compiler flags for building library objects.
10055 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
10056 pic_mode=$pic_mode
10058 # What is the maximum length of a command?
10059 max_cmd_len=$lt_cv_sys_max_cmd_len
10061 # Does compiler simultaneously support -c and -o options?
10062 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
10064 # Must we lock files when doing compilation ?
10065 need_locks=$lt_need_locks
10067 # Do we need the lib prefix for modules?
10068 need_lib_prefix=$need_lib_prefix
10070 # Do we need a version for libraries?
10071 need_version=$need_version
10073 # Whether dlopen is supported.
10074 dlopen_support=$enable_dlopen
10076 # Whether dlopen of programs is supported.
10077 dlopen_self=$enable_dlopen_self
10079 # Whether dlopen of statically linked programs is supported.
10080 dlopen_self_static=$enable_dlopen_self_static
10082 # Compiler flag to prevent dynamic linking.
10083 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
10085 # Compiler flag to turn off builtin functions.
10086 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
10088 # Compiler flag to allow reflexive dlopens.
10089 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
10091 # Compiler flag to generate shared objects directly from archives.
10092 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
10094 # Compiler flag to generate thread-safe objects.
10095 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
10097 # Library versioning type.
10098 version_type=$version_type
10100 # Format of library name prefix.
10101 libname_spec=$lt_libname_spec
10103 # List of archive names.  First name is the real one, the rest are links.
10104 # The last name is the one that the linker finds with -lNAME.
10105 library_names_spec=$lt_library_names_spec
10107 # The coded name of the library, if different from the real name.
10108 soname_spec=$lt_soname_spec
10110 # Commands used to build and install an old-style archive.
10111 RANLIB=$lt_RANLIB
10112 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
10113 old_postinstall_cmds=$lt_old_postinstall_cmds
10114 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10116 # Create an old-style archive from a shared archive.
10117 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
10119 # Create a temporary old-style archive to link instead of a shared archive.
10120 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
10122 # Commands used to build and install a shared archive.
10123 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
10124 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
10125 postinstall_cmds=$lt_postinstall_cmds
10126 postuninstall_cmds=$lt_postuninstall_cmds
10128 # Commands used to build a loadable module (assumed same as above if empty)
10129 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
10130 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
10132 # Commands to strip libraries.
10133 old_striplib=$lt_old_striplib
10134 striplib=$lt_striplib
10136 # Dependencies to place before the objects being linked to create a
10137 # shared library.
10138 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
10140 # Dependencies to place after the objects being linked to create a
10141 # shared library.
10142 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
10144 # Dependencies to place before the objects being linked to create a
10145 # shared library.
10146 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
10148 # Dependencies to place after the objects being linked to create a
10149 # shared library.
10150 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
10152 # The library search path used internally by the compiler when linking
10153 # a shared library.
10154 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
10156 # Method to check whether dependent libraries are shared objects.
10157 deplibs_check_method=$lt_deplibs_check_method
10159 # Command to use when deplibs_check_method == file_magic.
10160 file_magic_cmd=$lt_file_magic_cmd
10162 # Flag that allows shared libraries with undefined symbols to be built.
10163 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
10165 # Flag that forces no undefined symbols.
10166 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
10168 # Commands used to finish a libtool library installation in a directory.
10169 finish_cmds=$lt_finish_cmds
10171 # Same as above, but a single script fragment to be evaled but not shown.
10172 finish_eval=$lt_finish_eval
10174 # Take the output of nm and produce a listing of raw symbols and C names.
10175 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10177 # Transform the output of nm in a proper C declaration
10178 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10180 # Transform the output of nm in a C name address pair
10181 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10183 # This is the shared library runtime path variable.
10184 runpath_var=$runpath_var
10186 # This is the shared library path variable.
10187 shlibpath_var=$shlibpath_var
10189 # Is shlibpath searched before the hard-coded library search path?
10190 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10192 # How to hardcode a shared library path into an executable.
10193 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
10195 # Whether we should hardcode library paths into libraries.
10196 hardcode_into_libs=$hardcode_into_libs
10198 # Flag to hardcode \$libdir into a binary during linking.
10199 # This must work even if \$libdir does not exist.
10200 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
10202 # If ld is used when linking, flag to hardcode \$libdir into
10203 # a binary during linking. This must work even if \$libdir does
10204 # not exist.
10205 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
10207 # Whether we need a single -rpath flag with a separated argument.
10208 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
10210 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10211 # resulting binary.
10212 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
10214 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10215 # resulting binary.
10216 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
10218 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10219 # the resulting binary.
10220 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
10222 # Set to yes if building a shared library automatically hardcodes DIR into the library
10223 # and all subsequent libraries and executables linked against it.
10224 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
10226 # Variables whose values should be saved in libtool wrapper scripts and
10227 # restored at relink time.
10228 variables_saved_for_relink="$variables_saved_for_relink"
10230 # Whether libtool must link a program against all its dependency libraries.
10231 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
10233 # Compile-time system search path for libraries
10234 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10236 # Run-time system search path for libraries
10237 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10239 # Fix the shell variable \$srcfile for the compiler.
10240 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
10242 # Set to yes if exported symbols are required.
10243 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
10245 # The commands to list exported symbols.
10246 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
10248 # The commands to extract the exported symbol list from a shared archive.
10249 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10251 # Symbols that should not be listed in the preloaded symbols.
10252 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
10254 # Symbols that must always be exported.
10255 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10257 ifelse([$1],[],
10258 [# ### END LIBTOOL CONFIG],
10259 [# ### END LIBTOOL TAG CONFIG: $tagname])
10261 __EOF__
10263 ifelse([$1],[], [
10264   case $host_os in
10265   aix3*)
10266     cat <<\EOF >> "$cfgfile"
10268 # AIX sometimes has problems with the GCC collect2 program.  For some
10269 # reason, if we set the COLLECT_NAMES environment variable, the problems
10270 # vanish in a puff of smoke.
10271 if test "X${COLLECT_NAMES+set}" != Xset; then
10272   COLLECT_NAMES=
10273   export COLLECT_NAMES
10276     ;;
10277   esac
10279   # We use sed instead of cat because bash on DJGPP gets confused if
10280   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10281   # text mode, it properly converts lines to CR/LF.  This bash problem
10282   # is reportedly fixed, but why not run on old versions too?
10283   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10285   mv -f "$cfgfile" "$ofile" || \
10286     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10287   chmod +x "$ofile"
10289 else
10290   # If there is no Makefile yet, we rely on a make rule to execute
10291   # `config.status --recheck' to rerun these tests and create the
10292   # libtool script then.
10293   test -f Makefile && make "$ltmain"
10295 ])# AC_LIBTOOL_CONFIG
10298 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10299 # -------------------------------------------
10300 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10301 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10303 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10305 if test "$GCC" = yes; then
10306   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10308   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10309     lt_cv_prog_compiler_rtti_exceptions,
10310     [-fno-rtti -fno-exceptions], [],
10311     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10313 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10316 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10317 # ---------------------------------
10318 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10319 [AC_REQUIRE([AC_CANONICAL_HOST])
10320 AC_REQUIRE([AC_PROG_NM])
10321 AC_REQUIRE([AC_OBJEXT])
10322 # Check for command to grab the raw symbol name followed by C symbol from nm.
10323 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10324 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10326 # These are sane defaults that work on at least a few old systems.
10327 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
10329 # Character class describing NM global symbol codes.
10330 symcode='[[BCDEGRST]]'
10332 # Regexp to match symbols that can be accessed directly from C.
10333 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10335 # Transform the above into a raw symbol and a C symbol.
10336 symxfrm='\1 \2\3 \3'
10338 # Transform an extracted symbol line into a proper C declaration
10339 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10341 # Transform an extracted symbol line into symbol name and symbol address
10342 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'"
10344 # Define system-specific variables.
10345 case $host_os in
10346 aix*)
10347   symcode='[[BCDT]]'
10348   ;;
10349 cygwin* | mingw* | pw32*)
10350   symcode='[[ABCDGISTW]]'
10351   ;;
10352 hpux*) # Its linker distinguishes data from code symbols
10353   if test "$host_cpu" = ia64; then
10354     symcode='[[ABCDEGRST]]'
10355   fi
10356   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10357   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'"
10358   ;;
10359 irix* | nonstopux*)
10360   symcode='[[BCDEGRST]]'
10361   ;;
10362 osf*)
10363   symcode='[[BCDEGQRST]]'
10364   ;;
10365 solaris* | sysv5*)
10366   symcode='[[BDT]]'
10367   ;;
10368 sysv4)
10369   symcode='[[DFNSTU]]'
10370   ;;
10371 esac
10373 # Handle CRLF in mingw tool chain
10374 opt_cr=
10375 case $build_os in
10376 mingw*)
10377   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10378   ;;
10379 esac
10381 # If we're using GNU nm, then use its standard symbol codes.
10382 case `$NM -V 2>&1` in
10383 *GNU* | *'with BFD'*)
10384   symcode='[[ABCDGISTW]]' ;;
10385 esac
10387 # Try without a prefix undercore, then with it.
10388 for ac_symprfx in "" "_"; do
10390   # Write the raw and C identifiers.
10391   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10393   # Check to see that the pipe works correctly.
10394   pipe_works=no
10396   rm -f conftest*
10397   cat > conftest.$ac_ext <<EOF
10398 #ifdef __cplusplus
10399 extern "C" {
10400 #endif
10401 char nm_test_var;
10402 void nm_test_func(){}
10403 #ifdef __cplusplus
10405 #endif
10406 int main(){nm_test_var='a';nm_test_func();return(0);}
10409   if AC_TRY_EVAL(ac_compile); then
10410     # Now try to grab the symbols.
10411     nlist=conftest.nm
10412     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10413       # Try sorting and uniquifying the output.
10414       if sort "$nlist" | uniq > "$nlist"T; then
10415         mv -f "$nlist"T "$nlist"
10416       else
10417         rm -f "$nlist"T
10418       fi
10420       # Make sure that we snagged all the symbols we need.
10421       if grep ' nm_test_var$' "$nlist" >/dev/null; then
10422         if grep ' nm_test_func$' "$nlist" >/dev/null; then
10423           cat <<EOF > conftest.$ac_ext
10424 #ifdef __cplusplus
10425 extern "C" {
10426 #endif
10429           # Now generate the symbol file.
10430           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10432           cat <<EOF >> conftest.$ac_ext
10433 #if defined (__STDC__) && __STDC__
10434 # define lt_ptr_t void *
10435 #else
10436 # define lt_ptr_t char *
10437 # define const
10438 #endif
10440 /* The mapping between symbol names and symbols. */
10441 const struct {
10442   const char *name;
10443   lt_ptr_t address;
10445 lt_preloaded_symbols[[]] =
10448           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10449           cat <<\EOF >> conftest.$ac_ext
10450   {0, (lt_ptr_t) 0}
10453 #ifdef __cplusplus
10455 #endif
10457           # Now try linking the two files.
10458           mv conftest.$ac_objext conftstm.$ac_objext
10459           lt_save_LIBS="$LIBS"
10460           lt_save_CFLAGS="$CFLAGS"
10461           LIBS="conftstm.$ac_objext"
10462           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10463           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10464             pipe_works=yes
10465           fi
10466           LIBS="$lt_save_LIBS"
10467           CFLAGS="$lt_save_CFLAGS"
10468         else
10469           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10470         fi
10471       else
10472         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10473       fi
10474     else
10475       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10476     fi
10477   else
10478     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10479     cat conftest.$ac_ext >&5
10480   fi
10481   rm -f conftest* conftst*
10483   # Do not use the global_symbol_pipe unless it works.
10484   if test "$pipe_works" = yes; then
10485     break
10486   else
10487     lt_cv_sys_global_symbol_pipe=
10488   fi
10489 done
10491 if test -z "$lt_cv_sys_global_symbol_pipe"; then
10492   lt_cv_sys_global_symbol_to_cdecl=
10494 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10495   AC_MSG_RESULT(failed)
10496 else
10497   AC_MSG_RESULT(ok)
10499 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10502 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10503 # ---------------------------------------
10504 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10505 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10506 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10507 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10509 AC_MSG_CHECKING([for $compiler option to produce PIC])
10510  ifelse([$1],[CXX],[
10511   # C++ specific cases for pic, static, wl, etc.
10512   if test "$GXX" = yes; then
10513     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10514     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10516     case $host_os in
10517     aix*)
10518       # All AIX code is PIC.
10519       if test "$host_cpu" = ia64; then
10520         # AIX 5 now supports IA64 processor
10521         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10522       fi
10523       ;;
10524     amigaos*)
10525       # FIXME: we need at least 68020 code to build shared libraries, but
10526       # adding the `-m68020' flag to GCC prevents building anything better,
10527       # like `-m68040'.
10528       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10529       ;;
10530     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10531       # PIC is the default for these OSes.
10532       ;;
10533     mingw* | os2* | pw32*)
10534       # This hack is so that the source file can tell whether it is being
10535       # built for inclusion in a dll (and should export symbols for example).
10536       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10537       ;;
10538     darwin* | rhapsody*)
10539       # PIC is the default on this platform
10540       # Common symbols not allowed in MH_DYLIB files
10541       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10542       ;;
10543     *djgpp*)
10544       # DJGPP does not support shared libraries at all
10545       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10546       ;;
10547     sysv4*MP*)
10548       if test -d /usr/nec; then
10549         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10550       fi
10551       ;;
10552     hpux*)
10553       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10554       # not for PA HP-UX.
10555       case "$host_cpu" in
10556       hppa*64*|ia64*)
10557         ;;
10558       *)
10559         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10560         ;;
10561       esac
10562       ;;
10563     *)
10564       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10565       ;;
10566     esac
10567   else
10568     case $host_os in
10569       aix4* | aix5*)
10570         # All AIX code is PIC.
10571         if test "$host_cpu" = ia64; then
10572           # AIX 5 now supports IA64 processor
10573           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10574         else
10575           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10576         fi
10577         ;;
10578       chorus*)
10579         case $cc_basename in
10580         cxch68)
10581           # Green Hills C++ Compiler
10582           # _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"
10583           ;;
10584         esac
10585         ;;
10586       dgux*)
10587         case $cc_basename in
10588           ec++)
10589             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10590             ;;
10591           ghcx)
10592             # Green Hills C++ Compiler
10593             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10594             ;;
10595           *)
10596             ;;
10597         esac
10598         ;;
10599       freebsd* | kfreebsd*-gnu)
10600         # FreeBSD uses GNU C++
10601         ;;
10602       hpux9* | hpux10* | hpux11*)
10603         case $cc_basename in
10604           CC)
10605             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10606             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10607             if test "$host_cpu" != ia64; then
10608               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10609             fi
10610             ;;
10611           aCC)
10612             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10613             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10614             case "$host_cpu" in
10615             hppa*64*|ia64*)
10616               # +Z the default
10617               ;;
10618             *)
10619               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10620               ;;
10621             esac
10622             ;;
10623           *)
10624             ;;
10625         esac
10626         ;;
10627       irix5* | irix6* | nonstopux*)
10628         case $cc_basename in
10629           CC)
10630             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10631             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10632             # CC pic flag -KPIC is the default.
10633             ;;
10634           *)
10635             ;;
10636         esac
10637         ;;
10638       linux*)
10639         case $cc_basename in
10640           KCC)
10641             # KAI C++ Compiler
10642             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10643             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10644             ;;
10645           icpc)
10646             # Intel C++
10647             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10648             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10649             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10650             ;; 
10651           cxx)
10652             # Compaq C++
10653             # Make sure the PIC flag is empty.  It appears that all Alpha
10654             # Linux and Compaq Tru64 Unix objects are PIC.
10655             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10656             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10657             ;;
10658           *)
10659             ;;
10660         esac
10661         ;;
10662       lynxos*)
10663         ;;
10664       m88k*)
10665         ;;
10666       mvs*)
10667         case $cc_basename in
10668           cxx)
10669             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10670             ;;
10671           *)
10672             ;;
10673         esac
10674         ;;
10675       netbsd*)
10676         ;;
10677       osf3* | osf4* | osf5*)
10678         case $cc_basename in
10679           KCC)
10680             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10681             ;;
10682           RCC)
10683             # Rational C++ 2.4.1
10684             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10685             ;;
10686           cxx)
10687             # Digital/Compaq C++
10688             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10689             # Make sure the PIC flag is empty.  It appears that all Alpha
10690             # Linux and Compaq Tru64 Unix objects are PIC.
10691             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10692             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10693             ;;
10694           *)
10695             ;;
10696         esac
10697         ;;
10698       psos*)
10699         ;;
10700       sco*)
10701         case $cc_basename in
10702           CC)
10703             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10704             ;;
10705           *)
10706             ;;
10707         esac
10708         ;;
10709       solaris*)
10710         case $cc_basename in
10711           CC)
10712             # Sun C++ 4.2, 5.x and Centerline C++
10713             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10714             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10715             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10716             ;;
10717           gcx)
10718             # Green Hills C++ Compiler
10719             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10720             ;;
10721           *)
10722             ;;
10723         esac
10724         ;;
10725       sunos4*)
10726         case $cc_basename in
10727           CC)
10728             # Sun C++ 4.x
10729             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10730             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10731             ;;
10732           lcc)
10733             # Lucid
10734             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10735             ;;
10736           *)
10737             ;;
10738         esac
10739         ;;
10740       tandem*)
10741         case $cc_basename in
10742           NCC)
10743             # NonStop-UX NCC 3.20
10744             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10745             ;;
10746           *)
10747             ;;
10748         esac
10749         ;;
10750       unixware*)
10751         ;;
10752       vxworks*)
10753         ;;
10754       *)
10755         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10756         ;;
10757     esac
10758   fi
10761   if test "$GCC" = yes; then
10762     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10763     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10765     case $host_os in
10766       aix*)
10767       # All AIX code is PIC.
10768       if test "$host_cpu" = ia64; then
10769         # AIX 5 now supports IA64 processor
10770         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10771       fi
10772       ;;
10774     amigaos*)
10775       # FIXME: we need at least 68020 code to build shared libraries, but
10776       # adding the `-m68020' flag to GCC prevents building anything better,
10777       # like `-m68040'.
10778       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10779       ;;
10781     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10782       # PIC is the default for these OSes.
10783       ;;
10785     mingw* | pw32* | os2*)
10786       # This hack is so that the source file can tell whether it is being
10787       # built for inclusion in a dll (and should export symbols for example).
10788       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10789       ;;
10791     darwin* | rhapsody*)
10792       # PIC is the default on this platform
10793       # Common symbols not allowed in MH_DYLIB files
10794       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10795       ;;
10797     msdosdjgpp*)
10798       # Just because we use GCC doesn't mean we suddenly get shared libraries
10799       # on systems that don't support them.
10800       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10801       enable_shared=no
10802       ;;
10804     sysv4*MP*)
10805       if test -d /usr/nec; then
10806         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10807       fi
10808       ;;
10810     hpux*)
10811       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10812       # not for PA HP-UX.
10813       case "$host_cpu" in
10814       hppa*64*|ia64*)
10815         # +Z the default
10816         ;;
10817       *)
10818         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10819         ;;
10820       esac
10821       ;;
10823     *)
10824       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10825       ;;
10826     esac
10827   else
10828     # PORTME Check for flag to pass linker flags through the system compiler.
10829     case $host_os in
10830     aix*)
10831       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10832       if test "$host_cpu" = ia64; then
10833         # AIX 5 now supports IA64 processor
10834         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10835       else
10836         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10837       fi
10838       ;;
10840     mingw* | pw32* | os2*)
10841       # This hack is so that the source file can tell whether it is being
10842       # built for inclusion in a dll (and should export symbols for example).
10843       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10844       ;;
10846     hpux9* | hpux10* | hpux11*)
10847       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10848       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10849       # not for PA HP-UX.
10850       case "$host_cpu" in
10851       hppa*64*|ia64*)
10852         # +Z the default
10853         ;;
10854       *)
10855         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10856         ;;
10857       esac
10858       # Is there a better lt_prog_compiler_static that works with the bundled CC?
10859       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10860       ;;
10862     irix5* | irix6* | nonstopux*)
10863       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10864       # PIC (with -KPIC) is the default.
10865       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10866       ;;
10868     newsos6)
10869       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10870       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10871       ;;
10873     linux*)
10874       case $CC in
10875       icc* | ecc*)
10876         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10877         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10878         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10879         ;;
10880       ccc*)
10881         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10882         # All Alpha code is PIC.
10883         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10884         ;;
10885       esac
10886       ;;
10888     osf3* | osf4* | osf5*)
10889       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10890       # All OSF/1 code is PIC.
10891       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10892       ;;
10894     sco3.2v5*)
10895       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10896       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10897       ;;
10899     solaris*)
10900       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10901       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10902       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10903       ;;
10905     sunos4*)
10906       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10907       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10908       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10909       ;;
10911     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10912       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10913       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10914       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10915       ;;
10917     sysv4*MP*)
10918       if test -d /usr/nec ;then
10919         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10920         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10921       fi
10922       ;;
10924     uts4*)
10925       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10926       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10927       ;;
10929     *)
10930       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10931       ;;
10932     esac
10933   fi
10935 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10938 # Check to make sure the PIC flag actually works.
10940 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10941   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10942     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10943     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10944     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10945      "" | " "*) ;;
10946      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10947      esac],
10948     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10949      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10951 case "$host_os" in
10952   # For platforms which do not support PIC, -DPIC is meaningless:
10953   *djgpp*)
10954     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10955     ;;
10956   *)
10957     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10958     ;;
10959 esac
10963 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10964 # ------------------------------------
10965 # See if the linker supports building shared libraries.
10966 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10967 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10968 ifelse([$1],[CXX],[
10969   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10970   case $host_os in
10971   aix4* | aix5*)
10972     # If we're using GNU nm, then we don't want the "-C" option.
10973     # -C means demangle to AIX nm, but means don't demangle with GNU nm
10974     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10975       _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'
10976     else
10977       _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'
10978     fi
10979     ;;
10980   pw32*)
10981     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10982   ;;
10983   cygwin* | mingw*)
10984     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10985   ;;
10986   *)
10987     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10988   ;;
10989   esac
10991   runpath_var=
10992   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
10993   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10994   _LT_AC_TAGVAR(archive_cmds, $1)=
10995   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10996   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10997   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10998   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10999   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11000   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
11001   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11002   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
11003   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11004   _LT_AC_TAGVAR(hardcode_direct, $1)=no
11005   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11006   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11007   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
11008   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
11009   _LT_AC_TAGVAR(module_cmds, $1)=
11010   _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
11011   _LT_AC_TAGVAR(always_export_symbols, $1)=no
11012   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11013   # include_expsyms should be a list of space-separated symbols to be *always*
11014   # included in the symbol list
11015   _LT_AC_TAGVAR(include_expsyms, $1)=
11016   # exclude_expsyms can be an extended regexp of symbols to exclude
11017   # it will be wrapped by ` (' and `)$', so one must not match beginning or
11018   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
11019   # as well as any symbol that contains `d'.
11020   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
11021   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11022   # platforms (ab)use it in PIC code, but their linkers get confused if
11023   # the symbol is explicitly referenced.  Since portable code cannot
11024   # rely on this symbol name, it's probably fine to never include it in
11025   # preloaded symbol tables.
11026   extract_expsyms_cmds=
11028   case $host_os in
11029   cygwin* | mingw* | pw32*)
11030     # FIXME: the MSVC++ port hasn't been tested in a loooong time
11031     # When not using gcc, we currently assume that we are using
11032     # Microsoft Visual C++.
11033     if test "$GCC" != yes; then
11034       with_gnu_ld=no
11035     fi
11036     ;;
11037   openbsd*)
11038     with_gnu_ld=no
11039     ;;
11040   esac
11042   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11043   if test "$with_gnu_ld" = yes; then
11044     # If archive_cmds runs LD, not CC, wlarc should be empty
11045     wlarc='${wl}'
11047     # See if GNU ld supports shared libraries.
11048     case $host_os in
11049     aix3* | aix4* | aix5*)
11050       # On AIX/PPC, the GNU linker is very broken
11051       if test "$host_cpu" != ia64; then
11052         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11053         cat <<EOF 1>&2
11055 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
11056 *** to be unable to reliably create shared libraries on AIX.
11057 *** Therefore, libtool is disabling shared libraries support.  If you
11058 *** really care for shared libraries, you may want to modify your PATH
11059 *** so that a non-GNU linker is found, and then restart.
11062       fi
11063       ;;
11065     amigaos*)
11066       _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)'
11067       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11068       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11070       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
11071       # that the semantics of dynamic libraries on AmigaOS, at least up
11072       # to version 4, is to share data among multiple programs linked
11073       # with the same dynamic library.  Since this doesn't match the
11074       # behavior of shared libraries on other platforms, we can't use
11075       # them.
11076       _LT_AC_TAGVAR(ld_shlibs, $1)=no
11077       ;;
11079     beos*)
11080       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11081         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11082         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11083         # support --undefined.  This deserves some investigation.  FIXME
11084         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
11085       else
11086         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11087       fi
11088       ;;
11090     cygwin* | mingw* | pw32*)
11091       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
11092       # as there is no search path for DLLs.
11093       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11094       _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
11095       _LT_AC_TAGVAR(always_export_symbols, $1)=no
11096       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11097       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
11099       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11100         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
11101         # If the export-symbols file already is a .def file (1st line
11102         # is EXPORTS), use it as is; otherwise, prepend...
11103         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11104           cp $export_symbols $output_objdir/$soname.def;
11105         else
11106           echo EXPORTS > $output_objdir/$soname.def;
11107           cat $export_symbols >> $output_objdir/$soname.def;
11108         fi~
11109         $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
11110       else
11111         ld_shlibs=no
11112       fi
11113       ;;
11115     netbsd*)
11116       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11117         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11118         wlarc=
11119       else
11120         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
11121         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11122       fi
11123       ;;
11125     solaris* | sysv5*)
11126       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
11127         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11128         cat <<EOF 1>&2
11130 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
11131 *** create shared libraries on Solaris systems.  Therefore, libtool
11132 *** is disabling shared libraries support.  We urge you to upgrade GNU
11133 *** binutils to release 2.9.1 or newer.  Another option is to modify
11134 *** your PATH or compiler configuration so that the native linker is
11135 *** used, and then restart.
11138       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11139         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
11140         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11141       else
11142         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11143       fi
11144       ;;
11146     sunos4*)
11147       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11148       wlarc=
11149       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11150       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11151       ;;
11153     *)
11154       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11155         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
11156         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11157       else
11158         _LT_AC_TAGVAR(ld_shlibs, $1)=no
11159       fi
11160       ;;
11161     esac
11163     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
11164       runpath_var=LD_RUN_PATH
11165       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
11166       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
11167       # ancient GNU ld didn't support --whole-archive et. al.
11168       if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
11169         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11170       else
11171         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11172       fi
11173     fi
11174   else
11175     # PORTME fill in a description of your system's linker (not GNU ld)
11176     case $host_os in
11177     aix3*)
11178       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11179       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11180       _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'
11181       # Note: this linker hardcodes the directories in LIBPATH if there
11182       # are no directories specified by -L.
11183       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11184       if test "$GCC" = yes && test -z "$link_static_flag"; then
11185         # Neither direct hardcoding nor static linking is supported with a
11186         # broken collect2.
11187         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11188       fi
11189       ;;
11191     aix4* | aix5*)
11192       if test "$host_cpu" = ia64; then
11193         # On IA64, the linker does run time linking by default, so we don't
11194         # have to do anything special.
11195         aix_use_runtimelinking=no
11196         exp_sym_flag='-Bexport'
11197         no_entry_flag=""
11198       else
11199         # If we're using GNU nm, then we don't want the "-C" option.
11200         # -C means demangle to AIX nm, but means don't demangle with GNU nm
11201         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11202           _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'
11203         else
11204           _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'
11205         fi
11207         # KDE requires run time linking.  Make it the default.
11208         aix_use_runtimelinking=yes
11209         exp_sym_flag='-bexport'
11210         no_entry_flag='-bnoentry'
11211       fi
11213       # When large executables or shared objects are built, AIX ld can
11214       # have problems creating the table of contents.  If linking a library
11215       # or program results in "error TOC overflow" add -mminimal-toc to
11216       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
11217       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11219       _LT_AC_TAGVAR(archive_cmds, $1)=''
11220       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11221       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
11222       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11224       if test "$GCC" = yes; then
11225         case $host_os in aix4.[012]|aix4.[012].*)
11226         # We only want to do this on AIX 4.2 and lower, the check
11227         # below for broken collect2 doesn't work under 4.3+
11228           collect2name=`${CC} -print-prog-name=collect2`
11229           if test -f "$collect2name" && \
11230            strings "$collect2name" | grep resolve_lib_name >/dev/null
11231           then
11232           # We have reworked collect2
11233           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11234           else
11235           # We have old collect2
11236           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11237           # It fails to find uninstalled libraries when the uninstalled
11238           # path is not listed in the libpath.  Setting hardcode_minus_L
11239           # to unsupported forces relinking
11240           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11241           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11242           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11243           fi
11244         esac
11245         shared_flag='-shared'
11246       else
11247         # not using gcc
11248         if test "$host_cpu" = ia64; then
11249         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11250         # chokes on -Wl,-G. The following line is correct:
11251           shared_flag='-G'
11252         else
11253         if test "$aix_use_runtimelinking" = yes; then
11254             shared_flag='-qmkshrobj ${wl}-G'
11255           else
11256             shared_flag='-qmkshrobj'
11257         fi
11258         fi
11259       fi
11261       # Let the compiler handle the export list.
11262       _LT_AC_TAGVAR(always_export_symbols, $1)=no
11263       if test "$aix_use_runtimelinking" = yes; then
11264         # Warning - without using the other runtime loading flags (-brtl),
11265         # -berok will link without error, but may produce a broken library.
11266         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11267        # Determine the default libpath from the value encoded in an empty executable.
11268         _LT_AC_SYS_LIBPATH_AIX
11269         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11270         _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
11271         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11272        else
11273         if test "$host_cpu" = ia64; then
11274           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11275           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11276           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
11277         else
11278          # Determine the default libpath from the value encoded in an empty executable.
11279          _LT_AC_SYS_LIBPATH_AIX
11280          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11281           # Warning - without using the other run time loading flags,
11282           # -berok will link without error, but may produce a broken library.
11283           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11284           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11285           # -bexpall does not export symbols beginning with underscore (_)
11286           _LT_AC_TAGVAR(always_export_symbols, $1)=yes
11287           # Exported symbols can be pulled into shared objects from archives
11288           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
11289           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11290           # This is similar to how AIX traditionally builds it's shared libraries.
11291           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11292         fi
11293       fi
11294       ;;
11296     amigaos*)
11297       _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)'
11298       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11299       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11300       # see comment about different semantics on the GNU ld section
11301       _LT_AC_TAGVAR(ld_shlibs, $1)=no
11302       ;;
11304     bsdi4*)
11305       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11306       ;;
11308     cygwin* | mingw* | pw32*)
11309       # When not using gcc, we currently assume that we are using
11310       # Microsoft Visual C++.
11311       # hardcode_libdir_flag_spec is actually meaningless, as there is
11312       # no search path for DLLs.
11313       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11314       _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
11315       # Tell ltmain to make .lib files, not .a files.
11316       libext=lib
11317       # Tell ltmain to make .dll files, not .so files.
11318       shrext=".dll"
11319       # FIXME: Setting linknames here is a bad hack.
11320       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11321       # The linker will automatically build a .lib file if we build a DLL.
11322       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11323       # FIXME: Should let the user specify the lib program.
11324       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11325       fix_srcfile_path='`cygpath -w "$srcfile"`'
11326       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11327       ;;
11329     darwin* | rhapsody*)
11330     if test "$GXX" = yes ; then
11331       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11332       case "$host_os" in
11333       rhapsody* | darwin1.[[012]])
11334         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
11335         ;;
11336       *) # Darwin 1.3 on
11337         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11338           _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11339         else
11340           case ${MACOSX_DEPLOYMENT_TARGET} in
11341             10.[012])
11342               _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11343               ;;
11344             10.*)
11345               _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
11346               ;;
11347           esac
11348         fi
11349         ;;
11350       esac
11351         lt_int_apple_cc_single_mod=no
11352         output_verbose_link_cmd='echo'
11353         if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
11354           lt_int_apple_cc_single_mod=yes
11355         fi
11356         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11357           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
11358         else
11359         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
11360       fi
11361       _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
11362       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
11363         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11364           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11365         else
11366           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11367         fi
11368           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11369       _LT_AC_TAGVAR(hardcode_direct, $1)=no
11370       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11371       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11372       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
11373       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11374     else  
11375       _LT_AC_TAGVAR(ld_shlibs, $1)=no
11376     fi  
11377       ;;
11379     dgux*)
11380       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11381       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11382       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11383       ;;
11385     freebsd1*)
11386       _LT_AC_TAGVAR(ld_shlibs, $1)=no
11387       ;;
11389     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11390     # support.  Future versions do this automatically, but an explicit c++rt0.o
11391     # does not break anything, and helps significantly (at the cost of a little
11392     # extra space).
11393     freebsd2.2*)
11394       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11395       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11396       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11397       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11398       ;;
11400     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11401     freebsd2*)
11402       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11403       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11404       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11405       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11406       ;;
11408     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11409     freebsd* | kfreebsd*-gnu)
11410       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11411       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11412       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11413       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11414       ;;
11416     hpux9*)
11417       if test "$GCC" = yes; then
11418         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11419       else
11420         _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'
11421       fi
11422       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11423       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11424       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11426       # hardcode_minus_L: Not really in the search PATH,
11427       # but as the default location of the library.
11428       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11429       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11430       ;;
11432     hpux10* | hpux11*)
11433       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11434         case "$host_cpu" in
11435         hppa*64*|ia64*)
11436           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11437           ;;
11438         *)
11439           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11440           ;;
11441         esac
11442       else
11443         case "$host_cpu" in
11444         hppa*64*|ia64*)
11445           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11446           ;;
11447         *)
11448           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11449           ;;
11450         esac
11451       fi
11452       if test "$with_gnu_ld" = no; then
11453         case "$host_cpu" in
11454         hppa*64*)
11455           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11456           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11457           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11458           _LT_AC_TAGVAR(hardcode_direct, $1)=no
11459           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11460           ;;
11461         ia64*)
11462           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11463           _LT_AC_TAGVAR(hardcode_direct, $1)=no
11464           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11466           # hardcode_minus_L: Not really in the search PATH,
11467           # but as the default location of the library.
11468           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11469           ;;
11470         *)
11471           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11472           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11473           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11474           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11476           # hardcode_minus_L: Not really in the search PATH,
11477           # but as the default location of the library.
11478           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11479           ;;
11480         esac
11481       fi
11482       ;;
11484     irix5* | irix6* | nonstopux*)
11485       if test "$GCC" = yes; then
11486         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11487       else
11488         _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'
11489         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11490       fi
11491       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11492       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11493       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11494       ;;
11496     netbsd*)
11497       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11498         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
11499       else
11500         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
11501       fi
11502       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11503       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11504       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11505       ;;
11507     newsos6)
11508       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11509       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11510       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11511       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11512       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11513       ;;
11515     openbsd*)
11516       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11517       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11518       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11519         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11520         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11521         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11522       else
11523        case $host_os in
11524          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11525            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11526            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11527            ;;
11528          *)
11529            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11530            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11531            ;;
11532        esac
11533       fi
11534       ;;
11536     os2*)
11537       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11538       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11539       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11540       _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11541       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11542       ;;
11544     osf3*)
11545       if test "$GCC" = yes; then
11546         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11547         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11548       else
11549         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11550         _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'
11551       fi
11552       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11553       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11554       ;;
11556     osf4* | osf5*)      # as osf3* with the addition of -msym flag
11557       if test "$GCC" = yes; then
11558         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11559         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11560         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11561       else
11562         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11563         _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'
11564         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
11565         $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'
11567         # Both c and cxx compiler support -rpath directly
11568         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11569       fi
11570       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11571       ;;
11573     sco3.2v5*)
11574       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11575       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11576       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11577       runpath_var=LD_RUN_PATH
11578       hardcode_runpath_var=yes
11579       ;;
11581     solaris*)
11582       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11583       if test "$GCC" = yes; then
11584         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11585         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11586           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11587       else
11588         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11589         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11590         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11591       fi
11592       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11593       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11594       case $host_os in
11595       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11596       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
11597         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11598       esac
11599       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11600       ;;
11602     sunos4*)
11603       if test "x$host_vendor" = xsequent; then
11604         # Use $CC to link under sequent, because it throws in some extra .o
11605         # files that make .init and .fini sections work.
11606         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11607       else
11608         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11609       fi
11610       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11611       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11612       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11613       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11614       ;;
11616     sysv4)
11617       case $host_vendor in
11618         sni)
11619           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11620           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11621         ;;
11622         siemens)
11623           ## LD is ld it makes a PLAMLIB
11624           ## CC just makes a GrossModule.
11625           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11626           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11627           _LT_AC_TAGVAR(hardcode_direct, $1)=no
11628         ;;
11629         motorola)
11630           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11631           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11632         ;;
11633       esac
11634       runpath_var='LD_RUN_PATH'
11635       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11636       ;;
11638     sysv4.3*)
11639       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11640       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11641       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11642       ;;
11644     sysv4*MP*)
11645       if test -d /usr/nec; then
11646         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11647         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11648         runpath_var=LD_RUN_PATH
11649         hardcode_runpath_var=yes
11650         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
11651       fi
11652       ;;
11654     sysv4.2uw2*)
11655       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11656       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
11657       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11658       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11659       hardcode_runpath_var=yes
11660       runpath_var=LD_RUN_PATH
11661       ;;
11663    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
11664       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11665       if test "$GCC" = yes; then
11666         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11667       else
11668         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11669       fi
11670       runpath_var='LD_RUN_PATH'
11671       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11672       ;;
11674     sysv5*)
11675       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11676       # $CC -shared without GNU ld will not create a library from C++
11677       # object files and a static libstdc++, better avoid it by now
11678       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11679       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11680                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11681       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11682       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11683       runpath_var='LD_RUN_PATH'
11684       ;;
11686     uts4*)
11687       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11688       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11689       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11690       ;;
11692     *)
11693       _LT_AC_TAGVAR(ld_shlibs, $1)=no
11694       ;;
11695     esac
11696   fi
11698 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11699 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11701 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11702 if test "$GCC" = yes; then
11703   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11707 # Do we need to explicitly link libc?
11709 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11710 x|xyes)
11711   # Assume -lc should be added
11712   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11714   if test "$enable_shared" = yes && test "$GCC" = yes; then
11715     case $_LT_AC_TAGVAR(archive_cmds, $1) in
11716     *'~'*)
11717       # FIXME: we may have to deal with multi-command sequences.
11718       ;;
11719     '$CC '*)
11720       # Test whether the compiler implicitly links with -lc since on some
11721       # systems, -lgcc has to come before -lc. If gcc already passes -lc
11722       # to ld, don't add -lc before -lgcc.
11723       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11724       $rm conftest*
11725       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11726   
11727       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11728         soname=conftest
11729         lib=conftest
11730         libobjs=conftest.$ac_objext
11731         deplibs=
11732         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11733         compiler_flags=-v
11734         linker_flags=-v
11735         verstring=
11736         output_objdir=.
11737         libname=conftest
11738         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11739         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
11740         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11741         then
11742           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11743         else
11744           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11745         fi
11746         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11747       else
11748         cat conftest.err 1>&5
11749       fi
11750       $rm conftest*
11751       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11752       ;;
11753     esac
11754   fi
11755   ;;
11756 esac
11757 ])# AC_LIBTOOL_PROG_LD_SHLIBS
11760 # _LT_AC_FILE_LTDLL_C
11761 # -------------------
11762 # Be careful that the start marker always follows a newline.
11763 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11764 # /* ltdll.c starts here */
11765 # #define WIN32_LEAN_AND_MEAN
11766 # #include <windows.h>
11767 # #undef WIN32_LEAN_AND_MEAN
11768 # #include <stdio.h>
11770 # #ifndef __CYGWIN__
11771 # #  ifdef __CYGWIN32__
11772 # #    define __CYGWIN__ __CYGWIN32__
11773 # #  endif
11774 # #endif
11776 # #ifdef __cplusplus
11777 # extern "C" {
11778 # #endif
11779 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11780 # #ifdef __cplusplus
11781 # }
11782 # #endif
11784 # #ifdef __CYGWIN__
11785 # #include <cygwin/cygwin_dll.h>
11786 # DECLARE_CYGWIN_DLL( DllMain );
11787 # #endif
11788 # HINSTANCE __hDllInstance_base;
11790 # BOOL APIENTRY
11791 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11792 # {
11793 #   __hDllInstance_base = hInst;
11794 #   return TRUE;
11795 # }
11796 # /* ltdll.c ends here */
11797 ])# _LT_AC_FILE_LTDLL_C
11800 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11801 # ---------------------------------
11802 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11805 # old names
11806 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
11807 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
11808 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
11809 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11810 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11811 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
11812 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
11814 # This is just to silence aclocal about the macro not being used
11815 ifelse([AC_DISABLE_FAST_INSTALL])
11817 AC_DEFUN([LT_AC_PROG_GCJ],
11818 [AC_CHECK_TOOL(GCJ, gcj, no)
11819   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11820   AC_SUBST(GCJFLAGS)
11823 AC_DEFUN([LT_AC_PROG_RC],
11824 [AC_CHECK_TOOL(RC, windres, no)
11827 ############################################################
11828 # NOTE: This macro has been submitted for inclusion into   #
11829 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
11830 #  a released version of Autoconf we should remove this    #
11831 #  macro and use it instead.                               #
11832 ############################################################
11833 # LT_AC_PROG_SED
11834 # --------------
11835 # Check for a fully-functional sed program, that truncates
11836 # as few characters as possible.  Prefer GNU sed if found.
11837 AC_DEFUN([LT_AC_PROG_SED],
11838 [AC_MSG_CHECKING([for a sed that does not truncate output])
11839 AC_CACHE_VAL(lt_cv_path_SED,
11840 [# Loop through the user's path and test for sed and gsed.
11841 # Then use that list of sed's as ones to test for truncation.
11842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11843 for as_dir in $PATH
11845   IFS=$as_save_IFS
11846   test -z "$as_dir" && as_dir=.
11847   for lt_ac_prog in sed gsed; do
11848     for ac_exec_ext in '' $ac_executable_extensions; do
11849       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11850         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11851       fi
11852     done
11853   done
11854 done
11855 lt_ac_max=0
11856 lt_ac_count=0
11857 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
11858 # along with /bin/sed that truncates output.
11859 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11860   test ! -f $lt_ac_sed && break
11861   cat /dev/null > conftest.in
11862   lt_ac_count=0
11863   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11864   # Check for GNU sed and select it if it is found.
11865   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11866     lt_cv_path_SED=$lt_ac_sed
11867     break
11868   fi
11869   while true; do
11870     cat conftest.in conftest.in >conftest.tmp
11871     mv conftest.tmp conftest.in
11872     cp conftest.in conftest.nl
11873     echo >>conftest.nl
11874     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11875     cmp -s conftest.out conftest.nl || break
11876     # 10000 chars as input seems more than enough
11877     test $lt_ac_count -gt 10 && break
11878     lt_ac_count=`expr $lt_ac_count + 1`
11879     if test $lt_ac_count -gt $lt_ac_max; then
11880       lt_ac_max=$lt_ac_count
11881       lt_cv_path_SED=$lt_ac_sed
11882     fi
11883   done
11884 done
11886 SED=$lt_cv_path_SED
11887 AC_MSG_RESULT([$SED])