1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15
dnl This file is part of the KDE libraries/packages
16
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
17
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
19
dnl This file is free software; you can redistribute it and/or
20
dnl modify it under the terms of the GNU Library General Public
21
dnl License as published by the Free Software Foundation; either
22
dnl version 2 of the License, or (at your option) any later version.
24
dnl This library is distributed in the hope that it will be useful,
25
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
26
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
dnl Library General Public License for more details.
29
dnl You should have received a copy of the GNU Library General Public License
30
dnl along with this library; see the file COPYING.LIB. If not, write to
31
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32
dnl Boston, MA 02111-1307, USA.
35
dnl Please do not modify this file unless you expect your modifications to be
36
dnl carried into every other module in the repository.
38
dnl Single-module modifications are best placed in configure.in for kdelibs
39
dnl and kdebase or configure.in.in if present.
42
dnl Internal subroutine of AC_PATH_X.
43
dnl Set ac_x_includes and/or ac_x_libraries.
44
AC_DEFUN([KDE_PATH_X_DIRECT],
46
AC_REQUIRE([KDE_CHECK_LIB64])
48
if test "$ac_x_includes" = NO; then
49
# Guess where to find include files, by looking for this one X11 .h file.
50
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
52
# First, try using that file with no special directory specified.
53
AC_TRY_CPP([#include <$x_direct_test_include>],
54
[# We can compile using X headers with no special include directory.
56
[# Look for the header file in a standard set of common directories.
57
# Check X11 before X11Rn because it is often a symlink to the current release.
69
/usr/local/X11/include \
70
/usr/local/X11R6/include \
71
/usr/local/X11R5/include \
72
/usr/local/X11R4/include \
74
/usr/local/include/X11 \
75
/usr/local/include/X11R6 \
76
/usr/local/include/X11R5 \
77
/usr/local/include/X11R4 \
81
/usr/XFree86/include/X11 \
85
/usr/unsupported/include \
87
/usr/local/x11r5/include \
88
/usr/lpp/Xamples/include \
90
/usr/openwin/include \
91
/usr/openwin/share/include \
94
if test -r "$ac_dir/$x_direct_test_include"; then
99
fi # $ac_x_includes = NO
101
if test "$ac_x_libraries" = NO; then
102
# Check for the libraries.
104
test -z "$x_direct_test_library" && x_direct_test_library=Xt
105
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
107
# See if we find them without any special options.
108
# Don't add to $LIBS permanently.
110
LIBS="-l$x_direct_test_library $LIBS"
111
AC_TRY_LINK(, [${x_direct_test_function}()],
112
[LIBS="$ac_save_LIBS"
113
# We can link X programs with no special library path.
115
[LIBS="$ac_save_LIBS"
116
# First see if replacing the include by lib works.
117
# Check X11 before X11Rn because it is often a symlink to the current release.
118
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
119
/usr/X11/lib${kdelibsuff} \
120
/usr/X11R6/lib${kdelibsuff} \
121
/usr/X11R5/lib${kdelibsuff} \
122
/usr/X11R4/lib${kdelibsuff} \
124
/usr/lib${kdelibsuff}/X11 \
125
/usr/lib${kdelibsuff}/X11R6 \
126
/usr/lib${kdelibsuff}/X11R5 \
127
/usr/lib${kdelibsuff}/X11R4 \
129
/usr/local/X11/lib${kdelibsuff} \
130
/usr/local/X11R6/lib${kdelibsuff} \
131
/usr/local/X11R5/lib${kdelibsuff} \
132
/usr/local/X11R4/lib${kdelibsuff} \
134
/usr/local/lib${kdelibsuff}/X11 \
135
/usr/local/lib${kdelibsuff}/X11R6 \
136
/usr/local/lib${kdelibsuff}/X11R5 \
137
/usr/local/lib${kdelibsuff}/X11R4 \
139
/usr/X386/lib${kdelibsuff} \
140
/usr/x386/lib${kdelibsuff} \
141
/usr/XFree86/lib${kdelibsuff}/X11 \
143
/usr/lib${kdelibsuff} \
144
/usr/local/lib${kdelibsuff} \
145
/usr/unsupported/lib${kdelibsuff} \
146
/usr/athena/lib${kdelibsuff} \
147
/usr/local/x11r5/lib${kdelibsuff} \
148
/usr/lpp/Xamples/lib${kdelibsuff} \
149
/lib/usr/lib${kdelibsuff}/X11 \
151
/usr/openwin/lib${kdelibsuff} \
152
/usr/openwin/share/lib${kdelibsuff} \
155
dnl Don't even attempt the hair of trying to link an X program!
156
for ac_extension in a so sl; do
157
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
158
ac_x_libraries=$ac_dir
163
fi # $ac_x_libraries = NO
167
dnl ------------------------------------------------------------------------
168
dnl Find a file (or one of more files in a list of dirs)
169
dnl ------------------------------------------------------------------------
171
AC_DEFUN([AC_FIND_FILE],
178
echo "configure: __oline__: $i/$j" >&AC_FD_CC
179
if test -r "$i/$j"; then
180
echo "taking that" >&AC_FD_CC
188
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
189
dnl if-not-found, test-parameter)
190
AC_DEFUN([KDE_FIND_PATH],
192
AC_MSG_CHECKING([for $1])
193
if test -n "$$2"; then
196
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
198
AC_CACHE_VAL(kde_cv_path_$kde_cache,
210
if test -x "$dir/$1"; then
213
evalstr="$dir/$1 $5 2>&1 "
214
if eval $evalstr; then
215
kde_cv_path="$dir/$1"
219
kde_cv_path="$dir/$1"
225
eval "kde_cv_path_$kde_cache=$kde_cv_path"
229
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
233
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
234
AC_MSG_RESULT(not found)
237
AC_MSG_RESULT($kde_cv_path)
243
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
245
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
246
Please check whether you installed Qt correctly.
247
You need to have a running moc binary.
248
configure tried to run $ac_cv_path_moc and the test didn't
249
succeed. If configure shouldn't have tried this one, set
250
the environment variable MOC to the right one before running
255
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
257
AC_MSG_WARN([No Qt ui compiler (uic) found!
258
Please check whether you installed Qt correctly.
259
You need to have a running uic binary.
260
configure tried to run $ac_cv_path_uic and the test didn't
261
succeed. If configure shouldn't have tried this one, set
262
the environment variable UIC to the right one before running
268
AC_DEFUN([KDE_CHECK_UIC_FLAG],
270
AC_MSG_CHECKING([whether uic supports -$1 ])
271
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
272
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
274
cat >conftest.ui <<EOT
275
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
277
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
278
if AC_TRY_EVAL(ac_uic_testrun); then
279
eval "kde_cv_prog_uic_$kde_cache=yes"
281
eval "kde_cv_prog_uic_$kde_cache=no"
286
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
298
dnl ------------------------------------------------------------------------
299
dnl Find the meta object compiler and the ui compiler in the PATH,
300
dnl in $QTDIR/bin, and some more usual places
301
dnl ------------------------------------------------------------------------
303
AC_DEFUN([AC_PATH_QT_MOC_UIC],
305
AC_REQUIRE([KDE_CHECK_PERL])
307
for dir in $kde_qt_dirs; do
308
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
310
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
311
if test ! "$ac_qt_bindir" = "NO"; then
312
qt_bindirs="$ac_qt_bindir $qt_bindirs"
315
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
316
if test -z "$UIC_NOT_NEEDED"; then
317
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
318
if test -z "$UIC_PATH" ; then
319
KDE_UIC_ERROR_MESSAGE
324
if test $kde_qtver = 3; then
325
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
326
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
328
if test x$ac_uic_supports_libpath = xyes; then
329
UIC="$UIC -L \$(kde_widgetdir)"
331
if test x$ac_uic_supports_nounload = xyes; then
337
UIC="echo uic not available: "
344
if test $kde_qtver = 3; then
351
AC_DEFUN([KDE_1_CHECK_PATHS],
353
KDE_1_CHECK_PATH_HEADERS
357
if test -n "$USE_RPATH"; then
359
if test -n "$kde_libraries"; then
360
KDE_TEST_RPATH="-R $kde_libraries"
363
if test -n "$qt_libraries"; then
364
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
367
if test -n "$x_libraries"; then
368
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
371
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
374
AC_MSG_CHECKING([for KDE libraries installed])
375
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'
377
if AC_TRY_EVAL(ac_link) && test -s conftest; then
380
AC_MSG_ERROR([your system fails at linking a small KDE application!
381
Check, if your compiler is installed correctly and if you have used the
382
same compiler to compile Qt and kdelibs as you did use now.
383
For more details about this problem, look at the end of config.log.])
386
if eval `KDEDIR= ./conftest 2>&5`; then
392
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
393
kde_have_all_paths=yes
395
KDE_SET_PATHS($kde_result)
399
AC_DEFUN([KDE_SET_PATHS],
401
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
402
kde_htmldir=\"$kde_htmldir\" \
403
kde_appsdir=\"$kde_appsdir\" \
404
kde_icondir=\"$kde_icondir\" \
405
kde_sounddir=\"$kde_sounddir\" \
406
kde_datadir=\"$kde_datadir\" \
407
kde_locale=\"$kde_locale\" \
408
kde_cgidir=\"$kde_cgidir\" \
409
kde_confdir=\"$kde_confdir\" \
410
kde_kcfgdir=\"$kde_kcfgdir\" \
411
kde_mimedir=\"$kde_mimedir\" \
412
kde_toolbardir=\"$kde_toolbardir\" \
413
kde_wallpaperdir=\"$kde_wallpaperdir\" \
414
kde_templatesdir=\"$kde_templatesdir\" \
415
kde_bindir=\"$kde_bindir\" \
416
kde_servicesdir=\"$kde_servicesdir\" \
417
kde_servicetypesdir=\"$kde_servicetypesdir\" \
418
kde_moduledir=\"$kde_moduledir\" \
419
kde_styledir=\"$kde_styledir\" \
420
kde_widgetdir=\"$kde_widgetdir\" \
421
xdg_appsdir=\"$xdg_appsdir\" \
422
xdg_menudir=\"$xdg_menudir\" \
423
xdg_directorydir=\"$xdg_directorydir\" \
427
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
429
if test "$1" = "default"; then
431
if test -z "$kde_htmldir"; then
432
kde_htmldir='\${datadir}/doc/HTML'
434
if test -z "$kde_appsdir"; then
435
kde_appsdir='\${datadir}/applnk'
437
if test -z "$kde_icondir"; then
438
kde_icondir='\${datadir}/icons'
440
if test -z "$kde_sounddir"; then
441
kde_sounddir='\${datadir}/sounds'
443
if test -z "$kde_datadir"; then
444
kde_datadir='\${datadir}/apps'
446
if test -z "$kde_locale"; then
447
kde_locale='\${datadir}/locale'
449
if test -z "$kde_cgidir"; then
450
kde_cgidir='\${exec_prefix}/cgi-bin'
452
if test -z "$kde_confdir"; then
453
kde_confdir='\${datadir}/config'
455
if test -z "$kde_kcfgdir"; then
456
kde_kcfgdir='\${datadir}/config.kcfg'
458
if test -z "$kde_mimedir"; then
459
kde_mimedir='\${datadir}/mimelnk'
461
if test -z "$kde_toolbardir"; then
462
kde_toolbardir='\${datadir}/toolbar'
464
if test -z "$kde_wallpaperdir"; then
465
kde_wallpaperdir='\${datadir}/wallpapers'
467
if test -z "$kde_templatesdir"; then
468
kde_templatesdir='\${datadir}/templates'
470
if test -z "$kde_bindir"; then
471
kde_bindir='\${exec_prefix}/bin'
473
if test -z "$kde_servicesdir"; then
474
kde_servicesdir='\${datadir}/services'
476
if test -z "$kde_servicetypesdir"; then
477
kde_servicetypesdir='\${datadir}/servicetypes'
479
if test -z "$kde_moduledir"; then
480
if test "$kde_qtver" = "2"; then
481
kde_moduledir='\${libdir}/kde2'
483
kde_moduledir='\${libdir}/kde3'
486
if test -z "$kde_styledir"; then
487
kde_styledir='\${libdir}/kde3/plugins/styles'
489
if test -z "$kde_widgetdir"; then
490
kde_widgetdir='\${libdir}/kde3/plugins/designer'
492
if test -z "$xdg_appsdir"; then
493
xdg_appsdir='\${datadir}/applications/kde'
495
if test -z "$xdg_menudir"; then
496
xdg_menudir='\${sysconfdir}/xdg/menus'
498
if test -z "$xdg_directorydir"; then
499
xdg_directorydir='\${datadir}/desktop-directories'
502
KDE_SET_PATHS(defaults)
506
if test $kde_qtver = 1; then
507
AC_MSG_RESULT([compiling])
510
AC_MSG_ERROR([path checking not yet supported for KDE 2])
516
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
517
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
518
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
519
test -z "$kde_datadir" || test -z "$kde_locale" ||
520
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
521
test -z "$kde_kcfgdir" ||
522
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
523
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
524
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
525
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
526
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
527
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
528
test "x$kde_have_all_paths" != "xyes"; then
529
kde_have_all_paths=no
533
AC_DEFUN([KDE_MISSING_PROG_ERROR],
535
AC_MSG_ERROR([The important program $1 was not found!
536
Please check whether you installed KDE correctly.
540
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
542
AC_MSG_ERROR([The important program $1 was not found!
543
Please check whether you installed aRts correctly or use
544
--without-arts to compile without aRts support (this will remove functionality).
548
AC_DEFUN([KDE_SUBST_PROGRAMS],
551
AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
552
[build_arts=$withval],
555
AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
557
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"
558
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
559
if test -n "$KDEDIRS"; then
562
for dir in $KDEDIRS; do
563
kde_default_bindirs="$dir/bin $kde_default_bindirs "
567
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
568
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
569
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
570
if test "$build_arts" != "no"; then
571
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
572
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
574
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
575
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
578
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
581
if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
586
if test -n "$kde32ornewer"; then
587
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
588
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
590
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
592
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
593
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
594
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
595
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
596
if test "$KDE_XSL_STYLESHEET" = "NO"; then
597
KDE_XSL_STYLESHEET=""
599
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
603
DCOP_DEPENDENCIES='$(DCOPIDL)'
604
if test -n "$kde32ornewer"; then
605
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
606
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
607
AC_SUBST(KCONFIG_COMPILER)
608
AC_SUBST(KCFG_DEPENDENCIES)
612
AC_SUBST(DCOPIDL2CPP)
613
AC_SUBST(DCOP_DEPENDENCIES)
615
AC_SUBST(ARTSCCONFIG)
618
AC_SUBST(KDE_XSL_STYLESHEET)
621
if test -x "$KDECONFIG"; then # it can be "compiled"
622
kde_libs_prefix=`$KDECONFIG --prefix`
623
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
624
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
625
This means it has been moved since you installed it.
626
This won't work. Please recompile kdelibs for the new prefix.
629
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
631
kde_libs_prefix='$(prefix)'
632
kde_libs_htmldir='$(kde_htmldir)'
634
AC_SUBST(kde_libs_prefix)
635
AC_SUBST(kde_libs_htmldir)
638
AC_DEFUN([AC_CREATE_KFSSTND],
640
AC_REQUIRE([AC_CHECK_RPATH])
642
AC_MSG_CHECKING([for KDE paths])
645
AC_CACHE_VAL(kde_cv_all_paths,
647
KDE_SET_DEFAULT_PATHS($1)
650
eval "$kde_cv_all_paths"
651
KDE_CHECK_PATHS_FOR_COMPLETENESS
652
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
653
# wrong values were cached, may be, we can set better ones
655
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
656
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
657
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
658
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
662
xdg_appsdir = xdg_menudir= xdg_directorydir=
663
KDE_SET_DEFAULT_PATHS($1)
664
eval "$kde_cv_all_paths"
665
KDE_CHECK_PATHS_FOR_COMPLETENESS
666
kde_result="$kde_result (cache overridden)"
668
if test "$kde_have_all_paths" = "no"; then
669
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
670
Since it had compiled and linked before, it must be a strange problem on your system.
671
Look at config.log for details. If you are not able to fix this, look at
672
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
673
(If you're using an egcs version on Linux, you may update binutils!)
677
AC_MSG_RESULT($kde_result)
686
AC_DEFUN([AC_SUBST_KFSSTND],
688
AC_SUBST(kde_htmldir)
689
AC_SUBST(kde_appsdir)
690
AC_SUBST(kde_icondir)
691
AC_SUBST(kde_sounddir)
692
AC_SUBST(kde_datadir)
694
AC_SUBST(kde_confdir)
695
AC_SUBST(kde_kcfgdir)
696
AC_SUBST(kde_mimedir)
697
AC_SUBST(kde_wallpaperdir)
699
dnl X Desktop Group standards
700
AC_SUBST(xdg_appsdir)
701
AC_SUBST(xdg_menudir)
702
AC_SUBST(xdg_directorydir)
704
AC_SUBST(kde_templatesdir)
705
AC_SUBST(kde_servicesdir)
706
AC_SUBST(kde_servicetypesdir)
707
AC_SUBST(kde_moduledir)
708
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
709
AC_SUBST(kde_styledir)
710
AC_SUBST(kde_widgetdir)
711
if test "$kde_qtver" = 1; then
712
kde_minidir="$kde_icondir/mini"
714
# for KDE 1 - this breaks KDE2 apps using minidir, but
715
# that's the plan ;-/
716
kde_minidir="/dev/null"
718
dnl AC_SUBST(kde_minidir)
719
dnl AC_SUBST(kde_cgidir)
720
dnl AC_SUBST(kde_toolbardir)
723
AC_DEFUN([KDE_MISC_TESTS],
725
dnl Checks for libraries.
726
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
728
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
731
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
732
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
733
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
734
You should install libcrypt from another source or configure with PAM
739
if test $kde_have_crypt = yes; then
740
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
743
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
744
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
745
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
746
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
748
AC_CHECK_FUNC(inet_ntoa)
749
if test $ac_cv_func_inet_ntoa = no; then
750
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
752
AC_CHECK_FUNC(connect)
753
if test $ac_cv_func_connect = no; then
754
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
758
AC_CHECK_FUNC(remove)
759
if test $ac_cv_func_remove = no; then
760
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
763
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
764
AC_CHECK_FUNC(shmat, ,
765
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
767
# more headers that need to be explicitly included on darwin
768
AC_CHECK_HEADERS(sys/types.h stdint.h)
770
# darwin requires a poll emulation library
771
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
773
# CoreAudio framework
774
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
775
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
776
FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
781
AC_SUBST(FRAMEWORK_COREAUDIO)
782
LIBSOCKET="$X_EXTRA_LIBS"
784
AC_SUBST(X_EXTRA_LIBS)
785
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
788
case $host in dnl this *is* LynxOS specific
790
AC_MSG_CHECKING([LynxOS header file wrappers])
791
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
792
AC_MSG_RESULT(disabled)
793
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
801
# darwin needs this to initialize the environment
802
AC_CHECK_HEADERS(crt_externs.h)
803
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
805
AH_VERBATIM(_DARWIN_ENVIRON,
807
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
808
# include <sys/time.h>
809
# include <crt_externs.h>
810
# define environ (*_NSGetEnviron())
814
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
817
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
818
* that defines bzero.
826
AC_CHECK_FUNCS([vsnprintf snprintf])
830
* On HP-UX, the declaration of vsnprintf() is needed every time !
833
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
843
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
847
int snprintf(char *str, size_t n, char const *fmt, ...);
853
dnl ------------------------------------------------------------------------
854
dnl Find the header files and libraries for X-Windows. Extended the
856
dnl ------------------------------------------------------------------------
860
AC_REQUIRE([KDE_MISC_TESTS])dnl
861
AC_REQUIRE([KDE_CHECK_LIB64])
865
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
866
kde_use_qt_emb=$enableval,
872
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
873
kde_use_qt_emb_palm=$enableval,
874
kde_use_qt_emb_palm=no
879
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
880
kde_use_qt_mac=$enableval,
884
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
886
AC_MSG_CHECKING(for X)
888
AC_CACHE_VAL(kde_cv_have_x,
889
[# One or both of the vars are not set, and there is no cached value.
890
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
893
kde_x_includes=$x_includes
895
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
898
kde_x_libraries=$x_libraries
901
# below we use the standard autoconf calls
902
ac_x_libraries=$kde_x_libraries
903
ac_x_includes=$kde_x_includes
906
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
907
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
908
dnl location. The correct location is /usr/lib32 or an undefined value
909
dnl (the linker is smart enough to pick the correct default library).
910
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
911
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
912
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
913
dnl x_includes should be left alone.
921
if test -z "$ac_x_includes"; then
924
if test -z "$ac_x_libraries"; then
925
ac_x_libraries="/usr/lib${kdelibsuff}"
928
#from now on we use our own again
930
# when the user already gave --x-includes, we ignore
931
# what the standard autoconf macros told us.
932
if test "$kde_x_includes" = NO; then
933
kde_x_includes=$ac_x_includes
936
# for --x-libraries too
937
if test "$kde_x_libraries" = NO; then
938
kde_x_libraries=$ac_x_libraries
941
if test "$kde_x_includes" = NO; then
942
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
945
if test "$kde_x_libraries" = NO; then
946
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
949
# Record where we found X for the cache.
950
kde_cv_have_x="have_x=yes \
951
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
954
eval "$kde_cv_have_x"
956
if test "$have_x" != yes; then
957
AC_MSG_RESULT($have_x)
960
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
963
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
965
x_includes="."; dnl better than nothing :-
967
x_includes=$kde_x_includes
968
X_INCLUDES="-I$x_includes"
971
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
973
x_libraries="/usr/lib"; dnl better than nothing :-
975
x_libraries=$kde_x_libraries
976
X_LDFLAGS="-L$x_libraries"
978
all_includes="$X_INCLUDES"
979
all_libraries="$X_LDFLAGS"
981
# Check for libraries that X11R6 Xt/Xaw programs need.
982
ac_save_LDFLAGS="$LDFLAGS"
983
LDFLAGS="$LDFLAGS $X_LDFLAGS"
984
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
985
# check for ICE first), but we must link in the order -lSM -lICE or
986
# we get undefined symbols. So assume we have SM if we have ICE.
987
# These have to be linked with before -lX11, unlike the other
988
# libraries we check for below, so use a different variable.
989
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
990
AC_CHECK_LIB(ICE, IceConnectionNumber,
991
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
992
LDFLAGS="$ac_save_LDFLAGS"
994
LIB_X11='-lX11 $(LIBSOCKET)'
996
AC_MSG_CHECKING(for libXext)
997
AC_CACHE_VAL(kde_cv_have_libXext,
999
kde_ldflags_safe="$LDFLAGS"
1000
kde_libs_safe="$LIBS"
1002
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1003
LIBS="-lXext -lX11 $LIBSOCKET"
1008
# include <stdlib.h>
1012
printf("hello Xext\n");
1014
kde_cv_have_libXext=yes,
1015
kde_cv_have_libXext=no
1018
LDFLAGS=$kde_ldflags_safe
1022
AC_MSG_RESULT($kde_cv_have_libXext)
1024
if test "$kde_cv_have_libXext" = "no"; then
1025
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1026
can't find it itself, we stop here assuming that make wouldn't find
1033
elif test "$kde_use_qt_emb" = "yes"; then
1034
dnl We're using QT Embedded
1036
CXXFLAGS="$CXXFLAGS -fno-rtti"
1037
QTE_NORTTI="-fno-rtti -DQWS"
1047
elif test "$kde_use_qt_mac" = "yes"; then
1048
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1049
dnl be included to get the information) --Sam
1050
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1051
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1062
AC_SUBST(X_PRE_LIBS)
1064
AC_SUBST(LIB_XRENDER)
1066
AC_SUBST(X_INCLUDES)
1068
AC_SUBST(x_includes)
1069
AC_SUBST(x_libraries)
1070
AC_SUBST(QTE_NORTTI)
1075
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1077
AC_REQUIRE([KDE_USE_QT])
1078
cat > conftest.$ac_ext <<EOF
1079
#include "confdefs.h"
1080
#include <qglobal.h>
1081
#include <qapplication.h>
1083
if test "$kde_qtver" = "2"; then
1084
cat >> conftest.$ac_ext <<EOF
1086
#include <qstring.h>
1090
if test $kde_qtsubver -gt 0; then
1091
cat >> conftest.$ac_ext <<EOF
1092
#if QT_VERSION < 210
1099
if test "$kde_qtver" = "3"; then
1100
cat >> conftest.$ac_ext <<EOF
1101
#include <qcursor.h>
1102
#include <qstylefactory.h>
1103
#include <private/qucomextra_p.h>
1107
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1108
cat >> conftest.$ac_ext <<EOF
1114
if test "$kde_qtver" = "2"; then
1115
cat >> conftest.$ac_ext <<EOF
1116
QStringList *t = new QStringList();
1119
if test $kde_qtsubver -gt 0; then
1120
cat >> conftest.$ac_ext <<EOF
1122
s.setLatin1("Elvis is alive", 14);
1126
if test "$kde_qtver" = "3"; then
1127
cat >> conftest.$ac_ext <<EOF
1128
(void)QStyleFactory::create(QString::null);
1129
QCursor c(Qt::WhatsThisCursor);
1132
cat >> conftest.$ac_ext <<EOF
1138
AC_DEFUN([KDE_USE_QT],
1140
if test -z "$1"; then
1141
# Current default Qt version: 3.2
1145
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1146
# following is the check if subversion isnt found in passed argument
1147
if test "$kde_qtsubver" = "$1"; then
1150
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1151
if test "$kde_qtver" = "1"; then
1156
if test -z "$2"; then
1157
if test "$kde_qtver" = "2"; then
1158
if test $kde_qtsubver -gt 0; then
1159
kde_qt_minversion=">= Qt 2.2.2"
1161
kde_qt_minversion=">= Qt 2.0.2"
1164
if test "$kde_qtver" = "3"; then
1165
if test $kde_qtsubver -gt 0; then
1166
if test $kde_qtsubver -gt 1; then
1167
kde_qt_minversion=">= Qt 3.2"
1169
kde_qt_minversion=">= Qt 3.1 (20021021)"
1172
kde_qt_minversion=">= Qt 3.0"
1175
if test "$kde_qtver" = "1"; then
1176
kde_qt_minversion=">= 1.42 and < 2.0"
1179
kde_qt_minversion="$2"
1182
if test -z "$3"; then
1183
if test $kde_qtver = 3; then
1184
if test $kde_qtsubver -gt 0; then
1185
kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
1186
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1187
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1189
kde_qt_verstring="QT_VERSION >= 300"
1192
if test $kde_qtver = 2; then
1193
if test $kde_qtsubver -gt 0; then
1194
kde_qt_verstring="QT_VERSION >= 222"
1196
kde_qt_verstring="QT_VERSION >= 200"
1199
if test $kde_qtver = 1; then
1200
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1203
kde_qt_verstring="$3"
1206
if test $kde_qtver = 3; then
1207
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1209
if test $kde_qtver = 2; then
1210
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1212
if test $kde_qtver = 1; then
1213
kde_qt_dirs="$QTDIR /usr/lib/qt"
1217
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1219
AC_REQUIRE([KDE_USE_QT])
1220
AC_MSG_CHECKING([if Qt compiles without flags])
1221
AC_CACHE_VAL(kde_cv_qt_direct,
1225
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1226
ac_LIBRARY_PATH="$LIBRARY_PATH"
1227
ac_cxxflags_safe="$CXXFLAGS"
1228
ac_ldflags_safe="$LDFLAGS"
1229
ac_libs_safe="$LIBS"
1231
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1232
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1233
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1234
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1236
LIBS="$LIBQT $LIBSOCKET"
1239
export LD_LIBRARY_PATH
1243
KDE_PRINT_QT_PROGRAM
1245
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1246
kde_cv_qt_direct="yes"
1248
kde_cv_qt_direct="no"
1249
echo "configure: failed program was:" >&AC_FD_CC
1250
cat conftest.$ac_ext >&AC_FD_CC
1254
CXXFLAGS="$ac_cxxflags_safe"
1255
LDFLAGS="$ac_ldflags_safe"
1256
LIBS="$ac_libs_safe"
1258
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1259
export LD_LIBRARY_PATH
1260
LIBRARY_PATH="$ac_LIBRARY_PATH"
1265
if test "$kde_cv_qt_direct" = "yes"; then
1274
dnl ------------------------------------------------------------------------
1275
dnl Try to find the Qt headers and libraries.
1276
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1277
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1278
dnl ------------------------------------------------------------------------
1280
AC_DEFUN([AC_PATH_QT_1_3],
1282
AC_REQUIRE([K_PATH_X])
1283
AC_REQUIRE([KDE_USE_QT])
1284
AC_REQUIRE([KDE_CHECK_LIB64])
1286
dnl ------------------------------------------------------------------------
1287
dnl Add configure flag to enable linking to MT version of Qt library.
1288
dnl ------------------------------------------------------------------------
1292
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1293
kde_use_qt_mt=$enableval,
1295
if test $kde_qtver = 3; then
1305
dnl ------------------------------------------------------------------------
1306
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1307
dnl ------------------------------------------------------------------------
1311
if test "x$kde_use_qt_mt" = "xyes"; then
1313
if test "x$kde_use_threading" = "xyes"; then
1314
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1315
KDE_MT_LDFLAGS="$USE_THREADS"
1316
KDE_MT_LIBS="$LIBPTHREAD"
1321
AC_SUBST(KDE_MT_LDFLAGS)
1322
AC_SUBST(KDE_MT_LIBS)
1324
kde_qt_was_given=yes
1326
dnl ------------------------------------------------------------------------
1327
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1328
dnl ------------------------------------------------------------------------
1329
if test -z "$LIBQT_GLOB"; then
1330
if test "x$kde_use_qt_emb" = "xyes"; then
1331
LIBQT_GLOB="libqte.*"
1333
LIBQT_GLOB="libqt.*"
1337
if test -z "$LIBQT"; then
1338
dnl ------------------------------------------------------------
1339
dnl If we got --enable-embedded then adjust the Qt library name.
1340
dnl ------------------------------------------------------------
1341
if test "x$kde_use_qt_emb" = "xyes"; then
1347
kde_int_qt="-l$qtlib"
1353
if test -z "$LIBQPE"; then
1354
dnl ------------------------------------------------------------
1355
dnl If we got --enable-palmtop then add -lqpe to the link line
1356
dnl ------------------------------------------------------------
1357
if test "x$kde_use_qt_emb" = "xyes"; then
1358
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1368
dnl ------------------------------------------------------------------------
1369
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1370
dnl ------------------------------------------------------------------------
1372
if test "x$kde_use_qt_mt" = "xyes"; then
1373
if test -z "$LIBQT"; then
1375
kde_int_qt="-l$qtlib-mt"
1378
kde_int_qt="$qtlib-mt"
1380
LIBQT_GLOB="lib$qtlib-mt.*"
1381
USING_QT_MT="using -mt"
1386
if test $kde_qtver != 1; then
1388
AC_REQUIRE([AC_FIND_PNG])
1389
AC_REQUIRE([AC_FIND_JPEG])
1390
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1393
if test $kde_qtver = 3; then
1394
AC_REQUIRE([KDE_CHECK_LIBDL])
1395
LIBQT="$LIBQT $LIBDL"
1398
AC_MSG_CHECKING([for Qt])
1400
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1401
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1403
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1407
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1408
[ ac_qt_includes="$withval"/include
1409
ac_qt_libraries="$withval"/lib${kdelibsuff}
1410
ac_qt_bindir="$withval"/bin
1413
AC_ARG_WITH(qt-includes,
1414
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1416
ac_qt_includes="$withval"
1419
kde_qt_libs_given=no
1421
AC_ARG_WITH(qt-libraries,
1422
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1423
[ ac_qt_libraries="$withval"
1424
kde_qt_libs_given=yes
1427
AC_CACHE_VAL(ac_cv_have_qt,
1428
[#try to guess Qt locations
1431
for dir in $kde_qt_dirs; do
1432
qt_incdirs="$qt_incdirs $dir/include $dir"
1434
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"
1435
if test ! "$ac_qt_includes" = "NO"; then
1436
qt_incdirs="$ac_qt_includes $qt_incdirs"
1439
if test "$kde_qtver" != "1"; then
1440
kde_qt_header=qstyle.h
1442
kde_qt_header=qglobal.h
1445
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1446
ac_qt_includes="$qt_incdir"
1449
for dir in $kde_qt_dirs; do
1450
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1452
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1453
if test ! "$ac_qt_libraries" = "NO"; then
1454
qt_libdir=$ac_qt_libraries
1456
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1457
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1459
for dir in $qt_libdirs; do
1460
try="ls -1 $dir/${LIBQT_GLOB}"
1461
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1464
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1465
if test -e "$a"; then
1466
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1471
ac_qt_libraries="$qt_libdir"
1476
ac_cxxflags_safe="$CXXFLAGS"
1477
ac_ldflags_safe="$LDFLAGS"
1478
ac_libs_safe="$LIBS"
1480
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1481
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1482
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1484
KDE_PRINT_QT_PROGRAM
1486
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1489
echo "configure: failed program was:" >&AC_FD_CC
1490
cat conftest.$ac_ext >&AC_FD_CC
1491
ac_qt_libraries="NO"
1494
CXXFLAGS="$ac_cxxflags_safe"
1495
LDFLAGS="$ac_ldflags_safe"
1496
LIBS="$ac_libs_safe"
1499
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1500
ac_cv_have_qt="have_qt=no"
1503
if test "$ac_qt_includes" = NO; then
1504
if test "$ac_qt_libraries" = NO; then
1505
ac_qt_notfound="(headers and libraries)";
1507
ac_qt_notfound="(headers)";
1510
if test "x$kde_use_qt_mt" = "xyes"; then
1512
Make sure that you have compiled Qt with thread support!"
1513
ac_qt_notfound="(library $qtlib-mt)";
1515
ac_qt_notfound="(library $qtlib)";
1519
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1520
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1526
eval "$ac_cv_have_qt"
1528
if test "$have_qt" != yes; then
1529
AC_MSG_RESULT([$have_qt]);
1531
ac_cv_have_qt="have_qt=yes \
1532
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1533
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1535
qt_libraries="$ac_qt_libraries"
1536
qt_includes="$ac_qt_includes"
1539
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1540
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1543
AC_SUBST(qt_libraries)
1544
AC_SUBST(qt_includes)
1546
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1549
QT_INCLUDES="-I$qt_includes"
1550
all_includes="$QT_INCLUDES $all_includes"
1553
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1556
QT_LDFLAGS="-L$qt_libraries"
1557
all_libraries="$all_libraries $QT_LDFLAGS"
1559
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1561
AC_SUBST(QT_INCLUDES)
1562
AC_SUBST(QT_LDFLAGS)
1567
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1568
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1570
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1572
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1573
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1574
if test -e "$a"; then
1575
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1586
AC_DEFUN([AC_PATH_QT],
1591
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1593
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1595
if test x$ac_uic_supports_libpath = xyes; then
1597
AC_MSG_CHECKING([if UIC has KDE plugins available])
1598
AC_CACHE_VAL(kde_cv_uic_plugins,
1600
cat > actest.ui << EOF
1601
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1602
<class>NewConnectionDialog</class>
1603
<widget class="QDialog">
1604
<widget class="KLineEdit">
1605
<property name="name">
1606
<cstring>testInput</cstring>
1615
kde_cv_uic_plugins=no
1616
kde_line="$UIC_PATH -L $kde_widgetdir"
1617
if test x$ac_uic_supports_nounload = xyes; then
1618
kde_line="$kde_line -nounload"
1620
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1621
if AC_TRY_EVAL(kde_line); then
1622
# if you're trying to debug this check and think it's incorrect,
1623
# better check your installation. The check _is_ correct - your
1624
# installation is not.
1625
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1626
kde_cv_uic_plugins=yes
1629
rm -f actest.ui actest.cpp
1632
AC_MSG_RESULT([$kde_cv_uic_plugins])
1633
if test "$kde_cv_uic_plugins" != yes; then
1634
AC_MSG_ERROR([you need to install kdelibs first.])
1639
AC_DEFUN([KDE_CHECK_FINAL],
1641
AC_ARG_ENABLE(final,
1642
AC_HELP_STRING([--enable-final],
1643
[build size optimized apps (experimental - needs lots of memory)]),
1644
kde_use_final=$enableval, kde_use_final=no)
1646
if test "x$kde_use_final" = "xyes"; then
1647
KDE_USE_FINAL_TRUE=""
1648
KDE_USE_FINAL_FALSE="#"
1650
KDE_USE_FINAL_TRUE="#"
1651
KDE_USE_FINAL_FALSE=""
1653
AC_SUBST(KDE_USE_FINAL_TRUE)
1654
AC_SUBST(KDE_USE_FINAL_FALSE)
1657
AC_DEFUN([KDE_CHECK_CLOSURE],
1659
AC_ARG_ENABLE(closure,
1660
AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1661
kde_use_closure=$enableval, kde_use_closure=no)
1664
if test "x$kde_use_closure" = "xyes"; then
1665
KDE_USE_CLOSURE_TRUE=""
1666
KDE_USE_CLOSURE_FALSE="#"
1667
# CXXFLAGS="$CXXFLAGS $REPO"
1669
KDE_USE_CLOSURE_TRUE="#"
1670
KDE_USE_CLOSURE_FALSE=""
1674
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1675
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1676
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1677
[KDE_NO_UNDEFINED=""])],
1678
[KDE_NO_UNDEFINED=""])
1682
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1683
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1684
AC_SUBST(KDE_NO_UNDEFINED)
1687
AC_DEFUN([KDE_CHECK_NMCHECK],
1689
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1690
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1692
if test "$kde_use_nmcheck" = "yes"; then
1693
KDE_USE_NMCHECK_TRUE=""
1694
KDE_USE_NMCHECK_FALSE="#"
1696
KDE_USE_NMCHECK_TRUE="#"
1697
KDE_USE_NMCHECK_FALSE=""
1699
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1700
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1703
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1705
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1707
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1711
dnl ------------------------------------------------------------------------
1712
dnl Now, the same with KDE
1713
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1714
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1715
dnl ------------------------------------------------------------------------
1717
AC_DEFUN([AC_BASE_PATH_KDE],
1719
AC_REQUIRE([KDE_CHECK_STL])
1720
AC_REQUIRE([AC_PATH_QT])dnl
1721
AC_REQUIRE([KDE_CHECK_LIB64])
1724
AC_MSG_CHECKING([for KDE])
1726
if test "${prefix}" != NONE; then
1727
kde_includes=${includedir}
1728
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1730
kde_libraries=${libdir}
1731
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1740
AC_CACHE_VAL(ac_cv_have_kde,
1741
[#try to guess kde locations
1743
if test "$kde_qtver" = 1; then
1744
kde_check_header="ksock.h"
1745
kde_check_lib="libkdecore.la"
1747
kde_check_header="ksharedptr.h"
1748
kde_check_lib="libkio.la"
1751
if test -z "$1"; then
1753
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1754
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1755
kde_incdirs="$ac_kde_includes $kde_incdirs"
1756
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1757
ac_kde_includes="$kde_incdir"
1759
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1761
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1762
So, check this please and use another prefix!])
1765
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1766
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1767
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1768
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1769
ac_kde_libraries="$kde_libdir"
1772
dnl this might be somewhere else
1773
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1775
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1777
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1778
So, check this please and use another prefix!])
1781
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1783
I can't find the designer plugins. These are required and should have been installed
1787
if test -n "$kde_widgetdir"; then
1788
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1792
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1793
ac_cv_have_kde="have_kde=no"
1795
ac_cv_have_kde="have_kde=yes \
1796
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1801
ac_cv_have_kde="have_kde=no"
1806
eval "$ac_cv_have_kde"
1808
if test "$have_kde" != "yes"; then
1809
if test "${prefix}" = NONE; then
1810
ac_kde_prefix="$ac_default_prefix"
1812
ac_kde_prefix="$prefix"
1814
if test "$exec_prefix" = NONE; then
1815
ac_kde_exec_prefix="$ac_kde_prefix"
1816
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1818
ac_kde_exec_prefix="$exec_prefix"
1819
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1822
kde_libraries="${libdir}"
1823
kde_includes="${includedir}"
1826
ac_cv_have_kde="have_kde=yes \
1827
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1828
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1830
kde_libraries="$ac_kde_libraries"
1831
kde_includes="$ac_kde_includes"
1833
AC_SUBST(kde_libraries)
1834
AC_SUBST(kde_includes)
1836
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1839
KDE_INCLUDES="-I$kde_includes"
1840
all_includes="$KDE_INCLUDES $all_includes"
1843
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1845
KDE_LDFLAGS="-L$kde_libraries"
1846
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1847
all_libraries="$all_libraries $KDE_LDFLAGS"
1850
AC_SUBST(KDE_LDFLAGS)
1851
AC_SUBST(KDE_INCLUDES)
1853
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1855
all_libraries="$all_libraries $USER_LDFLAGS"
1856
all_includes="$all_includes $USER_INCLUDES"
1857
AC_SUBST(all_includes)
1858
AC_SUBST(all_libraries)
1860
if test -z "$1"; then
1861
KDE_CHECK_UIC_PLUGINS
1864
ac_kde_libraries="$kde_libdir"
1871
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1873
AC_MSG_CHECKING(for extra includes)
1874
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1875
kde_use_extra_includes="$withval",
1876
kde_use_extra_includes=NONE
1879
if test -n "$kde_use_extra_includes" && \
1880
test "$kde_use_extra_includes" != "NONE"; then
1884
for dir in $kde_use_extra_includes; do
1885
kde_extra_includes="$kde_extra_includes $dir"
1886
USER_INCLUDES="$USER_INCLUDES -I$dir"
1889
kde_use_extra_includes="added"
1891
kde_use_extra_includes="no"
1893
AC_SUBST(USER_INCLUDES)
1895
AC_MSG_RESULT($kde_use_extra_includes)
1898
AC_MSG_CHECKING(for extra libs)
1899
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1900
kde_use_extra_libs=$withval,
1901
kde_use_extra_libs=NONE
1903
if test -n "$kde_use_extra_libs" && \
1904
test "$kde_use_extra_libs" != "NONE"; then
1908
for dir in $kde_use_extra_libs; do
1909
kde_extra_libs="$kde_extra_libs $dir"
1910
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1911
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1914
kde_use_extra_libs="added"
1916
kde_use_extra_libs="no"
1919
AC_SUBST(USER_LDFLAGS)
1921
AC_MSG_RESULT($kde_use_extra_libs)
1925
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1927
AC_MSG_CHECKING([for KDE headers installed])
1930
cat > conftest.$ac_ext <<EOF
1932
# include <stdlib.h>
1935
#include "confdefs.h"
1939
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1940
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1941
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1942
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1943
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1944
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1945
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1946
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1947
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1948
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1949
printf("kde_wallpaperdir=\\"%s\\"\n",
1950
KApplication::kde_wallpaperdir().data());
1951
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1952
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1953
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1954
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1955
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1956
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1957
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1958
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1959
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1960
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1961
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1966
ac_save_CPPFLAGS=$CPPFLAGS
1967
CPPFLAGS="$all_includes $CPPFLAGS"
1968
if AC_TRY_EVAL(ac_compile); then
1971
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1972
Check, if you installed the KDE header files correctly.
1973
For more details about this problem, look at the end of config.log.])
1975
CPPFLAGS=$ac_save_CPPFLAGS
1980
AC_DEFUN([KDE_CHECK_KDEQTADDON],
1982
AC_MSG_CHECKING(for kde-qt-addon)
1983
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1985
kde_ldflags_safe="$LDFLAGS"
1986
kde_libs_safe="$LIBS"
1987
kde_cxxflags_safe="$CXXFLAGS"
1989
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1990
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1991
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1999
kde_cv_have_kdeqtaddon=yes,
2000
kde_cv_have_kdeqtaddon=no
2003
LDFLAGS=$kde_ldflags_safe
2005
CXXFLAGS=$kde_cxxflags_safe
2008
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2010
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2011
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2012
It is a separate package (and CVS module) named kde-qt-addon.])
2016
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2018
AC_REQUIRE([KDE_MISC_TESTS])
2019
AC_REQUIRE([KDE_CHECK_LIBDL])
2020
AC_REQUIRE([K_PATH_X])
2022
if test $kde_qtver = 3; then
2023
AC_SUBST(LIB_KDECORE, "-lkdecore")
2024
AC_SUBST(LIB_KDEUI, "-lkdeui")
2025
AC_SUBST(LIB_KIO, "-lkio")
2026
AC_SUBST(LIB_SMB, "-lsmb")
2027
AC_SUBST(LIB_KAB, "-lkab")
2028
AC_SUBST(LIB_KABC, "-lkabc")
2029
AC_SUBST(LIB_KHTML, "-lkhtml")
2030
AC_SUBST(LIB_KSPELL, "-lkspell")
2031
AC_SUBST(LIB_KPARTS, "-lkparts")
2032
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2033
AC_SUBST(LIB_KUTILS, "-lkutils")
2034
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2035
# these are for backward compatibility
2036
AC_SUBST(LIB_KSYCOCA, "-lkio")
2037
AC_SUBST(LIB_KFILE, "-lkio")
2038
elif test $kde_qtver = 2; then
2039
AC_SUBST(LIB_KDECORE, "-lkdecore")
2040
AC_SUBST(LIB_KDEUI, "-lkdeui")
2041
AC_SUBST(LIB_KIO, "-lkio")
2042
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2043
AC_SUBST(LIB_SMB, "-lsmb")
2044
AC_SUBST(LIB_KFILE, "-lkfile")
2045
AC_SUBST(LIB_KAB, "-lkab")
2046
AC_SUBST(LIB_KHTML, "-lkhtml")
2047
AC_SUBST(LIB_KSPELL, "-lkspell")
2048
AC_SUBST(LIB_KPARTS, "-lkparts")
2049
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2051
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2052
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2053
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2054
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2055
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2059
AC_DEFUN([AC_PATH_KDE],
2062
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2064
if test "$enableval" = "no";
2065
then ac_use_path_checking="default"
2066
else ac_use_path_checking=""
2070
if test "$kde_qtver" = 1;
2071
then ac_use_path_checking=""
2072
else ac_use_path_checking="default"
2077
AC_CREATE_KFSSTND($ac_use_path_checking)
2080
KDE_CREATE_LIBS_ALIASES
2083
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2084
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2086
AC_MSG_CHECKING(for $1)
2087
AC_CACHE_VAL(kde_cv_func_$1,
2091
save_CXXFLAGS="$CXXFLAGS"
2092
kde_safe_LIBS="$LIBS"
2093
LIBS="$LIBS $X_EXTRA_LIBS"
2094
if test "$GXX" = "yes"; then
2095
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2105
CXXFLAGS="$save_CXXFLAGS"
2106
LIBS="$kde_safe_LIBS"
2110
AC_MSG_RESULT($kde_cv_func_$1)
2112
AC_MSG_CHECKING([if $1 needs custom prototype])
2113
AC_CACHE_VAL(kde_cv_proto_$1,
2115
if test "x$kde_cv_func_$1" = xyes; then
2119
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2120
kde_cv_proto_$1="yes - in libkdefakes"
2123
kde_cv_proto_$1=unknown
2128
if test "x$kde_cv_proto_$1" = xunknown; then
2133
LIBS="$LIBS $X_EXTRA_LIBS"
2142
[ kde_cv_func_$1=yes
2143
kde_cv_proto_$1=yes ],
2144
[kde_cv_proto_$1="$1 unavailable"]
2150
AC_MSG_RESULT($kde_cv_proto_$1)
2152
if test "x$kde_cv_func_$1" = xyes; then
2153
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2156
if test "x$kde_cv_proto_$1" = xno; then
2157
AC_DEFINE(HAVE_$5_PROTO, 1,
2158
[Define if you have the $1 prototype])
2161
AH_VERBATIM([_HAVE_$5_PROTO],
2163
#if !defined(HAVE_$5_PROTO)
2175
AC_DEFUN([AC_CHECK_SETENV],
2177
KDE_CHECK_FUNC_EXT(setenv, [
2180
[setenv("VAR", "VALUE", 1);],
2181
[int setenv (const char *, const char *, int)],
2185
AC_DEFUN([AC_CHECK_UNSETENV],
2187
KDE_CHECK_FUNC_EXT(unsetenv, [
2191
[void unsetenv (const char *)],
2195
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2197
KDE_CHECK_FUNC_EXT(getdomainname, [
2204
getdomainname(buffer, 200);
2206
[#include <sys/types.h>
2207
int getdomainname (char *, size_t)],
2211
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2213
KDE_CHECK_FUNC_EXT(gethostname, [
2219
gethostname(buffer, 200);
2221
[int gethostname (char *, unsigned int)],
2225
AC_DEFUN([AC_CHECK_USLEEP],
2227
KDE_CHECK_FUNC_EXT(usleep, [
2233
[int usleep (unsigned int)],
2238
AC_DEFUN([AC_CHECK_RANDOM],
2240
KDE_CHECK_FUNC_EXT(random, [
2246
[long int random(void)],
2249
KDE_CHECK_FUNC_EXT(srandom, [
2255
[void srandom(unsigned int)],
2260
AC_DEFUN([AC_CHECK_INITGROUPS],
2262
KDE_CHECK_FUNC_EXT(initgroups, [
2263
#include <sys/types.h>
2269
initgroups(buffer, 27);
2271
[int initgroups(const char *, gid_t)],
2275
AC_DEFUN([AC_CHECK_MKSTEMPS],
2277
KDE_CHECK_FUNC_EXT(mkstemps, [
2282
mkstemps("/tmp/aaaXXXXXX", 6);
2284
[int mkstemps(char *, int)],
2288
AC_DEFUN([AC_CHECK_MKDTEMP],
2290
KDE_CHECK_FUNC_EXT(mkdtemp, [
2295
mkdtemp("/tmp/aaaXXXXXX");
2297
[char *mkdtemp(char *)],
2302
AC_DEFUN([AC_CHECK_RES_INIT],
2304
AC_MSG_CHECKING([if res_init needs -lresolv])
2305
kde_libs_safe="$LIBS"
2306
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2309
#include <sys/types.h>
2310
#include <netinet/in.h>
2311
#include <arpa/nameser.h>
2318
LIBRESOLV="-lresolv"
2320
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2322
[ AC_MSG_RESULT(no) ]
2327
AC_MSG_CHECKING([if res_init is available])
2330
#include <sys/types.h>
2331
#include <netinet/in.h>
2332
#include <arpa/nameser.h>
2340
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2342
[ AC_MSG_RESULT(no) ]
2346
AC_DEFUN([AC_CHECK_STRLCPY],
2348
KDE_CHECK_FUNC_EXT(strlcpy, [
2352
strlcpy(buf, "KDE function test", sizeof(buf));
2354
[unsigned long strlcpy(char*, const char*, unsigned long)],
2358
AC_DEFUN([AC_CHECK_STRLCAT],
2360
KDE_CHECK_FUNC_EXT(strlcat, [
2365
strlcat(buf, "KDE function test", sizeof(buf));
2367
[unsigned long strlcat(char*, const char*, unsigned long)],
2371
AC_DEFUN([AC_FIND_GIF],
2372
[AC_MSG_CHECKING([for giflib])
2373
AC_CACHE_VAL(ac_cv_lib_gif,
2374
[ac_save_LIBS="$LIBS"
2375
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2376
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2378
LIBS="$all_libraries -lgif"
2385
int GifLastError(void);
2389
/* We use char because int might match the return type of a gcc2
2390
builtin and then its argument prototype would still apply. */
2392
[return GifLastError();],
2393
eval "ac_cv_lib_gif=yes",
2394
eval "ac_cv_lib_gif=no")
2395
LIBS="$ac_save_LIBS"
2397
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2399
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2401
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2405
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2407
AC_MSG_CHECKING([for libjpeg$2])
2408
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2410
ac_save_LIBS="$LIBS"
2411
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2412
ac_save_CFLAGS="$CFLAGS"
2413
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2415
[/* Override any gcc2 internal prototype to avoid an error. */
2416
struct jpeg_decompress_struct;
2417
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2422
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2423
int version, size_t structsize);
2427
/* We use char because int might match the return type of a gcc2
2428
builtin and then its argument prototype would still apply. */
2430
[jpeg_CreateDecompress(0L, 0, 0);],
2431
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2432
eval "ac_cv_lib_jpeg_$1=no")
2433
LIBS="$ac_save_LIBS"
2434
CFLAGS="$ac_save_CFLAGS"
2437
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2438
LIBJPEG="$ac_cv_lib_jpeg_$1"
2439
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2447
AC_DEFUN([AC_FIND_JPEG],
2449
dnl first look for libraries
2450
KDE_FIND_JPEG_HELPER(6b, 6b,
2451
KDE_FIND_JPEG_HELPER(normal, [],
2458
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2459
dnl requires system dependent includes loaded before it)
2460
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2461
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2462
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2464
dnl if headers _and_ libraries are missing, this is no error, and we
2465
dnl continue with a warning (the user will get no jpeg support in khtml)
2466
dnl if only one is missing, it means a configuration error, but we still
2468
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2469
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2471
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2473
There is an installation error in jpeg support. You seem to have only one
2474
of either the headers _or_ the libraries installed. You may need to either
2475
provide correct --with-extra-... options, or the development package of
2476
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2477
Disabling JPEG support.
2480
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2487
AH_VERBATIM(_AC_CHECK_JPEG,
2489
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2490
* headers and I'm too lazy to write a configure test as long as only
2491
* unixware is related
2494
#define HAVE_BOOLEAN
2499
AC_DEFUN([KDE_CHECK_QT_JPEG],
2501
if test -n "$LIBJPEG"; then
2502
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2503
AC_CACHE_VAL(kde_cv_qt_jpeg,
2507
ac_save_LIBS="$LIBS"
2508
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2509
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2510
ac_save_CXXFLAGS="$CXXFLAGS"
2511
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2513
[#include <qapplication.h>],
2517
QApplication app(argc, argv);],
2518
eval "kde_cv_qt_jpeg=no",
2519
eval "kde_cv_qt_jpeg=yes")
2520
LIBS="$ac_save_LIBS"
2521
CXXFLAGS="$ac_save_CXXFLAGS"
2526
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2528
LIBJPEG_QT='$(LIBJPEG)'
2536
AC_DEFUN([AC_FIND_ZLIB],
2538
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2539
AC_MSG_CHECKING([for libz])
2540
AC_CACHE_VAL(ac_cv_lib_z,
2542
kde_save_LIBS="$LIBS"
2543
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2544
kde_save_CFLAGS="$CFLAGS"
2545
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2552
gzFile f = (gzFile) 0;
2553
/* this would segfault.. but we only link, don't run */
2554
(void) gzgets(f, buf, sizeof(buf));
2556
return (zlibVersion() == ZLIB_VERSION);
2558
eval "ac_cv_lib_z='-lz'",
2559
eval "ac_cv_lib_z=no")
2560
LIBS="$kde_save_LIBS"
2561
CFLAGS="$kde_save_CFLAGS"
2563
if test ! "$ac_cv_lib_z" = no; then
2564
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2566
AC_MSG_RESULT($ac_cv_lib_z)
2568
AC_MSG_ERROR(not found.
2569
Possibly configure picks up an outdated version
2570
installed by XFree86. Remove it from your system.
2572
Check your installation and look into config.log)
2578
AC_DEFUN([KDE_TRY_TIFFLIB],
2580
AC_MSG_CHECKING([for libtiff $1])
2582
AC_CACHE_VAL(kde_cv_libtiff_$1,
2586
kde_save_LIBS="$LIBS"
2587
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2588
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2590
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2592
kde_save_CXXFLAGS="$CXXFLAGS"
2593
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2599
[return (TIFFOpen( "", "r") == 0); ],
2601
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2603
kde_cv_libtiff_$1=no
2606
LIBS="$kde_save_LIBS"
2607
CXXFLAGS="$kde_save_CXXFLAGS"
2611
if test "$kde_cv_libtiff_$1" = "no"; then
2616
LIBTIFF="$kde_cv_libtiff_$1"
2618
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2624
AC_DEFUN([AC_FIND_TIFF],
2626
AC_REQUIRE([K_PATH_X])
2627
AC_REQUIRE([AC_FIND_ZLIB])
2628
AC_REQUIRE([AC_FIND_JPEG])
2629
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2631
KDE_TRY_TIFFLIB(tiff, [],
2632
KDE_TRY_TIFFLIB(tiff34))
2638
AC_DEFUN([AC_FIND_PNG],
2640
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2641
AC_REQUIRE([AC_FIND_ZLIB])
2642
AC_MSG_CHECKING([for libpng])
2643
AC_CACHE_VAL(ac_cv_lib_png,
2645
kde_save_LIBS="$LIBS"
2646
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2647
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2649
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2651
kde_save_CFLAGS="$CFLAGS"
2652
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2659
png_structp png_ptr = png_create_read_struct( /* image ptr */
2660
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2661
return( png_ptr != 0 );
2663
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2664
eval "ac_cv_lib_png=no"
2666
LIBS="$kde_save_LIBS"
2667
CFLAGS="$kde_save_CFLAGS"
2669
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2670
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2671
LIBPNG="$ac_cv_lib_png"
2673
AC_MSG_RESULT($ac_cv_lib_png)
2682
AC_DEFUN([AC_FIND_JASPER],
2684
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2685
AC_REQUIRE([AC_FIND_JPEG])
2686
AC_MSG_CHECKING([for jasper])
2687
AC_CACHE_VAL(ac_cv_jasper,
2689
kde_save_LIBS="$LIBS"
2690
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2691
kde_save_CFLAGS="$CFLAGS"
2692
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2696
#include<jasper/jasper.h>
2699
return( jas_init() );
2701
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2702
eval "ac_cv_jasper=no"
2704
LIBS="$kde_save_LIBS"
2705
CFLAGS="$kde_save_CFLAGS"
2707
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2708
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2709
LIB_JASPER="$ac_cv_jasper"
2710
AC_MSG_RESULT($ac_cv_jasper)
2715
AC_SUBST(LIB_JASPER)
2718
AC_DEFUN([AC_CHECK_BOOL],
2720
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2723
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2725
AC_MSG_CHECKING(if you need GNU extensions)
2726
AC_CACHE_VAL(ac_cv_gnu_extensions,
2728
cat > conftest.c << EOF
2729
#include <features.h>
2731
#ifdef __GNU_LIBRARY__
2736
if (eval "$ac_cpp conftest.c") 2>&5 |
2737
egrep "yes" >/dev/null 2>&1; then
2739
ac_cv_gnu_extensions=yes
2741
ac_cv_gnu_extensions=no
2745
AC_MSG_RESULT($ac_cv_gnu_extensions)
2746
if test "$ac_cv_gnu_extensions" = "yes"; then
2747
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2751
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2753
AC_MSG_CHECKING([whether $CXX supports -$1])
2754
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2755
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2759
save_CXXFLAGS="$CXXFLAGS"
2760
CXXFLAGS="$CXXFLAGS -$1"
2761
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2762
CXXFLAGS="$save_CXXFLAGS"
2765
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2776
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2777
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2778
dnl it's all white-space separated
2779
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2782
if test -n "$__val"; then
2788
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2789
*) # Careful to not add spaces, where there were none, because otherwise
2790
# libtool gets confused, if we change e.g. CXX
2791
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2799
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2800
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2802
if test "x$kde_use_qt_emb" != "xyes"; then
2803
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2804
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2806
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2807
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2811
AC_DEFUN([AC_CHECK_COMPILERS],
2813
AC_ARG_ENABLE(debug,
2814
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2818
kde_use_debug_code="yes"
2819
kde_use_debug_define=no
2822
kde_use_debug_code="full"
2823
kde_use_debug_define=no
2826
kde_use_debug_code="no"
2827
kde_use_debug_define=yes
2831
[kde_use_debug_code="no"
2832
kde_use_debug_define=no
2835
dnl Just for configure --help
2836
AC_ARG_ENABLE(dummyoption,
2837
AC_HELP_STRING([--disable-debug],
2838
[disables debug output and debug symbols [default=no]]),
2841
AC_ARG_ENABLE(strict,
2842
AC_HELP_STRING([--enable-strict],
2843
[compiles with strict compiler options (may not work!)]),
2845
if test $enableval = "no"; then
2846
kde_use_strict_options="no"
2848
kde_use_strict_options="yes"
2850
], [kde_use_strict_options="no"])
2852
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
2854
if test $enableval = "no"; then
2855
kde_use_warnings="no"
2857
kde_use_warnings="yes"
2859
], [kde_use_warnings="yes"])
2861
dnl enable warnings for debug build
2862
if test "$kde_use_debug_code" != "no"; then
2863
kde_use_warnings=yes
2866
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
2867
[kde_use_profiling=$enableval],
2868
[kde_use_profiling="no"]
2871
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2878
if test "$GCC" = "yes"; then
2879
if test "$kde_use_debug_code" != "no"; then
2880
if test $kde_use_debug_code = "full"; then
2881
CFLAGS="-g3 -fno-inline $CFLAGS"
2883
CFLAGS="-g -O2 $CFLAGS"
2886
CFLAGS="-O2 $CFLAGS"
2890
if test "$kde_use_debug_define" = "yes"; then
2891
CFLAGS="-DNDEBUG $CFLAGS"
2896
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2897
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2900
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2904
CXXFLAGS=" $CXXFLAGS"
2908
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2909
if test "$kde_use_debug_code" != "no"; then
2910
if test "$CXX" = "KCC"; then
2911
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2913
if test "$kde_use_debug_code" = "full"; then
2914
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
2916
CXXFLAGS="-g -O2 $CXXFLAGS"
2919
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2921
dnl convenience compiler flags
2922
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2923
AC_SUBST(WOVERLOADED_VIRTUAL)
2925
if test "$CXX" = "KCC"; then
2926
CXXFLAGS="+K3 $CXXFLAGS"
2928
CXXFLAGS="-O2 $CXXFLAGS"
2933
if test "$kde_use_debug_define" = "yes"; then
2934
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2937
if test "$kde_use_profiling" = "yes"; then
2938
KDE_CHECK_COMPILER_FLAG(pg,
2940
CFLAGS="-pg $CFLAGS"
2941
CXXFLAGS="-pg $CXXFLAGS"
2945
if test "$kde_use_warnings" = "yes"; then
2946
if test "$GCC" = "yes"; then
2949
CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2950
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2951
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2954
CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2955
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2956
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2957
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2961
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2962
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2965
if test "$GXX" = "yes"; then
2966
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2967
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2968
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2969
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2971
if test "$CXX" = "KCC"; then
2972
dnl unfortunately we currently cannot disable exception support in KCC
2973
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2974
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2975
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2978
AC_HELP_STRING([--enable-pch],
2979
[enables precompiled header support (currently only KCC) [default=no]]),
2981
kde_use_pch=$enableval
2984
if test "$kde_use_pch" = "yes"; then
2985
dnl TODO: support --pch-dir!
2986
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2987
dnl the below works (but the dir must exist), but it's
2988
dnl useless for a whole package.
2989
dnl The are precompiled headers for each source file, so when compiling
2990
dnl from scratch, it doesn't make a difference, and they take up
2991
dnl around ~5Mb _per_ sourcefile.
2992
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2993
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2995
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2996
dnl all implementations that are defined inside the class {} declaration.
2997
dnl because of templates-compatibility with broken gcc compilers, this
2998
dnl can cause excessive inlining. This flag limits it to a sane level
2999
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3000
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3001
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3002
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3003
dnl Some source files are shared between multiple executables
3004
dnl (or libraries) and some of those need template instantiations.
3005
dnl In that case KCC needs to compile those sources with
3006
dnl --one_instantiation_per_object. To make it easy for us we compile
3007
dnl _all_ objects with that flag (--one_per is a shorthand).
3008
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3010
AC_SUBST(USE_EXCEPTIONS)
3011
dnl obsolete macro - provided to keep things going
3016
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3017
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3018
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3020
if test "$GXX" = yes; then
3021
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3022
if test ! -f $libstdcpp; then
3023
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])
3029
AC_VALIDIFY_CXXFLAGS
3033
if test "$GCC" = yes; then
3036
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3038
AC_SUBST(NOOPT_CXXFLAGS)
3039
AC_SUBST(NOOPT_CFLAGS)
3045
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3048
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3050
[A]M_DEPENDENCIES(CC)
3051
[A]M_DEPENDENCIES(CXX)
3054
dnl just a wrapper to clean up configure.in
3055
AC_DEFUN([KDE_PROG_LIBTOOL],
3057
AC_REQUIRE([AC_CHECK_COMPILERS])
3058
AC_REQUIRE([AC_ENABLE_SHARED])
3059
AC_REQUIRE([AC_ENABLE_STATIC])
3061
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3062
AC_REQUIRE([KDE_CHECK_LIB64])
3070
LIBTOOL_SHELL="/bin/sh ./libtool"
3071
# LIBTOOL="$LIBTOOL --silent"
3072
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3073
AC_SUBST(KDE_PLUGIN)
3075
# we patch configure quite some so we better keep that consistent for incremental runs
3076
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3079
AC_DEFUN([KDE_CHECK_LIB64],
3082
AC_ARG_ENABLE(libsuffix,
3083
AC_HELP_STRING([--enable-libsuffix],
3084
[/lib directory suffix (64,32,none[=default])]),
3085
kdelibsuff=$enableval)
3086
# TODO: add an auto case that compiles a little C app to check
3087
# where the glibc is
3088
if test "$kdelibsuff" = "no"; then
3091
if test -z "$kdelibsuff"; then
3092
AC_MSG_RESULT([not using lib directory suffix])
3093
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3095
if test "$libdir" = '${exec_prefix}/lib'; then
3096
libdir="$libdir${kdelibsuff}"
3097
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3099
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3100
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3104
AC_DEFUN([KDE_CHECK_TYPES],
3105
[ AC_CHECK_SIZEOF(int, 4)dnl
3106
AC_CHECK_SIZEOF(short)dnl
3107
AC_CHECK_SIZEOF(long, 4)dnl
3108
AC_CHECK_SIZEOF(char *, 4)dnl
3111
AC_DEFUN([KDE_DO_IT_ALL],
3115
AM_INIT_AUTOMAKE($1, $2)
3116
AM_DISABLE_LIBRARIES
3117
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3124
AC_DEFUN([AC_CHECK_RPATH],
3126
AC_MSG_CHECKING(for rpath)
3127
AC_ARG_ENABLE(rpath,
3128
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3129
USE_RPATH=$enableval, USE_RPATH=yes)
3131
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3133
KDE_RPATH="-R \$(kde_libraries)"
3135
if test -n "$qt_libraries"; then
3136
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3138
dnl $x_libraries is set to /usr/lib in case
3139
if test -n "$X_LDFLAGS"; then
3140
X_RPATH="-R \$(x_libraries)"
3141
KDE_RPATH="$KDE_RPATH $X_RPATH"
3143
if test -n "$KDE_EXTRA_RPATH"; then
3144
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3147
AC_SUBST(KDE_EXTRA_RPATH)
3150
AC_MSG_RESULT($USE_RPATH)
3153
dnl Check for the type of the third argument of getsockname
3154
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3155
AC_MSG_CHECKING(for socklen_t)
3156
AC_CACHE_VAL(ac_cv_socklen_t, [
3160
#include <sys/types.h>
3161
#include <sys/socket.h>
3164
getsockname(0,(struct sockaddr*)0, &a);
3166
ac_cv_socklen_t=socklen_t,
3168
#include <sys/types.h>
3169
#include <sys/socket.h>
3172
getsockname(0,(struct sockaddr*)0, &a);
3174
ac_cv_socklen_t=int,
3175
ac_cv_socklen_t=size_t
3181
AC_MSG_RESULT($ac_cv_socklen_t)
3182
if test "$ac_cv_socklen_t" != "socklen_t"; then
3183
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3184
[Define the real type of socklen_t])
3186
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3190
dnl This is a merge of some macros out of the gettext aclocal.m4
3191
dnl since we don't need anything, I took the things we need
3192
dnl the copyright for them is:
3194
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3195
dnl This Makefile.in is free software; the Free Software Foundation
3196
dnl gives unlimited permission to copy and/or distribute it,
3197
dnl with or without modifications, as long as this notice is preserved.
3199
dnl This program is distributed in the hope that it will be useful,
3200
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3201
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3202
dnl PARTICULAR PURPOSE.
3204
dnl for this file it is relicensed under LGPL
3206
AC_DEFUN([AM_KDE_WITH_NLS],
3208
dnl If we use NLS figure out what method
3210
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3211
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3212
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3214
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3215
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3222
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3223
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3225
dnl Test whether we really found GNU xgettext.
3226
if test "$XGETTEXT" != ":"; then
3227
dnl If it is no GNU xgettext we define it as : so that the
3228
dnl Makefiles still can work.
3229
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3233
[found xgettext programs is not GNU xgettext; ignore it])
3241
# Search path for a program which passes the given test.
3242
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3245
# Stephan Kulow: I appended a _KDE against name conflicts
3247
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3248
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3249
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3250
[# Extract the first word of "$2", so it can be a program name with args.
3251
set dummy $2; ac_word=[$]2
3252
AC_MSG_CHECKING([for $ac_word])
3253
AC_CACHE_VAL(ac_cv_path_$1,
3256
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3259
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3260
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3261
test -z "$ac_dir" && ac_dir=.
3262
if test -f $ac_dir/$ac_word; then
3264
ac_cv_path_$1="$ac_dir/$ac_word"
3270
dnl If no 4th arg is given, leave the cache variable unset,
3271
dnl so AC_PATH_PROGS will keep looking.
3272
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3277
if test -n "[$]$1"; then
3278
AC_MSG_RESULT([$]$1)
3286
# Check whether LC_MESSAGES is available in <locale.h>.
3287
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3291
AC_DEFUN([AM_LC_MESSAGES],
3292
[if test $ac_cv_header_locale_h = yes; then
3293
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3294
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3295
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3296
if test $am_cv_val_LC_MESSAGES = yes; then
3297
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3301
dnl From Jim Meyering.
3302
dnl FIXME: migrate into libit.
3304
AC_DEFUN([AM_FUNC_OBSTACK],
3305
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3306
[AC_TRY_LINK([#include "obstack.h"],
3307
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3308
am_cv_func_obstack=yes,
3309
am_cv_func_obstack=no)])
3310
if test $am_cv_func_obstack = yes; then
3311
AC_DEFINE(HAVE_OBSTACK)
3313
LIBOBJS="$LIBOBJS obstack.o"
3317
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3318
dnl FIXME: Migrate into libit
3320
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3321
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3322
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3323
am_cv_lib_error_at_line=yes,
3324
am_cv_lib_error_at_line=no)])
3325
if test $am_cv_lib_error_at_line = no; then
3326
LIBOBJS="$LIBOBJS error.o"
3328
AC_SUBST(LIBOBJS)dnl
3331
# Macro to add for using GNU gettext.
3332
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3335
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3337
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3338
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3339
AC_REQUIRE([AC_PROG_RANLIB])dnl
3340
AC_REQUIRE([AC_HEADER_STDC])dnl
3341
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3342
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3343
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3344
AC_REQUIRE([AC_FUNC_MMAP])dnl
3345
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3346
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3347
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3348
__argz_count __argz_stringify __argz_next])
3350
AC_MSG_CHECKING(for stpcpy)
3351
AC_CACHE_VAL(kde_cv_func_stpcpy,
3353
kde_safe_cxxflags=$CXXFLAGS
3362
stpcpy(buffer, buffer);
3364
kde_cv_func_stpcpy=yes,
3365
kde_cv_func_stpcpy=no)
3367
CXXFLAGS=$kde_safe_cxxflags
3369
AC_MSG_RESULT($kde_cv_func_stpcpy)
3370
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3371
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3376
if test "x$CATOBJEXT" != "x"; then
3377
if test "x$ALL_LINGUAS" = "x"; then
3380
AC_MSG_CHECKING(for catalogs to be installed)
3382
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3383
case "$ALL_LINGUAS" in
3384
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3387
LINGUAS=$NEW_LINGUAS
3388
AC_MSG_RESULT($LINGUAS)
3391
dnl Construct list of names of catalog files to be constructed.
3392
if test -n "$LINGUAS"; then
3393
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3399
AC_DEFUN([AC_HAVE_XPM],
3400
[AC_REQUIRE_CPP()dnl
3401
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3403
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3404
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3406
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3407
xpm_test=$withval, xpm_test="yes")
3408
if test "x$xpm_test" = xno; then
3411
AC_MSG_CHECKING(for XPM)
3412
AC_CACHE_VAL(ac_cv_have_xpm,
3414
ac_save_ldflags="$LDFLAGS"
3415
ac_save_cflags="$CFLAGS"
3416
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3417
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3419
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3421
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3422
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3423
AC_TRY_LINK([#include <X11/xpm.h>],[],
3424
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3425
LDFLAGS="$ac_save_ldflags"
3426
CFLAGS="$ac_save_cflags"
3429
if test "$ac_cv_have_xpm" = no; then
3435
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3436
if test "$XPM_LDFLAGS" = ""; then
3437
XPMLIB='-lXpm $(LIB_X11)'
3439
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3441
if test "$XPM_INCLUDE" = ""; then
3444
XPMINC="-I$XPM_INCLUDE"
3454
AC_DEFUN([AC_HAVE_DPMS],
3455
[AC_REQUIRE_CPP()dnl
3456
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3458
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3459
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3462
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3463
dpms_test=$withval, dpms_test="yes")
3464
if test "x$dpms_test" = xno; then
3467
AC_MSG_CHECKING(for DPMS)
3468
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3469
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3470
AC_CACHE_VAL(ac_cv_have_dpms,
3472
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3474
ac_cv_have_dpms="no"
3476
ac_save_ldflags="$LDFLAGS"
3477
ac_save_cflags="$CFLAGS"
3478
ac_save_libs="$LIBS"
3479
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3480
CFLAGS="$CFLAGS $X_INCLUDES"
3481
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3483
#include <X11/Xproto.h>
3485
#include <X11/Xlib.h>
3486
#include <X11/extensions/dpms.h>
3488
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3489
ac_cv_have_dpms="yes", [
3490
LDFLAGS="$ac_save_ldflags"
3491
CFLAGS="$ac_save_cflags"
3492
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3493
LIBS="$LIBS -lXdpms"
3494
CFLAGS="$CFLAGS $X_INCLUDES"
3495
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3497
#include <X11/Xproto.h>
3499
#include <X11/Xlib.h>
3500
#include <X11/extensions/dpms.h>
3502
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3504
ac_cv_have_dpms="-lXdpms"
3505
],ac_cv_have_dpms="no")
3507
LDFLAGS="$ac_save_ldflags"
3508
CFLAGS="$ac_save_cflags"
3509
LIBS="$ac_save_libs"
3513
if test "$ac_cv_have_dpms" = no; then
3519
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3520
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3523
if test "$DPMS_LDFLAGS" = ""; then
3524
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3526
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3528
if test "$DPMS_INCLUDE" = ""; then
3531
DPMSINC="-I$DPMS_INCLUDE"
3537
ac_save_cflags="$CFLAGS"
3538
CFLAGS="$CFLAGS $X_INCLUDES"
3539
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3540
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3541
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3542
AC_CHECK_DECL(DPMSCapable,
3543
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3544
[#include <X11/extensions/dpms.h>])
3545
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3546
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3547
AC_CHECK_DECL(DPMSInfo,
3548
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3549
[#include <X11/extensions/dpms.h>])
3550
CFLAGS="$ac_save_cflags"
3555
AC_DEFUN([AC_HAVE_GL],
3556
[AC_REQUIRE_CPP()dnl
3557
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3559
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3560
test -z "$GL_INCLUDE" && GL_INCLUDE=
3562
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3563
gl_test=$withval, gl_test="yes")
3564
if test "x$kde_use_qt_emb" = "xyes"; then
3565
# GL and Qt Embedded is a no-go for now.
3567
elif test "x$gl_test" = xno; then
3570
AC_MSG_CHECKING(for GL)
3571
AC_CACHE_VAL(ac_cv_have_gl,
3575
ac_save_ldflags="$LDFLAGS"
3576
ac_save_cxxflags="$CXXFLAGS"
3577
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3578
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3579
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3580
CXXFLAGS="$CFLAGS $X_INCLUDES"
3581
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3582
AC_TRY_LINK([#include <GL/gl.h>
3585
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3586
if test "x$ac_cv_have_gl" = "xno"; then
3587
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3588
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3589
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3590
CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3591
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3592
AC_TRY_LINK([#include <GL/gl.h>
3595
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3598
LDFLAGS="$ac_save_ldflags"
3599
CXXFLAGS="$ac_save_cxxflags"
3602
if test "$ac_cv_have_gl" = "no"; then
3608
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3609
if test "$GL_LDFLAGS" = ""; then
3610
if test "$ac_cv_have_gl" = "mesa"; then
3611
GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3613
GLLIB='-lGLU -lGL $(LIB_X11)'
3616
if test "$ac_cv_have_gl" = "mesa"; then
3617
GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3619
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3622
if test "$GL_INCLUDE" = ""; then
3625
GLINC="-I$GL_INCLUDE"
3627
AC_MSG_RESULT($ac_cv_have_gl)
3636
dnl shadow password and PAM magic - maintained by ossi@kde.org
3638
AC_DEFUN([KDE_PAM], [
3639
AC_REQUIRE([KDE_CHECK_LIBDL])
3643
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3644
[ if test "x$withval" = "xyes"; then
3647
elif test "x$withval" = "xno"; then
3651
pam_service=$withval
3653
], [ pam_service=kde ])
3657
if test "x$want_pam" != xno; then
3658
AC_CHECK_LIB(pam, pam_start, [
3659
AC_CHECK_HEADER(security/pam_appl.h,
3660
[ pam_header=security/pam_appl.h ],
3661
[ AC_CHECK_HEADER(pam/pam_appl.h,
3662
[ pam_header=pam/pam_appl.h ],
3664
AC_MSG_WARN([PAM detected, but no headers found!
3665
Make sure you have the necessary development packages installed.])
3671
if test -z "$pam_header"; then
3672
if test "x$want_pam" = xyes; then
3673
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3676
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3677
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3680
dnl darwin claims to be something special
3681
if test "$pam_header" = "pam/pam_appl.h"; then
3682
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3685
dnl test whether struct pam_message is const (Linux) or not (Sun)
3686
AC_MSG_CHECKING(for const pam_message)
3687
AC_EGREP_HEADER([struct pam_message], $pam_header,
3688
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3689
[AC_MSG_RESULT([const: Linux-type PAM])],
3690
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3691
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3693
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3700
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3701
AC_DEFUN([DEF_PAM_SERVICE], [
3703
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3704
[ if test "x$use_pam" = xyes; then
3705
$3_PAM_SERVICE=$withval
3707
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3708
You may want to enforce it by using --with-pam.])
3711
[ if test "x$use_pam" = xyes; then
3712
$3_PAM_SERVICE="$pam_service"
3715
if test -n "$$3_PAM_SERVICE"; then
3716
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3717
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3719
AC_SUBST($3_PAM_SERVICE)
3722
AC_DEFUN([KDE_SHADOWPASSWD], [
3723
AC_REQUIRE([KDE_PAM])
3725
AC_CHECK_LIB(shadow, getspent,
3726
[ LIBSHADOW="-lshadow"
3730
AC_CHECK_LIB(gen, getspent,
3734
[ AC_CHECK_FUNC(getspent,
3735
[ ac_use_shadow=yes ],
3736
[ ac_use_shadow=no ])
3742
AC_MSG_CHECKING([for shadow passwords])
3745
AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
3746
[ if test "x$withval" != "xno"; then
3752
use_shadow="$ac_use_shadow"
3755
if test "x$use_shadow" = xyes; then
3757
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3764
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3765
dnl this still applies, if we could use it indirectly through pam.
3766
if test "x$use_shadow" = xyes ||
3767
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3769
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3770
SETUIDFLAGS="-m 4755 -o root";;
3772
SETUIDFLAGS="-m 4755";;
3775
AC_SUBST(SETUIDFLAGS)
3779
AC_DEFUN([KDE_PASSWDLIBS], [
3780
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3781
AC_REQUIRE([KDE_PAM])
3782
AC_REQUIRE([KDE_SHADOWPASSWD])
3784
if test "x$use_pam" = "xyes"; then
3785
PASSWDLIBS="$PAMLIBS"
3787
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3790
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3791
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3792
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3793
dnl may need to read /etc/master.passwd).
3796
SETUIDFLAGS="-m 4755 -o root"
3802
AC_SUBST(PASSWDLIBS)
3805
AC_DEFUN([KDE_CHECK_LIBDL],
3807
AC_CHECK_LIB(dl, dlopen, [
3809
ac_cv_have_dlfcn=yes
3812
AC_CHECK_LIB(dld, shl_unload, [
3814
ac_cv_have_shload=yes
3820
AC_DEFUN([KDE_CHECK_DLOPEN],
3823
AC_CHECK_HEADERS(dlfcn.h dl.h)
3824
if test "$ac_cv_header_dlfcn_h" = "no"; then
3828
if test "$ac_cv_header_dl_h" = "no"; then
3829
ac_cv_have_shload=no
3832
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3834
AC_ARG_ENABLE(dlopen,
3835
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
3836
enable_dlopen=$enableval,
3839
# override the user's opinion, if we know it better ;)
3840
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3844
if test "$ac_cv_have_dlfcn" = "yes"; then
3845
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3848
if test "$ac_cv_have_shload" = "yes"; then
3849
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3852
if test "$enable_dlopen" = no ; then
3853
test -n "$1" && eval $1
3855
test -n "$2" && eval $2
3860
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
3862
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3864
AC_MSG_CHECKING([dynamic loading])
3865
eval "`egrep '^build_libtool_libs=' libtool`"
3866
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3868
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3872
AC_MSG_RESULT($dynamic_loading)
3873
if test "$dynamic_loading" = "yes"; then
3880
AC_DEFUN([KDE_ADD_INCLUDES],
3882
if test -z "$1"; then
3883
test_include="Pix.h"
3888
AC_MSG_CHECKING([for libg++ ($test_include)])
3890
AC_CACHE_VAL(kde_cv_libgpp_includes,
3892
kde_cv_libgpp_includes=no
3898
/usr/unsupported/include \
3903
if test -r "$ac_dir/$test_include"; then
3904
kde_cv_libgpp_includes=$ac_dir
3910
AC_MSG_RESULT($kde_cv_libgpp_includes)
3911
if test "$kde_cv_libgpp_includes" != "no"; then
3912
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3917
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
3921
if test -n "$PTHREAD_LIBS"; then
3922
PTHREAD_LIBS_save="$PTHREAD_LIBS"
3923
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
3924
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
3925
PTHREAD_LIBS="$PTHREAD_LIBS_save"
3928
if test -z "$LIBPTHREAD"; then
3929
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3932
AC_SUBST(LIBPTHREAD)
3935
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
3938
if test -z "$LIBPTHREAD"; then
3939
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
3942
AH_VERBATIM(__svr_define, [
3943
#if defined(__SVR4) && !defined(__svr4__)
3949
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3950
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3953
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
3956
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3957
LIBPTHREAD="$LIBPTHREAD -lc_r"
3959
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3960
if test "$CXX" = "KCC"; then
3961
CXXFLAGS="$CXXFLAGS --thread_safe"
3962
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3968
AC_SUBST(USE_THREADS)
3969
AC_SUBST(LIBPTHREAD)
3972
AC_DEFUN([KDE_CHECK_THREADING],
3974
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3975
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3976
dnl default is yes if libpthread is found and no if no libpthread is available
3977
if test -z "$LIBPTHREAD"; then
3978
if test -z "$USE_THREADS"; then
3979
kde_check_threading_default=no
3981
kde_check_threading_default=yes
3984
kde_check_threading_default=yes
3986
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
3987
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3988
if test "x$kde_use_threading" = "xyes"; then
3989
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3993
AC_DEFUN([KDE_TRY_LINK_PYTHON],
3995
if test "$kde_python_link_found" = no; then
3997
if test "$1" = normal; then
3998
AC_MSG_CHECKING(if a Python application links)
4000
AC_MSG_CHECKING(if Python depends on $2)
4003
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4005
kde_save_cflags="$CFLAGS"
4006
CFLAGS="$CFLAGS $PYTHONINC"
4007
kde_save_libs="$LIBS"
4008
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4009
kde_save_ldflags="$LDFLAGS"
4010
LDFLAGS="$LDFLAGS $PYTHONLIB"
4016
PySys_SetArgv(1, 0);
4018
[kde_cv_try_link_python_$1=yes],
4019
[kde_cv_try_link_python_$1=no]
4021
CFLAGS="$kde_save_cflags"
4022
LIBS="$kde_save_libs"
4023
LDFLAGS="$kde_save_ldflags"
4026
if test "$kde_cv_try_link_python_$1" = "yes"; then
4028
kde_python_link_found=yes
4029
if test ! "$1" = normal; then
4030
LIBPYTHON="$LIBPYTHON $2"
4042
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4044
AC_MSG_CHECKING([for Python directory])
4046
AC_CACHE_VAL(kde_cv_pythondir,
4048
if test -z "$PYTHONDIR"; then
4049
kde_cv_pythondir=/usr/local
4051
kde_cv_pythondir="$PYTHONDIR"
4055
AC_ARG_WITH(pythondir,
4056
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4058
ac_python_dir=$withval
4059
], ac_python_dir=$kde_cv_pythondir
4062
AC_MSG_RESULT($ac_python_dir)
4065
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4067
AC_REQUIRE([KDE_CHECK_LIBDL])
4068
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4069
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4071
if test -z "$1"; then
4077
AC_MSG_CHECKING([for Python$version])
4079
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4080
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4081
if test ! -r $python_incdir/Python.h; then
4082
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4083
python_incdir=$python_incdir/python$version
4084
if test ! -r $python_incdir/Python.h; then
4089
PYTHONINC=-I$python_incdir
4091
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4092
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4093
if test ! -r $python_libdir/libpython$version.so; then
4094
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4095
if test ! -r $python_libdir/libpython$version.a; then
4096
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4097
python_libdir=$python_libdir/python$version/config
4098
if test ! -r $python_libdir/libpython$version.a; then
4104
PYTHONLIB=-L$python_libdir
4105
kde_orig_LIBPYTHON=$LIBPYTHON
4106
if test -z "$LIBPYTHON"; then
4107
LIBPYTHON=-lpython$version
4110
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4111
python_moddir=$python_moddir/python$version
4112
if test ! -r $python_moddir/copy.py; then
4116
PYTHONMODDIR=$python_moddir
4118
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4120
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4121
LIBPYTHON=$kde_orig_LIBPYTHON
4122
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4123
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4126
dnl Note: this test is very weak
4127
kde_python_link_found=no
4128
KDE_TRY_LINK_PYTHON(normal)
4129
KDE_TRY_LINK_PYTHON(m, -lm)
4130
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4131
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4132
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4133
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4134
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4135
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4136
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4137
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4138
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4139
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4140
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4141
[AC_MSG_WARN([it seems, Python depends on another library.
4142
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4143
and contact the authors to let them know about this problem])
4146
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4150
AC_SUBST(PYTHONMODDIR)
4151
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4157
AC_DEFUN([KDE_CHECK_PYTHON],
4159
KDE_CHECK_PYTHON_INTERN("2.3",
4160
[KDE_CHECK_PYTHON_INTERN("2.2",
4161
[KDE_CHECK_PYTHON_INTERN("2.1",
4162
[KDE_CHECK_PYTHON_INTERN("2.0",
4163
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4169
AC_DEFUN([KDE_CHECK_STL],
4173
ac_save_CXXFLAGS="$CXXFLAGS"
4174
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4176
AC_MSG_CHECKING([if C++ programs can be compiled])
4177
AC_CACHE_VAL(kde_cv_stl_works,
4181
using namespace std;
4183
string astring="Hallo Welt.";
4184
astring.erase(0, 6); // now astring is "Welt"
4186
], kde_cv_stl_works=yes,
4187
kde_cv_stl_works=no)
4190
AC_MSG_RESULT($kde_cv_stl_works)
4192
if test "$kde_cv_stl_works" = "yes"; then
4194
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4196
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4197
Check config.log for details - if you're using a Linux distribution you might miss
4198
a package named similiar to libstd++-dev.])
4201
CXXFLAGS="$ac_save_CXXFLAGS"
4205
AC_DEFUN([AC_FIND_QIMGIO],
4206
[AC_REQUIRE([AC_FIND_JPEG])
4207
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4208
AC_MSG_CHECKING([for qimgio])
4209
AC_CACHE_VAL(ac_cv_lib_qimgio,
4213
ac_save_LIBS="$LIBS"
4214
ac_save_CXXFLAGS="$CXXFLAGS"
4215
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4216
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4219
#include <qimageio.h>
4220
#include <qstring.h>
4222
QString t = "hallo";
4227
ac_cv_lib_qimgio=yes,
4228
ac_cv_lib_qimgio=no,
4229
ac_cv_lib_qimgio=no)
4230
LIBS="$ac_save_LIBS"
4231
CXXFLAGS="$ac_save_CXXFLAGS"
4234
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4235
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4237
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4240
AC_MSG_RESULT(not found)
4244
AC_DEFUN([AM_DISABLE_LIBRARIES],
4246
AC_PROVIDE([AM_ENABLE_STATIC])
4247
AC_PROVIDE([AM_ENABLE_SHARED])
4253
AC_DEFUN([AC_CHECK_UTMP_FILE],
4255
AC_MSG_CHECKING([for utmp file])
4257
AC_CACHE_VAL(kde_cv_utmp_file,
4268
if test -r "$ac_file"; then
4269
kde_cv_utmp_file=$ac_file
4275
if test "$kde_cv_utmp_file" != "no"; then
4276
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4278
AC_MSG_RESULT($kde_cv_utmp_file)
4281
AC_MSG_RESULT([non found])
4286
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4289
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4291
if test ! -s $srcdir/subdirs; then
4292
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4294
files=`cd $srcdir && ls -1`
4295
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4297
echo $i >> $srcdir/subdirs
4302
if test -s $srcdir/inst-apps; then
4303
ac_topsubdirs="`cat $srcdir/inst-apps`"
4304
elif test -s $srcdir/subdirs; then
4305
ac_topsubdirs="`cat $srcdir/subdirs`"
4308
for i in $ac_topsubdirs; do
4309
AC_MSG_CHECKING([if $i should be compiled])
4310
if test -d $srcdir/$i; then
4312
for j in $DO_NOT_COMPILE; do
4313
if test $i = $j; then
4320
AC_MSG_RESULT($install_it)
4321
vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4322
if test $install_it = "yes"; then
4323
TOPSUBDIRS="$TOPSUBDIRS $i"
4324
eval "$vari""_SUBDIR_included=yes"
4326
eval "$vari""_SUBDIR_included=no"
4330
AC_SUBST(TOPSUBDIRS)
4333
AC_DEFUN([KDE_CHECK_NAMESPACES],
4335
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4349
int Foo::Bar::i = 1;
4352
AC_DEFINE(HAVE_NAMESPACES)
4359
dnl ------------------------------------------------------------------------
4360
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4361
dnl ------------------------------------------------------------------------
4363
AC_DEFUN([AC_CHECK_S_ISSOCK],
4365
AC_MSG_CHECKING(for S_ISSOCK)
4366
AC_CACHE_VAL(ac_cv_have_s_issock,
4370
#include <sys/stat.h>
4374
int b = S_ISSOCK( buff.st_mode );
4376
ac_cv_have_s_issock=yes,
4377
ac_cv_have_s_issock=no)
4379
AC_MSG_RESULT($ac_cv_have_s_issock)
4380
if test "$ac_cv_have_s_issock" = "yes"; then
4381
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4384
AH_VERBATIM(_ISSOCK,
4386
#ifndef HAVE_S_ISSOCK
4387
#define HAVE_S_ISSOCK
4388
#define S_ISSOCK(mode) (1==0)
4394
dnl ------------------------------------------------------------------------
4395
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4396
dnl ------------------------------------------------------------------------
4398
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4400
AC_MSG_CHECKING(for MAXPATHLEN)
4401
AC_CACHE_VAL(ac_cv_maxpathlen,
4403
cat > conftest.$ac_ext <<EOF
4405
# include <stdlib.h>
4408
#include <sys/param.h>
4410
#define MAXPATHLEN 1024
4413
KDE_HELLO MAXPATHLEN
4417
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4419
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4420
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4422
ac_cv_maxpathlen=1024
4428
AC_MSG_RESULT($ac_cv_maxpathlen)
4429
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4432
AC_DEFUN([KDE_CHECK_HEADER],
4435
kde_safe_cppflags=$CPPFLAGS
4436
CPPFLAGS="$CPPFLAGS $all_includes"
4438
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4439
CPPFLAGS=$kde_safe_cppflags
4443
AC_DEFUN([KDE_CHECK_HEADERS],
4445
AH_CHECK_HEADERS([$1])
4447
kde_safe_cppflags=$CPPFLAGS
4448
CPPFLAGS="$CPPFLAGS $all_includes"
4450
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4451
CPPFLAGS=$kde_safe_cppflags
4455
AC_DEFUN([KDE_FAST_CONFIGURE],
4457
dnl makes configure fast (needs perl)
4458
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4459
with_fast_perl=$enableval, with_fast_perl=yes)
4462
AC_DEFUN([KDE_CONF_FILES],
4465
if test -f $srcdir/configure.files ; then
4466
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4469
if test -n "$val" ; then
4471
CONF_FILES="$CONF_FILES $i"
4474
AC_SUBST(CONF_FILES)
4477
AC_DEFUN([KDE_SET_PREFIX],
4480
dnl make $KDEDIR the default for the installation
4481
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4483
if test "x$prefix" = "xNONE"; then
4484
prefix=$ac_default_prefix
4485
ac_configure_args="$ac_configure_args --prefix=$prefix"
4487
# And delete superfluous '/' to make compares easier
4488
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4489
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4494
pushdef([AC_PROG_INSTALL],
4496
dnl our own version, testing for a -p flag
4497
popdef([AC_PROG_INSTALL])
4498
dnl as AC_PROG_INSTALL works as it works we first have
4499
dnl to save if the user didn't specify INSTALL, as the
4500
dnl autoconf one overwrites INSTALL and we have no chance to find
4502
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4503
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4504
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4507
if test -z "$kde_save_INSTALL_given" ; then
4508
# OK, user hasn't given any INSTALL, autoconf found one for us
4509
# now we test, if it supports the -p flag
4510
AC_MSG_CHECKING(for -p flag to install)
4511
rm -f confinst.$$.* > /dev/null 2>&1
4512
echo "Testtest" > confinst.$$.orig
4514
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4515
if test -f confinst.$$.new ; then
4516
# OK, -p seems to do no harm to install
4517
INSTALL="${INSTALL} -p"
4522
AC_MSG_RESULT($ac_res)
4524
dnl the following tries to resolve some signs and wonders coming up
4525
dnl with different autoconf/automake versions
4527
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4528
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4529
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4530
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4531
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4532
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4533
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4534
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4535
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4536
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4537
dnl automake (due to broken Makefile.am or whatever) to install programs,
4538
dnl and so does not see the -s flag in automake > 1.4
4539
dnl to clean up that mess we:
4540
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4541
dnl which cleans KDE's program with automake > 1.4;
4542
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4543
dnl with automake<=1.4
4544
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4545
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4547
dnl And to all this comes, that I even can't write in comments variable
4548
dnl names used by automake, because it is so stupid to think I wanted to
4549
dnl _use_ them, therefor I have written A_M_... instead of AM_
4550
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4552
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4553
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4555
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4556
INSTALL_SCRIPT='${INSTALL}'
4560
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4562
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4563
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4566
pushdef([AC_LANG_CPLUSPLUS],
4567
[popdef([AC_LANG_CPLUSPLUS])
4571
AC_DEFUN([KDE_CHECK_LONG_LONG],
4573
AC_MSG_CHECKING(for long long)
4574
AC_CACHE_VAL(kde_cv_c_long_long,
4582
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4585
AC_MSG_RESULT($kde_cv_c_long_long)
4586
if test "$kde_cv_c_long_long" = yes; then
4587
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4591
AC_DEFUN([KDE_CHECK_LIB],
4593
kde_save_LDFLAGS="$LDFLAGS"
4594
dnl AC_CHECK_LIB modifies LIBS, so save it here
4595
kde_save_LIBS="$LIBS"
4596
LDFLAGS="$LDFLAGS $all_libraries"
4598
aix*) LDFLAGS="-brtl $LDFLAGS"
4599
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4602
AC_CHECK_LIB($1, $2, $3, $4, $5)
4603
LDFLAGS="$kde_save_LDFLAGS"
4604
LIBS="$kde_save_LIBS"
4607
AC_DEFUN([KDE_JAVA_PREFIX],
4610
base=`basename "$1"`
4611
list=`ls -1 $dir 2> /dev/null`
4612
for entry in $list; do
4613
if test -d $dir/$entry/bin; then
4616
javadirs="$javadirs $dir/$entry/bin"
4619
elif test -d $dir/$entry/jre/bin; then
4622
javadirs="$javadirs $dir/$entry/jre/bin"
4629
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4630
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4634
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4635
[ ac_java_dir=$withval
4639
AC_MSG_CHECKING([for Java])
4641
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4642
if test "x$ac_java_dir" = "xno"; then
4644
kde_java_includedir=no
4645
kde_java_libjvmdir=no
4646
kde_java_libgcjdir=no
4647
kde_java_libhpidir=no
4649
if test "x$ac_java_dir" = "x"; then
4652
dnl No option set -> collect list of candidate paths
4653
if test -n "$JAVA_HOME"; then
4654
KDE_JAVA_PREFIX($JAVA_HOME)
4656
KDE_JAVA_PREFIX(/usr/j2se)
4657
KDE_JAVA_PREFIX(/usr/lib/j2se)
4658
KDE_JAVA_PREFIX(/usr/j*dk*)
4659
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4660
KDE_JAVA_PREFIX(/opt/j*sdk*)
4661
KDE_JAVA_PREFIX(/usr/lib/java*)
4662
KDE_JAVA_PREFIX(/usr/java*)
4663
KDE_JAVA_PREFIX(/usr/java/j*dk*)
4664
KDE_JAVA_PREFIX(/usr/java/j*re*)
4665
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4666
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4667
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4668
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4669
KDE_JAVA_PREFIX(/opt/java*)
4674
for dir in $PATH; do
4675
if test -d "$dir"; then
4676
javadirs="$javadirs $dir"
4682
dnl Now javadirs contains a list of paths that exist, all ending with bin/
4683
for dir in $javadirs; do
4684
dnl Check for the java executable
4685
if test -x "$dir/java"; then
4686
dnl And also check for a libjvm.so somewhere under there
4687
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
4688
if test "$dir" != "/usr/bin"; then
4689
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4690
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4691
jredirs="$jredirs $dir"
4696
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
4700
for dir in $jredirs; do
4702
kde_java_bindir=$dir
4703
if test -x "$dir/javac"; then
4709
if test -n "$JAVAC"; then
4710
dnl this substitution might not work - well, we test for jni.h below
4711
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4713
kde_java_includedir=no
4716
dnl config option set
4717
kde_java_bindir=$ac_java_dir/bin
4718
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4719
kde_java_includedir=no
4721
kde_java_includedir=$ac_java_dir/include
4726
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4727
if test "x$kde_java_bindir" != "xno"; then
4729
dnl Look for libjvm.so
4730
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4731
dnl Look for libgcj.so
4732
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
4733
dnl Look for libhpi.so and avoid green threads
4734
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4736
dnl Now check everything's fine under there
4737
dnl the include dir is our flag for having the JDK
4738
if test -d "$kde_java_includedir"; then
4739
if test ! -x "$kde_java_bindir/javac"; then
4740
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4742
if test ! -x "$kde_java_bindir/javah"; then
4743
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4745
if test ! -x "$kde_java_bindir/jar"; then
4746
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4748
if test ! -r "$kde_java_includedir/jni.h"; then
4749
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4752
jni_includes="-I$kde_java_includedir"
4753
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4754
dnl and under linux here..
4756
dnl not needed for gcj
4758
if test "x$kde_java_libgcjdir" = "x"; then
4759
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4760
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4761
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4769
if test "x$kde_java_libgcjdir" = "x"; then
4770
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4771
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4774
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
4775
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
4779
if test ! -x "$kde_java_bindir/java"; then
4780
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4783
dnl not needed for gcj compile
4785
if test "x$kde_java_libgcjdir" = "x"; then
4786
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4787
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4791
if test -n "$jni_includes"; then
4792
dnl Check for JNI version
4795
ac_cxxflags_safe="$CXXFLAGS"
4796
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4802
#ifndef JNI_VERSION_1_2
4805
],[ kde_jni_works=yes ],
4806
[ kde_jni_works=no ])
4808
if test $kde_jni_works = no; then
4809
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4810
You need to have Java Development Kit (JDK) version 1.2.
4812
Use --with-java to specify another location.
4813
Use --without-java to configure without java support.
4814
Or download a newer JDK and try again.
4815
See e.g. http://java.sun.com/products/jdk/1.2 ])
4818
CXXFLAGS="$ac_cxxflags_safe"
4821
dnl All tests ok, inform and subst the variables
4823
JAVAC=$kde_java_bindir/javac
4824
JAVAH=$kde_java_bindir/javah
4825
JAR=$kde_java_bindir/jar
4826
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4827
if test "x$kde_java_libgcjdir" = "x"; then
4828
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4830
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
4832
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4835
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4836
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4838
elif test -d "/Library/Java/Home"; then
4839
kde_java_bindir="/Library/Java/Home/bin"
4840
jni_includes="-I/Library/Java/Home/include"
4842
JAVAC=$kde_java_bindir/javac
4843
JAVAH=$kde_java_bindir/javah
4844
JAR=$kde_java_bindir/jar
4845
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
4847
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4848
AC_MSG_RESULT([Apple Java Framework])
4850
AC_MSG_RESULT([none found])
4857
AC_SUBST(jni_includes)
4859
# for backward compat
4860
kde_cv_java_includedir=$kde_java_includedir
4861
kde_cv_java_bindir=$kde_java_bindir
4864
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4865
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4866
dnl big packages, m4_foreach is dog-slow. So use our own version of
4867
dnl it. (matz@kde.org)
4868
m4_define([mm_foreach],
4869
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4870
m4_define([mm_car], [[$1]])
4871
m4_define([mm_car2], [[$@]])
4872
m4_define([_mm_foreach],
4873
[m4_if(m4_quote($2), [], [],
4874
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
4875
mm_car2(m4_shift($2)),
4877
m4_define([AC_FOREACH],
4878
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4880
AC_DEFUN([KDE_NEED_FLEX],
4883
LIBS="$LIBS $USER_LDFLAGS"
4886
if test -z "$LEXLIB"; then
4887
AC_MSG_ERROR([You need to have flex installed.])
4892
AC_DEFUN([AC_PATH_QTOPIA],
4894
dnl TODO: use AC_CACHE_VAL
4896
if test -z "$1"; then
4901
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4902
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4903
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4906
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4907
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4909
AC_REQUIRE([AC_PATH_QT])
4911
AC_MSG_CHECKING([for Qtopia])
4914
AC_SUBST(LIB_QTOPIA)
4916
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4920
AC_ARG_WITH(qtopia-dir,
4921
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
4922
[ ac_qtopia_incdir="$withval"/include] )
4925
for dir in $kde_qtopia_dirs; do
4926
qtopia_incdirs="$qtopia_incdirs $dir/include"
4929
if test ! "$ac_qtopia_incdir" = "NO"; then
4930
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4934
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4935
ac_qtopia_incdir="$qtopia_incdir"
4937
if test -z "$qtopia_incdir"; then
4938
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4941
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4942
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4943
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4945
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4946
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4947
if test "$qtopia_ver" -lt "$qtopia_minver"; then
4948
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4955
ac_cxxflags_safe="$CXXFLAGS"
4956
ac_ldflags_safe="$LDFLAGS"
4957
ac_libs_safe="$LIBS"
4959
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4960
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4961
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4963
cat > conftest.$ac_ext <<EOF
4964
#include "confdefs.h"
4965
#include <qpe/qpeapplication.h>
4966
#include <qpe/version.h>
4968
int main( int argc, char **argv )
4970
QPEApplication app( argc, argv );
4975
if AC_TRY_EVAL(ac_link) && test -s conftest; then
4979
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4980
the end of config.log])
4983
CXXFLAGS="$ac_cxxflags_safe"
4984
LDFLAGS="$ac_ldflags_safe"
4985
LIBS="$ac_libs_safe"
4989
QTOPIA_INCLUDES="-I$qtopia_incdir"
4990
AC_SUBST(QTOPIA_INCLUDES)
4992
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
4996
AC_DEFUN([KDE_INIT_DOXYGEN],
4998
AC_MSG_CHECKING([for Qt docs])
5000
if test "${with_qt_dir+set}" = set; then
5001
kde_qtdir="$with_qt_dir"
5004
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)
5005
AC_MSG_RESULT($QTDOCDIR)
5009
KDE_FIND_PATH(dot, DOT, [], [])
5010
if test -n "$DOT"; then
5015
AC_SUBST(KDE_HAVE_DOT)
5016
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5019
DOXYGEN_PROJECT_NAME="$1"
5020
DOXYGEN_PROJECT_NUMBER="$2"
5021
AC_SUBST(DOXYGEN_PROJECT_NAME)
5022
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5025
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5028
AC_SUBST(KDE_HAS_DOXYGEN)
5033
AC_DEFUN([AC_FIND_BZIP2],
5035
AC_MSG_CHECKING([for bzDecompress in libbz2])
5036
AC_CACHE_VAL(ac_cv_lib_bzip2,
5040
kde_save_LIBS="$LIBS"
5041
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5042
kde_save_CXXFLAGS="$CXXFLAGS"
5043
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5049
[ bz_stream s; (void) bzDecompress(&s); ],
5050
eval "ac_cv_lib_bzip2='-lbz2'",
5051
eval "ac_cv_lib_bzip2=no")
5052
LIBS="$kde_save_LIBS"
5053
CXXFLAGS="$kde_save_CXXFLAGS"
5056
AC_MSG_RESULT($ac_cv_lib_bzip2)
5058
if test ! "$ac_cv_lib_bzip2" = no; then
5061
LIBBZ2="$ac_cv_lib_bzip2"
5068
KDE_CHECK_COMPILER_FLAG(shared, [
5069
ld_shared_flag="-shared"
5071
KDE_CHECK_COMPILER_FLAG(fPIC, [
5072
cxx_shared_flag="-fPIC"
5075
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5076
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5080
kde_save_LIBS="$LIBS"
5081
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5082
kde_save_CXXFLAGS="$CXXFLAGS"
5083
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5090
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5091
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5092
eval "ac_cv_lib_bzip2_prefix=no")
5093
LIBS="$kde_save_LIBS"
5094
CXXFLAGS="$kde_save_CXXFLAGS"
5098
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5100
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5103
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5106
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5107
dnl else, we just ignore this
5111
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5114
dnl ------------------------------------------------------------------------
5115
dnl Try to find the SSL headers and libraries.
5116
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5117
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5118
dnl ------------------------------------------------------------------------
5120
AC_DEFUN([KDE_CHECK_SSL],
5122
LIBSSL="-lssl -lcrypto"
5123
AC_REQUIRE([KDE_CHECK_LIB64])
5125
ac_ssl_includes=NO ac_ssl_libraries=NO
5128
AC_ARG_WITH(ssl-dir,
5129
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5130
[ ac_ssl_includes="$withval"/include
5131
ac_ssl_libraries="$withval"/lib$kdelibsuff
5136
AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5137
[want_ssl=$withval])
5139
if test $want_ssl = yes; then
5141
AC_MSG_CHECKING(for OpenSSL)
5143
AC_CACHE_VAL(ac_cv_have_ssl,
5144
[#try to guess OpenSSL locations
5146
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5147
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5148
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5149
ac_ssl_includes="$ssl_incdir"
5151
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"
5152
if test ! "$ac_ssl_libraries" = "NO"; then
5153
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5158
for dir in $ssl_libdirs; do
5159
try="ls -1 $dir/libssl*"
5160
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5163
ac_ssl_libraries="$ssl_libdir"
5165
ac_ldflags_safe="$LDFLAGS"
5166
ac_libs_safe="$LIBS"
5168
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5169
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5171
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5177
LDFLAGS="$ac_ldflags_safe"
5178
LIBS="$ac_libs_safe"
5180
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5188
eval "$ac_cv_have_ssl"
5190
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5192
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5193
AC_MSG_RESULT($ac_ssl_rsaref)
5195
AC_MSG_CHECKING([for easter eggs])
5196
AC_MSG_RESULT([none found])
5202
if test "$have_ssl" = yes; then
5203
AC_MSG_CHECKING(for OpenSSL version)
5204
dnl Check for SSL version
5205
AC_CACHE_VAL(ac_cv_ssl_version,
5208
cat >conftest.$ac_ext <<EOF
5209
#include <openssl/opensslv.h>
5213
#ifndef OPENSSL_VERSION_NUMBER
5214
printf("ssl_version=\\"error\\"\n");
5216
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5217
printf("ssl_version=\\"old\\"\n");
5219
printf("ssl_version=\\"ok\\"\n");
5225
ac_save_CPPFLAGS=$CPPFLAGS
5226
if test "$ac_ssl_includes" != "/usr/include"; then
5227
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5230
if AC_TRY_EVAL(ac_link); then
5232
if eval `./conftest 2>&5`; then
5233
if test $ssl_version = error; then
5234
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5236
if test $ssl_version = old; then
5237
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5241
ac_cv_ssl_version="ssl_version=$ssl_version"
5243
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5244
Check config.log, and if you can't figure it out, send a mail to
5245
David Faure <faure@kde.org>, attaching your config.log])
5249
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5250
Check config.log, and if you can't figure it out, send a mail to
5251
David Faure <faure@kde.org>, attaching your config.log])
5253
CPPFLAGS=$ac_save_CPPFLAGS
5257
eval "$ac_cv_ssl_version"
5258
AC_MSG_RESULT($ssl_version)
5261
if test "$have_ssl" != yes; then
5264
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5265
ac_cv_have_ssl="have_ssl=yes \
5266
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5269
ssl_libraries="$ac_ssl_libraries"
5270
ssl_includes="$ac_ssl_includes"
5272
if test "$ac_ssl_rsaref" = yes; then
5273
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5276
if test $ssl_version = "old"; then
5277
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5283
if test "$ssl_includes" = "/usr/include"; then
5284
if test -f /usr/kerberos/include/krb5.h; then
5285
SSL_INCLUDES="-I/usr/kerberos/include"
5287
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5288
SSL_INCLUDES="-I$ssl_includes"
5291
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5294
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5297
AC_SUBST(SSL_INCLUDES)
5298
AC_SUBST(SSL_LDFLAGS)
5302
AC_DEFUN([KDE_CHECK_STRLCPY],
5304
AC_REQUIRE([AC_CHECK_STRLCAT])
5305
AC_REQUIRE([AC_CHECK_STRLCPY])
5306
AC_CHECK_SIZEOF(size_t)
5307
AC_CHECK_SIZEOF(unsigned long)
5309
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5311
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5314
],AC_MSG_RESULT([yes]),[
5317
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5318
does not apply. Please mail kde-devel@kde.org with a description of your system!
5323
AC_DEFUN([KDE_CHECK_BINUTILS],
5325
AC_MSG_CHECKING([if ld supports unversioned version maps])
5327
kde_save_LDFLAGS="$LDFLAGS"
5328
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5329
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5330
AC_TRY_LINK([int foo;],
5332
#ifdef __INTEL_COMPILER
5333
icc apparently does not support libtools version-info and version-script
5334
at the same time. Dunno where the bug is, but until somebody figured out,
5335
better disable the optional version scripts.
5339
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5340
LDFLAGS="$kde_save_LDFLAGS"
5342
AM_CONDITIONAL(include_VERSION_SCRIPT,
5343
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5345
AC_MSG_RESULT($kde_supports_versionmaps)
5348
AC_DEFUN([AM_PROG_OBJC],[
5349
AC_CHECK_PROGS(OBJC, gcc, gcc)
5350
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5351
if test "x${OBJCFLAGS-unset}" = xunset; then
5355
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5358
AC_DEFUN([KDE_CHECK_PERL],
5360
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5361
AC_MSG_ERROR([No Perl found in your $PATH.
5362
We need perl to generate some code.])
5366
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5368
# serial 47 AC_PROG_LIBTOOL
5371
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5372
# -----------------------------------------------------------
5373
# If this macro is not defined by Autoconf, define it here.
5374
m4_ifdef([AC_PROVIDE_IFELSE],
5376
[m4_define([AC_PROVIDE_IFELSE],
5377
[m4_ifdef([AC_PROVIDE_$1],
5383
AC_DEFUN([AC_PROG_LIBTOOL],
5384
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5385
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5386
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5387
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5389
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5391
dnl And a similar setup for Fortran 77 support
5392
AC_PROVIDE_IFELSE([AC_PROG_F77],
5394
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5397
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5398
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5399
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5400
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5402
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5404
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5406
[ifdef([AC_PROG_GCJ],
5407
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5408
ifdef([A][M_PROG_GCJ],
5409
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5410
ifdef([LT_AC_PROG_GCJ],
5411
[define([LT_AC_PROG_GCJ],
5412
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5413
])])# AC_PROG_LIBTOOL
5418
AC_DEFUN([_AC_PROG_LIBTOOL],
5419
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5420
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5421
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5422
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5424
# This can be used to rebuild libtool when needed
5425
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5427
# Always use our own libtool.
5428
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5429
AC_SUBST(LIBTOOL)dnl
5431
# Prevent multiple expansion
5432
define([AC_PROG_LIBTOOL], [])
5433
])# _AC_PROG_LIBTOOL
5438
AC_DEFUN([AC_LIBTOOL_SETUP],
5440
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5441
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5442
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5443
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5444
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5445
AC_REQUIRE([AC_PROG_CC])dnl
5446
AC_REQUIRE([AC_PROG_LD])dnl
5447
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5448
AC_REQUIRE([AC_PROG_NM])dnl
5450
AC_REQUIRE([AC_PROG_LN_S])dnl
5451
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5452
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5453
AC_REQUIRE([AC_OBJEXT])dnl
5454
AC_REQUIRE([AC_EXEEXT])dnl
5457
AC_LIBTOOL_SYS_MAX_CMD_LEN
5458
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5461
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5462
_LT_AC_PROG_ECHO_BACKSLASH
5466
# AIX sometimes has problems with the GCC collect2 program. For some
5467
# reason, if we set the COLLECT_NAMES environment variable, the problems
5468
# vanish in a puff of smoke.
5469
if test "X${COLLECT_NAMES+set}" != Xset; then
5471
export COLLECT_NAMES
5476
# Sed substitution that helps us do robust quoting. It backslashifies
5477
# metacharacters that are still active within double-quoted strings.
5478
Xsed='sed -e s/^X//'
5479
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5481
# Same as above, but do not quote variable references.
5482
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5484
# Sed substitution to delay expansion of an escaped shell variable in a
5485
# double_quote_subst'ed string.
5486
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5488
# Sed substitution to avoid accidental globbing in evaled expressions
5489
no_glob_subst='s/\*/\\\*/g'
5495
default_ofile=libtool
5496
can_build_shared=yes
5498
# All known linkers require a `.a' archive for static linking (except M$VC,
5499
# which needs '.lib').
5501
ltmain="$ac_aux_dir/ltmain.sh"
5502
ofile="$default_ofile"
5503
with_gnu_ld="$lt_cv_prog_gnu_ld"
5505
AC_CHECK_TOOL(AR, ar, false)
5506
AC_CHECK_TOOL(RANLIB, ranlib, :)
5507
AC_CHECK_TOOL(STRIP, strip, :)
5510
old_CFLAGS="$CFLAGS"
5512
# Set sane defaults for various variables
5513
test -z "$AR" && AR=ar
5514
test -z "$AR_FLAGS" && AR_FLAGS=cru
5515
test -z "$AS" && AS=as
5516
test -z "$CC" && CC=cc
5517
test -z "$LTCC" && LTCC=$CC
5518
test -z "$DLLTOOL" && DLLTOOL=dlltool
5519
test -z "$LD" && LD=ld
5520
test -z "$LN_S" && LN_S="ln -s"
5521
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5522
test -z "$NM" && NM=nm
5523
test -z "$SED" && SED=sed
5524
test -z "$OBJDUMP" && OBJDUMP=objdump
5525
test -z "$RANLIB" && RANLIB=:
5526
test -z "$STRIP" && STRIP=:
5527
test -z "$ac_objext" && ac_objext=o
5529
# Determine commands to create old-style static archives.
5530
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5531
old_postinstall_cmds='chmod 644 $oldlib'
5532
old_postuninstall_cmds=
5534
if test -n "$RANLIB"; then
5537
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5540
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5543
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5546
# Only perform the check for file, if the check method requires it
5547
case $deplibs_check_method in
5549
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5555
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5556
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5557
enable_win32_dll=yes, enable_win32_dll=no)
5559
AC_ARG_ENABLE([libtool-lock],
5560
[AC_HELP_STRING([--disable-libtool-lock],
5561
[avoid locking (might break parallel builds)])])
5562
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5565
[AC_HELP_STRING([--with-pic],
5566
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5567
[pic_mode="$withval"],
5569
test -z "$pic_mode" && pic_mode=default
5571
# Use C for the default configuration in the libtool script
5573
AC_LIBTOOL_LANG_C_CONFIG
5575
])# AC_LIBTOOL_SETUP
5578
# _LT_AC_SYS_COMPILER
5579
# -------------------
5580
AC_DEFUN([_LT_AC_SYS_COMPILER],
5581
[AC_REQUIRE([AC_PROG_CC])dnl
5583
# If no C compiler was specified, use CC.
5586
# Allow CC to be a program name with arguments.
5588
])# _LT_AC_SYS_COMPILER
5591
# _LT_AC_SYS_LIBPATH_AIX
5592
# ----------------------
5593
# Links a minimal program and checks the executable
5594
# for the system default hardcoded library path. In most cases,
5595
# this is /usr/lib:/lib, but when the MPI compilers are used
5596
# the location of the communication and MPI libs are included too.
5597
# If we don't find anything, use the default library path according
5598
# to the aix ld manual.
5599
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5600
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5601
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5603
# Check for a 64-bit object if we didn't find anything.
5604
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; }
5606
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5607
])# _LT_AC_SYS_LIBPATH_AIX
5610
# _LT_AC_SHELL_INIT(ARG)
5611
# ----------------------
5612
AC_DEFUN([_LT_AC_SHELL_INIT],
5613
[ifdef([AC_DIVERSION_NOTICE],
5614
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5615
[AC_DIVERT_PUSH(NOTICE)])
5618
])# _LT_AC_SHELL_INIT
5621
# _LT_AC_PROG_ECHO_BACKSLASH
5622
# --------------------------
5623
# Add some code to the start of the generated configure script which
5624
# will find an echo command which doesn't interpret backslashes.
5625
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5626
[_LT_AC_SHELL_INIT([
5627
# Check that we are running under the correct shell.
5628
SHELL=${CONFIG_SHELL-/bin/sh}
5632
# Remove one level of quotation (which was required for Make).
5633
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5638
if test "X[$]1" = X--no-reexec; then
5639
# Discard the --no-reexec flag, and continue.
5641
elif test "X[$]1" = X--fallback-echo; then
5642
# Avoid inline document here, it may be left over
5644
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
5645
# Yippee, $echo works!
5648
# Restart under the correct shell.
5649
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5652
if test "X[$]1" = X--fallback-echo; then
5653
# used as fallback echo
5661
# The HP-UX ksh and POSIX shell print the target directory to stdout
5663
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5665
if test -z "$ECHO"; then
5666
if test "X${echo_test_string+set}" != Xset; then
5667
# find a string as large as possible, as long as the shell can cope with it
5668
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5669
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5670
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5671
echo_test_string="`eval $cmd`" &&
5672
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5679
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5680
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5681
test "X$echo_testing_string" = "X$echo_test_string"; then
5684
# The Solaris, AIX, and Digital Unix default echo programs unquote
5685
# backslashes. This makes it impossible to quote backslashes using
5686
# echo "$something" | sed 's/\\/\\\\/g'
5688
# So, first we look for a working echo in the user's PATH.
5690
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5691
for dir in $PATH /usr/ucb; do
5693
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5694
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5695
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5696
test "X$echo_testing_string" = "X$echo_test_string"; then
5703
if test "X$echo" = Xecho; then
5704
# We didn't find a better echo, so look for alternatives.
5705
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5706
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5707
test "X$echo_testing_string" = "X$echo_test_string"; then
5708
# This shell has a builtin print -r that does the trick.
5710
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5711
test "X$CONFIG_SHELL" != X/bin/ksh; then
5712
# If we have ksh, try running configure again with it.
5713
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5714
export ORIGINAL_CONFIG_SHELL
5715
CONFIG_SHELL=/bin/ksh
5717
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5721
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5722
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5723
test "X$echo_testing_string" = "X$echo_test_string"; then
5724
# Cool, printf works
5726
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5727
test "X$echo_testing_string" = 'X\t' &&
5728
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5729
test "X$echo_testing_string" = "X$echo_test_string"; then
5730
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5732
SHELL="$CONFIG_SHELL"
5734
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5735
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5736
test "X$echo_testing_string" = 'X\t' &&
5737
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5738
test "X$echo_testing_string" = "X$echo_test_string"; then
5739
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5741
# maybe with a smaller string...
5744
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5745
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5752
if test "$prev" != 'sed 50q "[$]0"'; then
5753
echo_test_string=`eval $prev`
5754
export echo_test_string
5755
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5757
# Oops. We lost completely, so just stick with echo.
5766
# Copy echo and quote the copy suitably for passing to libtool from
5767
# the Makefile, instead of quoting the original, which is used later.
5769
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5770
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5774
])])# _LT_AC_PROG_ECHO_BACKSLASH
5779
AC_DEFUN([_LT_AC_LOCK],
5780
[AC_ARG_ENABLE([libtool-lock],
5781
[AC_HELP_STRING([--disable-libtool-lock],
5782
[avoid locking (might break parallel builds)])])
5783
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5785
# Some flags need to be propagated to the compiler or linker for good
5789
# Find out which ABI we are using.
5790
echo 'int i;' > conftest.$ac_ext
5791
if AC_TRY_EVAL(ac_compile); then
5792
case `/usr/bin/file conftest.$ac_objext` in
5804
# Find out which ABI we are using.
5805
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5806
if AC_TRY_EVAL(ac_compile); then
5807
if test "$lt_cv_prog_gnu_ld" = yes; then
5808
case `/usr/bin/file conftest.$ac_objext` in
5810
LD="${LD-ld} -melf32bsmip"
5813
LD="${LD-ld} -melf32bmipn32"
5816
LD="${LD-ld} -melf64bmip"
5820
case `/usr/bin/file conftest.$ac_objext` in
5836
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5837
# Find out which ABI we are using.
5838
echo 'int i;' > conftest.$ac_ext
5839
if AC_TRY_EVAL(ac_compile); then
5840
case "`/usr/bin/file conftest.o`" in
5845
LD="${LD-ld} -m elf_i386"
5848
LD="${LD-ld} -m elf32ppclinux"
5851
LD="${LD-ld} -m elf_s390"
5854
LD="${LD-ld} -m elf32_sparc"
5862
LD="${LD-ld} -m elf_x86_64"
5864
ppc*-*linux*|powerpc*-*linux*)
5865
LD="${LD-ld} -m elf64ppc"
5868
LD="${LD-ld} -m elf64_s390"
5871
LD="${LD-ld} -m elf64_sparc"
5881
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5882
SAVE_CFLAGS="$CFLAGS"
5883
CFLAGS="$CFLAGS -belf"
5884
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5886
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5888
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5889
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5890
CFLAGS="$SAVE_CFLAGS"
5893
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5894
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5895
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5896
AC_CHECK_TOOL(AS, as, false)
5897
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5902
need_locks="$enable_libtool_lock"
5907
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5908
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5909
# ----------------------------------------------------------------
5910
# Check whether the given compiler option works
5911
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5912
[AC_REQUIRE([LT_AC_PROG_SED])
5913
AC_CACHE_CHECK([$1], [$2],
5915
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5916
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5917
lt_compiler_flag="$3"
5918
# Insert the option either (1) after the last *FLAGS variable, or
5919
# (2) before a word containing "conftest.", or (3) at the end.
5920
# Note that $ac_compile itself does not contain backslashes and begins
5921
# with a dollar sign (not a hyphen), so the echo should work correctly.
5922
# The option is referenced via a variable to avoid confusing sed.
5923
lt_compile=`echo "$ac_compile" | $SED \
5924
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
5925
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5926
-e 's:$: $lt_compiler_flag:'`
5927
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5928
(eval "$lt_compile" 2>conftest.err)
5930
cat conftest.err >&AS_MESSAGE_LOG_FD
5931
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5932
if (exit $ac_status) && test -s "$ac_outfile"; then
5933
# The compiler can only warn and ignore the option if not recognized
5934
# So say no if there are warnings
5935
if test ! -s conftest.err; then
5942
if test x"[$]$2" = xyes; then
5943
ifelse([$5], , :, [$5])
5945
ifelse([$6], , :, [$6])
5947
])# AC_LIBTOOL_COMPILER_OPTION
5950
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5951
# [ACTION-SUCCESS], [ACTION-FAILURE])
5952
# ------------------------------------------------------------
5953
# Check whether the given compiler option works
5954
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5955
[AC_CACHE_CHECK([$1], [$2],
5957
save_LDFLAGS="$LDFLAGS"
5958
LDFLAGS="$LDFLAGS $3"
5959
printf "$lt_simple_link_test_code" > conftest.$ac_ext
5960
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5961
# The compiler can only warn and ignore the option if not recognized
5962
# So say no if there are warnings
5963
if test -s conftest.err; then
5964
# Append any errors to the config.log.
5965
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5971
LDFLAGS="$save_LDFLAGS"
5974
if test x"[$]$2" = xyes; then
5975
ifelse([$4], , :, [$4])
5977
ifelse([$5], , :, [$5])
5979
])# AC_LIBTOOL_LINKER_OPTION
5982
# AC_LIBTOOL_SYS_MAX_CMD_LEN
5983
# --------------------------
5984
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
5985
[# find the maximum length of command line arguments
5986
AC_MSG_CHECKING([the maximum length of command line arguments])
5987
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5993
# On DJGPP, this test can blow up pretty badly due to problems in libc
5994
# (any single argument exceeding 2000 bytes causes a buffer overrun
5995
# during glob expansion). Even if it were fixed, the result of this
5996
# check would be larger than it should be.
5997
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6001
# Under GNU Hurd, this test is not required because there is
6002
# no limit to the length of command line arguments.
6003
# Libtool will interpret -1 as no limit whatsoever
6004
lt_cv_sys_max_cmd_len=-1;
6008
# On Win9x/ME, this test blows up -- it succeeds, but takes
6009
# about 5 minutes as the teststring grows exponentially.
6010
# Worse, since 9x/ME are not pre-emptively multitasking,
6011
# you end up with a "frozen" computer, even though with patience
6012
# the test eventually succeeds (with a max line length of 256k).
6013
# Instead, let's just punt: use the minimum linelength reported by
6014
# all of the supported platforms: 8192 (on NT/2K/XP).
6015
lt_cv_sys_max_cmd_len=8192;
6019
# If test is not a shell built-in, we'll probably end up computing a
6020
# maximum length that is only half of the actual maximum length, but
6022
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6023
= "XX$testring") >/dev/null 2>&1 &&
6024
new_result=`expr "X$testring" : ".*" 2>&1` &&
6025
lt_cv_sys_max_cmd_len=$new_result &&
6026
test $i != 17 # 1/2 MB should be enough
6029
testring=$testring$testring
6032
# Add a significant safety factor because C++ compilers can tack on massive
6033
# amounts of additional arguments before passing them to the linker.
6034
# It appears as though 1/2 is a usable value.
6035
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6039
if test -n $lt_cv_sys_max_cmd_len ; then
6040
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6044
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6047
# _LT_AC_CHECK_DLFCN
6048
# --------------------
6049
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6050
[AC_CHECK_HEADERS(dlfcn.h)dnl
6051
])# _LT_AC_CHECK_DLFCN
6054
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6055
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6056
# ------------------------------------------------------------------
6057
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6058
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6059
if test "$cross_compiling" = yes; then :
6062
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6063
lt_status=$lt_dlunknown
6064
cat > conftest.$ac_ext <<EOF
6065
[#line __oline__ "configure"
6066
#include "confdefs.h"
6075
# define LT_DLGLOBAL RTLD_GLOBAL
6078
# define LT_DLGLOBAL DL_GLOBAL
6080
# define LT_DLGLOBAL 0
6084
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6085
find out it does not work in some platform. */
6086
#ifndef LT_DLLAZY_OR_NOW
6088
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6091
# define LT_DLLAZY_OR_NOW DL_LAZY
6094
# define LT_DLLAZY_OR_NOW RTLD_NOW
6097
# define LT_DLLAZY_OR_NOW DL_NOW
6099
# define LT_DLLAZY_OR_NOW 0
6107
extern "C" void exit (int);
6110
void fnord() { int i=42;}
6113
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6114
int status = $lt_dlunknown;
6118
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6119
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6120
/* dlclose (self); */
6126
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6127
(./conftest; exit; ) 2>/dev/null
6130
x$lt_dlno_uscore) $1 ;;
6131
x$lt_dlneed_uscore) $2 ;;
6132
x$lt_unknown|x*) $3 ;;
6135
# compilation failed
6140
])# _LT_AC_TRY_DLOPEN_SELF
6143
# AC_LIBTOOL_DLOPEN_SELF
6144
# -------------------
6145
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6146
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6147
if test "x$enable_dlopen" != xyes; then
6148
enable_dlopen=unknown
6149
enable_dlopen_self=unknown
6150
enable_dlopen_self_static=unknown
6157
lt_cv_dlopen="load_add_on"
6159
lt_cv_dlopen_self=yes
6163
lt_cv_dlopen="LoadLibrary"
6168
lt_cv_dlopen="dlopen"
6173
# if libdl is installed we need to link against it
6174
AC_CHECK_LIB([dl], [dlopen],
6175
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6178
lt_cv_dlopen_self=yes
6183
AC_CHECK_FUNC([shl_load],
6184
[lt_cv_dlopen="shl_load"],
6185
[AC_CHECK_LIB([dld], [shl_load],
6186
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6187
[AC_CHECK_FUNC([dlopen],
6188
[lt_cv_dlopen="dlopen"],
6189
[AC_CHECK_LIB([dl], [dlopen],
6190
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6191
[AC_CHECK_LIB([svld], [dlopen],
6192
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6193
[AC_CHECK_LIB([dld], [dld_link],
6194
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6203
if test "x$lt_cv_dlopen" != xno; then
6209
case $lt_cv_dlopen in
6211
save_CPPFLAGS="$CPPFLAGS"
6212
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6214
save_LDFLAGS="$LDFLAGS"
6215
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6218
LIBS="$lt_cv_dlopen_libs $LIBS"
6220
AC_CACHE_CHECK([whether a program can dlopen itself],
6221
lt_cv_dlopen_self, [dnl
6222
_LT_AC_TRY_DLOPEN_SELF(
6223
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6224
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6227
if test "x$lt_cv_dlopen_self" = xyes; then
6228
LDFLAGS="$LDFLAGS $link_static_flag"
6229
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6230
lt_cv_dlopen_self_static, [dnl
6231
_LT_AC_TRY_DLOPEN_SELF(
6232
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6233
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6237
CPPFLAGS="$save_CPPFLAGS"
6238
LDFLAGS="$save_LDFLAGS"
6243
case $lt_cv_dlopen_self in
6244
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6245
*) enable_dlopen_self=unknown ;;
6248
case $lt_cv_dlopen_self_static in
6249
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6250
*) enable_dlopen_self_static=unknown ;;
6253
])# AC_LIBTOOL_DLOPEN_SELF
6256
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6257
# ---------------------------------
6258
# Check to see if options -c and -o are simultaneously supported by compiler
6259
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6260
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6261
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6262
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6263
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6264
$rm -r conftest 2>/dev/null
6268
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6270
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6271
# that will create temporary files in the current directory regardless of
6272
# the output directory. Thus, making CWD read-only will cause this test
6273
# to fail, enabling locking or at least warning the user not to do parallel
6277
lt_compiler_flag="-o out/conftest2.$ac_objext"
6278
# Insert the option either (1) after the last *FLAGS variable, or
6279
# (2) before a word containing "conftest.", or (3) at the end.
6280
# Note that $ac_compile itself does not contain backslashes and begins
6281
# with a dollar sign (not a hyphen), so the echo should work correctly.
6282
lt_compile=`echo "$ac_compile" | $SED \
6283
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6284
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6285
-e 's:$: $lt_compiler_flag:'`
6286
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6287
(eval "$lt_compile" 2>out/conftest.err)
6289
cat out/conftest.err >&AS_MESSAGE_LOG_FD
6290
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6291
if (exit $ac_status) && test -s out/conftest2.$ac_objext
6293
# The compiler can only warn and ignore the option if not recognized
6294
# So say no if there are warnings
6295
if test ! -s out/conftest.err; then
6296
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6306
])# AC_LIBTOOL_PROG_CC_C_O
6309
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6310
# -----------------------------------------
6311
# Check to see if we can do hard links to lock some files if needed
6312
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6313
[AC_REQUIRE([_LT_AC_LOCK])dnl
6315
hard_links="nottested"
6316
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6317
# do not overwrite the value of need_locks provided by the user
6318
AC_MSG_CHECKING([if we can lock with hard links])
6321
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6323
ln conftest.a conftest.b 2>&5 || hard_links=no
6324
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6325
AC_MSG_RESULT([$hard_links])
6326
if test "$hard_links" = no; then
6327
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6333
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6338
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6339
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6340
[rm -f .libs 2>/dev/null
6341
mkdir .libs 2>/dev/null
6342
if test -d .libs; then
6345
# MS-DOS does not allow filenames that begin with a dot.
6348
rmdir .libs 2>/dev/null])
6349
objdir=$lt_cv_objdir
6350
])# AC_LIBTOOL_OBJDIR
6353
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6354
# ----------------------------------------------
6355
# Check hardcoding attributes.
6356
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6357
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6358
_LT_AC_TAGVAR(hardcode_action, $1)=
6359
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6360
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6361
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6363
# We can hardcode non-existant directories.
6364
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6365
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6366
# have to relink, otherwise we might link with an installed library
6367
# when we should be linking with a yet-to-be-installed one
6368
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6369
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6370
# Linking always hardcodes the temporary library directory.
6371
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6373
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6374
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6377
# We cannot hardcode anything, or else we can only hardcode existing
6379
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6381
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6383
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6384
# Fast installation is not supported
6385
enable_fast_install=no
6386
elif test "$shlibpath_overrides_runpath" = yes ||
6387
test "$enable_shared" = no; then
6388
# Fast installation is not necessary
6389
enable_fast_install=needless
6391
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6394
# AC_LIBTOOL_SYS_LIB_STRIP
6395
# ------------------------
6396
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6399
AC_MSG_CHECKING([whether stripping libraries is possible])
6400
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6401
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6402
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6403
AC_MSG_RESULT([yes])
6405
# FIXME - insert some real tests, host_os isn't really good enough
6408
if test -n "$STRIP" ; then
6409
striplib="$STRIP -x"
6410
AC_MSG_RESULT([yes])
6420
])# AC_LIBTOOL_SYS_LIB_STRIP
6423
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6424
# -----------------------------
6425
# PORTME Fill in your ld.so characteristics
6426
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6427
[AC_MSG_CHECKING([dynamic linker characteristics])
6429
libname_spec='lib$name'
6437
shlibpath_overrides_runpath=unknown
6439
dynamic_linker="$host_os ld.so"
6440
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6441
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6442
need_lib_prefix=unknown
6443
hardcode_into_libs=no
6445
# when you set need_version to no, make sure it does not cause -set_version
6446
# flags to be left without arguments
6447
need_version=unknown
6452
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6453
shlibpath_var=LIBPATH
6455
# AIX 3 has no versioning support, so we append a major version to the name.
6456
soname_spec='${libname}${release}${shared_ext}$major'
6463
hardcode_into_libs=yes
6464
if test "$host_cpu" = ia64; then
6465
# AIX 5 supports IA64
6466
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6467
shlibpath_var=LD_LIBRARY_PATH
6469
# With GCC up to 2.95.x, collect2 would create an import file
6470
# for dependence libraries. The import file would start with
6471
# the line `#! .'. This would cause the generated library to
6472
# depend on `.', always an invalid library. This was fixed in
6473
# development snapshots of GCC prior to 3.0.
6475
aix4 | aix4.[[01]] | aix4.[[01]].*)
6476
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6478
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6485
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6486
# soname into executable. Probably we can add versioning support to
6487
# collect2, so additional links can be useful in future.
6488
if test "$aix_use_runtimelinking" = yes; then
6489
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6490
# instead of lib<name>.a to let people know that these are not
6491
# typical AIX shared libraries.
6492
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6494
# We preserve .a as extension for shared libraries through AIX4.2
6495
# and later when we are not doing run time linking.
6496
library_names_spec='${libname}${release}.a $libname.a'
6497
soname_spec='${libname}${release}${shared_ext}$major'
6499
shlibpath_var=LIBPATH
6504
library_names_spec='$libname.ixlibrary $libname.a'
6505
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6506
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'
6510
library_names_spec='${libname}${shared_ext}'
6511
dynamic_linker="$host_os ld.so"
6512
shlibpath_var=LIBRARY_PATH
6518
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6519
soname_spec='${libname}${release}${shared_ext}$major'
6520
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6521
shlibpath_var=LD_LIBRARY_PATH
6522
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6523
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6524
# the default ld.so.conf also contains /usr/contrib/lib and
6525
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6526
# libtool to hard-code these into programs
6529
cygwin* | mingw* | pw32*)
6530
version_type=windows
6535
case $GCC,$host_os in
6536
yes,cygwin* | yes,mingw* | yes,pw32*)
6537
library_names_spec='$libname.dll.a'
6538
# DLL is installed to $(libdir)/../bin by postinstall_cmds
6539
postinstall_cmds='base_file=`basename \${file}`~
6540
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6541
dldir=$destdir/`dirname \$dlpath`~
6542
test -d \$dldir || mkdir -p \$dldir~
6543
$install_prog $dir/$dlname \$dldir/$dlname'
6544
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6545
dlpath=$dir/\$dldll~
6547
shlibpath_overrides_runpath=yes
6551
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
6552
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6553
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6556
# MinGW DLLs use traditional 'lib' prefix
6557
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6558
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6559
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6560
# It is most probably a Windows format PATH printed by
6561
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6562
# path with ; separators, and with drive letters. We can handle the
6563
# drive letters (cygwin fileutils understands them), so leave them,
6564
# especially as we might pass files found there to a mingw objdump,
6565
# which wouldn't understand a cygwinified path. Ahh.
6566
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6568
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6572
# pw32 DLLs use 'pw' prefix rather than 'lib'
6573
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6579
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6582
dynamic_linker='Win32 ld.exe'
6583
# FIXME: first we should search . and the directory the executable is in
6587
darwin* | rhapsody*)
6588
dynamic_linker="$host_os dyld"
6592
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6593
soname_spec='${libname}${release}${major}$shared_ext'
6594
shlibpath_overrides_runpath=yes
6595
shlibpath_var=DYLD_LIBRARY_PATH
6596
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
6597
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6598
if test "$GCC" = yes; then
6599
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"`
6601
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6603
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6610
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6611
soname_spec='${libname}${release}${shared_ext}$major'
6612
shlibpath_var=LD_LIBRARY_PATH
6623
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6624
soname_spec='${libname}${release}${shared_ext}$major'
6625
shlibpath_var=LD_LIBRARY_PATH
6626
shlibpath_overrides_runpath=no
6627
hardcode_into_libs=yes
6628
dynamic_linker='GNU ld.so'
6632
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6633
version_type=freebsd-$objformat
6634
case $version_type in
6636
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6641
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6645
shlibpath_var=LD_LIBRARY_PATH
6648
shlibpath_overrides_runpath=yes
6650
freebsd3.[01]* | freebsdelf3.[01]*)
6651
shlibpath_overrides_runpath=yes
6652
hardcode_into_libs=yes
6655
shlibpath_overrides_runpath=no
6656
hardcode_into_libs=yes
6665
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6666
soname_spec='${libname}${release}${shared_ext}$major'
6667
shlibpath_var=LD_LIBRARY_PATH
6668
hardcode_into_libs=yes
6671
hpux9* | hpux10* | hpux11*)
6672
# Give a soname corresponding to the major version so that dld.sl refuses to
6673
# link against other versions.
6680
hardcode_into_libs=yes
6681
dynamic_linker="$host_os dld.so"
6682
shlibpath_var=LD_LIBRARY_PATH
6683
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6684
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6685
soname_spec='${libname}${release}${shared_ext}$major'
6686
if test "X$HPUX_IA64_MODE" = X32; then
6687
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6689
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6691
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6695
hardcode_into_libs=yes
6696
dynamic_linker="$host_os dld.sl"
6697
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6698
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6699
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6700
soname_spec='${libname}${release}${shared_ext}$major'
6701
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6702
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6706
dynamic_linker="$host_os dld.sl"
6707
shlibpath_var=SHLIB_PATH
6708
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6709
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6710
soname_spec='${libname}${release}${shared_ext}$major'
6713
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6714
postinstall_cmds='chmod 555 $lib'
6717
irix5* | irix6* | nonstopux*)
6719
nonstopux*) version_type=nonstopux ;;
6721
if test "$lt_cv_prog_gnu_ld" = yes; then
6729
soname_spec='${libname}${release}${shared_ext}$major'
6730
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
6732
irix5* | nonstopux*)
6736
case $LD in # libtool.m4 will add one of these switches to LD
6737
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6738
libsuff= shlibsuff= libmagic=32-bit;;
6739
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6740
libsuff=32 shlibsuff=N32 libmagic=N32;;
6741
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6742
libsuff=64 shlibsuff=64 libmagic=64-bit;;
6743
*) libsuff= shlibsuff= libmagic=never-match;;
6747
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6748
shlibpath_overrides_runpath=no
6749
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6750
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6751
hardcode_into_libs=yes
6754
# No shared lib support for Linux oldld, aout, or coff.
6755
linux*oldld* | linux*aout* | linux*coff*)
6759
# This must be Linux ELF.
6764
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6765
soname_spec='${libname}${release}${shared_ext}$major'
6766
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6768
if test "x$LINUX_64_MODE" = x64; then
6769
# Some platforms are per default 64-bit, so there's no /lib64
6770
if test -d /lib64; then
6774
shlibpath_var=LD_LIBRARY_PATH
6775
shlibpath_overrides_runpath=no
6776
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6777
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6778
# This implies no fast_install, which is unacceptable.
6779
# Some rework will be needed to allow for fast_install
6780
# before this can be enabled.
6781
hardcode_into_libs=yes
6783
# We used to test for /lib/ld.so.1 and disable shared libraries on
6784
# powerpc, because MkLinux only supported shared libraries with the
6785
# GNU dynamic linker. Since this was broken with cross compilers,
6786
# most powerpc-linux boxes support dynamic linking these days and
6787
# people can always --disable-shared, the test was removed, and we
6788
# assume the GNU/Linux dynamic linker is in use.
6789
dynamic_linker='GNU/Linux ld.so'
6796
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6797
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6798
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6799
dynamic_linker='NetBSD (a.out) ld.so'
6801
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
6802
soname_spec='${libname}${release}${shared_ext}$major'
6803
dynamic_linker='NetBSD ld.elf_so'
6805
shlibpath_var=LD_LIBRARY_PATH
6806
shlibpath_overrides_runpath=yes
6807
hardcode_into_libs=yes
6812
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6813
shlibpath_var=LD_LIBRARY_PATH
6814
shlibpath_overrides_runpath=yes
6821
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6822
soname_spec='${libname}${release}${shared_ext}$major'
6823
shlibpath_var=LD_LIBRARY_PATH
6824
shlibpath_overrides_runpath=yes
6831
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6832
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6833
shlibpath_var=LD_LIBRARY_PATH
6834
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6836
openbsd2.[[89]] | openbsd2.[[89]].*)
6837
shlibpath_overrides_runpath=no
6840
shlibpath_overrides_runpath=yes
6844
shlibpath_overrides_runpath=yes
6849
libname_spec='$name'
6852
library_names_spec='$libname${shared_ext} $libname.a'
6853
dynamic_linker='OS/2 ld.exe'
6854
shlibpath_var=LIBPATH
6857
osf3* | osf4* | osf5*)
6861
soname_spec='${libname}${release}${shared_ext}$major'
6862
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6863
shlibpath_var=LD_LIBRARY_PATH
6864
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6865
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6870
soname_spec='${libname}${release}${shared_ext}$major'
6871
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6872
shlibpath_var=LD_LIBRARY_PATH
6879
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6880
soname_spec='${libname}${release}${shared_ext}$major'
6881
shlibpath_var=LD_LIBRARY_PATH
6882
shlibpath_overrides_runpath=yes
6883
hardcode_into_libs=yes
6884
# ldd complains unless libraries are executable
6885
postinstall_cmds='chmod +x $lib'
6890
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6891
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6892
shlibpath_var=LD_LIBRARY_PATH
6893
shlibpath_overrides_runpath=yes
6894
if test "$with_gnu_ld" = yes; then
6900
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6902
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6903
soname_spec='${libname}${release}${shared_ext}$major'
6904
shlibpath_var=LD_LIBRARY_PATH
6905
case $host_vendor in
6907
shlibpath_overrides_runpath=no
6909
export_dynamic_flag_spec='${wl}-Blargedynsym'
6910
runpath_var=LD_RUN_PATH
6918
shlibpath_overrides_runpath=no
6919
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6925
if test -d /usr/nec ;then
6927
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
6928
soname_spec='$libname${shared_ext}.$major'
6929
shlibpath_var=LD_LIBRARY_PATH
6935
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6936
soname_spec='${libname}${release}${shared_ext}$major'
6937
shlibpath_var=LD_LIBRARY_PATH
6944
AC_MSG_RESULT([$dynamic_linker])
6945
test "$dynamic_linker" = no && can_build_shared=no
6946
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6951
AC_DEFUN([_LT_AC_TAGCONFIG],
6952
[AC_ARG_WITH([tags],
6953
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
6954
[include additional configurations @<:@automatic@:>@])],
6955
[tagnames="$withval"])
6957
if test -f "$ltmain" && test -n "$tagnames"; then
6958
if test ! -f "${ofile}"; then
6959
AC_MSG_WARN([output file `$ofile' does not exist])
6962
if test -z "$LTCC"; then
6963
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6964
if test -z "$LTCC"; then
6965
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6967
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6971
# Extract list of available tagged configurations in $ofile.
6972
# Note that this assumes the entire list is on one line.
6973
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6975
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6976
for tagname in $tagnames; do
6978
# Check whether tagname contains only valid characters
6979
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6981
*) AC_MSG_ERROR([invalid tag name: $tagname])
6985
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6987
AC_MSG_ERROR([tag name \"$tagname\" already exists])
6990
# Update the list of available tags.
6991
if test -n "$tagname"; then
6992
echo appending configuration tag \"$tagname\" to $ofile
6996
if test -n "$CXX" && test "X$CXX" != "Xno"; then
6997
AC_LIBTOOL_LANG_CXX_CONFIG
7004
if test -n "$F77" && test "X$F77" != "Xno"; then
7005
AC_LIBTOOL_LANG_F77_CONFIG
7012
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7013
AC_LIBTOOL_LANG_GCJ_CONFIG
7020
AC_LIBTOOL_LANG_RC_CONFIG
7024
AC_MSG_ERROR([Unsupported tag name: $tagname])
7028
# Append the new tag name to the list of available tags.
7029
if test -n "$tagname" ; then
7030
available_tags="$available_tags $tagname"
7036
# Now substitute the updated list of available tags.
7037
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7038
mv "${ofile}T" "$ofile"
7042
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7045
])# _LT_AC_TAGCONFIG
7050
# enable checks for dlopen support
7051
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7052
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7053
])# AC_LIBTOOL_DLOPEN
7056
# AC_LIBTOOL_WIN32_DLL
7057
# --------------------
7058
# declare package support for building win32 dll's
7059
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7060
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7061
])# AC_LIBTOOL_WIN32_DLL
7064
# AC_ENABLE_SHARED([DEFAULT])
7065
# ---------------------------
7066
# implement the --enable-shared flag
7067
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7068
AC_DEFUN([AC_ENABLE_SHARED],
7069
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7070
AC_ARG_ENABLE([shared],
7071
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7072
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7073
[p=${PACKAGE-default}
7075
yes) enable_shared=yes ;;
7076
no) enable_shared=no ;;
7079
# Look at the argument we got. We use all the common list separators.
7080
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7081
for pkg in $enableval; do
7083
if test "X$pkg" = "X$p"; then
7090
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7091
])# AC_ENABLE_SHARED
7096
#- set the default shared flag to --disable-shared
7097
AC_DEFUN([AC_DISABLE_SHARED],
7098
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7099
AC_ENABLE_SHARED(no)
7100
])# AC_DISABLE_SHARED
7103
# AC_ENABLE_STATIC([DEFAULT])
7104
# ---------------------------
7105
# implement the --enable-static flag
7106
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7107
AC_DEFUN([AC_ENABLE_STATIC],
7108
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7109
AC_ARG_ENABLE([static],
7110
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7111
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7112
[p=${PACKAGE-default}
7114
yes) enable_static=yes ;;
7115
no) enable_static=no ;;
7118
# Look at the argument we got. We use all the common list separators.
7119
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7120
for pkg in $enableval; do
7122
if test "X$pkg" = "X$p"; then
7129
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7130
])# AC_ENABLE_STATIC
7135
# set the default static flag to --disable-static
7136
AC_DEFUN([AC_DISABLE_STATIC],
7137
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7138
AC_ENABLE_STATIC(no)
7139
])# AC_DISABLE_STATIC
7142
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7143
# ---------------------------------
7144
# implement the --enable-fast-install flag
7145
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7146
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7147
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7148
AC_ARG_ENABLE([fast-install],
7149
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7150
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7151
[p=${PACKAGE-default}
7153
yes) enable_fast_install=yes ;;
7154
no) enable_fast_install=no ;;
7156
enable_fast_install=no
7157
# Look at the argument we got. We use all the common list separators.
7158
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7159
for pkg in $enableval; do
7161
if test "X$pkg" = "X$p"; then
7162
enable_fast_install=yes
7168
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7169
])# AC_ENABLE_FAST_INSTALL
7172
# AC_DISABLE_FAST_INSTALL
7173
# -----------------------
7174
# set the default to --disable-fast-install
7175
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7176
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7177
AC_ENABLE_FAST_INSTALL(no)
7178
])# AC_DISABLE_FAST_INSTALL
7181
# AC_LIBTOOL_PICMODE([MODE])
7182
# --------------------------
7183
# implement the --with-pic flag
7184
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7185
AC_DEFUN([AC_LIBTOOL_PICMODE],
7186
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7187
pic_mode=ifelse($#,1,$1,default)
7188
])# AC_LIBTOOL_PICMODE
7193
# This is predefined starting with Autoconf 2.54, so this conditional
7194
# definition can be removed once we require Autoconf 2.54 or later.
7195
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7196
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7197
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7198
then ac_cv_prog_egrep='grep -E'
7199
else ac_cv_prog_egrep='egrep'
7201
EGREP=$ac_cv_prog_egrep
7206
# AC_PATH_TOOL_PREFIX
7207
# -------------------
7208
# find a file program which can recognise shared library
7209
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7210
[AC_REQUIRE([AC_PROG_EGREP])dnl
7211
AC_MSG_CHECKING([for $1])
7212
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7214
[[\\/*] | ?:[\\/]*])
7215
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7218
lt_save_MAGIC_CMD="$MAGIC_CMD"
7219
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7220
dnl $ac_dummy forces splitting on constant user-supplied paths.
7221
dnl POSIX.2 word splitting is done only on the output of word expansions,
7222
dnl not every word. This closes a longstanding sh security hole.
7223
ac_dummy="ifelse([$2], , $PATH, [$2])"
7224
for ac_dir in $ac_dummy; do
7226
test -z "$ac_dir" && ac_dir=.
7227
if test -f $ac_dir/$1; then
7228
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7229
if test -n "$file_magic_test_file"; then
7230
case $deplibs_check_method in
7232
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7233
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7234
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7235
$EGREP "$file_magic_regex" > /dev/null; then
7240
*** Warning: the command libtool uses to detect shared libraries,
7241
*** $file_magic_cmd, produces output that libtool cannot recognize.
7242
*** The result is that libtool may fail to recognize shared libraries
7243
*** as such. This will affect the creation of libtool libraries that
7244
*** depend on shared libraries, but programs linked with such libtool
7245
*** libraries will work regardless of this problem. Nevertheless, you
7246
*** may want to report the problem to your system manager and/or to
7247
*** bug-libtool@gnu.org
7257
MAGIC_CMD="$lt_save_MAGIC_CMD"
7260
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7261
if test -n "$MAGIC_CMD"; then
7262
AC_MSG_RESULT($MAGIC_CMD)
7266
])# AC_PATH_TOOL_PREFIX
7271
# find a file program which can recognise a shared library
7272
AC_DEFUN([AC_PATH_MAGIC],
7273
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7274
if test -z "$lt_cv_path_MAGIC_CMD"; then
7275
if test -n "$ac_tool_prefix"; then
7276
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7286
# find the pathname to the GNU or non-GNU linker
7287
AC_DEFUN([AC_PROG_LD],
7288
[AC_ARG_WITH([gnu-ld],
7289
[AC_HELP_STRING([--with-gnu-ld],
7290
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7291
[test "$withval" = no || with_gnu_ld=yes],
7293
AC_REQUIRE([LT_AC_PROG_SED])dnl
7294
AC_REQUIRE([AC_PROG_CC])dnl
7295
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7296
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7298
if test "$GCC" = yes; then
7299
# Check if gcc -print-prog-name=ld gives a path.
7300
AC_MSG_CHECKING([for ld used by $CC])
7303
# gcc leaves a trailing carriage return which upsets mingw
7304
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7306
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7309
# Accept absolute paths.
7310
[[\\/]]* | ?:[[\\/]]*)
7311
re_direlt='/[[^/]][[^/]]*/\.\./'
7312
# Canonicalize the pathname of ld
7313
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7314
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7315
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7317
test -z "$LD" && LD="$ac_prog"
7320
# If it fails, then pretend we aren't using GCC.
7324
# If it is relative, then search for the first ld in PATH.
7328
elif test "$with_gnu_ld" = yes; then
7329
AC_MSG_CHECKING([for GNU ld])
7331
AC_MSG_CHECKING([for non-GNU ld])
7333
AC_CACHE_VAL(lt_cv_path_LD,
7334
[if test -z "$LD"; then
7335
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7336
for ac_dir in $PATH; do
7338
test -z "$ac_dir" && ac_dir=.
7339
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7340
lt_cv_path_LD="$ac_dir/$ac_prog"
7341
# Check to see if the program is GNU ld. I'd rather use --version,
7342
# but apparently some GNU ld's only accept -v.
7343
# Break only if it was the GNU/non-GNU ld that we prefer.
7344
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7345
*GNU* | *'with BFD'*)
7346
test "$with_gnu_ld" != no && break
7349
test "$with_gnu_ld" != yes && break
7356
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7359
if test -n "$LD"; then
7364
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7371
AC_DEFUN([AC_PROG_LD_GNU],
7372
[AC_REQUIRE([AC_PROG_EGREP])dnl
7373
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7374
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7375
case `$LD -v 2>&1 </dev/null` in
7376
*GNU* | *'with BFD'*)
7377
lt_cv_prog_gnu_ld=yes
7380
lt_cv_prog_gnu_ld=no
7383
with_gnu_ld=$lt_cv_prog_gnu_ld
7387
# AC_PROG_LD_RELOAD_FLAG
7388
# ----------------------
7389
# find reload flag for linker
7390
# -- PORTME Some linkers may need a different reload flag.
7391
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7392
[AC_CACHE_CHECK([for $LD option to reload object files],
7393
lt_cv_ld_reload_flag,
7394
[lt_cv_ld_reload_flag='-r'])
7395
reload_flag=$lt_cv_ld_reload_flag
7396
case $reload_flag in
7398
*) reload_flag=" $reload_flag" ;;
7400
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7401
])# AC_PROG_LD_RELOAD_FLAG
7404
# AC_DEPLIBS_CHECK_METHOD
7405
# -----------------------
7406
# how to check for library dependencies
7407
# -- PORTME fill in with the dynamic library characteristics
7408
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7409
[AC_CACHE_CHECK([how to recognise dependent libraries],
7410
lt_cv_deplibs_check_method,
7411
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7412
lt_cv_file_magic_test_file=
7413
lt_cv_deplibs_check_method='unknown'
7414
# Need to set the preceding variable on all platforms that support
7415
# interlibrary dependencies.
7416
# 'none' -- dependencies not supported.
7417
# `unknown' -- same as none, but documents that we really don't know.
7418
# 'pass_all' -- all dependencies passed with no checks.
7419
# 'test_compile' -- check by making test program.
7420
# 'file_magic [[regex]]' -- check by looking for files in library path
7421
# which responds to the $file_magic_cmd with a given extended regex.
7422
# If you have `file' or equivalent on your system and you're not sure
7423
# whether `pass_all' will *always* work, you probably want this one.
7427
lt_cv_deplibs_check_method=pass_all
7431
lt_cv_deplibs_check_method=pass_all
7435
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7436
lt_cv_file_magic_cmd='/usr/bin/file -L'
7437
lt_cv_file_magic_test_file=/shlib/libc.so
7440
cygwin* | mingw* | pw32*)
7441
# win32_libid is a shell function defined in ltmain.sh
7442
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7443
lt_cv_file_magic_cmd='win32_libid'
7446
darwin* | rhapsody*)
7447
# this will be overwritten by pass_all, but leave it in just in case
7448
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7449
lt_cv_file_magic_cmd='/usr/bin/file -L'
7451
rhapsody* | darwin1.[[012]])
7452
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7455
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7458
lt_cv_deplibs_check_method=pass_all
7462
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7465
# Not sure whether the presence of OpenBSD here was a mistake.
7466
# Let's accept both of them until this is cleared up.
7467
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7468
lt_cv_file_magic_cmd=/usr/bin/file
7469
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7473
lt_cv_deplibs_check_method=pass_all
7478
lt_cv_deplibs_check_method=pass_all
7481
hpux10.20* | hpux11*)
7482
lt_cv_file_magic_cmd=/usr/bin/file
7485
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7486
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7489
[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]']
7490
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7493
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7494
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7499
irix5* | irix6* | nonstopux*)
7501
irix5* | nonstopux*)
7502
# this will be overridden with pass_all, but let us keep it just in case
7503
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7507
*-32|*"-32 ") libmagic=32-bit;;
7508
*-n32|*"-n32 ") libmagic=N32;;
7509
*-64|*"-64 ") libmagic=64-bit;;
7510
*) libmagic=never-match;;
7512
# this will be overridden with pass_all, but let us keep it just in case
7513
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7516
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7517
lt_cv_deplibs_check_method=pass_all
7520
# This must be Linux ELF.
7523
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7524
lt_cv_deplibs_check_method=pass_all ;;
7525
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7527
lt_cv_deplibs_check_method=pass_all ;;
7529
# glibc up to 2.1.1 does not perform some relocations on ARM
7530
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7532
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7536
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7537
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7539
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7544
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7545
lt_cv_file_magic_cmd=/usr/bin/file
7546
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7550
lt_cv_deplibs_check_method=unknown
7554
lt_cv_file_magic_cmd=/usr/bin/file
7555
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7556
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7557
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7559
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7563
osf3* | osf4* | osf5*)
7564
# this will be overridden with pass_all, but let us keep it just in case
7565
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7566
lt_cv_file_magic_test_file=/shlib/libc.so
7567
lt_cv_deplibs_check_method=pass_all
7571
lt_cv_deplibs_check_method=pass_all
7575
lt_cv_deplibs_check_method=pass_all
7576
lt_cv_file_magic_test_file=/lib/libc.so
7579
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7580
case $host_vendor in
7582
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]]'
7583
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7586
lt_cv_deplibs_check_method=pass_all
7589
lt_cv_file_magic_cmd='/bin/file'
7590
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7593
lt_cv_file_magic_cmd='/bin/file'
7594
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7595
lt_cv_file_magic_test_file=/lib/libc.so
7598
lt_cv_deplibs_check_method=pass_all
7603
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7604
lt_cv_deplibs_check_method=pass_all
7608
file_magic_cmd=$lt_cv_file_magic_cmd
7609
deplibs_check_method=$lt_cv_deplibs_check_method
7610
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7611
])# AC_DEPLIBS_CHECK_METHOD
7616
# find the pathname to a BSD-compatible name lister
7617
AC_DEFUN([AC_PROG_NM],
7618
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7619
[if test -n "$NM"; then
7620
# Let the user override the test.
7623
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7624
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7626
test -z "$ac_dir" && ac_dir=.
7627
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7628
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7629
# Check to see if the nm accepts a BSD-compat flag.
7630
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7631
# nm: unknown option "B" ignored
7632
# Tru64's nm complains that /dev/null is an invalid object file
7633
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7634
*/dev/null* | *'Invalid file or object type'*)
7635
lt_cv_path_NM="$tmp_nm -B"
7639
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7641
lt_cv_path_NM="$tmp_nm -p"
7645
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7646
continue # so that we can try to find one that supports BSD flags
7653
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7661
# check for math library
7662
AC_DEFUN([AC_CHECK_LIBM],
7663
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7666
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
7667
# These system don't have libm, or don't need it
7670
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7671
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7674
AC_CHECK_LIB(m, cos, LIBM="-lm")
7680
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7681
# -----------------------------------
7682
# sets LIBLTDL to the link flags for the libltdl convenience library and
7683
# LTDLINCL to the include flags for the libltdl header and adds
7684
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7685
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7686
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7687
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7688
# '${top_srcdir}/' (note the single quotes!). If your package is not
7689
# flat and you're not using automake, define top_builddir and
7690
# top_srcdir appropriately in the Makefiles.
7691
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7692
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7693
case $enable_ltdl_convenience in
7694
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7695
"") enable_ltdl_convenience=yes
7696
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7698
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7699
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7700
# For backwards non-gettext consistent compatibility...
7702
])# AC_LIBLTDL_CONVENIENCE
7705
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7706
# -----------------------------------
7707
# sets LIBLTDL to the link flags for the libltdl installable library and
7708
# LTDLINCL to the include flags for the libltdl header and adds
7709
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7710
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7711
# DIRECTORY is not provided and an installed libltdl is not found, it is
7712
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7713
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7714
# quotes!). If your package is not flat and you're not using automake,
7715
# define top_builddir and top_srcdir appropriately in the Makefiles.
7716
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7717
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7718
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7719
AC_CHECK_LIB(ltdl, lt_dlinit,
7720
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7721
[if test x"$enable_ltdl_install" = xno; then
7722
AC_MSG_WARN([libltdl not installed, but installation disabled])
7724
enable_ltdl_install=yes
7727
if test x"$enable_ltdl_install" = x"yes"; then
7728
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7729
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7730
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7732
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7736
# For backwards non-gettext consistent compatibility...
7738
])# AC_LIBLTDL_INSTALLABLE
7743
# enable support for C++ libraries
7744
AC_DEFUN([AC_LIBTOOL_CXX],
7745
[AC_REQUIRE([_LT_AC_LANG_CXX])
7751
AC_DEFUN([_LT_AC_LANG_CXX],
7752
[AC_REQUIRE([AC_PROG_CXX])
7753
AC_REQUIRE([AC_PROG_CXXCPP])
7754
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
7760
# enable support for Fortran 77 libraries
7761
AC_DEFUN([AC_LIBTOOL_F77],
7762
[AC_REQUIRE([_LT_AC_LANG_F77])
7768
AC_DEFUN([_LT_AC_LANG_F77],
7769
[AC_REQUIRE([AC_PROG_F77])
7770
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
7776
# enable support for GCJ libraries
7777
AC_DEFUN([AC_LIBTOOL_GCJ],
7778
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7784
AC_DEFUN([_LT_AC_LANG_GCJ],
7785
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7786
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7787
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7788
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7789
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7790
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7791
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
7797
# enable support for Windows resource files
7798
AC_DEFUN([AC_LIBTOOL_RC],
7799
[AC_REQUIRE([LT_AC_PROG_RC])
7800
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
7804
# AC_LIBTOOL_LANG_C_CONFIG
7805
# ------------------------
7806
# Ensure that the configuration vars for the C compiler are
7807
# suitably defined. Those variables are subsequently used by
7808
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7809
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7810
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7814
# Source file extension for C test sources.
7817
# Object file extension for compiled C test sources.
7819
_LT_AC_TAGVAR(objext, $1)=$objext
7821
# Code to be used in simple compile tests
7822
lt_simple_compile_test_code="int some_variable = 0;\n"
7824
# Code to be used in simple link tests
7825
lt_simple_link_test_code='int main(){return(0);}\n'
7830
# Check for any special shared library compilation flags.
7832
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7833
if test "$GCC" = no; then
7836
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7840
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7841
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7842
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7844
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7845
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7851
# Check to make sure the static flag actually works.
7853
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7854
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7855
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7857
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7860
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7861
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7862
AC_LIBTOOL_PROG_CC_C_O($1)
7863
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7864
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7865
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7866
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7867
AC_LIBTOOL_SYS_LIB_STRIP
7868
AC_LIBTOOL_DLOPEN_SELF($1)
7870
# Report which librarie types wil actually be built
7871
AC_MSG_CHECKING([if libtool supports shared libraries])
7872
AC_MSG_RESULT([$can_build_shared])
7874
AC_MSG_CHECKING([whether to build shared libraries])
7875
test "$can_build_shared" = "no" && enable_shared=no
7877
# On AIX, shared libraries and static libraries use the same namespace, and
7878
# are all built from PIC.
7881
test "$enable_shared" = yes && enable_static=no
7882
if test -n "$RANLIB"; then
7883
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7884
postinstall_cmds='$RANLIB $lib'
7889
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7890
test "$enable_shared" = yes && enable_static=no
7893
darwin* | rhapsody*)
7894
if test "$GCC" = yes; then
7895
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7897
rhapsody* | darwin1.[[012]])
7898
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
7901
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
7904
output_verbose_link_cmd='echo'
7905
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
7906
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7907
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7908
_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 $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7909
_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 $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7910
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7911
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7912
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7913
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
7914
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7916
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7920
AC_MSG_RESULT([$enable_shared])
7922
AC_MSG_CHECKING([whether to build static libraries])
7923
# Make sure either enable_shared or enable_static is yes.
7924
test "$enable_shared" = yes || enable_static=yes
7925
AC_MSG_RESULT([$enable_static])
7927
AC_LIBTOOL_CONFIG($1)
7931
])# AC_LIBTOOL_LANG_C_CONFIG
7934
# AC_LIBTOOL_LANG_CXX_CONFIG
7935
# --------------------------
7936
# Ensure that the configuration vars for the C compiler are
7937
# suitably defined. Those variables are subsequently used by
7938
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7939
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7940
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7942
AC_REQUIRE([AC_PROG_CXX])
7943
AC_REQUIRE([AC_PROG_CXXCPP])
7945
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7946
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7947
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7949
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7950
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7952
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7953
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7954
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7955
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
7956
_LT_AC_TAGVAR(module_cmds, $1)=
7957
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
7958
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7959
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7960
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7961
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7962
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7964
# Dependencies to place before and after the object being linked:
7965
_LT_AC_TAGVAR(predep_objects, $1)=
7966
_LT_AC_TAGVAR(postdep_objects, $1)=
7967
_LT_AC_TAGVAR(predeps, $1)=
7968
_LT_AC_TAGVAR(postdeps, $1)=
7969
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7971
# Source file extension for C++ test sources.
7974
# Object file extension for compiled C++ test sources.
7976
_LT_AC_TAGVAR(objext, $1)=$objext
7978
# Code to be used in simple compile tests
7979
lt_simple_compile_test_code="int some_variable = 0;\n"
7981
# Code to be used in simple link tests
7982
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
7984
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7987
# Allow CC to be a program name with arguments.
7992
lt_save_with_gnu_ld=$with_gnu_ld
7993
lt_save_path_LD=$lt_cv_path_LD
7994
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7995
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7997
unset lt_cv_prog_gnu_ld
7999
if test -n "${lt_cv_path_LDCXX+set}"; then
8000
lt_cv_path_LD=$lt_cv_path_LDCXX
8004
test -z "${LDCXX+set}" || LD=$LDCXX
8007
_LT_AC_TAGVAR(compiler, $1)=$CC
8008
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8010
# We don't want -fno-exception wen compiling C++ code, so set the
8011
# no_builtin_flag separately
8012
if test "$GXX" = yes; then
8013
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8015
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8018
if test "$GXX" = yes; then
8019
# Set up default GNU C++ configuration
8023
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8024
# archiving commands below assume that GNU ld is being used.
8025
if test "$with_gnu_ld" = yes; then
8026
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8027
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8029
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8030
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8032
# If archive_cmds runs LD, not CC, wlarc should be empty
8033
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8034
# investigate it a little bit more. (MM)
8037
# ancient GNU ld didn't support --whole-archive et. al.
8038
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8039
grep 'no-whole-archive' > /dev/null; then
8040
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8042
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8048
# A generic and very simple default shared library creation
8049
# command for GNU C++ for the case where it uses the native
8050
# linker, instead of GNU ld. If possible, this setting should
8051
# overridden to take advantage of the native linker features on
8052
# the platform it is being used on.
8053
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8056
# Commands to make compiler produce verbose output that lists
8057
# what "hidden" libraries, object files and flags are used when
8058
# linking a shared library.
8059
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8067
# PORTME: fill in a description of your system's C++ link characteristics
8068
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8069
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8072
# FIXME: insert proper C++ library support
8073
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8076
if test "$host_cpu" = ia64; then
8077
# On IA64, the linker does run time linking by default, so we don't
8078
# have to do anything special.
8079
aix_use_runtimelinking=no
8080
exp_sym_flag='-Bexport'
8083
# KDE requires run time linking. Make it the default.
8084
aix_use_runtimelinking=yes
8085
exp_sym_flag='-bexport'
8086
no_entry_flag='-bnoentry'
8089
# When large executables or shared objects are built, AIX ld can
8090
# have problems creating the table of contents. If linking a library
8091
# or program results in "error TOC overflow" add -mminimal-toc to
8092
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8093
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8095
_LT_AC_TAGVAR(archive_cmds, $1)=''
8096
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8097
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8098
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8100
if test "$GXX" = yes; then
8101
case $host_os in aix4.[012]|aix4.[012].*)
8102
# We only want to do this on AIX 4.2 and lower, the check
8103
# below for broken collect2 doesn't work under 4.3+
8104
collect2name=`${CC} -print-prog-name=collect2`
8105
if test -f "$collect2name" && \
8106
strings "$collect2name" | grep resolve_lib_name >/dev/null
8108
# We have reworked collect2
8109
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8111
# We have old collect2
8112
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8113
# It fails to find uninstalled libraries when the uninstalled
8114
# path is not listed in the libpath. Setting hardcode_minus_L
8115
# to unsupported forces relinking
8116
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8117
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8118
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8121
shared_flag='-shared'
8124
if test "$host_cpu" = ia64; then
8125
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8126
# chokes on -Wl,-G. The following line is correct:
8129
if test "$aix_use_runtimelinking" = yes; then
8130
shared_flag='-qmkshrobj ${wl}-G'
8132
shared_flag='-qmkshrobj'
8137
# Let the compiler handle the export list.
8138
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8139
if test "$aix_use_runtimelinking" = yes; then
8140
# Warning - without using the other runtime loading flags (-brtl),
8141
# -berok will link without error, but may produce a broken library.
8142
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8143
# Determine the default libpath from the value encoded in an empty executable.
8144
_LT_AC_SYS_LIBPATH_AIX
8145
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8147
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8148
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8150
if test "$host_cpu" = ia64; then
8151
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8152
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8153
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8155
# Determine the default libpath from the value encoded in an empty executable.
8156
_LT_AC_SYS_LIBPATH_AIX
8157
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8158
# Warning - without using the other run time loading flags,
8159
# -berok will link without error, but may produce a broken library.
8160
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8161
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8162
# -bexpall does not export symbols beginning with underscore (_)
8163
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8164
# Exported symbols can be pulled into shared objects from archives
8165
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8166
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8167
# This is similar to how AIX traditionally builds it's shared libraries.
8168
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8173
case $cc_basename in
8175
# FIXME: insert proper C++ library support
8176
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8181
cygwin* | mingw* | pw32*)
8182
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8183
# as there is no search path for DLLs.
8184
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8185
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8186
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8187
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8189
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8190
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8191
# If the export-symbols file already is a .def file (1st line
8192
# is EXPORTS), use it as is; otherwise, prepend...
8193
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8194
cp $export_symbols $output_objdir/$soname.def;
8196
echo EXPORTS > $output_objdir/$soname.def;
8197
cat $export_symbols >> $output_objdir/$soname.def;
8199
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8201
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8205
darwin* | rhapsody*)
8206
if test "$GXX" = yes; then
8207
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8209
rhapsody* | darwin1.[[012]])
8210
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8213
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8216
lt_int_apple_cc_single_mod=no
8217
output_verbose_link_cmd='echo'
8218
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8219
lt_int_apple_cc_single_mod=yes
8221
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8222
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8224
_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 $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8226
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8228
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8229
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8230
_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 $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8232
_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 $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8234
_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 $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8235
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8236
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8237
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8238
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8239
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8241
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8246
case $cc_basename in
8248
# FIXME: insert proper C++ library support
8249
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8252
# Green Hills C++ Compiler
8253
# FIXME: insert proper C++ library support
8254
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8257
# FIXME: insert proper C++ library support
8258
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8263
# C++ shared libraries reported to be fairly broken before switch to ELF
8264
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8267
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8270
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8272
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8277
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8278
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8279
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8280
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8281
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8282
# but as the default
8283
# location of the library.
8285
case $cc_basename in
8287
# FIXME: insert proper C++ library support
8288
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8291
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8292
# Commands to make compiler produce verbose output that lists
8293
# what "hidden" libraries, object files and flags are used when
8294
# linking a shared library.
8296
# There doesn't appear to be a way to prevent this compiler from
8297
# explicitly linking system object files so we need to strip them
8298
# from the output so that they don't get included in the library
8300
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'
8303
if test "$GXX" = yes; then
8304
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8306
# FIXME: insert proper C++ library support
8307
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8313
if test $with_gnu_ld = no; then
8316
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8317
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8318
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8321
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8324
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8325
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8326
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8332
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8333
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8336
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8337
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8338
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8339
# but as the default
8340
# location of the library.
8343
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8344
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8345
# but as the default
8346
# location of the library.
8350
case $cc_basename in
8352
# FIXME: insert proper C++ library support
8353
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8358
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8361
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8364
# Commands to make compiler produce verbose output that lists
8365
# what "hidden" libraries, object files and flags are used when
8366
# linking a shared library.
8368
# There doesn't appear to be a way to prevent this compiler from
8369
# explicitly linking system object files so we need to strip them
8370
# from the output so that they don't get included in the library
8372
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'
8375
if test "$GXX" = yes; then
8376
if test $with_gnu_ld = no; then
8379
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8382
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8387
# FIXME: insert proper C++ library support
8388
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8394
case $cc_basename in
8397
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8399
# Archives containing C++ object files must be created using
8400
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8401
# necessary to make sure instantiated templates are included
8403
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8406
if test "$GXX" = yes; then
8407
if test "$with_gnu_ld" = no; then
8408
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8410
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8413
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8416
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8417
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8420
case $cc_basename in
8422
# Kuck and Associates, Inc. (KAI) C++ Compiler
8424
# KCC will only create a shared library if the output file
8425
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8426
# to its proper name (with version) after linking.
8427
_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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8428
_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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8429
# Commands to make compiler produce verbose output that lists
8430
# what "hidden" libraries, object files and flags are used when
8431
# linking a shared library.
8433
# There doesn't appear to be a way to prevent this compiler from
8434
# explicitly linking system object files so we need to strip them
8435
# from the output so that they don't get included in the library
8437
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'
8439
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8440
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8442
# Archives containing C++ object files must be created using
8443
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8444
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8449
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8450
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8451
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8452
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8453
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8454
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8458
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8459
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8461
runpath_var=LD_RUN_PATH
8462
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8463
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8465
# Commands to make compiler produce verbose output that lists
8466
# what "hidden" libraries, object files and flags are used when
8467
# linking a shared library.
8469
# There doesn't appear to be a way to prevent this compiler from
8470
# explicitly linking system object files so we need to strip them
8471
# from the output so that they don't get included in the library
8473
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'
8478
# FIXME: insert proper C++ library support
8479
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8482
# FIXME: insert proper C++ library support
8483
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8486
case $cc_basename in
8488
# FIXME: insert proper C++ library support
8489
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8492
# FIXME: insert proper C++ library support
8493
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8498
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8499
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8501
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8502
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8503
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8505
# Workaround some broken pre-1.5 toolchains
8506
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8509
case $cc_basename in
8511
# Kuck and Associates, Inc. (KAI) C++ Compiler
8513
# KCC will only create a shared library if the output file
8514
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8515
# to its proper name (with version) after linking.
8516
_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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8518
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8519
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8521
# Archives containing C++ object files must be created using
8522
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8523
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8527
# Rational C++ 2.4.1
8528
# FIXME: insert proper C++ library support
8529
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8532
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8533
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8535
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8536
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8538
# Commands to make compiler produce verbose output that lists
8539
# what "hidden" libraries, object files and flags are used when
8540
# linking a shared library.
8542
# There doesn't appear to be a way to prevent this compiler from
8543
# explicitly linking system object files so we need to strip them
8544
# from the output so that they don't get included in the library
8546
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'
8549
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8550
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8551
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8553
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8554
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8556
# Commands to make compiler produce verbose output that lists
8557
# what "hidden" libraries, object files and flags are used when
8558
# linking a shared library.
8559
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8562
# FIXME: insert proper C++ library support
8563
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8569
case $cc_basename in
8571
# Kuck and Associates, Inc. (KAI) C++ Compiler
8573
# KCC will only create a shared library if the output file
8574
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8575
# to its proper name (with version) after linking.
8576
_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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8578
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8579
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8581
# Archives containing C++ object files must be created using
8582
# the KAI C++ compiler.
8583
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8586
# Rational C++ 2.4.1
8587
# FIXME: insert proper C++ library support
8588
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8591
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8592
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8593
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8594
echo "-hidden">> $lib.exp~
8595
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8598
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8599
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8601
# Commands to make compiler produce verbose output that lists
8602
# what "hidden" libraries, object files and flags are used when
8603
# linking a shared library.
8605
# There doesn't appear to be a way to prevent this compiler from
8606
# explicitly linking system object files so we need to strip them
8607
# from the output so that they don't get included in the library
8609
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'
8612
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8613
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8614
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8616
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8617
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8619
# Commands to make compiler produce verbose output that lists
8620
# what "hidden" libraries, object files and flags are used when
8621
# linking a shared library.
8622
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8625
# FIXME: insert proper C++ library support
8626
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8632
# FIXME: insert proper C++ library support
8633
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8636
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8637
case $cc_basename in
8639
# FIXME: insert proper C++ library support
8640
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8643
# FIXME: insert proper C++ library support
8644
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8649
case $cc_basename in
8652
# FIXME: insert proper C++ library support
8653
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8657
# FIXME: insert proper C++ library support
8658
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8661
# FIXME: insert proper C++ library support
8662
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8667
case $cc_basename in
8669
# Sun C++ 4.2, 5.x and Centerline C++
8670
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8671
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8672
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8673
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8675
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8676
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8678
solaris2.[0-5] | solaris2.[0-5].*) ;;
8680
# The C++ compiler is used as linker so we must use $wl
8681
# flag to pass the commands to the underlying system
8683
# Supported since Solaris 2.6 (maybe 2.5.1?)
8684
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8687
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8689
# Commands to make compiler produce verbose output that lists
8690
# what "hidden" libraries, object files and flags are used when
8691
# linking a shared library.
8693
# There doesn't appear to be a way to prevent this compiler from
8694
# explicitly linking system object files so we need to strip them
8695
# from the output so that they don't get included in the library
8697
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'
8699
# Archives containing C++ object files must be created using
8700
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8701
# necessary to make sure instantiated templates are included
8703
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8706
# Green Hills C++ Compiler
8707
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8709
# The C++ compiler must be used to create the archive.
8710
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8713
# GNU C++ compiler with Solaris linker
8714
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8715
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8716
if $CC --version | grep -v '^2\.7' > /dev/null; then
8717
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8718
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8719
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8721
# Commands to make compiler produce verbose output that lists
8722
# what "hidden" libraries, object files and flags are used when
8723
# linking a shared library.
8724
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8726
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8728
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8729
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8730
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8732
# Commands to make compiler produce verbose output that lists
8733
# what "hidden" libraries, object files and flags are used when
8734
# linking a shared library.
8735
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8738
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8743
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8744
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8747
case $cc_basename in
8749
# NonStop-UX NCC 3.20
8750
# FIXME: insert proper C++ library support
8751
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8754
# FIXME: insert proper C++ library support
8755
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8760
# FIXME: insert proper C++ library support
8761
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8764
# FIXME: insert proper C++ library support
8765
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8768
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8769
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8771
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8772
_LT_AC_TAGVAR(LD, $1)="$LD"
8774
AC_LIBTOOL_POSTDEP_PREDEP($1)
8775
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8776
AC_LIBTOOL_PROG_CC_C_O($1)
8777
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8778
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8779
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8780
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8781
AC_LIBTOOL_SYS_LIB_STRIP
8782
AC_LIBTOOL_DLOPEN_SELF($1)
8784
AC_LIBTOOL_CONFIG($1)
8791
with_gnu_ldcxx=$with_gnu_ld
8792
with_gnu_ld=$lt_save_with_gnu_ld
8793
lt_cv_path_LDCXX=$lt_cv_path_LD
8794
lt_cv_path_LD=$lt_save_path_LD
8795
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8796
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8797
])# AC_LIBTOOL_LANG_CXX_CONFIG
8799
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
8800
# ------------------------
8801
# Figure out "hidden" library dependencies from verbose
8802
# compiler output when linking a shared library.
8803
# Parse the compiler output and extract the necessary
8804
# objects, libraries and library flags.
8805
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
8806
dnl we can't use the lt_simple_compile_test_code here,
8807
dnl because it contains code intended for an executable,
8808
dnl not a library. It's possible we should let each
8809
dnl tag define a new lt_????_link_test_code variable,
8810
dnl but it's only used here...
8811
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
8813
void foo (void) { a = 0; }
8815
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
8819
Foo (void) { a = 0; }
8824
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
8832
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
8835
public void bar (void) {
8841
dnl Parse the compiler output and extract the necessary
8842
dnl objects, libraries and library flags.
8843
if AC_TRY_EVAL(ac_compile); then
8844
# Parse the compiler output and extract the necessary
8845
# objects, libraries and library flags.
8847
# Sentinel used to keep track of whether or not we are before
8848
# the conftest object file.
8849
pre_test_object_deps_done=no
8851
# The `*' in the case matches for architectures that use `case' in
8852
# $output_verbose_cmd can trigger glob expansion during the loop
8853
# eval without this substitution.
8854
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8856
for p in `eval $output_verbose_link_cmd`; do
8860
# Some compilers place space between "-{L,R}" and the path.
8863
|| test $p = "-R"; then
8870
if test "$pre_test_object_deps_done" = no; then
8873
# Internal compiler library paths should come after those
8874
# provided the user. The postdeps already come after the
8875
# user supplied libs so there is no need to process them.
8876
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8877
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8879
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8882
# The "-l" case would never come before the object being
8883
# linked, so don't bother handling this case.
8886
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8887
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8889
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8894
*.$objext|*.$libext)
8895
# This assumes that the test object file only shows up
8896
# once in the compiler output.
8897
if test "$p" = "conftest.$objext"; then
8898
pre_test_object_deps_done=yes
8902
if test "$pre_test_object_deps_done" = no; then
8903
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8904
_LT_AC_TAGVAR(predep_objects, $1)="$p"
8906
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8909
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8910
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
8912
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8917
*) ;; # Ignore the rest.
8925
echo "libtool.m4: error: problem compiling $1 test program"
8928
$rm -f confest.$objext
8930
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8931
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8933
])# AC_LIBTOOL_POSTDEP_PREDEP
8935
# AC_LIBTOOL_LANG_F77_CONFIG
8936
# ------------------------
8937
# Ensure that the configuration vars for the C compiler are
8938
# suitably defined. Those variables are subsequently used by
8939
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8940
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
8941
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
8942
[AC_REQUIRE([AC_PROG_F77])
8943
AC_LANG_PUSH(Fortran 77)
8945
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8946
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8947
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8948
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8949
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8950
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8951
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8952
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8953
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8954
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8955
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8956
_LT_AC_TAGVAR(module_cmds, $1)=
8957
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8958
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8959
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8960
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8961
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8962
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8964
# Source file extension for f77 test sources.
8967
# Object file extension for compiled f77 test sources.
8969
_LT_AC_TAGVAR(objext, $1)=$objext
8971
# Code to be used in simple compile tests
8972
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
8974
# Code to be used in simple link tests
8975
lt_simple_link_test_code=" program t\n end\n"
8977
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8980
# Allow CC to be a program name with arguments.
8984
_LT_AC_TAGVAR(compiler, $1)=$CC
8985
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8987
AC_MSG_CHECKING([if libtool supports shared libraries])
8988
AC_MSG_RESULT([$can_build_shared])
8990
AC_MSG_CHECKING([whether to build shared libraries])
8991
test "$can_build_shared" = "no" && enable_shared=no
8993
# On AIX, shared libraries and static libraries use the same namespace, and
8994
# are all built from PIC.
8997
test "$enable_shared" = yes && enable_static=no
8998
if test -n "$RANLIB"; then
8999
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9000
postinstall_cmds='$RANLIB $lib'
9004
test "$enable_shared" = yes && enable_static=no
9007
AC_MSG_RESULT([$enable_shared])
9009
AC_MSG_CHECKING([whether to build static libraries])
9010
# Make sure either enable_shared or enable_static is yes.
9011
test "$enable_shared" = yes || enable_static=yes
9012
AC_MSG_RESULT([$enable_static])
9014
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9016
_LT_AC_TAGVAR(GCC, $1)="$G77"
9017
_LT_AC_TAGVAR(LD, $1)="$LD"
9019
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9020
AC_LIBTOOL_PROG_CC_C_O($1)
9021
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9022
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9023
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9024
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9025
AC_LIBTOOL_SYS_LIB_STRIP
9028
AC_LIBTOOL_CONFIG($1)
9032
])# AC_LIBTOOL_LANG_F77_CONFIG
9035
# AC_LIBTOOL_LANG_GCJ_CONFIG
9036
# --------------------------
9037
# Ensure that the configuration vars for the C compiler are
9038
# suitably defined. Those variables are subsequently used by
9039
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9040
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9041
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9044
# Source file extension for Java test sources.
9047
# Object file extension for compiled Java test sources.
9049
_LT_AC_TAGVAR(objext, $1)=$objext
9051
# Code to be used in simple compile tests
9052
lt_simple_compile_test_code="class foo {}\n"
9054
# Code to be used in simple link tests
9055
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9057
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9060
# Allow CC to be a program name with arguments.
9064
_LT_AC_TAGVAR(compiler, $1)=$CC
9066
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9067
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9069
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9070
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9071
AC_LIBTOOL_PROG_CC_C_O($1)
9072
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9073
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9074
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9075
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9076
AC_LIBTOOL_SYS_LIB_STRIP
9077
AC_LIBTOOL_DLOPEN_SELF($1)
9079
AC_LIBTOOL_CONFIG($1)
9083
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9086
# AC_LIBTOOL_LANG_RC_CONFIG
9087
# --------------------------
9088
# Ensure that the configuration vars for the Windows resource compiler are
9089
# suitably defined. Those variables are subsequently used by
9090
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9091
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9092
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9095
# Source file extension for RC test sources.
9098
# Object file extension for compiled RC test sources.
9100
_LT_AC_TAGVAR(objext, $1)=$objext
9102
# Code to be used in simple compile tests
9103
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9105
# Code to be used in simple link tests
9106
lt_simple_link_test_code="$lt_simple_compile_test_code"
9108
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9111
# Allow CC to be a program name with arguments.
9115
_LT_AC_TAGVAR(compiler, $1)=$CC
9116
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9118
AC_LIBTOOL_CONFIG($1)
9122
])# AC_LIBTOOL_LANG_RC_CONFIG
9125
# AC_LIBTOOL_CONFIG([TAGNAME])
9126
# ----------------------------
9127
# If TAGNAME is not passed, then create an initial libtool script
9128
# with a default configuration from the untagged config vars. Otherwise
9129
# add code to config.status for appending the configuration named by
9130
# TAGNAME from the matching tagged config vars.
9131
AC_DEFUN([AC_LIBTOOL_CONFIG],
9132
[# The else clause should only fire when bootstrapping the
9133
# libtool distribution, otherwise you forgot to ship ltmain.sh
9134
# with your package, and you will get complaints that there are
9135
# no rules to generate ltmain.sh.
9136
if test -f "$ltmain"; then
9137
# See if we are running on zsh, and set the options which allow our commands through
9138
# without removal of \ escapes.
9139
if test -n "${ZSH_VERSION+set}" ; then
9140
setopt NO_GLOB_SUBST
9142
# Now quote all the things that may contain metacharacters while being
9143
# careful not to overquote the AC_SUBSTed values. We take copies of the
9144
# variables and quote the copies for generation of the libtool script.
9145
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9146
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9147
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9148
deplibs_check_method reload_flag reload_cmds need_locks \
9149
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9150
lt_cv_sys_global_symbol_to_c_name_address \
9151
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9152
old_postinstall_cmds old_postuninstall_cmds \
9153
_LT_AC_TAGVAR(compiler, $1) \
9154
_LT_AC_TAGVAR(CC, $1) \
9155
_LT_AC_TAGVAR(LD, $1) \
9156
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9157
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9158
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9159
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9160
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9161
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9162
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9163
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9164
_LT_AC_TAGVAR(old_archive_cmds, $1) \
9165
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9166
_LT_AC_TAGVAR(predep_objects, $1) \
9167
_LT_AC_TAGVAR(postdep_objects, $1) \
9168
_LT_AC_TAGVAR(predeps, $1) \
9169
_LT_AC_TAGVAR(postdeps, $1) \
9170
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9171
_LT_AC_TAGVAR(archive_cmds, $1) \
9172
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9173
_LT_AC_TAGVAR(postinstall_cmds, $1) \
9174
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
9175
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9176
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
9177
_LT_AC_TAGVAR(no_undefined_flag, $1) \
9178
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
9179
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9180
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9181
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9182
_LT_AC_TAGVAR(hardcode_automatic, $1) \
9183
_LT_AC_TAGVAR(module_cmds, $1) \
9184
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
9185
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9186
_LT_AC_TAGVAR(exclude_expsyms, $1) \
9187
_LT_AC_TAGVAR(include_expsyms, $1); do
9190
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
9191
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9192
_LT_AC_TAGVAR(archive_cmds, $1) | \
9193
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9194
_LT_AC_TAGVAR(module_cmds, $1) | \
9195
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9196
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9197
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9198
extract_expsyms_cmds | reload_cmds | finish_cmds | \
9199
postinstall_cmds | postuninstall_cmds | \
9200
old_postinstall_cmds | old_postuninstall_cmds | \
9201
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9202
# Double-quote double-evaled strings.
9203
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9206
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9212
*'\[$]0 --fallback-echo"')
9213
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9218
[cfgfile="${ofile}T"
9219
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9221
AC_MSG_NOTICE([creating $ofile])],
9224
cat <<__EOF__ >> "$cfgfile"
9228
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9229
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9230
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9232
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9233
# Free Software Foundation, Inc.
9235
# This file is part of GNU Libtool:
9236
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9238
# This program is free software; you can redistribute it and/or modify
9239
# it under the terms of the GNU General Public License as published by
9240
# the Free Software Foundation; either version 2 of the License, or
9241
# (at your option) any later version.
9243
# This program is distributed in the hope that it will be useful, but
9244
# WITHOUT ANY WARRANTY; without even the implied warranty of
9245
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9246
# General Public License for more details.
9248
# You should have received a copy of the GNU General Public License
9249
# along with this program; if not, write to the Free Software
9250
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9252
# As a special exception to the GNU General Public License, if you
9253
# distribute this file as part of a program that contains a
9254
# configuration script generated by Autoconf, you may include it under
9255
# the same distribution terms that you use for the rest of that program.
9257
# A sed program that does not truncate output.
9260
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9261
Xsed="$SED -e s/^X//"
9263
# The HP-UX ksh and POSIX shell print the target directory to stdout
9265
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9267
# The names of the tagged configurations supported by this script.
9270
# ### BEGIN LIBTOOL CONFIG],
9271
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9273
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9275
# Shell to use when invoking shell scripts.
9278
# Whether or not to build shared libraries.
9279
build_libtool_libs=$enable_shared
9281
# Whether or not to build static libraries.
9282
build_old_libs=$enable_static
9284
# Whether or not to add -lc for building shared libraries.
9285
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9287
# Whether or not to disallow shared libs when runtime libs are static
9288
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9290
# Whether or not to optimize for fast installation.
9291
fast_install=$enable_fast_install
9294
host_alias=$host_alias
9297
# An echo program that does not interpret backslashes.
9302
AR_FLAGS=$lt_AR_FLAGS
9307
# A language-specific compiler.
9308
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9310
# Is the compiler the GNU C compiler?
9311
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9316
# The linker used to build libraries.
9317
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9319
# Whether we need hard or soft links.
9322
# A BSD-compatible nm program.
9325
# A symbol stripping program
9328
# Used to examine libraries when file_magic_cmd begins "file"
9329
MAGIC_CMD=$MAGIC_CMD
9331
# Used on cygwin: DLL creation program.
9334
# Used on cygwin: object dumper.
9337
# Used on cygwin: assembler.
9340
# The name of the directory that contains temporary libtool files.
9343
# How to create reloadable object files.
9344
reload_flag=$lt_reload_flag
9345
reload_cmds=$lt_reload_cmds
9347
# How to pass a linker flag through the compiler.
9348
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9350
# Object file suffix (normally "o").
9353
# Old archive suffix (normally "a").
9356
# Shared library suffix (normally ".so").
9359
# Executable file suffix (normally "").
9362
# Additional compiler flags for building library objects.
9363
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9366
# What is the maximum length of a command?
9367
max_cmd_len=$lt_cv_sys_max_cmd_len
9369
# Does compiler simultaneously support -c and -o options?
9370
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9372
# Must we lock files when doing compilation ?
9373
need_locks=$lt_need_locks
9375
# Do we need the lib prefix for modules?
9376
need_lib_prefix=$need_lib_prefix
9378
# Do we need a version for libraries?
9379
need_version=$need_version
9381
# Whether dlopen is supported.
9382
dlopen_support=$enable_dlopen
9384
# Whether dlopen of programs is supported.
9385
dlopen_self=$enable_dlopen_self
9387
# Whether dlopen of statically linked programs is supported.
9388
dlopen_self_static=$enable_dlopen_self_static
9390
# Compiler flag to prevent dynamic linking.
9391
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9393
# Compiler flag to turn off builtin functions.
9394
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9396
# Compiler flag to allow reflexive dlopens.
9397
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9399
# Compiler flag to generate shared objects directly from archives.
9400
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9402
# Compiler flag to generate thread-safe objects.
9403
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9405
# Library versioning type.
9406
version_type=$version_type
9408
# Format of library name prefix.
9409
libname_spec=$lt_libname_spec
9411
# List of archive names. First name is the real one, the rest are links.
9412
# The last name is the one that the linker finds with -lNAME.
9413
library_names_spec=$lt_library_names_spec
9415
# The coded name of the library, if different from the real name.
9416
soname_spec=$lt_soname_spec
9418
# Commands used to build and install an old-style archive.
9420
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9421
old_postinstall_cmds=$lt_old_postinstall_cmds
9422
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9424
# Create an old-style archive from a shared archive.
9425
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9427
# Create a temporary old-style archive to link instead of a shared archive.
9428
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9430
# Commands used to build and install a shared archive.
9431
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9432
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9433
postinstall_cmds=$lt_postinstall_cmds
9434
postuninstall_cmds=$lt_postuninstall_cmds
9436
# Commands used to build a loadable module (assumed same as above if empty)
9437
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9438
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9440
# Commands to strip libraries.
9441
old_striplib=$lt_old_striplib
9442
striplib=$lt_striplib
9444
# Dependencies to place before the objects being linked to create a
9446
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9448
# Dependencies to place after the objects being linked to create a
9450
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9452
# Dependencies to place before the objects being linked to create a
9454
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9456
# Dependencies to place after the objects being linked to create a
9458
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9460
# The library search path used internally by the compiler when linking
9462
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9464
# Method to check whether dependent libraries are shared objects.
9465
deplibs_check_method=$lt_deplibs_check_method
9467
# Command to use when deplibs_check_method == file_magic.
9468
file_magic_cmd=$lt_file_magic_cmd
9470
# Flag that allows shared libraries with undefined symbols to be built.
9471
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9473
# Flag that forces no undefined symbols.
9474
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9476
# Commands used to finish a libtool library installation in a directory.
9477
finish_cmds=$lt_finish_cmds
9479
# Same as above, but a single script fragment to be evaled but not shown.
9480
finish_eval=$lt_finish_eval
9482
# Take the output of nm and produce a listing of raw symbols and C names.
9483
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9485
# Transform the output of nm in a proper C declaration
9486
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9488
# Transform the output of nm in a C name address pair
9489
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9491
# This is the shared library runtime path variable.
9492
runpath_var=$runpath_var
9494
# This is the shared library path variable.
9495
shlibpath_var=$shlibpath_var
9497
# Is shlibpath searched before the hard-coded library search path?
9498
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9500
# How to hardcode a shared library path into an executable.
9501
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9503
# Whether we should hardcode library paths into libraries.
9504
hardcode_into_libs=$hardcode_into_libs
9506
# Flag to hardcode \$libdir into a binary during linking.
9507
# This must work even if \$libdir does not exist.
9508
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9510
# If ld is used when linking, flag to hardcode \$libdir into
9511
# a binary during linking. This must work even if \$libdir does
9513
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9515
# Whether we need a single -rpath flag with a separated argument.
9516
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9518
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9520
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9522
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9524
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9526
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9527
# the resulting binary.
9528
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9530
# Set to yes if building a shared library automatically hardcodes DIR into the library
9531
# and all subsequent libraries and executables linked against it.
9532
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9534
# Variables whose values should be saved in libtool wrapper scripts and
9535
# restored at relink time.
9536
variables_saved_for_relink="$variables_saved_for_relink"
9538
# Whether libtool must link a program against all its dependency libraries.
9539
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9541
# Compile-time system search path for libraries
9542
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9544
# Run-time system search path for libraries
9545
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9547
# Fix the shell variable \$srcfile for the compiler.
9548
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9550
# Set to yes if exported symbols are required.
9551
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9553
# The commands to list exported symbols.
9554
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9556
# The commands to extract the exported symbol list from a shared archive.
9557
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9559
# Symbols that should not be listed in the preloaded symbols.
9560
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9562
# Symbols that must always be exported.
9563
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9566
[# ### END LIBTOOL CONFIG],
9567
[# ### END LIBTOOL TAG CONFIG: $tagname])
9574
cat <<\EOF >> "$cfgfile"
9576
# AIX sometimes has problems with the GCC collect2 program. For some
9577
# reason, if we set the COLLECT_NAMES environment variable, the problems
9578
# vanish in a puff of smoke.
9579
if test "X${COLLECT_NAMES+set}" != Xset; then
9581
export COLLECT_NAMES
9587
# We use sed instead of cat because bash on DJGPP gets confused if
9588
# if finds mixed CR/LF and LF-only lines. Since sed operates in
9589
# text mode, it properly converts lines to CR/LF. This bash problem
9590
# is reportedly fixed, but why not run on old versions too?
9591
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9593
mv -f "$cfgfile" "$ofile" || \
9594
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9598
# If there is no Makefile yet, we rely on a make rule to execute
9599
# `config.status --recheck' to rerun these tests and create the
9600
# libtool script then.
9601
test -f Makefile && make "$ltmain"
9603
])# AC_LIBTOOL_CONFIG
9606
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9607
# -------------------------------------------
9608
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9609
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9611
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9613
if test "$GCC" = yes; then
9614
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9616
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9617
lt_cv_prog_compiler_rtti_exceptions,
9618
[-fno-rtti -fno-exceptions], [],
9619
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9621
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9624
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9625
# ---------------------------------
9626
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9627
[AC_REQUIRE([AC_CANONICAL_HOST])
9628
AC_REQUIRE([AC_PROG_NM])
9629
AC_REQUIRE([AC_OBJEXT])
9630
# Check for command to grab the raw symbol name followed by C symbol from nm.
9631
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9632
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9634
# These are sane defaults that work on at least a few old systems.
9635
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9637
# Character class describing NM global symbol codes.
9638
symcode='[[BCDEGRST]]'
9640
# Regexp to match symbols that can be accessed directly from C.
9641
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9643
# Transform the above into a raw symbol and a C symbol.
9644
symxfrm='\1 \2\3 \3'
9646
# Transform an extracted symbol line into a proper C declaration
9647
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9649
# Transform an extracted symbol line into symbol name and symbol address
9650
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'"
9652
# Define system-specific variables.
9657
cygwin* | mingw* | pw32*)
9658
symcode='[[ABCDGISTW]]'
9660
hpux*) # Its linker distinguishes data from code symbols
9661
if test "$host_cpu" = ia64; then
9662
symcode='[[ABCDEGRST]]'
9664
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9665
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'"
9668
symcode='[[BCDEGRST]]'
9671
symcode='[[BCDEGQRST]]'
9677
symcode='[[DFNSTU]]'
9681
# Handle CRLF in mingw tool chain
9685
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9689
# If we're using GNU nm, then use its standard symbol codes.
9690
case `$NM -V 2>&1` in
9691
*GNU* | *'with BFD'*)
9692
symcode='[[ABCDGISTW]]' ;;
9695
# Try without a prefix undercore, then with it.
9696
for ac_symprfx in "" "_"; do
9698
# Write the raw and C identifiers.
9699
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9701
# Check to see that the pipe works correctly.
9705
cat > conftest.$ac_ext <<EOF
9710
void nm_test_func(){}
9714
int main(){nm_test_var='a';nm_test_func();return(0);}
9717
if AC_TRY_EVAL(ac_compile); then
9718
# Now try to grab the symbols.
9720
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9721
# Try sorting and uniquifying the output.
9722
if sort "$nlist" | uniq > "$nlist"T; then
9723
mv -f "$nlist"T "$nlist"
9728
# Make sure that we snagged all the symbols we need.
9729
if grep ' nm_test_var$' "$nlist" >/dev/null; then
9730
if grep ' nm_test_func$' "$nlist" >/dev/null; then
9731
cat <<EOF > conftest.$ac_ext
9737
# Now generate the symbol file.
9738
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9740
cat <<EOF >> conftest.$ac_ext
9741
#if defined (__STDC__) && __STDC__
9742
# define lt_ptr_t void *
9744
# define lt_ptr_t char *
9748
/* The mapping between symbol names and symbols. */
9753
lt_preloaded_symbols[[]] =
9756
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9757
cat <<\EOF >> conftest.$ac_ext
9765
# Now try linking the two files.
9766
mv conftest.$ac_objext conftstm.$ac_objext
9767
lt_save_LIBS="$LIBS"
9768
lt_save_CFLAGS="$CFLAGS"
9769
LIBS="conftstm.$ac_objext"
9770
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9771
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9774
LIBS="$lt_save_LIBS"
9775
CFLAGS="$lt_save_CFLAGS"
9777
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9780
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9783
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9786
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9787
cat conftest.$ac_ext >&5
9789
rm -f conftest* conftst*
9791
# Do not use the global_symbol_pipe unless it works.
9792
if test "$pipe_works" = yes; then
9795
lt_cv_sys_global_symbol_pipe=
9799
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9800
lt_cv_sys_global_symbol_to_cdecl=
9802
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9803
AC_MSG_RESULT(failed)
9807
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9810
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9811
# ---------------------------------------
9812
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9813
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9814
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9815
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9817
AC_MSG_CHECKING([for $compiler option to produce PIC])
9819
# C++ specific cases for pic, static, wl, etc.
9820
if test "$GXX" = yes; then
9821
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9822
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9826
# All AIX code is PIC.
9827
if test "$host_cpu" = ia64; then
9828
# AIX 5 now supports IA64 processor
9829
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9833
# FIXME: we need at least 68020 code to build shared libraries, but
9834
# adding the `-m68020' flag to GCC prevents building anything better,
9836
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9838
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9839
# PIC is the default for these OSes.
9841
mingw* | os2* | pw32*)
9842
# This hack is so that the source file can tell whether it is being
9843
# built for inclusion in a dll (and should export symbols for example).
9844
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9846
darwin* | rhapsody*)
9847
# PIC is the default on this platform
9848
# Common symbols not allowed in MH_DYLIB files
9849
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9852
# DJGPP does not support shared libraries at all
9853
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9856
if test -d /usr/nec; then
9857
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9861
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9867
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9872
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9878
# All AIX code is PIC.
9879
if test "$host_cpu" = ia64; then
9880
# AIX 5 now supports IA64 processor
9881
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9883
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9887
case $cc_basename in
9889
# Green Hills C++ Compiler
9890
# _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"
9895
case $cc_basename in
9897
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9900
# Green Hills C++ Compiler
9901
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9908
# FreeBSD uses GNU C++
9910
hpux9* | hpux10* | hpux11*)
9911
case $cc_basename in
9913
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9914
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9915
if test "$host_cpu" != ia64; then
9916
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9920
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9921
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9927
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9935
irix5* | irix6* | nonstopux*)
9936
case $cc_basename in
9938
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9939
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9940
# CC pic flag -KPIC is the default.
9947
case $cc_basename in
9950
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9951
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9955
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9956
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9957
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9961
# Make sure the PIC flag is empty. It appears that all Alpha
9962
# Linux and Compaq Tru64 Unix objects are PIC.
9963
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9964
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9975
case $cc_basename in
9977
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9985
osf3* | osf4* | osf5*)
9986
case $cc_basename in
9988
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9991
# Rational C++ 2.4.1
9992
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9995
# Digital/Compaq C++
9996
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9997
# Make sure the PIC flag is empty. It appears that all Alpha
9998
# Linux and Compaq Tru64 Unix objects are PIC.
9999
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10000
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10009
case $cc_basename in
10011
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10018
case $cc_basename in
10020
# Sun C++ 4.2, 5.x and Centerline C++
10021
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10022
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10023
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10026
# Green Hills C++ Compiler
10027
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10034
case $cc_basename in
10037
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10038
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10042
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10049
case $cc_basename in
10051
# NonStop-UX NCC 3.20
10052
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10063
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10069
if test "$GCC" = yes; then
10070
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10071
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10075
# All AIX code is PIC.
10076
if test "$host_cpu" = ia64; then
10077
# AIX 5 now supports IA64 processor
10078
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10083
# FIXME: we need at least 68020 code to build shared libraries, but
10084
# adding the `-m68020' flag to GCC prevents building anything better,
10086
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10089
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10090
# PIC is the default for these OSes.
10093
mingw* | pw32* | os2*)
10094
# This hack is so that the source file can tell whether it is being
10095
# built for inclusion in a dll (and should export symbols for example).
10096
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10099
darwin* | rhapsody*)
10100
# PIC is the default on this platform
10101
# Common symbols not allowed in MH_DYLIB files
10102
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10106
# Just because we use GCC doesn't mean we suddenly get shared libraries
10107
# on systems that don't support them.
10108
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10113
if test -d /usr/nec; then
10114
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10119
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10120
# not for PA HP-UX.
10121
case "$host_cpu" in
10126
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10132
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10136
# PORTME Check for flag to pass linker flags through the system compiler.
10139
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10140
if test "$host_cpu" = ia64; then
10141
# AIX 5 now supports IA64 processor
10142
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10144
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10148
mingw* | pw32* | os2*)
10149
# This hack is so that the source file can tell whether it is being
10150
# built for inclusion in a dll (and should export symbols for example).
10151
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10154
hpux9* | hpux10* | hpux11*)
10155
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10156
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10157
# not for PA HP-UX.
10158
case "$host_cpu" in
10163
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10166
# Is there a better lt_prog_compiler_static that works with the bundled CC?
10167
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10170
irix5* | irix6* | nonstopux*)
10171
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10172
# PIC (with -KPIC) is the default.
10173
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10177
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10178
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10184
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10185
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10186
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10189
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10190
# All Alpha code is PIC.
10191
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10196
osf3* | osf4* | osf5*)
10197
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10198
# All OSF/1 code is PIC.
10199
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10203
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10204
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10208
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10209
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10210
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10214
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10215
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10216
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10219
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10220
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10221
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10222
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10226
if test -d /usr/nec ;then
10227
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10228
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10233
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10234
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10238
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10243
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10246
# Check to make sure the PIC flag actually works.
10248
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10249
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10250
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10251
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10252
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10254
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10256
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10257
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10260
# For platforms which do not support PIC, -DPIC is meaningless:
10262
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10265
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10271
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10272
# ------------------------------------
10273
# See if the linker supports building shared libraries.
10274
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10275
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10276
ifelse([$1],[CXX],[
10277
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10280
# If we're using GNU nm, then we don't want the "-C" option.
10281
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10282
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10283
_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'
10285
_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'
10289
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10292
_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'
10295
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10300
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10301
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10302
_LT_AC_TAGVAR(archive_cmds, $1)=
10303
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10304
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10305
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10306
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10307
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10308
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10309
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10310
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10311
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10312
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10313
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10314
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10315
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10316
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
10317
_LT_AC_TAGVAR(module_cmds, $1)=
10318
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
10319
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10320
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10321
# include_expsyms should be a list of space-separated symbols to be *always*
10322
# included in the symbol list
10323
_LT_AC_TAGVAR(include_expsyms, $1)=
10324
# exclude_expsyms can be an extended regexp of symbols to exclude
10325
# it will be wrapped by ` (' and `)$', so one must not match beginning or
10326
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10327
# as well as any symbol that contains `d'.
10328
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10329
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10330
# platforms (ab)use it in PIC code, but their linkers get confused if
10331
# the symbol is explicitly referenced. Since portable code cannot
10332
# rely on this symbol name, it's probably fine to never include it in
10333
# preloaded symbol tables.
10334
extract_expsyms_cmds=
10337
cygwin* | mingw* | pw32*)
10338
# FIXME: the MSVC++ port hasn't been tested in a loooong time
10339
# When not using gcc, we currently assume that we are using
10340
# Microsoft Visual C++.
10341
if test "$GCC" != yes; then
10350
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10351
if test "$with_gnu_ld" = yes; then
10352
# If archive_cmds runs LD, not CC, wlarc should be empty
10355
# See if GNU ld supports shared libraries.
10357
aix3* | aix4* | aix5*)
10358
# On AIX/PPC, the GNU linker is very broken
10359
if test "$host_cpu" != ia64; then
10360
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10363
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10364
*** to be unable to reliably create shared libraries on AIX.
10365
*** Therefore, libtool is disabling shared libraries support. If you
10366
*** really care for shared libraries, you may want to modify your PATH
10367
*** so that a non-GNU linker is found, and then restart.
10374
_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)'
10375
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10376
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10378
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10379
# that the semantics of dynamic libraries on AmigaOS, at least up
10380
# to version 4, is to share data among multiple programs linked
10381
# with the same dynamic library. Since this doesn't match the
10382
# behavior of shared libraries on other platforms, we can't use
10384
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10388
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10389
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10390
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10391
# support --undefined. This deserves some investigation. FIXME
10392
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10394
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10398
cygwin* | mingw* | pw32*)
10399
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10400
# as there is no search path for DLLs.
10401
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10402
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10403
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10404
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10405
_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'
10407
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10408
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10409
# If the export-symbols file already is a .def file (1st line
10410
# is EXPORTS), use it as is; otherwise, prepend...
10411
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10412
cp $export_symbols $output_objdir/$soname.def;
10414
echo EXPORTS > $output_objdir/$soname.def;
10415
cat $export_symbols >> $output_objdir/$soname.def;
10417
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10424
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10425
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10428
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10429
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10434
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10435
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10438
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10439
*** create shared libraries on Solaris systems. Therefore, libtool
10440
*** is disabling shared libraries support. We urge you to upgrade GNU
10441
*** binutils to release 2.9.1 or newer. Another option is to modify
10442
*** your PATH or compiler configuration so that the native linker is
10443
*** used, and then restart.
10446
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10447
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10448
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10450
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10455
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10457
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10458
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10462
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10463
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10464
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10466
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10471
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10472
runpath_var=LD_RUN_PATH
10473
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10474
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10475
# ancient GNU ld didn't support --whole-archive et. al.
10476
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10477
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10479
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10483
# PORTME fill in a description of your system's linker (not GNU ld)
10486
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10487
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10488
_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'
10489
# Note: this linker hardcodes the directories in LIBPATH if there
10490
# are no directories specified by -L.
10491
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10492
if test "$GCC" = yes && test -z "$link_static_flag"; then
10493
# Neither direct hardcoding nor static linking is supported with a
10495
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10500
if test "$host_cpu" = ia64; then
10501
# On IA64, the linker does run time linking by default, so we don't
10502
# have to do anything special.
10503
aix_use_runtimelinking=no
10504
exp_sym_flag='-Bexport'
10507
# If we're using GNU nm, then we don't want the "-C" option.
10508
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10509
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10510
_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'
10512
_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'
10515
# KDE requires run time linking. Make it the default.
10516
aix_use_runtimelinking=yes
10517
exp_sym_flag='-bexport'
10518
no_entry_flag='-bnoentry'
10521
# When large executables or shared objects are built, AIX ld can
10522
# have problems creating the table of contents. If linking a library
10523
# or program results in "error TOC overflow" add -mminimal-toc to
10524
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10525
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10527
_LT_AC_TAGVAR(archive_cmds, $1)=''
10528
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10529
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10530
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10532
if test "$GCC" = yes; then
10533
case $host_os in aix4.[012]|aix4.[012].*)
10534
# We only want to do this on AIX 4.2 and lower, the check
10535
# below for broken collect2 doesn't work under 4.3+
10536
collect2name=`${CC} -print-prog-name=collect2`
10537
if test -f "$collect2name" && \
10538
strings "$collect2name" | grep resolve_lib_name >/dev/null
10540
# We have reworked collect2
10541
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10543
# We have old collect2
10544
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10545
# It fails to find uninstalled libraries when the uninstalled
10546
# path is not listed in the libpath. Setting hardcode_minus_L
10547
# to unsupported forces relinking
10548
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10549
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10550
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10553
shared_flag='-shared'
10556
if test "$host_cpu" = ia64; then
10557
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10558
# chokes on -Wl,-G. The following line is correct:
10561
if test "$aix_use_runtimelinking" = yes; then
10562
shared_flag='-qmkshrobj ${wl}-G'
10564
shared_flag='-qmkshrobj'
10569
# Let the compiler handle the export list.
10570
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10571
if test "$aix_use_runtimelinking" = yes; then
10572
# Warning - without using the other runtime loading flags (-brtl),
10573
# -berok will link without error, but may produce a broken library.
10574
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10575
# Determine the default libpath from the value encoded in an empty executable.
10576
_LT_AC_SYS_LIBPATH_AIX
10577
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10578
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10579
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10581
if test "$host_cpu" = ia64; then
10582
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10583
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10584
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10586
# Determine the default libpath from the value encoded in an empty executable.
10587
_LT_AC_SYS_LIBPATH_AIX
10588
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10589
# Warning - without using the other run time loading flags,
10590
# -berok will link without error, but may produce a broken library.
10591
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10592
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10593
# -bexpall does not export symbols beginning with underscore (_)
10594
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10595
# Exported symbols can be pulled into shared objects from archives
10596
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10597
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10598
# This is similar to how AIX traditionally builds it's shared libraries.
10599
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10605
_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)'
10606
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10607
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10608
# see comment about different semantics on the GNU ld section
10609
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10613
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10616
cygwin* | mingw* | pw32*)
10617
# When not using gcc, we currently assume that we are using
10618
# Microsoft Visual C++.
10619
# hardcode_libdir_flag_spec is actually meaningless, as there is
10620
# no search path for DLLs.
10621
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10622
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10623
# Tell ltmain to make .lib files, not .a files.
10625
# Tell ltmain to make .dll files, not .so files.
10627
# FIXME: Setting linknames here is a bad hack.
10628
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10629
# The linker will automatically build a .lib file if we build a DLL.
10630
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10631
# FIXME: Should let the user specify the lib program.
10632
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10633
fix_srcfile_path='`cygpath -w "$srcfile"`'
10634
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10637
darwin* | rhapsody*)
10638
if test "$GXX" = yes ; then
10639
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10641
rhapsody* | darwin1.[[012]])
10642
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10645
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10648
lt_int_apple_cc_single_mod=no
10649
output_verbose_link_cmd='echo'
10650
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
10651
lt_int_apple_cc_single_mod=yes
10653
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10654
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10656
_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 $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10658
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10659
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10660
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10661
_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 $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10663
_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 $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10665
_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 $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10666
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10667
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10668
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10669
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10670
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10672
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10677
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10678
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10679
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10683
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10686
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10687
# support. Future versions do this automatically, but an explicit c++rt0.o
10688
# does not break anything, and helps significantly (at the cost of a little
10691
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10692
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10693
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10694
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10697
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
10699
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10700
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10701
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10702
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10705
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10707
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10708
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10709
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10710
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10714
if test "$GCC" = yes; then
10715
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10717
_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'
10719
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10720
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10721
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10723
# hardcode_minus_L: Not really in the search PATH,
10724
# but as the default location of the library.
10725
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10726
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10730
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
10731
case "$host_cpu" in
10733
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10736
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10740
case "$host_cpu" in
10742
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10745
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10749
if test "$with_gnu_ld" = no; then
10750
case "$host_cpu" in
10752
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10753
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
10754
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10755
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10756
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10759
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10760
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10761
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10763
# hardcode_minus_L: Not really in the search PATH,
10764
# but as the default location of the library.
10765
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10768
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10769
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10770
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10771
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10773
# hardcode_minus_L: Not really in the search PATH,
10774
# but as the default location of the library.
10775
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10781
irix5* | irix6* | nonstopux*)
10782
if test "$GCC" = yes; then
10783
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10785
_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'
10786
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
10788
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10789
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10790
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10794
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10795
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10797
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10799
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10800
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10801
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10805
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10806
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10807
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10808
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10809
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10813
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10814
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10815
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10816
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10817
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10818
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10821
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10822
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10823
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10826
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10827
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10834
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10835
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10836
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10837
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
10838
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10842
if test "$GCC" = yes; then
10843
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10844
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10846
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10847
_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'
10849
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10850
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10853
osf4* | osf5*) # as osf3* with the addition of -msym flag
10854
if test "$GCC" = yes; then
10855
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10856
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10857
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10859
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10860
_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'
10861
_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~
10862
$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'
10864
# Both c and cxx compiler support -rpath directly
10865
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10867
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10871
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10872
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10873
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10874
runpath_var=LD_RUN_PATH
10875
hardcode_runpath_var=yes
10879
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10880
if test "$GCC" = yes; then
10881
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10882
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10883
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10885
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10886
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10887
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10889
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10890
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10892
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10893
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
10894
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10896
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10900
if test "x$host_vendor" = xsequent; then
10901
# Use $CC to link under sequent, because it throws in some extra .o
10902
# files that make .init and .fini sections work.
10903
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10905
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10907
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10908
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10909
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10910
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10914
case $host_vendor in
10916
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10917
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10920
## LD is ld it makes a PLAMLIB
10921
## CC just makes a GrossModule.
10922
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10923
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
10924
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10927
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10928
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10931
runpath_var='LD_RUN_PATH'
10932
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10936
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10937
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10938
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10942
if test -d /usr/nec; then
10943
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10944
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10945
runpath_var=LD_RUN_PATH
10946
hardcode_runpath_var=yes
10947
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10952
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10953
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10954
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10955
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10956
hardcode_runpath_var=yes
10957
runpath_var=LD_RUN_PATH
10960
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10961
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10962
if test "$GCC" = yes; then
10963
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10965
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10967
runpath_var='LD_RUN_PATH'
10968
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10972
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10973
# $CC -shared without GNU ld will not create a library from C++
10974
# object files and a static libstdc++, better avoid it by now
10975
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10976
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10977
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10978
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10979
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10980
runpath_var='LD_RUN_PATH'
10984
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10985
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10986
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10990
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10995
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10996
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10998
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10999
if test "$GCC" = yes; then
11000
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11004
# Do we need to explicitly link libc?
11006
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11008
# Assume -lc should be added
11009
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11011
if test "$enable_shared" = yes && test "$GCC" = yes; then
11012
case $_LT_AC_TAGVAR(archive_cmds, $1) in
11014
# FIXME: we may have to deal with multi-command sequences.
11017
# Test whether the compiler implicitly links with -lc since on some
11018
# systems, -lgcc has to come before -lc. If gcc already passes -lc
11019
# to ld, don't add -lc before -lgcc.
11020
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11022
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11024
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11027
libobjs=conftest.$ac_objext
11029
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11035
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11036
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11037
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11039
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11041
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11043
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11045
cat conftest.err 1>&5
11048
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11054
])# AC_LIBTOOL_PROG_LD_SHLIBS
11057
# _LT_AC_FILE_LTDLL_C
11058
# -------------------
11059
# Be careful that the start marker always follows a newline.
11060
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11061
# /* ltdll.c starts here */
11062
# #define WIN32_LEAN_AND_MEAN
11063
# #include <windows.h>
11064
# #undef WIN32_LEAN_AND_MEAN
11065
# #include <stdio.h>
11067
# #ifndef __CYGWIN__
11068
# # ifdef __CYGWIN32__
11069
# # define __CYGWIN__ __CYGWIN32__
11073
# #ifdef __cplusplus
11076
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11077
# #ifdef __cplusplus
11081
# #ifdef __CYGWIN__
11082
# #include <cygwin/cygwin_dll.h>
11083
# DECLARE_CYGWIN_DLL( DllMain );
11085
# HINSTANCE __hDllInstance_base;
11088
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11090
# __hDllInstance_base = hInst;
11093
# /* ltdll.c ends here */
11094
])# _LT_AC_FILE_LTDLL_C
11097
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11098
# ---------------------------------
11099
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11103
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11104
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11105
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11106
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11107
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11108
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11109
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11111
# This is just to silence aclocal about the macro not being used
11112
ifelse([AC_DISABLE_FAST_INSTALL])
11114
AC_DEFUN([LT_AC_PROG_GCJ],
11115
[AC_CHECK_TOOL(GCJ, gcj, no)
11116
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11120
AC_DEFUN([LT_AC_PROG_RC],
11121
[AC_CHECK_TOOL(RC, windres, no)
11124
# NOTE: This macro has been submitted for inclusion into #
11125
# GNU Autoconf as AC_PROG_SED. When it is available in #
11126
# a released version of Autoconf we should remove this #
11127
# macro and use it instead. #
11130
# Check for a fully-functional sed program, that truncates
11131
# as few characters as possible. Prefer GNU sed if found.
11132
AC_DEFUN([LT_AC_PROG_SED],
11133
[AC_MSG_CHECKING([for a sed that does not truncate output])
11134
AC_CACHE_VAL(lt_cv_path_SED,
11135
[# Loop through the user's path and test for sed and gsed.
11136
# Then use that list of sed's as ones to test for truncation.
11137
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11138
for as_dir in $PATH
11141
test -z "$as_dir" && as_dir=.
11142
for lt_ac_prog in sed gsed; do
11143
for ac_exec_ext in '' $ac_executable_extensions; do
11144
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11145
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11152
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11153
# along with /bin/sed that truncates output.
11154
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11155
test ! -f $lt_ac_sed && break
11156
cat /dev/null > conftest.in
11158
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11159
# Check for GNU sed and select it if it is found.
11160
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11161
lt_cv_path_SED=$lt_ac_sed
11165
cat conftest.in conftest.in >conftest.tmp
11166
mv conftest.tmp conftest.in
11167
cp conftest.in conftest.nl
11169
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11170
cmp -s conftest.out conftest.nl || break
11171
# 10000 chars as input seems more than enough
11172
test $lt_ac_count -gt 10 && break
11173
lt_ac_count=`expr $lt_ac_count + 1`
11174
if test $lt_ac_count -gt $lt_ac_max; then
11175
lt_ac_max=$lt_ac_count
11176
lt_cv_path_SED=$lt_ac_sed
11181
SED=$lt_cv_path_SED
11182
AC_MSG_RESULT([$SED])
11185
# AM_CONDITIONAL -*- Autoconf -*-
11187
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
11189
# This program is free software; you can redistribute it and/or modify
11190
# it under the terms of the GNU General Public License as published by
11191
# the Free Software Foundation; either version 2, or (at your option)
11192
# any later version.
11194
# This program is distributed in the hope that it will be useful,
11195
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11196
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11197
# GNU General Public License for more details.
11199
# You should have received a copy of the GNU General Public License
11200
# along with this program; if not, write to the Free Software
11201
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11208
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11209
# -------------------------------------
11210
# Define a conditional.
11211
AC_DEFUN([AM_CONDITIONAL],
11212
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
11213
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11214
AC_SUBST([$1_TRUE])
11215
AC_SUBST([$1_FALSE])
11223
AC_CONFIG_COMMANDS_PRE(
11224
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11225
AC_MSG_ERROR([conditional \"$1\" was never defined.
11226
Usually this means the macro was only invoked conditionally.])
11229
# Do all the work for Automake. -*- Autoconf -*-
11231
# This macro actually does too much some checks are only needed if
11232
# your package does certain things. But this isn't really a big deal.
11234
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
11235
# Free Software Foundation, Inc.
11237
# This program is free software; you can redistribute it and/or modify
11238
# it under the terms of the GNU General Public License as published by
11239
# the Free Software Foundation; either version 2, or (at your option)
11240
# any later version.
11242
# This program is distributed in the hope that it will be useful,
11243
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11244
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11245
# GNU General Public License for more details.
11247
# You should have received a copy of the GNU General Public License
11248
# along with this program; if not, write to the Free Software
11249
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11254
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11255
# written in clear, in which case automake, when reading aclocal.m4,
11256
# will think it sees a *use*, and therefore will trigger all it's
11257
# C support machinery. Also note that it means that autoscan, seeing
11258
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11263
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
11264
# the ones we care about.
11265
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11267
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11268
# AM_INIT_AUTOMAKE([OPTIONS])
11269
# -----------------------------------------------
11270
# The call with PACKAGE and VERSION arguments is the old style
11271
# call (pre autoconf-2.50), which is being phased out. PACKAGE
11272
# and VERSION should now be passed to AC_INIT and removed from
11273
# the call to AM_INIT_AUTOMAKE.
11274
# We support both call styles for the transition. After
11275
# the next Automake release, Autoconf can make the AC_INIT
11276
# arguments mandatory, and then we can depend on a new Autoconf
11277
# release and drop the old call support.
11278
AC_DEFUN([AM_INIT_AUTOMAKE],
11279
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11280
AC_REQUIRE([AC_PROG_INSTALL])dnl
11281
# test to see if srcdir already configured
11282
if test "`cd $srcdir && pwd`" != "`pwd`" &&
11283
test -f $srcdir/config.status; then
11284
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11287
# Define the identity of the package.
11288
dnl Distinguish between old-style and new-style calls.
11290
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11291
AC_SUBST([PACKAGE], [$1])dnl
11292
AC_SUBST([VERSION], [$2])],
11293
[_AM_SET_OPTIONS([$1])dnl
11294
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
11295
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
11297
_AM_IF_OPTION([no-define],,
11298
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
11299
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
11301
# Some tools Automake needs.
11302
AC_REQUIRE([AM_SANITY_CHECK])dnl
11303
AC_REQUIRE([AC_ARG_PROGRAM])dnl
11304
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
11305
AM_MISSING_PROG(AUTOCONF, autoconf)
11306
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
11307
AM_MISSING_PROG(AUTOHEADER, autoheader)
11308
AM_MISSING_PROG(MAKEINFO, makeinfo)
11309
AM_MISSING_PROG(AMTAR, tar)
11311
AM_PROG_INSTALL_STRIP
11312
# We need awk for the "check" target. The system "awk" is bad on
11314
AC_REQUIRE([AC_PROG_AWK])dnl
11315
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11317
_AM_IF_OPTION([no-dependencies],,
11318
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
11319
[_AM_DEPENDENCIES(CC)],
11320
[define([AC_PROG_][CC],
11321
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
11322
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
11323
[_AM_DEPENDENCIES(CXX)],
11324
[define([AC_PROG_][CXX],
11325
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11329
# Copyright 2002 Free Software Foundation, Inc.
11331
# This program is free software; you can redistribute it and/or modify
11332
# it under the terms of the GNU General Public License as published by
11333
# the Free Software Foundation; either version 2, or (at your option)
11334
# any later version.
11336
# This program is distributed in the hope that it will be useful,
11337
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11338
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11339
# GNU General Public License for more details.
11341
# You should have received a copy of the GNU General Public License
11342
# along with this program; if not, write to the Free Software
11343
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11345
# AM_AUTOMAKE_VERSION(VERSION)
11346
# ----------------------------
11347
# Automake X.Y traces this macro to ensure aclocal.m4 has been
11348
# generated from the m4 files accompanying Automake X.Y.
11349
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
11351
# AM_SET_CURRENT_AUTOMAKE_VERSION
11352
# -------------------------------
11353
# Call AM_AUTOMAKE_VERSION so it can be traced.
11354
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
11355
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11356
[AM_AUTOMAKE_VERSION([1.6.3])])
11358
# Helper functions for option handling. -*- Autoconf -*-
11360
# Copyright 2001, 2002 Free Software Foundation, Inc.
11362
# This program is free software; you can redistribute it and/or modify
11363
# it under the terms of the GNU General Public License as published by
11364
# the Free Software Foundation; either version 2, or (at your option)
11365
# any later version.
11367
# This program is distributed in the hope that it will be useful,
11368
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11369
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11370
# GNU General Public License for more details.
11372
# You should have received a copy of the GNU General Public License
11373
# along with this program; if not, write to the Free Software
11374
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11379
# _AM_MANGLE_OPTION(NAME)
11380
# -----------------------
11381
AC_DEFUN([_AM_MANGLE_OPTION],
11382
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11384
# _AM_SET_OPTION(NAME)
11385
# ------------------------------
11386
# Set option NAME. Presently that only means defining a flag for this option.
11387
AC_DEFUN([_AM_SET_OPTION],
11388
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11390
# _AM_SET_OPTIONS(OPTIONS)
11391
# ----------------------------------
11392
# OPTIONS is a space-separated list of Automake options.
11393
AC_DEFUN([_AM_SET_OPTIONS],
11394
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11396
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11397
# -------------------------------------------
11398
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11399
AC_DEFUN([_AM_IF_OPTION],
11400
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11403
# Check to make sure that the build environment is sane.
11406
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
11408
# This program is free software; you can redistribute it and/or modify
11409
# it under the terms of the GNU General Public License as published by
11410
# the Free Software Foundation; either version 2, or (at your option)
11411
# any later version.
11413
# This program is distributed in the hope that it will be useful,
11414
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11415
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11416
# GNU General Public License for more details.
11418
# You should have received a copy of the GNU General Public License
11419
# along with this program; if not, write to the Free Software
11420
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11427
AC_DEFUN([AM_SANITY_CHECK],
11428
[AC_MSG_CHECKING([whether build environment is sane])
11431
echo timestamp > conftest.file
11432
# Do `set' in a subshell so we don't clobber the current shell's
11433
# arguments. Must try -L first in case configure is actually a
11434
# symlink; some systems play weird games with the mod time of symlinks
11435
# (eg FreeBSD returns the mod time of the symlink's containing
11438
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11439
if test "$[*]" = "X"; then
11441
set X `ls -t $srcdir/configure conftest.file`
11443
rm -f conftest.file
11444
if test "$[*]" != "X $srcdir/configure conftest.file" \
11445
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
11447
# If neither matched, then we have a broken ls. This can happen
11448
# if, for instance, CONFIG_SHELL is bash and it inherits a
11449
# broken ls alias from the environment. This has actually
11450
# happened. Such a system could not be considered "sane".
11451
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11452
alias in your environment])
11455
test "$[2]" = conftest.file
11461
AC_MSG_ERROR([newly created file is older than distributed files!
11462
Check your system clock])
11464
AC_MSG_RESULT(yes)])
11469
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
11471
# This program is free software; you can redistribute it and/or modify
11472
# it under the terms of the GNU General Public License as published by
11473
# the Free Software Foundation; either version 2, or (at your option)
11474
# any later version.
11476
# This program is distributed in the hope that it will be useful,
11477
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11478
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11479
# GNU General Public License for more details.
11481
# You should have received a copy of the GNU General Public License
11482
# along with this program; if not, write to the Free Software
11483
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11488
# AM_MISSING_PROG(NAME, PROGRAM)
11489
# ------------------------------
11490
AC_DEFUN([AM_MISSING_PROG],
11491
[AC_REQUIRE([AM_MISSING_HAS_RUN])
11492
$1=${$1-"${am_missing_run}$2"}
11496
# AM_MISSING_HAS_RUN
11497
# ------------------
11498
# Define MISSING if not defined so far and test if it supports --run.
11499
# If it does, set am_missing_run to use it, otherwise, to nothing.
11500
AC_DEFUN([AM_MISSING_HAS_RUN],
11501
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11502
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11503
# Use eval to expand $SHELL
11504
if eval "$MISSING --run true"; then
11505
am_missing_run="$MISSING --run "
11508
AC_MSG_WARN([`missing' script is too old or missing])
11512
# AM_AUX_DIR_EXPAND
11514
# Copyright 2001 Free Software Foundation, Inc.
11516
# This program is free software; you can redistribute it and/or modify
11517
# it under the terms of the GNU General Public License as published by
11518
# the Free Software Foundation; either version 2, or (at your option)
11519
# any later version.
11521
# This program is distributed in the hope that it will be useful,
11522
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11523
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11524
# GNU General Public License for more details.
11526
# You should have received a copy of the GNU General Public License
11527
# along with this program; if not, write to the Free Software
11528
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11531
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11532
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
11533
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
11535
# Of course, Automake must honor this variable whenever it calls a
11536
# tool from the auxiliary directory. The problem is that $srcdir (and
11537
# therefore $ac_aux_dir as well) can be either absolute or relative,
11538
# depending on how configure is run. This is pretty annoying, since
11539
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
11540
# source directory, any form will work fine, but in subdirectories a
11541
# relative path needs to be adjusted first.
11543
# $ac_aux_dir/missing
11544
# fails when called from a subdirectory if $ac_aux_dir is relative
11545
# $top_srcdir/$ac_aux_dir/missing
11546
# fails if $ac_aux_dir is absolute,
11547
# fails when called from a subdirectory in a VPATH build with
11548
# a relative $ac_aux_dir
11550
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
11551
# are both prefixed by $srcdir. In an in-source build this is usually
11552
# harmless because $srcdir is `.', but things will broke when you
11553
# start a VPATH build or use an absolute $srcdir.
11555
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11556
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
11557
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11558
# and then we would define $MISSING as
11559
# MISSING="\${SHELL} $am_aux_dir/missing"
11560
# This will work as long as MISSING is not called from configure, because
11561
# unfortunately $(top_srcdir) has no meaning in configure.
11562
# However there are other variables, like CC, which are often used in
11563
# configure, and could therefore not use this "fixed" $ac_aux_dir.
11565
# Another solution, used here, is to always expand $ac_aux_dir to an
11566
# absolute PATH. The drawback is that using absolute paths prevent a
11567
# configured tree to be moved without reconfiguration.
11569
# Rely on autoconf to set up CDPATH properly.
11572
AC_DEFUN([AM_AUX_DIR_EXPAND], [
11573
# expand $ac_aux_dir to an absolute path
11574
am_aux_dir=`cd $ac_aux_dir && pwd`
11577
# AM_PROG_INSTALL_SH
11578
# ------------------
11579
# Define $install_sh.
11581
# Copyright 2001 Free Software Foundation, Inc.
11583
# This program is free software; you can redistribute it and/or modify
11584
# it under the terms of the GNU General Public License as published by
11585
# the Free Software Foundation; either version 2, or (at your option)
11586
# any later version.
11588
# This program is distributed in the hope that it will be useful,
11589
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11590
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11591
# GNU General Public License for more details.
11593
# You should have received a copy of the GNU General Public License
11594
# along with this program; if not, write to the Free Software
11595
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11598
AC_DEFUN([AM_PROG_INSTALL_SH],
11599
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11600
install_sh=${install_sh-"$am_aux_dir/install-sh"}
11601
AC_SUBST(install_sh)])
11603
# AM_PROG_INSTALL_STRIP
11605
# Copyright 2001 Free Software Foundation, Inc.
11607
# This program is free software; you can redistribute it and/or modify
11608
# it under the terms of the GNU General Public License as published by
11609
# the Free Software Foundation; either version 2, or (at your option)
11610
# any later version.
11612
# This program is distributed in the hope that it will be useful,
11613
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11614
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11615
# GNU General Public License for more details.
11617
# You should have received a copy of the GNU General Public License
11618
# along with this program; if not, write to the Free Software
11619
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11622
# One issue with vendor `install' (even GNU) is that you can't
11623
# specify the program used to strip binaries. This is especially
11624
# annoying in cross-compiling environments, where the build's strip
11625
# is unlikely to handle the host's binaries.
11626
# Fortunately install-sh will honor a STRIPPROG variable, so we
11627
# always use install-sh in `make install-strip', and initialize
11628
# STRIPPROG with the value of the STRIP variable (set by the user).
11629
AC_DEFUN([AM_PROG_INSTALL_STRIP],
11630
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11631
# Installed binaries are usually stripped using `strip' when the user
11632
# run `make install-strip'. However `strip' might not be the right
11633
# tool to use in cross-compilation environments, therefore Automake
11634
# will honor the `STRIP' environment variable to overrule this program.
11635
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11636
if test "$cross_compiling" != no; then
11637
AC_CHECK_TOOL([STRIP], [strip], :)
11639
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
11640
AC_SUBST([INSTALL_STRIP_PROGRAM])])
11642
# serial 4 -*- Autoconf -*-
11644
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
11646
# This program is free software; you can redistribute it and/or modify
11647
# it under the terms of the GNU General Public License as published by
11648
# the Free Software Foundation; either version 2, or (at your option)
11649
# any later version.
11651
# This program is distributed in the hope that it will be useful,
11652
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11653
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11654
# GNU General Public License for more details.
11656
# You should have received a copy of the GNU General Public License
11657
# along with this program; if not, write to the Free Software
11658
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11662
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11663
# written in clear, in which case automake, when reading aclocal.m4,
11664
# will think it sees a *use*, and therefore will trigger all it's
11665
# C support machinery. Also note that it means that autoscan, seeing
11666
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11670
# _AM_DEPENDENCIES(NAME)
11671
# ----------------------
11672
# See how the compiler implements dependency checking.
11673
# NAME is "CC", "CXX", "GCJ", or "OBJC".
11674
# We try a few techniques and use that to set a single cache variable.
11676
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
11677
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
11678
# dependency, and given that the user is not expected to run this macro,
11679
# just rely on AC_PROG_CC.
11680
AC_DEFUN([_AM_DEPENDENCIES],
11681
[AC_REQUIRE([AM_SET_DEPDIR])dnl
11682
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
11683
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
11684
AC_REQUIRE([AM_DEP_TRACK])dnl
11686
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
11687
[$1], CXX, [depcc="$CXX" am_compiler_list=],
11688
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
11689
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
11690
[depcc="$$1" am_compiler_list=])
11692
AC_CACHE_CHECK([dependency style of $depcc],
11693
[am_cv_$1_dependencies_compiler_type],
11694
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11695
# We make a subdir and do the tests there. Otherwise we can end up
11696
# making bogus files that we don't know about and never remove. For
11697
# instance it was reported that on HP-UX the gcc test will end up
11698
# making a dummy file named `D' -- because `-MD' means `put the output
11701
# Copy depcomp to subdir because otherwise we won't find it if we're
11702
# using a relative directory.
11703
cp "$am_depcomp" conftest.dir
11706
am_cv_$1_dependencies_compiler_type=none
11707
if test "$am_compiler_list" = ""; then
11708
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
11710
for depmode in $am_compiler_list; do
11711
# We need to recreate these files for each test, as the compiler may
11712
# overwrite some of them when testing with obscure command lines.
11713
# This happens at least with the AIX C compiler.
11714
echo '#include "conftest.h"' > conftest.c
11715
echo 'int i;' > conftest.h
11716
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
11720
# after this tag, mechanisms are not by side-effect, so they'll
11721
# only be used when explicitly requested
11722
if test "x$enable_dependency_tracking" = xyes; then
11730
# We check with `-c' and `-o' for the sake of the "dashmstdout"
11731
# mode. It turns out that the SunPro C++ compiler does not properly
11732
# handle `-M -o', and we need to detect this.
11733
if depmode=$depmode \
11734
source=conftest.c object=conftest.o \
11735
depfile=conftest.Po tmpdepfile=conftest.TPo \
11736
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
11737
grep conftest.h conftest.Po > /dev/null 2>&1 &&
11738
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11739
am_cv_$1_dependencies_compiler_type=$depmode
11745
rm -rf conftest.dir
11747
am_cv_$1_dependencies_compiler_type=none
11750
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
11756
# Choose a directory name for dependency files.
11757
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
11758
AC_DEFUN([AM_SET_DEPDIR],
11759
[rm -f .deps 2>/dev/null
11760
mkdir .deps 2>/dev/null
11761
if test -d .deps; then
11764
# MS-DOS does not allow filenames that begin with a dot.
11767
rmdir .deps 2>/dev/null
11774
AC_DEFUN([AM_DEP_TRACK],
11775
[AC_ARG_ENABLE(dependency-tracking,
11776
[ --disable-dependency-tracking Speeds up one-time builds
11777
--enable-dependency-tracking Do not reject slow dependency extractors])
11778
if test "x$enable_dependency_tracking" != xno; then
11779
am_depcomp="$ac_aux_dir/depcomp"
11782
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
11783
AC_SUBST([AMDEPBACKSLASH])
11786
# Generate code to set up dependency tracking. -*- Autoconf -*-
11788
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
11790
# This program is free software; you can redistribute it and/or modify
11791
# it under the terms of the GNU General Public License as published by
11792
# the Free Software Foundation; either version 2, or (at your option)
11793
# any later version.
11795
# This program is distributed in the hope that it will be useful,
11796
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11797
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11798
# GNU General Public License for more details.
11800
# You should have received a copy of the GNU General Public License
11801
# along with this program; if not, write to the Free Software
11802
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11807
# _AM_OUTPUT_DEPENDENCY_COMMANDS
11808
# ------------------------------
11809
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
11810
[for mf in $CONFIG_FILES; do
11811
# Strip MF so we end up with the name of the file.
11812
mf=`echo "$mf" | sed -e 's/:.*$//'`
11813
# Check whether this is an Automake generated Makefile or not.
11814
# We used to match only the files named `Makefile.in', but
11815
# some people rename them; so instead we look at the file content.
11816
# Grep'ing the first line is not enough: some people post-process
11817
# each Makefile.in and add a new line on top of each file to say so.
11818
# So let's grep whole file.
11819
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
11820
dirpart=`AS_DIRNAME("$mf")`
11824
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
11825
# Extract the definition of DEP_FILES from the Makefile without
11827
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
11828
test -z "$DEPDIR" && continue
11829
# When using ansi2knr, U may be empty or an underscore; expand it
11830
U=`sed -n -e '/^U = / s///p' < "$mf"`
11831
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
11832
# We invoke sed twice because it is the simplest approach to
11833
# changing $(DEPDIR) to its actual value in the expansion.
11834
for file in `sed -n -e '
11835
/^DEP_FILES = .*\\\\$/ {
11844
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
11845
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
11846
# Make sure the directory exists.
11847
test -f "$dirpart/$file" && continue
11848
fdir=`AS_DIRNAME(["$file"])`
11849
AS_MKDIR_P([$dirpart/$fdir])
11850
# echo "creating $dirpart/$file"
11851
echo '# dummy' > "$dirpart/$file"
11854
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
11857
# AM_OUTPUT_DEPENDENCY_COMMANDS
11858
# -----------------------------
11859
# This macro should only be invoked once -- use via AC_REQUIRE.
11861
# This code is only required when automatic dependency tracking
11862
# is enabled. FIXME. This creates each `.P' file that we will
11863
# need in order to bootstrap the dependency handling code.
11864
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
11865
[AC_CONFIG_COMMANDS([depfiles],
11866
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
11867
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
11870
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
11872
# This program is free software; you can redistribute it and/or modify
11873
# it under the terms of the GNU General Public License as published by
11874
# the Free Software Foundation; either version 2, or (at your option)
11875
# any later version.
11877
# This program is distributed in the hope that it will be useful,
11878
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11879
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11880
# GNU General Public License for more details.
11882
# You should have received a copy of the GNU General Public License
11883
# along with this program; if not, write to the Free Software
11884
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11889
# AM_MAKE_INCLUDE()
11890
# -----------------
11891
# Check to see how make treats includes.
11892
AC_DEFUN([AM_MAKE_INCLUDE],
11893
[am_make=${MAKE-make}
11894
cat > confinc << 'END'
11898
# If we don't find an include directive, just comment out the code.
11899
AC_MSG_CHECKING([for style of include used by $am_make])
11903
# First try GNU make style include.
11904
echo "include confinc" > confmf
11905
# We grep out `Entering directory' and `Leaving directory'
11906
# messages which can occur if `w' ends up in MAKEFLAGS.
11907
# In particular we don't look at `^make:' because GNU make might
11908
# be invoked under some other name (usually "gmake"), in which
11909
# case it prints its new name instead of `make'.
11910
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
11911
am__include=include
11915
# Now try BSD make style include.
11916
if test "$am__include" = "#"; then
11917
echo '.include "confinc"' > confmf
11918
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
11919
am__include=.include
11924
AC_SUBST(am__include)
11925
AC_SUBST(am__quote)
11926
AC_MSG_RESULT($_am_result)
11927
rm -f confinc confmf
11931
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
11933
# This program is free software; you can redistribute it and/or modify
11934
# it under the terms of the GNU General Public License as published by
11935
# the Free Software Foundation; either version 2, or (at your option)
11936
# any later version.
11938
# This program is distributed in the hope that it will be useful,
11939
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11940
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11941
# GNU General Public License for more details.
11943
# You should have received a copy of the GNU General Public License
11944
# along with this program; if not, write to the Free Software
11945
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11954
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
11955
# "missing" invocation, for better error output.
11956
AC_DEFUN([AM_PROG_LEX],
11957
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
11958
AC_REQUIRE([AC_PROG_LEX])dnl
11959
if test "$LEX" = :; then
11960
LEX=${am_missing_run}flex
11963
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
11965
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
11967
# This program is free software; you can redistribute it and/or modify
11968
# it under the terms of the GNU General Public License as published by
11969
# the Free Software Foundation; either version 2, or (at your option)
11970
# any later version.
11972
# This program is distributed in the hope that it will be useful,
11973
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11974
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11975
# GNU General Public License for more details.
11977
# You should have received a copy of the GNU General Public License
11978
# along with this program; if not, write to the Free Software
11979
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11986
# When config.status generates a header, we must update the stamp-h file.
11987
# This file resides in the same directory as the config header
11988
# that is generated. We must strip everything past the first ":",
11989
# and everything past the last "/".
11991
# _AM_DIRNAME(PATH)
11992
# -----------------
11993
# Like AS_DIRNAME, only do it during macro expansion
11994
AC_DEFUN([_AM_DIRNAME],
11995
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
11996
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
11997
m4_if(regexp([$1], [^/.*]), -1,
11999
patsubst([$1], [^\(/\).*], [\1])),
12000
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
12001
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
12005
# The stamp files are numbered to have different names.
12006
# We could number them on a directory basis, but that's additional
12007
# complications, let's have a unique counter.
12008
m4_define([_AM_STAMP_Count], [0])
12011
# _AM_STAMP(HEADER)
12012
# -----------------
12013
# The name of the stamp file for HEADER.
12014
AC_DEFUN([_AM_STAMP],
12015
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
12016
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
12017
[:.*])))/stamp-h[]_AM_STAMP_Count])
12020
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
12021
# ------------------------------------------------------------
12022
# We used to try to get a real timestamp in stamp-h. But the fear is that
12023
# that will cause unnecessary cvs conflicts.
12024
AC_DEFUN([_AM_CONFIG_HEADER],
12025
[# Add the stamp file to the list of files AC keeps track of,
12026
# along with our hook.
12027
AC_CONFIG_HEADERS([$1],
12028
[# update the timestamp
12029
echo 'timestamp for $1' >"_AM_STAMP([$1])"
12032
])# _AM_CONFIG_HEADER
12035
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
12036
# --------------------------------------------------------------
12037
AC_DEFUN([AM_CONFIG_HEADER],
12038
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
12039
])# AM_CONFIG_HEADER