11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
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., 51 Franklin Street, Fifth Floor,
32
dnl Boston, MA 02110-1301, 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([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
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(program-name, variable-name, list-of-dirs,
189
dnl if-not-found, test-parameter, prepend-path)
191
dnl Look for program-name in list-of-dirs+$PATH.
192
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
193
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
194
dnl test-parameter: if set, the program is executed with this arg,
195
dnl and only a successful exit code is required.
196
AC_DEFUN([KDE_FIND_PATH],
198
AC_MSG_CHECKING([for $1])
199
if test -n "$$2"; then
202
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
204
AC_CACHE_VAL(kde_cv_path_$kde_cache,
213
if test -z "$6"; then dnl Append dirs in PATH (default)
215
else dnl Prepend dirs in PATH (if 6th arg is set)
221
if test -x "$dir/$1"; then
224
evalstr="$dir/$1 $5 2>&1 "
225
if eval $evalstr; then
226
kde_cv_path="$dir/$1"
230
kde_cv_path="$dir/$1"
236
eval "kde_cv_path_$kde_cache=$kde_cv_path"
240
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
244
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
245
AC_MSG_RESULT(not found)
248
AC_MSG_RESULT($kde_cv_path)
254
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
256
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
257
Please check whether you installed Qt correctly.
258
You need to have a running moc binary.
259
configure tried to run $ac_cv_path_moc and the test didn't
260
succeed. If configure shouldn't have tried this one, set
261
the environment variable MOC to the right one before running
266
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
268
AC_MSG_WARN([No Qt ui compiler (uic) found!
269
Please check whether you installed Qt correctly.
270
You need to have a running uic binary.
271
configure tried to run $ac_cv_path_uic and the test didn't
272
succeed. If configure shouldn't have tried this one, set
273
the environment variable UIC to the right one before running
279
AC_DEFUN([KDE_CHECK_UIC_FLAG],
281
AC_MSG_CHECKING([whether uic supports -$1 ])
282
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
283
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
285
cat >conftest.ui <<EOT
286
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
288
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
289
if AC_TRY_EVAL(ac_uic_testrun); then
290
eval "kde_cv_prog_uic_$kde_cache=yes"
292
eval "kde_cv_prog_uic_$kde_cache=no"
297
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
309
dnl ------------------------------------------------------------------------
310
dnl Find the meta object compiler and the ui compiler in the PATH,
311
dnl in $QTDIR/bin, and some more usual places
312
dnl ------------------------------------------------------------------------
314
AC_DEFUN([AC_PATH_QT_MOC_UIC],
316
AC_REQUIRE([KDE_CHECK_PERL])
318
for dir in $kde_qt_dirs; do
319
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
321
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
322
if test ! "$ac_qt_bindir" = "NO"; then
323
qt_bindirs="$ac_qt_bindir $qt_bindirs"
326
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
327
if test -z "$UIC_NOT_NEEDED"; then
328
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
329
if test -z "$UIC_PATH" ; then
330
KDE_UIC_ERROR_MESSAGE
335
if test $kde_qtver = 3; then
336
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
337
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
339
if test x$ac_uic_supports_libpath = xyes; then
340
UIC="$UIC -L \$(kde_widgetdir)"
342
if test x$ac_uic_supports_nounload = xyes; then
348
UIC="echo uic not available: "
355
if test $kde_qtver = 3; then
362
AC_DEFUN([KDE_1_CHECK_PATHS],
364
KDE_1_CHECK_PATH_HEADERS
368
if test -n "$USE_RPATH"; then
370
if test -n "$kde_libraries"; then
371
KDE_TEST_RPATH="-R $kde_libraries"
374
if test -n "$qt_libraries"; then
375
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
378
if test -n "$x_libraries"; then
379
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
382
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
385
AC_MSG_CHECKING([for KDE libraries installed])
386
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'
388
if AC_TRY_EVAL(ac_link) && test -s conftest; then
391
AC_MSG_ERROR([your system fails at linking a small KDE application!
392
Check, if your compiler is installed correctly and if you have used the
393
same compiler to compile Qt and kdelibs as you did use now.
394
For more details about this problem, look at the end of config.log.])
397
if eval `KDEDIR= ./conftest 2>&5`; then
403
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
404
kde_have_all_paths=yes
406
KDE_SET_PATHS($kde_result)
410
AC_DEFUN([KDE_SET_PATHS],
412
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
413
kde_htmldir=\"$kde_htmldir\" \
414
kde_appsdir=\"$kde_appsdir\" \
415
kde_icondir=\"$kde_icondir\" \
416
kde_sounddir=\"$kde_sounddir\" \
417
kde_datadir=\"$kde_datadir\" \
418
kde_locale=\"$kde_locale\" \
419
kde_cgidir=\"$kde_cgidir\" \
420
kde_confdir=\"$kde_confdir\" \
421
kde_kcfgdir=\"$kde_kcfgdir\" \
422
kde_mimedir=\"$kde_mimedir\" \
423
kde_toolbardir=\"$kde_toolbardir\" \
424
kde_wallpaperdir=\"$kde_wallpaperdir\" \
425
kde_templatesdir=\"$kde_templatesdir\" \
426
kde_bindir=\"$kde_bindir\" \
427
kde_servicesdir=\"$kde_servicesdir\" \
428
kde_servicetypesdir=\"$kde_servicetypesdir\" \
429
kde_moduledir=\"$kde_moduledir\" \
430
kde_styledir=\"$kde_styledir\" \
431
kde_widgetdir=\"$kde_widgetdir\" \
432
xdg_appsdir=\"$xdg_appsdir\" \
433
xdg_menudir=\"$xdg_menudir\" \
434
xdg_directorydir=\"$xdg_directorydir\" \
438
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
440
if test "$1" = "default"; then
442
if test -z "$kde_htmldir"; then
443
kde_htmldir='\${datadir}/doc/HTML'
445
if test -z "$kde_appsdir"; then
446
kde_appsdir='\${datadir}/applnk'
448
if test -z "$kde_icondir"; then
449
kde_icondir='\${datadir}/icons'
451
if test -z "$kde_sounddir"; then
452
kde_sounddir='\${datadir}/sounds'
454
if test -z "$kde_datadir"; then
455
kde_datadir='\${datadir}/apps'
457
if test -z "$kde_locale"; then
458
kde_locale='\${datadir}/locale'
460
if test -z "$kde_cgidir"; then
461
kde_cgidir='\${exec_prefix}/cgi-bin'
463
if test -z "$kde_confdir"; then
464
kde_confdir='\${datadir}/config'
466
if test -z "$kde_kcfgdir"; then
467
kde_kcfgdir='\${datadir}/config.kcfg'
469
if test -z "$kde_mimedir"; then
470
kde_mimedir='\${datadir}/mimelnk'
472
if test -z "$kde_toolbardir"; then
473
kde_toolbardir='\${datadir}/toolbar'
475
if test -z "$kde_wallpaperdir"; then
476
kde_wallpaperdir='\${datadir}/wallpapers'
478
if test -z "$kde_templatesdir"; then
479
kde_templatesdir='\${datadir}/templates'
481
if test -z "$kde_bindir"; then
482
kde_bindir='\${exec_prefix}/bin'
484
if test -z "$kde_servicesdir"; then
485
kde_servicesdir='\${datadir}/services'
487
if test -z "$kde_servicetypesdir"; then
488
kde_servicetypesdir='\${datadir}/servicetypes'
490
if test -z "$kde_moduledir"; then
491
if test "$kde_qtver" = "2"; then
492
kde_moduledir='\${libdir}/kde2'
494
kde_moduledir='\${libdir}/kde3'
497
if test -z "$kde_styledir"; then
498
kde_styledir='\${libdir}/kde3/plugins/styles'
500
if test -z "$kde_widgetdir"; then
501
kde_widgetdir='\${libdir}/kde3/plugins/designer'
503
if test -z "$xdg_appsdir"; then
504
xdg_appsdir='\${datadir}/applications/kde'
506
if test -z "$xdg_menudir"; then
507
xdg_menudir='\${sysconfdir}/xdg/menus'
509
if test -z "$xdg_directorydir"; then
510
xdg_directorydir='\${datadir}/desktop-directories'
513
KDE_SET_PATHS(defaults)
517
if test $kde_qtver = 1; then
518
AC_MSG_RESULT([compiling])
521
AC_MSG_ERROR([path checking not yet supported for KDE 2])
527
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
528
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
529
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
530
test -z "$kde_datadir" || test -z "$kde_locale" ||
531
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
532
test -z "$kde_kcfgdir" ||
533
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
534
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
535
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
536
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
537
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
538
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
539
test "x$kde_have_all_paths" != "xyes"; then
540
kde_have_all_paths=no
544
AC_DEFUN([KDE_MISSING_PROG_ERROR],
546
AC_MSG_ERROR([The important program $1 was not found!
547
Please check whether you installed KDE correctly.
551
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
553
AC_MSG_ERROR([The important program $1 was not found!
554
Please check whether you installed aRts correctly or use
555
--without-arts to compile without aRts support (this will remove functionality).
559
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
561
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"
562
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
563
if test -n "$KDEDIRS"; then
566
for dir in $KDEDIRS; do
567
kde_default_bindirs="$dir/bin $kde_default_bindirs "
573
AC_DEFUN([KDE_SUBST_PROGRAMS],
576
AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
577
[build_arts=$withval],
580
AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
581
if test "$build_arts" = "no"; then
582
AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
585
KDE_SET_DEFAULT_BINDIRS
586
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
587
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
588
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
589
if test "$build_arts" '!=' "no"; then
590
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
591
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
593
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
597
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
601
if test "$kde_qtver" = "3"; then
602
if test "$kde_qtsubver" -le 1; then
605
if test "$kde_qtsubver" -le 2; then
608
if test "$KDECONFIG" != "compiled"; then
609
if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
616
if test -n "$kde32ornewer"; then
617
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
618
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
620
if test -n "$kde33ornewer"; then
621
KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
622
AC_SUBST(MAKEKDEWIDGETS)
624
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
626
if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
627
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
628
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
629
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
630
if test "$KDE_XSL_STYLESHEET" = "NO"; then
631
KDE_XSL_STYLESHEET=""
633
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
637
DCOP_DEPENDENCIES='$(DCOPIDL)'
638
if test -n "$kde32ornewer"; then
639
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
640
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
641
AC_SUBST(KCONFIG_COMPILER)
642
AC_SUBST(KCFG_DEPENDENCIES)
646
AC_SUBST(DCOPIDL2CPP)
647
AC_SUBST(DCOP_DEPENDENCIES)
649
AC_SUBST(ARTSCCONFIG)
651
AC_SUBST(KDE_XSL_STYLESHEET)
655
AC_DEFUN([AC_CREATE_KFSSTND],
657
AC_REQUIRE([AC_CHECK_RPATH])
659
AC_MSG_CHECKING([for KDE paths])
662
AC_CACHE_VAL(kde_cv_all_paths,
664
KDE_SET_DEFAULT_PATHS($1)
667
eval "$kde_cv_all_paths"
668
KDE_CHECK_PATHS_FOR_COMPLETENESS
669
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
670
# wrong values were cached, may be, we can set better ones
672
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
673
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
674
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
675
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
679
xdg_appsdir = xdg_menudir= xdg_directorydir=
680
KDE_SET_DEFAULT_PATHS($1)
681
eval "$kde_cv_all_paths"
682
KDE_CHECK_PATHS_FOR_COMPLETENESS
683
kde_result="$kde_result (cache overridden)"
685
if test "$kde_have_all_paths" = "no"; then
686
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
687
Since it had compiled and linked before, it must be a strange problem on your system.
688
Look at config.log for details. If you are not able to fix this, look at
689
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
690
(If you're using an egcs version on Linux, you may update binutils!)
694
AC_MSG_RESULT($kde_result)
703
AC_DEFUN([AC_SUBST_KFSSTND],
705
AC_SUBST(kde_htmldir)
706
AC_SUBST(kde_appsdir)
707
AC_SUBST(kde_icondir)
708
AC_SUBST(kde_sounddir)
709
AC_SUBST(kde_datadir)
711
AC_SUBST(kde_confdir)
712
AC_SUBST(kde_kcfgdir)
713
AC_SUBST(kde_mimedir)
714
AC_SUBST(kde_wallpaperdir)
716
dnl X Desktop Group standards
717
AC_SUBST(xdg_appsdir)
718
AC_SUBST(xdg_menudir)
719
AC_SUBST(xdg_directorydir)
721
AC_SUBST(kde_templatesdir)
722
AC_SUBST(kde_servicesdir)
723
AC_SUBST(kde_servicetypesdir)
724
AC_SUBST(kde_moduledir)
725
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
726
AC_SUBST(kde_styledir)
727
AC_SUBST(kde_widgetdir)
728
if test "$kde_qtver" = 1; then
729
kde_minidir="$kde_icondir/mini"
731
# for KDE 1 - this breaks KDE2 apps using minidir, but
732
# that's the plan ;-/
733
kde_minidir="/dev/null"
735
dnl AC_SUBST(kde_minidir)
736
dnl AC_SUBST(kde_cgidir)
737
dnl AC_SUBST(kde_toolbardir)
740
AC_DEFUN([KDE_MISC_TESTS],
742
dnl Checks for libraries.
743
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
745
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
748
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
749
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
750
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
751
You should install libcrypt from another source or configure with PAM
756
if test $kde_have_crypt = yes; then
757
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
760
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
761
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
762
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
763
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
765
AC_CHECK_FUNC(inet_ntoa)
766
if test $ac_cv_func_inet_ntoa = no; then
767
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
769
AC_CHECK_FUNC(connect)
770
if test $ac_cv_func_connect = no; then
771
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
775
AC_CHECK_FUNC(remove)
776
if test $ac_cv_func_remove = no; then
777
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
780
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
781
AC_CHECK_FUNC(shmat, ,
782
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
784
# more headers that need to be explicitly included on darwin
785
AC_CHECK_HEADERS(sys/types.h stdint.h)
787
# sys/bitypes.h is needed for uint32_t and friends on Tru64
788
AC_CHECK_HEADERS(sys/bitypes.h)
790
# darwin requires a poll emulation library
791
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
793
# for some image handling on Mac OS X
794
AC_CHECK_HEADERS(Carbon/Carbon.h)
796
# CoreAudio framework
797
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
798
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
799
FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio"
804
AC_SUBST(FRAMEWORK_COREAUDIO)
805
LIBSOCKET="$X_EXTRA_LIBS"
807
AC_SUBST(X_EXTRA_LIBS)
808
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
811
case $host in dnl this *is* LynxOS specific
813
AC_MSG_CHECKING([LynxOS header file wrappers])
814
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
815
AC_MSG_RESULT(disabled)
816
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
823
KDE_CHECK_PIE_SUPPORT
825
# darwin needs this to initialize the environment
826
AC_CHECK_HEADERS(crt_externs.h)
827
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
829
AH_VERBATIM(_DARWIN_ENVIRON,
831
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
832
# include <sys/time.h>
833
# include <crt_externs.h>
834
# define environ (*_NSGetEnviron())
838
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
841
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
842
* that defines bzero.
850
AC_CHECK_FUNCS([vsnprintf snprintf])
854
* On HP-UX, the declaration of vsnprintf() is needed every time !
857
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
867
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
871
int snprintf(char *str, size_t n, char const *fmt, ...);
877
dnl ------------------------------------------------------------------------
878
dnl Find the header files and libraries for X-Windows. Extended the
880
dnl ------------------------------------------------------------------------
884
AC_REQUIRE([KDE_MISC_TESTS])dnl
885
AC_REQUIRE([KDE_CHECK_LIB64])
889
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
890
kde_use_qt_emb=$enableval,
896
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
897
kde_use_qt_emb_palm=$enableval,
898
kde_use_qt_emb_palm=no
903
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
904
kde_use_qt_mac=$enableval,
908
# used to disable x11-specific stuff on special platforms
909
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
911
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
913
AC_MSG_CHECKING(for X)
915
AC_CACHE_VAL(kde_cv_have_x,
916
[# One or both of the vars are not set, and there is no cached value.
917
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
920
kde_x_includes=$x_includes
922
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
925
kde_x_libraries=$x_libraries
928
# below we use the standard autoconf calls
929
ac_x_libraries=$kde_x_libraries
930
ac_x_includes=$kde_x_includes
933
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
934
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
935
dnl location. The correct location is /usr/lib32 or an undefined value
936
dnl (the linker is smart enough to pick the correct default library).
937
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
938
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
939
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
940
dnl x_includes should be left alone.
948
if test -z "$ac_x_includes"; then
951
if test -z "$ac_x_libraries"; then
952
ac_x_libraries="/usr/lib${kdelibsuff}"
955
#from now on we use our own again
957
# when the user already gave --x-includes, we ignore
958
# what the standard autoconf macros told us.
959
if test "$kde_x_includes" = NO; then
960
kde_x_includes=$ac_x_includes
963
# for --x-libraries too
964
if test "$kde_x_libraries" = NO; then
965
kde_x_libraries=$ac_x_libraries
968
if test "$kde_x_includes" = NO; then
969
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
972
if test "$kde_x_libraries" = NO; then
973
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
976
# Record where we found X for the cache.
977
kde_cv_have_x="have_x=yes \
978
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
981
eval "$kde_cv_have_x"
983
if test "$have_x" != yes; then
984
AC_MSG_RESULT($have_x)
987
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
990
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
992
x_includes="."; dnl better than nothing :-
994
x_includes=$kde_x_includes
995
X_INCLUDES="-I$x_includes"
998
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
1000
x_libraries="/usr/lib"; dnl better than nothing :-
1002
x_libraries=$kde_x_libraries
1003
X_LDFLAGS="-L$x_libraries"
1005
all_includes="$X_INCLUDES"
1006
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
1008
# Check for libraries that X11R6 Xt/Xaw programs need.
1009
ac_save_LDFLAGS="$LDFLAGS"
1010
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1011
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1012
# check for ICE first), but we must link in the order -lSM -lICE or
1013
# we get undefined symbols. So assume we have SM if we have ICE.
1014
# These have to be linked with before -lX11, unlike the other
1015
# libraries we check for below, so use a different variable.
1016
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1017
AC_CHECK_LIB(ICE, IceConnectionNumber,
1018
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1019
LDFLAGS="$ac_save_LDFLAGS"
1021
LIB_X11='-lX11 $(LIBSOCKET)'
1023
AC_MSG_CHECKING(for libXext)
1024
AC_CACHE_VAL(kde_cv_have_libXext,
1026
kde_ldflags_safe="$LDFLAGS"
1027
kde_libs_safe="$LIBS"
1029
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1030
LIBS="-lXext -lX11 $LIBSOCKET"
1035
# include <stdlib.h>
1039
printf("hello Xext\n");
1041
kde_cv_have_libXext=yes,
1042
kde_cv_have_libXext=no
1045
LDFLAGS=$kde_ldflags_safe
1049
AC_MSG_RESULT($kde_cv_have_libXext)
1051
if test "$kde_cv_have_libXext" = "no"; then
1052
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1053
can't find it itself, we stop here assuming that make wouldn't find
1060
elif test "$kde_use_qt_emb" = "yes"; then
1061
dnl We're using QT Embedded
1063
CXXFLAGS="$CXXFLAGS -fno-rtti"
1064
QTE_NORTTI="-fno-rtti -DQWS"
1074
elif test "$kde_use_qt_mac" = "yes"; then
1075
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1076
dnl be included to get the information) --Sam
1077
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1078
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1089
AC_SUBST(X_PRE_LIBS)
1091
AC_SUBST(LIB_XRENDER)
1093
AC_SUBST(X_INCLUDES)
1095
AC_SUBST(x_includes)
1096
AC_SUBST(x_libraries)
1097
AC_SUBST(QTE_NORTTI)
1102
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1104
AC_REQUIRE([KDE_USE_QT])
1105
cat > conftest.$ac_ext <<EOF
1106
#include "confdefs.h"
1107
#include <qglobal.h>
1108
#include <qapplication.h>
1110
if test "$kde_qtver" = "2"; then
1111
cat >> conftest.$ac_ext <<EOF
1113
#include <qstring.h>
1117
if test $kde_qtsubver -gt 0; then
1118
cat >> conftest.$ac_ext <<EOF
1119
#if QT_VERSION < 210
1126
if test "$kde_qtver" = "3"; then
1127
cat >> conftest.$ac_ext <<EOF
1128
#include <qcursor.h>
1129
#include <qstylefactory.h>
1130
#include <private/qucomextra_p.h>
1134
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1135
cat >> conftest.$ac_ext <<EOF
1141
if test "$kde_qtver" = "2"; then
1142
cat >> conftest.$ac_ext <<EOF
1143
QStringList *t = new QStringList();
1146
if test $kde_qtsubver -gt 0; then
1147
cat >> conftest.$ac_ext <<EOF
1149
s.setLatin1("Elvis is alive", 14);
1153
if test "$kde_qtver" = "3"; then
1154
cat >> conftest.$ac_ext <<EOF
1155
(void)QStyleFactory::create(QString::null);
1156
QCursor c(Qt::WhatsThisCursor);
1159
cat >> conftest.$ac_ext <<EOF
1165
AC_DEFUN([KDE_USE_QT],
1167
if test -z "$1"; then
1168
# Current default Qt version: 3.3
1172
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1173
# following is the check if subversion isnt found in passed argument
1174
if test "$kde_qtsubver" = "$1"; then
1177
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1178
if test "$kde_qtver" = "1"; then
1183
if test -z "$2"; then
1184
if test "$kde_qtver" = "2"; then
1185
if test $kde_qtsubver -gt 0; then
1186
kde_qt_minversion=">= Qt 2.2.2"
1188
kde_qt_minversion=">= Qt 2.0.2"
1191
if test "$kde_qtver" = "3"; then
1192
if test $kde_qtsubver -gt 0; then
1193
if test $kde_qtsubver -gt 1; then
1194
if test $kde_qtsubver -gt 2; then
1195
kde_qt_minversion=">= Qt 3.3 and < 4.0"
1197
kde_qt_minversion=">= Qt 3.2 and < 4.0"
1200
kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1203
kde_qt_minversion=">= Qt 3.0 and < 4.0"
1206
if test "$kde_qtver" = "1"; then
1207
kde_qt_minversion=">= 1.42 and < 2.0"
1210
kde_qt_minversion="$2"
1213
if test -z "$3"; then
1214
if test $kde_qtver = 3; then
1215
if test $kde_qtsubver -gt 0; then
1216
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1217
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1218
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1220
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1223
if test $kde_qtver = 2; then
1224
if test $kde_qtsubver -gt 0; then
1225
kde_qt_verstring="QT_VERSION >= 222"
1227
kde_qt_verstring="QT_VERSION >= 200"
1230
if test $kde_qtver = 1; then
1231
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1234
kde_qt_verstring="$3"
1237
if test $kde_qtver = 4; then
1238
kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
1240
if test $kde_qtver = 3; then
1241
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1243
if test $kde_qtver = 2; then
1244
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1246
if test $kde_qtver = 1; then
1247
kde_qt_dirs="$QTDIR /usr/lib/qt"
1251
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1253
AC_REQUIRE([KDE_USE_QT])
1254
AC_MSG_CHECKING([if Qt compiles without flags])
1255
AC_CACHE_VAL(kde_cv_qt_direct,
1259
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1260
ac_LIBRARY_PATH="$LIBRARY_PATH"
1261
ac_cxxflags_safe="$CXXFLAGS"
1262
ac_ldflags_safe="$LDFLAGS"
1263
ac_libs_safe="$LIBS"
1265
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1266
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1267
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1268
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1270
LIBS="$LIBQT $LIBSOCKET"
1273
export LD_LIBRARY_PATH
1277
KDE_PRINT_QT_PROGRAM
1279
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1280
kde_cv_qt_direct="yes"
1282
kde_cv_qt_direct="no"
1283
echo "configure: failed program was:" >&AC_FD_CC
1284
cat conftest.$ac_ext >&AC_FD_CC
1288
CXXFLAGS="$ac_cxxflags_safe"
1289
LDFLAGS="$ac_ldflags_safe"
1290
LIBS="$ac_libs_safe"
1292
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1293
export LD_LIBRARY_PATH
1294
LIBRARY_PATH="$ac_LIBRARY_PATH"
1299
if test "$kde_cv_qt_direct" = "yes"; then
1308
dnl ------------------------------------------------------------------------
1309
dnl Try to find the Qt headers and libraries.
1310
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1311
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1312
dnl ------------------------------------------------------------------------
1314
AC_DEFUN([AC_PATH_QT_1_3],
1316
AC_REQUIRE([K_PATH_X])
1317
AC_REQUIRE([KDE_USE_QT])
1318
AC_REQUIRE([KDE_CHECK_LIB64])
1320
dnl ------------------------------------------------------------------------
1321
dnl Add configure flag to enable linking to MT version of Qt library.
1322
dnl ------------------------------------------------------------------------
1326
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1327
kde_use_qt_mt=$enableval,
1329
if test $kde_qtver = 3; then
1339
dnl ------------------------------------------------------------------------
1340
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1341
dnl ------------------------------------------------------------------------
1345
if test "x$kde_use_qt_mt" = "xyes"; then
1347
if test "x$kde_use_threading" = "xyes"; then
1348
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1349
KDE_MT_LDFLAGS="$USE_THREADS"
1350
KDE_MT_LIBS="$LIBPTHREAD"
1355
AC_SUBST(KDE_MT_LDFLAGS)
1356
AC_SUBST(KDE_MT_LIBS)
1358
kde_qt_was_given=yes
1360
dnl ------------------------------------------------------------------------
1361
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1362
dnl ------------------------------------------------------------------------
1363
if test -z "$LIBQT_GLOB"; then
1364
if test "x$kde_use_qt_emb" = "xyes"; then
1365
LIBQT_GLOB="libqte.*"
1367
LIBQT_GLOB="libqt.*"
1371
dnl ------------------------------------------------------------
1372
dnl If we got --enable-embedded then adjust the Qt library name.
1373
dnl ------------------------------------------------------------
1374
if test "x$kde_use_qt_emb" = "xyes"; then
1380
kde_int_qt="-l$qtlib"
1382
if test -z "$LIBQPE"; then
1383
dnl ------------------------------------------------------------
1384
dnl If we got --enable-palmtop then add -lqpe to the link line
1385
dnl ------------------------------------------------------------
1386
if test "x$kde_use_qt_emb" = "xyes"; then
1387
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1397
dnl ------------------------------------------------------------------------
1398
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1399
dnl ------------------------------------------------------------------------
1401
if test "x$kde_use_qt_mt" = "xyes"; then
1403
kde_int_qt="-l$qtlib-mt"
1404
LIBQT_GLOB="lib$qtlib-mt.*"
1405
USING_QT_MT="using -mt"
1410
if test $kde_qtver != 1; then
1412
AC_REQUIRE([AC_FIND_PNG])
1413
AC_REQUIRE([AC_FIND_JPEG])
1414
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1417
if test $kde_qtver = 3; then
1418
AC_REQUIRE([KDE_CHECK_LIBDL])
1419
LIBQT="$LIBQT $LIBDL"
1422
AC_MSG_CHECKING([for Qt])
1424
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1425
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1427
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1431
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1432
[ ac_qt_includes="$withval"/include
1433
ac_qt_libraries="$withval"/lib${kdelibsuff}
1434
ac_qt_bindir="$withval"/bin
1437
AC_ARG_WITH(qt-includes,
1438
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1440
ac_qt_includes="$withval"
1443
kde_qt_libs_given=no
1445
AC_ARG_WITH(qt-libraries,
1446
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1447
[ ac_qt_libraries="$withval"
1448
kde_qt_libs_given=yes
1451
AC_CACHE_VAL(ac_cv_have_qt,
1452
[#try to guess Qt locations
1455
for dir in $kde_qt_dirs; do
1456
qt_incdirs="$qt_incdirs $dir/include $dir"
1458
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"
1459
if test ! "$ac_qt_includes" = "NO"; then
1460
qt_incdirs="$ac_qt_includes $qt_incdirs"
1463
if test "$kde_qtver" != "1"; then
1464
kde_qt_header=qstyle.h
1466
kde_qt_header=qglobal.h
1469
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1470
ac_qt_includes="$qt_incdir"
1473
for dir in $kde_qt_dirs; do
1474
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1476
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1477
if test ! "$ac_qt_libraries" = "NO"; then
1478
qt_libdir=$ac_qt_libraries
1480
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1481
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1483
for dir in $qt_libdirs; do
1484
try="ls -1 $dir/${LIBQT_GLOB}"
1485
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1488
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1489
if test -e "$a"; then
1490
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1495
ac_qt_libraries="$qt_libdir"
1500
ac_cxxflags_safe="$CXXFLAGS"
1501
ac_ldflags_safe="$LDFLAGS"
1502
ac_libs_safe="$LIBS"
1504
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1505
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1506
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1508
KDE_PRINT_QT_PROGRAM
1510
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1513
echo "configure: failed program was:" >&AC_FD_CC
1514
cat conftest.$ac_ext >&AC_FD_CC
1515
ac_qt_libraries="NO"
1518
CXXFLAGS="$ac_cxxflags_safe"
1519
LDFLAGS="$ac_ldflags_safe"
1520
LIBS="$ac_libs_safe"
1523
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1524
ac_cv_have_qt="have_qt=no"
1527
if test "$ac_qt_includes" = NO; then
1528
if test "$ac_qt_libraries" = NO; then
1529
ac_qt_notfound="(headers and libraries)";
1531
ac_qt_notfound="(headers)";
1534
if test "x$kde_use_qt_mt" = "xyes"; then
1536
Make sure that you have compiled Qt with thread support!"
1537
ac_qt_notfound="(library $qtlib-mt)";
1539
ac_qt_notfound="(library $qtlib)";
1543
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1544
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1550
eval "$ac_cv_have_qt"
1552
if test "$have_qt" != yes; then
1553
AC_MSG_RESULT([$have_qt]);
1555
ac_cv_have_qt="have_qt=yes \
1556
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1557
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1559
qt_libraries="$ac_qt_libraries"
1560
qt_includes="$ac_qt_includes"
1563
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1564
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1567
AC_SUBST(qt_libraries)
1568
AC_SUBST(qt_includes)
1570
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1573
QT_INCLUDES="-I$qt_includes"
1574
all_includes="$QT_INCLUDES $all_includes"
1577
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1580
QT_LDFLAGS="-L$qt_libraries"
1581
all_libraries="$QT_LDFLAGS $all_libraries"
1583
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1585
AC_SUBST(QT_INCLUDES)
1586
AC_SUBST(QT_LDFLAGS)
1591
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1592
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1594
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1596
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1597
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1598
if test -e "$a"; then
1599
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1610
AC_DEFUN([AC_PATH_QT],
1615
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1617
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1619
if test x$ac_uic_supports_libpath = xyes; then
1621
AC_MSG_CHECKING([if UIC has KDE plugins available])
1622
AC_CACHE_VAL(kde_cv_uic_plugins,
1624
cat > actest.ui << EOF
1625
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1626
<class>NewConnectionDialog</class>
1627
<widget class="QDialog">
1628
<widget class="KLineEdit">
1629
<property name="name">
1630
<cstring>testInput</cstring>
1639
kde_cv_uic_plugins=no
1640
kde_line="$UIC_PATH -L $kde_widgetdir"
1641
if test x$ac_uic_supports_nounload = xyes; then
1642
kde_line="$kde_line -nounload"
1644
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1645
if AC_TRY_EVAL(kde_line); then
1646
# if you're trying to debug this check and think it's incorrect,
1647
# better check your installation. The check _is_ correct - your
1648
# installation is not.
1649
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1650
kde_cv_uic_plugins=yes
1653
rm -f actest.ui actest.cpp
1656
AC_MSG_RESULT([$kde_cv_uic_plugins])
1657
if test "$kde_cv_uic_plugins" != yes; then
1659
you need to install kdelibs first.
1661
If you did install kdelibs, then the Qt version that is picked up by
1662
this configure is not the same version you used to compile kdelibs.
1663
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the
1664
_same Qt version_, compiled with the _same compiler_ and the same Qt
1665
configuration settings.
1671
AC_DEFUN([KDE_CHECK_FINAL],
1673
AC_ARG_ENABLE(final,
1674
AC_HELP_STRING([--enable-final],
1675
[build size optimized apps (experimental - needs lots of memory)]),
1676
kde_use_final=$enableval, kde_use_final=no)
1678
if test "x$kde_use_final" = "xyes"; then
1679
KDE_USE_FINAL_TRUE=""
1680
KDE_USE_FINAL_FALSE="#"
1682
KDE_USE_FINAL_TRUE="#"
1683
KDE_USE_FINAL_FALSE=""
1685
AC_SUBST(KDE_USE_FINAL_TRUE)
1686
AC_SUBST(KDE_USE_FINAL_FALSE)
1689
AC_DEFUN([KDE_CHECK_CLOSURE],
1691
AC_ARG_ENABLE(closure,
1692
AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1693
kde_use_closure=$enableval, kde_use_closure=no)
1696
if test "x$kde_use_closure" = "xyes"; then
1697
KDE_USE_CLOSURE_TRUE=""
1698
KDE_USE_CLOSURE_FALSE="#"
1699
# CXXFLAGS="$CXXFLAGS $REPO"
1701
KDE_USE_CLOSURE_TRUE="#"
1702
KDE_USE_CLOSURE_FALSE=""
1706
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1707
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1708
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1709
[KDE_NO_UNDEFINED=""])],
1710
[KDE_NO_UNDEFINED=""])
1714
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1715
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1716
AC_SUBST(KDE_NO_UNDEFINED)
1719
dnl Check if the linker supports --enable-new-dtags and --as-needed
1720
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1722
AC_ARG_ENABLE(new_ldflags,
1723
AC_HELP_STRING([--enable-new-ldflags],
1724
[enable the new linker flags]),
1725
kde_use_new_ldflags=$enableval,
1726
kde_use_new_ldflags=no)
1728
LDFLAGS_AS_NEEDED=""
1729
LDFLAGS_NEW_DTAGS=""
1730
if test "x$kde_use_new_ldflags" = "xyes"; then
1731
LDFLAGS_NEW_DTAGS=""
1732
KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1733
[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1735
KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1736
[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1738
AC_SUBST(LDFLAGS_AS_NEEDED)
1739
AC_SUBST(LDFLAGS_NEW_DTAGS)
1742
AC_DEFUN([KDE_CHECK_NMCHECK],
1744
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1745
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1747
if test "$kde_use_nmcheck" = "yes"; then
1748
KDE_USE_NMCHECK_TRUE=""
1749
KDE_USE_NMCHECK_FALSE="#"
1751
KDE_USE_NMCHECK_TRUE="#"
1752
KDE_USE_NMCHECK_FALSE=""
1754
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1755
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1758
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1760
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1762
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1766
dnl ------------------------------------------------------------------------
1767
dnl Now, the same with KDE
1768
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1769
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1770
dnl ------------------------------------------------------------------------
1772
AC_DEFUN([AC_BASE_PATH_KDE],
1774
AC_REQUIRE([KDE_CHECK_STL])
1775
AC_REQUIRE([AC_PATH_QT])dnl
1776
AC_REQUIRE([KDE_CHECK_LIB64])
1779
AC_MSG_CHECKING([for KDE])
1781
if test "${prefix}" != NONE; then
1782
kde_includes=${includedir}
1783
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1785
kde_libraries=${libdir}
1786
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1795
AC_CACHE_VAL(ac_cv_have_kde,
1796
[#try to guess kde locations
1798
if test "$kde_qtver" = 1; then
1799
kde_check_header="ksock.h"
1800
kde_check_lib="libkdecore.la"
1802
kde_check_header="ksharedptr.h"
1803
kde_check_lib="libkio.la"
1806
if test -z "$1"; then
1808
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1809
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1810
kde_incdirs="$ac_kde_includes $kde_incdirs"
1811
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1812
ac_kde_includes="$kde_incdir"
1814
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1816
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1817
So, check this please and use another prefix!])
1820
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1821
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1822
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1823
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1824
ac_kde_libraries="$kde_libdir"
1827
dnl this might be somewhere else
1828
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1830
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1832
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1833
So, check this please and use another prefix!])
1836
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1838
I can't find the designer plugins. These are required and should have been installed
1842
if test -n "$kde_widgetdir"; then
1843
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1847
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1848
ac_cv_have_kde="have_kde=no"
1850
ac_cv_have_kde="have_kde=yes \
1851
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1854
else dnl test -z $1, e.g. from kdelibs
1856
ac_cv_have_kde="have_kde=no"
1861
eval "$ac_cv_have_kde"
1863
if test "$have_kde" != "yes"; then
1864
if test "${prefix}" = NONE; then
1865
ac_kde_prefix="$ac_default_prefix"
1867
ac_kde_prefix="$prefix"
1869
if test "$exec_prefix" = NONE; then
1870
ac_kde_exec_prefix="$ac_kde_prefix"
1871
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1873
ac_kde_exec_prefix="$exec_prefix"
1874
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1877
kde_libraries="${libdir}"
1878
kde_includes="${includedir}"
1881
ac_cv_have_kde="have_kde=yes \
1882
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1883
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1885
kde_libraries="$ac_kde_libraries"
1886
kde_includes="$ac_kde_includes"
1888
AC_SUBST(kde_libraries)
1889
AC_SUBST(kde_includes)
1891
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1894
KDE_INCLUDES="-I$kde_includes"
1895
all_includes="$KDE_INCLUDES $all_includes"
1898
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1900
KDE_LDFLAGS="-L$kde_libraries"
1901
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1902
all_libraries="$KDE_LDFLAGS $all_libraries"
1905
AC_SUBST(KDE_LDFLAGS)
1906
AC_SUBST(KDE_INCLUDES)
1908
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1910
all_libraries="$all_libraries $USER_LDFLAGS"
1911
all_includes="$all_includes $USER_INCLUDES"
1912
AC_SUBST(all_includes)
1913
AC_SUBST(all_libraries)
1915
if test -z "$1"; then
1916
KDE_CHECK_UIC_PLUGINS
1919
ac_kde_libraries="$kde_libdir"
1926
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1928
AC_MSG_CHECKING(for extra includes)
1929
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1930
kde_use_extra_includes="$withval",
1931
kde_use_extra_includes=NONE
1934
if test -n "$kde_use_extra_includes" && \
1935
test "$kde_use_extra_includes" != "NONE"; then
1939
for dir in $kde_use_extra_includes; do
1940
kde_extra_includes="$kde_extra_includes $dir"
1941
USER_INCLUDES="$USER_INCLUDES -I$dir"
1944
kde_use_extra_includes="added"
1946
kde_use_extra_includes="no"
1948
AC_SUBST(USER_INCLUDES)
1950
AC_MSG_RESULT($kde_use_extra_includes)
1953
AC_MSG_CHECKING(for extra libs)
1954
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1955
kde_use_extra_libs=$withval,
1956
kde_use_extra_libs=NONE
1958
if test -n "$kde_use_extra_libs" && \
1959
test "$kde_use_extra_libs" != "NONE"; then
1963
for dir in $kde_use_extra_libs; do
1964
kde_extra_libs="$kde_extra_libs $dir"
1965
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1966
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1969
kde_use_extra_libs="added"
1971
kde_use_extra_libs="no"
1974
AC_SUBST(USER_LDFLAGS)
1976
AC_MSG_RESULT($kde_use_extra_libs)
1980
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1982
AC_MSG_CHECKING([for KDE headers installed])
1985
cat > conftest.$ac_ext <<EOF
1987
# include <stdlib.h>
1990
#include "confdefs.h"
1994
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1995
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1996
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1997
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1998
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1999
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
2000
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
2001
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
2002
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
2003
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
2004
printf("kde_wallpaperdir=\\"%s\\"\n",
2005
KApplication::kde_wallpaperdir().data());
2006
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
2007
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
2008
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
2009
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
2010
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2011
printf("kde_styledir=\\"/tmp/dummy\\"\n");
2012
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2013
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2014
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2015
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2016
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2021
ac_save_CPPFLAGS=$CPPFLAGS
2022
CPPFLAGS="$all_includes $CPPFLAGS"
2023
if AC_TRY_EVAL(ac_compile); then
2026
AC_MSG_ERROR([your system is not able to compile a small KDE application!
2027
Check, if you installed the KDE header files correctly.
2028
For more details about this problem, look at the end of config.log.])
2030
CPPFLAGS=$ac_save_CPPFLAGS
2035
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2037
AC_MSG_CHECKING(for kde-qt-addon)
2038
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2040
kde_ldflags_safe="$LDFLAGS"
2041
kde_libs_safe="$LIBS"
2042
kde_cxxflags_safe="$CXXFLAGS"
2044
LIBS="-lkde-qt-addon $LIBQT $LIBS"
2045
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2046
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2054
kde_cv_have_kdeqtaddon=yes,
2055
kde_cv_have_kdeqtaddon=no
2058
LDFLAGS=$kde_ldflags_safe
2060
CXXFLAGS=$kde_cxxflags_safe
2063
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2065
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2066
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2067
It is a separate package (and CVS module) named kde-qt-addon.])
2071
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2073
AC_REQUIRE([KDE_MISC_TESTS])
2074
AC_REQUIRE([KDE_CHECK_LIBDL])
2075
AC_REQUIRE([K_PATH_X])
2077
if test $kde_qtver = 3; then
2079
*cygwin*) lib_kded="-lkdeinit_kded" ;;
2082
AC_SUBST(LIB_KDED, $lib_kded)
2083
AC_SUBST(LIB_KDECORE, "-lkdecore")
2084
AC_SUBST(LIB_KDEUI, "-lkdeui")
2085
AC_SUBST(LIB_KIO, "-lkio")
2086
AC_SUBST(LIB_KJS, "-lkjs")
2087
AC_SUBST(LIB_SMB, "-lsmb")
2088
AC_SUBST(LIB_KAB, "-lkab")
2089
AC_SUBST(LIB_KABC, "-lkabc")
2090
AC_SUBST(LIB_KHTML, "-lkhtml")
2091
AC_SUBST(LIB_KSPELL, "-lkspell")
2092
AC_SUBST(LIB_KPARTS, "-lkparts")
2093
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2094
AC_SUBST(LIB_KUTILS, "-lkutils")
2095
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2096
AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2097
AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2098
AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2099
AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2100
# these are for backward compatibility
2101
AC_SUBST(LIB_KSYCOCA, "-lkio")
2102
AC_SUBST(LIB_KFILE, "-lkio")
2103
elif test $kde_qtver = 2; then
2104
AC_SUBST(LIB_KDECORE, "-lkdecore")
2105
AC_SUBST(LIB_KDEUI, "-lkdeui")
2106
AC_SUBST(LIB_KIO, "-lkio")
2107
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2108
AC_SUBST(LIB_SMB, "-lsmb")
2109
AC_SUBST(LIB_KFILE, "-lkfile")
2110
AC_SUBST(LIB_KAB, "-lkab")
2111
AC_SUBST(LIB_KHTML, "-lkhtml")
2112
AC_SUBST(LIB_KSPELL, "-lkspell")
2113
AC_SUBST(LIB_KPARTS, "-lkparts")
2114
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2116
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2117
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2118
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2119
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2120
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2124
AC_DEFUN([AC_PATH_KDE],
2127
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2129
if test "$enableval" = "no";
2130
then ac_use_path_checking="default"
2131
else ac_use_path_checking=""
2135
if test "$kde_qtver" = 1;
2136
then ac_use_path_checking=""
2137
else ac_use_path_checking="default"
2142
AC_CREATE_KFSSTND($ac_use_path_checking)
2145
KDE_CREATE_LIBS_ALIASES
2148
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2149
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2151
AC_MSG_CHECKING(for $1)
2152
AC_CACHE_VAL(kde_cv_func_$1,
2156
save_CXXFLAGS="$CXXFLAGS"
2157
kde_safe_LIBS="$LIBS"
2158
LIBS="$LIBS $X_EXTRA_LIBS"
2159
if test "$GXX" = "yes"; then
2160
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2170
CXXFLAGS="$save_CXXFLAGS"
2171
LIBS="$kde_safe_LIBS"
2175
AC_MSG_RESULT($kde_cv_func_$1)
2177
AC_MSG_CHECKING([if $1 needs custom prototype])
2178
AC_CACHE_VAL(kde_cv_proto_$1,
2180
if test "x$kde_cv_func_$1" = xyes; then
2184
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2185
kde_cv_proto_$1="yes - in libkdefakes"
2188
kde_cv_proto_$1=unknown
2193
if test "x$kde_cv_proto_$1" = xunknown; then
2198
LIBS="$LIBS $X_EXTRA_LIBS"
2207
[ kde_cv_func_$1=yes
2208
kde_cv_proto_$1=yes ],
2209
[kde_cv_proto_$1="$1 unavailable"]
2215
AC_MSG_RESULT($kde_cv_proto_$1)
2217
if test "x$kde_cv_func_$1" = xyes; then
2218
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2221
if test "x$kde_cv_proto_$1" = xno; then
2222
AC_DEFINE(HAVE_$5_PROTO, 1,
2223
[Define if you have the $1 prototype])
2226
AH_VERBATIM([_HAVE_$5_PROTO],
2228
#if !defined(HAVE_$5_PROTO)
2240
AC_DEFUN([AC_CHECK_SETENV],
2242
KDE_CHECK_FUNC_EXT(setenv, [
2245
[setenv("VAR", "VALUE", 1);],
2246
[int setenv (const char *, const char *, int)],
2250
AC_DEFUN([AC_CHECK_UNSETENV],
2252
KDE_CHECK_FUNC_EXT(unsetenv, [
2256
[void unsetenv (const char *)],
2260
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2262
KDE_CHECK_FUNC_EXT(getdomainname, [
2269
getdomainname(buffer, 200);
2271
[#include <sys/types.h>
2272
int getdomainname (char *, size_t)],
2276
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2278
KDE_CHECK_FUNC_EXT(gethostname, [
2284
gethostname(buffer, 200);
2286
[int gethostname (char *, unsigned int)],
2290
AC_DEFUN([AC_CHECK_USLEEP],
2292
KDE_CHECK_FUNC_EXT(usleep, [
2298
[int usleep (unsigned int)],
2303
AC_DEFUN([AC_CHECK_RANDOM],
2305
KDE_CHECK_FUNC_EXT(random, [
2311
[long int random(void)],
2314
KDE_CHECK_FUNC_EXT(srandom, [
2320
[void srandom(unsigned int)],
2325
AC_DEFUN([AC_CHECK_INITGROUPS],
2327
KDE_CHECK_FUNC_EXT(initgroups, [
2328
#include <sys/types.h>
2334
initgroups(buffer, 27);
2336
[int initgroups(const char *, gid_t)],
2340
AC_DEFUN([AC_CHECK_MKSTEMPS],
2342
KDE_CHECK_FUNC_EXT(mkstemps, [
2347
mkstemps("/tmp/aaaXXXXXX", 6);
2349
[int mkstemps(char *, int)],
2353
AC_DEFUN([AC_CHECK_MKSTEMP],
2355
KDE_CHECK_FUNC_EXT(mkstemp, [
2360
mkstemp("/tmp/aaaXXXXXX");
2362
[int mkstemp(char *)],
2366
AC_DEFUN([AC_CHECK_MKDTEMP],
2368
KDE_CHECK_FUNC_EXT(mkdtemp, [
2373
mkdtemp("/tmp/aaaXXXXXX");
2375
[char *mkdtemp(char *)],
2380
AC_DEFUN([AC_CHECK_RES_INIT],
2382
AC_MSG_CHECKING([if res_init needs -lresolv])
2383
kde_libs_safe="$LIBS"
2384
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2387
#include <sys/types.h>
2388
#include <netinet/in.h>
2389
#include <arpa/nameser.h>
2396
LIBRESOLV="-lresolv"
2398
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2400
[ AC_MSG_RESULT(no) ]
2405
KDE_CHECK_FUNC_EXT(res_init,
2407
#include <sys/types.h>
2408
#include <netinet/in.h>
2409
#include <arpa/nameser.h>
2413
[int res_init(void)],
2417
AC_DEFUN([AC_CHECK_STRLCPY],
2419
KDE_CHECK_FUNC_EXT(strlcpy, [
2423
strlcpy(buf, "KDE function test", sizeof(buf));
2425
[unsigned long strlcpy(char*, const char*, unsigned long)],
2429
AC_DEFUN([AC_CHECK_STRLCAT],
2431
KDE_CHECK_FUNC_EXT(strlcat, [
2436
strlcat(buf, "KDE function test", sizeof(buf));
2438
[unsigned long strlcat(char*, const char*, unsigned long)],
2442
AC_DEFUN([AC_CHECK_RES_QUERY],
2444
KDE_CHECK_FUNC_EXT(res_query, [
2445
#include <sys/types.h>
2446
#include <netinet/in.h>
2447
#include <arpa/nameser.h>
2452
res_query(NULL, 0, 0, NULL, 0);
2454
[int res_query(const char *, int, int, unsigned char *, int)],
2458
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2460
KDE_CHECK_FUNC_EXT(dn_skipname, [
2461
#include <sys/types.h>
2462
#include <netinet/in.h>
2463
#include <arpa/nameser.h>
2467
dn_skipname (NULL, NULL);
2469
[int dn_skipname (unsigned char *, unsigned char *)],
2474
AC_DEFUN([AC_FIND_GIF],
2475
[AC_MSG_CHECKING([for giflib])
2476
AC_CACHE_VAL(ac_cv_lib_gif,
2477
[ac_save_LIBS="$LIBS"
2478
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2479
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2481
LIBS="$all_libraries -lgif"
2488
int GifLastError(void);
2492
/* We use char because int might match the return type of a gcc2
2493
builtin and then its argument prototype would still apply. */
2495
[return GifLastError();],
2496
eval "ac_cv_lib_gif=yes",
2497
eval "ac_cv_lib_gif=no")
2498
LIBS="$ac_save_LIBS"
2500
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2502
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2504
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2508
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2510
AC_MSG_CHECKING([for libjpeg$2])
2511
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2513
ac_save_LIBS="$LIBS"
2514
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2515
ac_save_CFLAGS="$CFLAGS"
2516
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2522
void jpeg_CreateDecompress();
2527
[jpeg_CreateDecompress();],
2528
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2529
eval "ac_cv_lib_jpeg_$1=no")
2530
LIBS="$ac_save_LIBS"
2531
CFLAGS="$ac_save_CFLAGS"
2534
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2535
LIBJPEG="$ac_cv_lib_jpeg_$1"
2536
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2544
AC_DEFUN([AC_FIND_JPEG],
2546
dnl first look for libraries
2547
KDE_FIND_JPEG_HELPER(6b, 6b,
2548
KDE_FIND_JPEG_HELPER(normal, [],
2555
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2556
dnl requires system dependent includes loaded before it)
2557
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2558
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2559
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2561
dnl if headers _and_ libraries are missing, this is no error, and we
2562
dnl continue with a warning (the user will get no jpeg support in khtml)
2563
dnl if only one is missing, it means a configuration error, but we still
2565
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2566
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2568
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2570
There is an installation error in jpeg support. You seem to have only one
2571
of either the headers _or_ the libraries installed. You may need to either
2572
provide correct --with-extra-... options, or the development package of
2573
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2574
Disabling JPEG support.
2577
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2584
AH_VERBATIM(_AC_CHECK_JPEG,
2586
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2587
* headers and I'm too lazy to write a configure test as long as only
2588
* unixware is related
2591
#define HAVE_BOOLEAN
2596
AC_DEFUN([KDE_CHECK_QT_JPEG],
2598
if test -n "$LIBJPEG"; then
2599
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2600
AC_CACHE_VAL(kde_cv_qt_jpeg,
2604
ac_save_LIBS="$LIBS"
2605
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2606
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2607
ac_save_CXXFLAGS="$CXXFLAGS"
2608
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2610
[#include <qapplication.h>],
2614
QApplication app(argc, argv);],
2615
eval "kde_cv_qt_jpeg=no",
2616
eval "kde_cv_qt_jpeg=yes")
2617
LIBS="$ac_save_LIBS"
2618
CXXFLAGS="$ac_save_CXXFLAGS"
2623
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2625
LIBJPEG_QT='$(LIBJPEG)'
2633
AC_DEFUN([AC_FIND_ZLIB],
2635
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2636
AC_MSG_CHECKING([for libz])
2637
AC_CACHE_VAL(ac_cv_lib_z,
2639
kde_save_LIBS="$LIBS"
2640
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2641
kde_save_CFLAGS="$CFLAGS"
2642
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2649
gzFile f = (gzFile) 0;
2650
/* this would segfault.. but we only link, don't run */
2651
(void) gzgets(f, buf, sizeof(buf));
2653
return (zlibVersion() == ZLIB_VERSION);
2655
eval "ac_cv_lib_z='-lz'",
2656
eval "ac_cv_lib_z=no")
2657
LIBS="$kde_save_LIBS"
2658
CFLAGS="$kde_save_CFLAGS"
2660
if test ! "$ac_cv_lib_z" = no; then
2661
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2663
AC_MSG_RESULT($ac_cv_lib_z)
2665
AC_MSG_ERROR(not found.
2666
Possibly configure picks up an outdated version
2667
installed by XFree86. Remove it from your system.
2669
Check your installation and look into config.log)
2675
AC_DEFUN([KDE_TRY_TIFFLIB],
2677
AC_MSG_CHECKING([for libtiff $1])
2679
AC_CACHE_VAL(kde_cv_libtiff_$1,
2683
kde_save_LIBS="$LIBS"
2684
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2685
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2687
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2689
kde_save_CXXFLAGS="$CXXFLAGS"
2690
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2696
[return (TIFFOpen( "", "r") == 0); ],
2698
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2700
kde_cv_libtiff_$1=no
2703
LIBS="$kde_save_LIBS"
2704
CXXFLAGS="$kde_save_CXXFLAGS"
2708
if test "$kde_cv_libtiff_$1" = "no"; then
2713
LIBTIFF="$kde_cv_libtiff_$1"
2715
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2721
AC_DEFUN([AC_FIND_TIFF],
2723
AC_REQUIRE([K_PATH_X])
2724
AC_REQUIRE([AC_FIND_ZLIB])
2725
AC_REQUIRE([AC_FIND_JPEG])
2726
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2728
KDE_TRY_TIFFLIB(tiff, [],
2729
KDE_TRY_TIFFLIB(tiff34))
2734
AC_DEFUN([KDE_FIND_LIBEXR],
2736
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2737
AC_REQUIRE([AC_FIND_ZLIB])
2738
AC_CACHE_VAL(ac_cv_libexr,
2740
if test -z "$PKG_CONFIG"; then
2741
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2744
AC_MSG_CHECKING([for OpenEXR libraries])
2746
if test "$PKG_CONFIG" = "no" ; then
2748
echo "*** The pkg-config script could not be found. Make sure it is"
2749
echo "*** in your path, or set the PKG_CONFIG environment variable"
2750
echo "*** to the full path to pkg-config."
2751
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
2753
if !(`$PKG_CONFIG --exists OpenEXR`) ; then
2757
if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
2761
kde_save_LIBS="$LIBS"
2762
LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ"
2765
kde_save_CXXFLAGS="$CXXFLAGS"
2766
EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
2767
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
2771
#include <ImfRgbaFile.h>
2774
using namespace Imf;
2775
RgbaInputFile file ("dummy");
2778
eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
2779
eval "ac_cv_libexr=no"
2781
LIBS="$kde_save_LIBS"
2782
CXXFLAGS="$kde_save_CXXFLAGS"
2785
if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
2786
AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
2787
LIB_EXR="$ac_cv_libexr"
2788
AC_MSG_RESULT($ac_cv_libexr)
2802
AC_DEFUN([AC_FIND_PNG],
2804
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2805
AC_REQUIRE([AC_FIND_ZLIB])
2806
AC_MSG_CHECKING([for libpng])
2807
AC_CACHE_VAL(ac_cv_lib_png,
2809
kde_save_LIBS="$LIBS"
2810
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2811
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2813
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2815
kde_save_CFLAGS="$CFLAGS"
2816
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2823
png_structp png_ptr = png_create_read_struct( /* image ptr */
2824
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2825
return( png_ptr != 0 );
2827
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2828
eval "ac_cv_lib_png=no"
2830
LIBS="$kde_save_LIBS"
2831
CFLAGS="$kde_save_CFLAGS"
2833
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2834
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2835
LIBPNG="$ac_cv_lib_png"
2837
AC_MSG_RESULT($ac_cv_lib_png)
2846
AC_DEFUN([AC_FIND_JASPER],
2848
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2849
AC_REQUIRE([AC_FIND_JPEG])
2850
AC_MSG_CHECKING([for jasper])
2851
AC_CACHE_VAL(ac_cv_jasper,
2853
kde_save_LIBS="$LIBS"
2854
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2855
kde_save_CFLAGS="$CFLAGS"
2856
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2860
#include<jasper/jasper.h>
2863
return( jas_init() );
2865
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2866
eval "ac_cv_jasper=no"
2868
LIBS="$kde_save_LIBS"
2869
CFLAGS="$kde_save_CFLAGS"
2871
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2872
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2873
LIB_JASPER="$ac_cv_jasper"
2874
AC_MSG_RESULT($ac_cv_jasper)
2879
AC_SUBST(LIB_JASPER)
2882
AC_DEFUN([AC_CHECK_BOOL],
2884
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2887
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2889
AC_MSG_CHECKING(if you need GNU extensions)
2890
AC_CACHE_VAL(ac_cv_gnu_extensions,
2892
cat > conftest.c << EOF
2893
#include <features.h>
2895
#ifdef __GNU_LIBRARY__
2900
if (eval "$ac_cpp conftest.c") 2>&5 |
2901
egrep "yes" >/dev/null 2>&1; then
2903
ac_cv_gnu_extensions=yes
2905
ac_cv_gnu_extensions=no
2909
AC_MSG_RESULT($ac_cv_gnu_extensions)
2910
if test "$ac_cv_gnu_extensions" = "yes"; then
2911
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2915
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2917
AC_MSG_CHECKING([whether $CXX supports -$1])
2918
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2919
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2923
save_CXXFLAGS="$CXXFLAGS"
2924
CXXFLAGS="$CXXFLAGS -$1"
2925
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2926
CXXFLAGS="$save_CXXFLAGS"
2929
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2940
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2942
AC_MSG_CHECKING([whether $CC supports -$1])
2943
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2944
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2948
save_CFLAGS="$CFLAGS"
2949
CFLAGS="$CFLAGS -$1"
2950
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2951
CFLAGS="$save_CFLAGS"
2954
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2966
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2967
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2968
dnl it's all white-space separated
2969
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2972
if test -n "$__val"; then
2978
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2979
*) # Careful to not add spaces, where there were none, because otherwise
2980
# libtool gets confused, if we change e.g. CXX
2981
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2990
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2992
AC_MSG_CHECKING([whether $CC is blacklisted])
2994
dnl In theory we have tu run this test against $CC and $CXX
2995
dnl in C and in C++ mode, because its perfectly legal for
2996
dnl the user to mix compiler versions, since C has a defined
2999
dnl For now, we assume the user is not on crack.
3003
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
3008
kde_bad_compiler=no,
3009
kde_bad_compiler=yes
3012
AC_MSG_RESULT($kde_bad_compiler)
3014
if test "$kde_bad_compiler" = "yes"; then
3017
This particular compiler version is blacklisted because it
3018
is known to miscompile KDE. Please use a newer version, or
3019
if that is not yet available, choose an older version.
3021
Please do not report a bug or bother us reporting this
3022
configure error. We know about it, and we introduced
3023
it by intention to avoid untraceable bugs or crashes in KDE.
3031
AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH],
3033
AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline],
3034
kde_cv_opt_noinline_match,
3036
kde_cv_opt_noinline_match=irrelevant
3037
dnl if we don't use both -O2 and -fno-inline, this check is moot
3038
if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \
3039
&& echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then
3041
ac_cflags_save="$CFLAGS"
3042
CFLAGS="$CFLAGS -D_USE_GNU"
3046
], [ const char *pt, *et;
3047
et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ;
3049
kde_cv_opt_noinline_match=yes,
3050
kde_cv_opt_noinline_match=no
3053
CFLAGS="$ac_cflags_save"
3059
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
3060
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
3062
if test "x$kde_use_qt_emb" != "xyes"; then
3063
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
3064
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
3066
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
3067
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
3071
AC_DEFUN([AC_CHECK_COMPILERS],
3073
AC_ARG_ENABLE(debug,
3074
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
3078
kde_use_debug_code="yes"
3079
kde_use_debug_define=no
3082
kde_use_debug_code="full"
3083
kde_use_debug_define=no
3086
kde_use_debug_code="no"
3087
kde_use_debug_define=yes
3091
[kde_use_debug_code="no"
3092
kde_use_debug_define=no
3095
dnl Just for configure --help
3096
AC_ARG_ENABLE(dummyoption,
3097
AC_HELP_STRING([--disable-debug],
3098
[disables debug output and debug symbols [default=no]]),
3101
AC_ARG_ENABLE(strict,
3102
AC_HELP_STRING([--enable-strict],
3103
[compiles with strict compiler options (may not work!)]),
3105
if test $enableval = "no"; then
3106
kde_use_strict_options="no"
3108
kde_use_strict_options="yes"
3110
], [kde_use_strict_options="no"])
3112
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3114
if test $enableval = "no"; then
3115
kde_use_warnings="no"
3117
kde_use_warnings="yes"
3119
], [kde_use_warnings="yes"])
3121
dnl enable warnings for debug build
3122
if test "$kde_use_debug_code" != "no"; then
3123
kde_use_warnings=yes
3126
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3127
[kde_use_profiling=$enableval],
3128
[kde_use_profiling="no"]
3131
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3138
if test "$GCC" = "yes"; then
3139
if test "$kde_use_debug_code" != "no"; then
3140
if test $kde_use_debug_code = "full"; then
3141
CFLAGS="-g3 -fno-inline $CFLAGS"
3143
CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS"
3146
CFLAGS="-O2 $CFLAGS"
3150
if test "$kde_use_debug_define" = "yes"; then
3151
CFLAGS="-DNDEBUG $CFLAGS"
3156
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3157
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3160
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3164
CXXFLAGS=" $CXXFLAGS"
3168
KDE_CHECK_FOR_BAD_COMPILER
3170
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3171
if test "$kde_use_debug_code" != "no"; then
3172
if test "$CXX" = "KCC"; then
3173
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3175
if test "$kde_use_debug_code" = "full"; then
3176
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3178
CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS"
3181
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3183
dnl convenience compiler flags
3184
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3185
AC_SUBST(WOVERLOADED_VIRTUAL)
3187
if test "$CXX" = "KCC"; then
3188
CXXFLAGS="+K3 $CXXFLAGS"
3190
CXXFLAGS="-O2 $CXXFLAGS"
3195
if test "$kde_use_debug_define" = "yes"; then
3196
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3199
if test "$kde_use_profiling" = "yes"; then
3200
KDE_CHECK_COMPILER_FLAG(pg,
3202
CFLAGS="-pg $CFLAGS"
3203
CXXFLAGS="-pg $CXXFLAGS"
3207
if test "$kde_use_warnings" = "yes"; then
3208
if test "$GCC" = "yes"; then
3209
CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
3212
CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3213
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3214
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3215
KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3218
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3219
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3220
dnl ### FIXME: revert for KDE 4
3221
KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
3225
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3226
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3230
AC_HELP_STRING([--enable-pch],
3231
[enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3232
[ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3234
HAVE_GCC_VISIBILITY=0
3235
AC_SUBST([HAVE_GCC_VISIBILITY])
3237
if test "$GXX" = "yes"; then
3238
gcc_no_reorder_blocks=NO
3239
KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES])
3240
if test $kde_use_debug_code != "no" && \
3241
test $kde_use_debug_code != "full" && \
3242
test "YES" = "$gcc_no_reorder_blocks" ; then
3243
CXXFLAGS="$CXXFLAGS -fno-reorder-blocks"
3244
CFLAGS="$CFLAGS -fno-reorder-blocks"
3246
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3247
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3248
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3249
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
3250
ENABLE_PERMISSIVE_FLAG="-fpermissive"
3252
if test "$kde_use_pch" = "yes"; then
3253
AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3255
if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3256
kde_gcc_supports_pch=yes
3259
kde_gcc_supports_pch=no
3262
if test "$kde_gcc_supports_pch" = "yes"; then
3263
AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3264
if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3265
kde_gcc_supports_pch=yes
3268
kde_gcc_supports_pch=no
3272
rm -f conftest.h conftest.h.gch
3275
KDE_CHECK_FOR_OPT_NOINLINE_MATCH
3276
if test "x$kde_cv_opt_noinline_match" = "xno" ; then
3277
CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`"
3280
AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3281
if test "$CXX" = "KCC"; then
3282
dnl unfortunately we currently cannot disable exception support in KCC
3283
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3284
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3285
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
3287
if test "$kde_use_pch" = "yes"; then
3288
dnl TODO: support --pch-dir!
3289
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3290
dnl the below works (but the dir must exist), but it's
3291
dnl useless for a whole package.
3292
dnl The are precompiled headers for each source file, so when compiling
3293
dnl from scratch, it doesn't make a difference, and they take up
3294
dnl around ~5Mb _per_ sourcefile.
3295
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3296
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3298
dnl this flag controls inlining. by default KCC inlines in optimisation mode
3299
dnl all implementations that are defined inside the class {} declaration.
3300
dnl because of templates-compatibility with broken gcc compilers, this
3301
dnl can cause excessive inlining. This flag limits it to a sane level
3302
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3303
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3304
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3305
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3306
dnl Some source files are shared between multiple executables
3307
dnl (or libraries) and some of those need template instantiations.
3308
dnl In that case KCC needs to compile those sources with
3309
dnl --one_instantiation_per_object. To make it easy for us we compile
3310
dnl _all_ objects with that flag (--one_per is a shorthand).
3311
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3313
AC_SUBST(USE_EXCEPTIONS)
3314
dnl obsolete macro - provided to keep things going
3319
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3320
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3321
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3323
if test "$GXX" = yes; then
3324
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3325
if test ! -f $libstdcpp; then
3326
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])
3332
AC_VALIDIFY_CXXFLAGS
3336
if test "$GCC" = yes; then
3339
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3341
AC_ARG_ENABLE(coverage,
3342
AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3343
if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3344
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3345
ac_coverage_linker="-lgcc"
3346
elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3347
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3348
ac_coverage_linker=""
3350
AC_MSG_ERROR([coverage with your compiler is not supported])
3352
CFLAGS="$CFLAGS $ac_coverage_compiler"
3353
CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3354
LDFLAGS="$LDFLAGS $ac_coverage_linker"
3357
AC_SUBST(NOOPT_CXXFLAGS)
3358
AC_SUBST(NOOPT_CFLAGS)
3359
AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3361
KDE_CHECK_NEW_LDFLAGS
3366
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3369
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3371
AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3376
safe_CXXFLAGS=$CXXFLAGS
3377
safe_LDFLAGS=$LDFLAGS
3378
CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3379
LDFLAGS="$LDFLAGS -shared -fPIC"
3383
/* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3385
int some_function( void ) __attribute__ ((visibility("default")));
3386
int some_function( void )
3388
std::string s("blafasel");
3391
], [/* elvis is alive */],
3392
kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3394
CXXFLAGS=$safe_CXXFLAGS
3395
LDFLAGS=$safe_LDFLAGS
3400
if test x$kde_cv_val_gcc_visibility_bug = xno; then
3401
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3406
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3408
AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
3410
AC_MSG_CHECKING([grepping for visibility push/pop in headers])
3412
if test "x$GXX" = "xyes"; then
3416
[GCC visibility push],
3417
[ #include <exception>
3421
kde_stdc_visibility_patched=yes ],
3424
AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for
3425
visibility support. Disabling -fvisibility=hidden])
3427
kde_stdc_visibility_patched=no ])
3431
kde_have_gcc_visibility=no
3432
KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
3434
kde_have_gcc_visibility=yes
3435
dnl the whole toolchain is just a mess, gcc is just too buggy
3436
dnl to handle STL with visibility enabled. Lets reconsider
3437
dnl when gcc 4.2 is out or when things get fixed in the compiler.
3438
dnl Contact mueller@kde.org for details.
3439
AC_ARG_ENABLE(gcc-hidden-visibility,
3440
AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
3441
[kde_have_gcc_visibility=$enableval],
3442
[kde_have_gcc_visibility=no])
3444
AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
3449
safe_CXXFLAGS=$CXXFLAGS
3450
CXXFLAGS="$CXXFLAGS $all_includes"
3454
#include <qglobal.h>
3455
#if Q_EXPORT - 0 != 0
3456
/* if this compiles, then Q_EXPORT is undefined */
3457
/* if Q_EXPORT is nonempty, this will break compilation */
3459
], [/* elvis is alive */],
3460
kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
3462
CXXFLAGS=$safe_CXXFLAGS
3467
if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
3468
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3469
KDE_CHECK_VISIBILITY_GCC_BUG
3470
HAVE_GCC_VISIBILITY=1
3471
AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3477
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3479
[A]M_DEPENDENCIES(CC)
3480
[A]M_DEPENDENCIES(CXX)
3483
dnl just a wrapper to clean up configure.in
3484
AC_DEFUN([KDE_PROG_LIBTOOL],
3486
AC_REQUIRE([AC_CHECK_COMPILERS])
3487
AC_REQUIRE([AC_ENABLE_SHARED])
3488
AC_REQUIRE([AC_ENABLE_STATIC])
3490
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3491
AC_REQUIRE([KDE_CHECK_LIB64])
3499
LIBTOOL_SHELL="/bin/sh ./libtool"
3500
# LIBTOOL="$LIBTOOL --silent"
3501
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3502
AC_SUBST(KDE_PLUGIN)
3504
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3505
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3506
AC_SUBST(KDE_CHECK_PLUGIN)
3508
# we patch configure quite some so we better keep that consistent for incremental runs
3509
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3512
AC_DEFUN([KDE_CHECK_LIB64],
3514
kdelibsuff="$kde_libs_suffix"
3515
if test -z "$kdelibsuff"; then
3518
AC_ARG_ENABLE(libsuffix,
3519
AC_HELP_STRING([--enable-libsuffix],
3520
[/lib directory suffix (64,32,none,auto[=default])]),
3521
kdelibsuff=$enableval)
3523
if test "$kdelibsuff" = "auto"; then
3525
cat > conftest.c << EOF
3531
kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{
3532
s,.*/lib\([[^\/]]*\)/.*,\1,
3538
if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then
3541
if test -z "$kdelibsuff"; then
3542
AC_MSG_RESULT([not using lib directory suffix])
3543
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3545
if test "$libdir" = '${exec_prefix}/lib'; then
3546
libdir="$libdir${kdelibsuff}"
3547
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3549
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3550
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3554
AC_DEFUN([KDE_CHECK_TYPES],
3555
[ AC_CHECK_SIZEOF(int, 4)dnl
3556
AC_CHECK_SIZEOF(short)dnl
3557
AC_CHECK_SIZEOF(long, 4)dnl
3558
AC_CHECK_SIZEOF(char *, 4)dnl
3561
dnl Not used - kept for compat only?
3562
AC_DEFUN([KDE_DO_IT_ALL],
3566
AM_INIT_AUTOMAKE($1, $2)
3567
AM_DISABLE_LIBRARIES
3568
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3575
AC_DEFUN([AC_CHECK_RPATH],
3577
AC_MSG_CHECKING(for rpath)
3578
AC_ARG_ENABLE(rpath,
3579
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3580
USE_RPATH=$enableval, USE_RPATH=yes)
3582
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3584
KDE_RPATH="-R \$(libdir)"
3586
if test "$kde_libraries" != "$libdir"; then
3587
KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3590
if test -n "$qt_libraries"; then
3591
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3593
dnl $x_libraries is set to /usr/lib in case
3594
if test -n "$X_LDFLAGS"; then
3595
X_RPATH="-R \$(x_libraries)"
3596
KDE_RPATH="$KDE_RPATH $X_RPATH"
3598
if test -n "$KDE_EXTRA_RPATH"; then
3599
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3602
AC_SUBST(KDE_EXTRA_RPATH)
3605
AC_MSG_RESULT($USE_RPATH)
3608
dnl Check for the type of the third argument of getsockname
3609
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3611
AC_MSG_CHECKING(for socklen_t)
3612
AC_CACHE_VAL(kde_cv_socklen_t,
3617
#include <sys/types.h>
3618
#include <sys/socket.h>
3622
getpeername(0,0,&len);
3625
kde_cv_socklen_t=yes
3626
kde_cv_socklen_t_equiv=socklen_t
3630
AC_MSG_RESULT($kde_cv_socklen_t)
3631
if test $kde_cv_socklen_t = no; then
3632
AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3633
AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3635
kde_cv_socklen_t_equiv=int
3637
for t in int size_t unsigned long "unsigned long"; do
3639
#include <sys/types.h>
3640
#include <sys/socket.h>
3644
getpeername(0,0,&len);
3647
kde_cv_socklen_t_equiv="$t"
3653
AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3655
AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3656
[type to use in place of socklen_t if not defined])
3657
AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3658
[type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3661
dnl This is a merge of some macros out of the gettext aclocal.m4
3662
dnl since we don't need anything, I took the things we need
3663
dnl the copyright for them is:
3665
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3666
dnl This Makefile.in is free software; the Free Software Foundation
3667
dnl gives unlimited permission to copy and/or distribute it,
3668
dnl with or without modifications, as long as this notice is preserved.
3670
dnl This program is distributed in the hope that it will be useful,
3671
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3672
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3673
dnl PARTICULAR PURPOSE.
3675
dnl for this file it is relicensed under LGPL
3677
AC_DEFUN([AM_KDE_WITH_NLS],
3679
dnl If we use NLS figure out what method
3681
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3682
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3683
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3685
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3686
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3693
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3694
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3696
dnl Test whether we really found GNU xgettext.
3697
if test "$XGETTEXT" != ":"; then
3698
dnl If it is no GNU xgettext we define it as : so that the
3699
dnl Makefiles still can work.
3700
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3704
[found xgettext programs is not GNU xgettext; ignore it])
3712
# Search path for a program which passes the given test.
3713
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3716
# Stephan Kulow: I appended a _KDE against name conflicts
3718
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3719
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3720
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3721
[# Extract the first word of "$2", so it can be a program name with args.
3722
set dummy $2; ac_word=[$]2
3723
AC_MSG_CHECKING([for $ac_word])
3724
AC_CACHE_VAL(ac_cv_path_$1,
3727
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3730
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3731
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3732
test -z "$ac_dir" && ac_dir=.
3733
if test -f $ac_dir/$ac_word; then
3735
ac_cv_path_$1="$ac_dir/$ac_word"
3741
dnl If no 4th arg is given, leave the cache variable unset,
3742
dnl so AC_PATH_PROGS will keep looking.
3743
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3748
if test -n "[$]$1"; then
3749
AC_MSG_RESULT([$]$1)
3757
# Check whether LC_MESSAGES is available in <locale.h>.
3758
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3762
AC_DEFUN([AM_LC_MESSAGES],
3763
[if test $ac_cv_header_locale_h = yes; then
3764
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3765
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3766
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3767
if test $am_cv_val_LC_MESSAGES = yes; then
3768
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3772
dnl From Jim Meyering.
3773
dnl FIXME: migrate into libit.
3775
AC_DEFUN([AM_FUNC_OBSTACK],
3776
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3777
[AC_TRY_LINK([#include "obstack.h"],
3778
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3779
am_cv_func_obstack=yes,
3780
am_cv_func_obstack=no)])
3781
if test $am_cv_func_obstack = yes; then
3782
AC_DEFINE(HAVE_OBSTACK)
3784
LIBOBJS="$LIBOBJS obstack.o"
3788
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3789
dnl FIXME: Migrate into libit
3791
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3792
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3793
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3794
am_cv_lib_error_at_line=yes,
3795
am_cv_lib_error_at_line=no)])
3796
if test $am_cv_lib_error_at_line = no; then
3797
LIBOBJS="$LIBOBJS error.o"
3799
AC_SUBST(LIBOBJS)dnl
3802
# Macro to add for using GNU gettext.
3803
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3806
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3808
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3809
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3810
AC_REQUIRE([AC_PROG_RANLIB])dnl
3811
AC_REQUIRE([AC_HEADER_STDC])dnl
3812
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3813
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3814
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3815
AC_REQUIRE([AC_FUNC_MMAP])dnl
3816
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3817
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3818
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3819
__argz_count __argz_stringify __argz_next])
3821
AC_MSG_CHECKING(for stpcpy)
3822
AC_CACHE_VAL(kde_cv_func_stpcpy,
3824
kde_safe_cxxflags=$CXXFLAGS
3833
stpcpy(buffer, buffer);
3835
kde_cv_func_stpcpy=yes,
3836
kde_cv_func_stpcpy=no)
3838
CXXFLAGS=$kde_safe_cxxflags
3840
AC_MSG_RESULT($kde_cv_func_stpcpy)
3841
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3842
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3847
if test "x$CATOBJEXT" != "x"; then
3848
if test "x$ALL_LINGUAS" = "x"; then
3851
AC_MSG_CHECKING(for catalogs to be installed)
3853
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3854
case "$ALL_LINGUAS" in
3855
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3858
LINGUAS=$NEW_LINGUAS
3859
AC_MSG_RESULT($LINGUAS)
3862
dnl Construct list of names of catalog files to be constructed.
3863
if test -n "$LINGUAS"; then
3864
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3870
AC_DEFUN([AC_HAVE_XPM],
3871
[AC_REQUIRE_CPP()dnl
3872
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3874
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3875
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3877
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3878
xpm_test=$withval, xpm_test="yes")
3879
if test "x$xpm_test" = xno; then
3882
AC_MSG_CHECKING(for XPM)
3883
AC_CACHE_VAL(ac_cv_have_xpm,
3885
ac_save_ldflags="$LDFLAGS"
3886
ac_save_cflags="$CFLAGS"
3887
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3888
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3890
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3892
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3893
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3894
AC_TRY_LINK([#include <X11/xpm.h>],[],
3895
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3896
LDFLAGS="$ac_save_ldflags"
3897
CFLAGS="$ac_save_cflags"
3900
if test "$ac_cv_have_xpm" = no; then
3906
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3907
if test "$XPM_LDFLAGS" = ""; then
3908
XPMLIB='-lXpm $(LIB_X11)'
3910
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3912
if test "$XPM_INCLUDE" = ""; then
3915
XPMINC="-I$XPM_INCLUDE"
3925
AC_DEFUN([AC_HAVE_DPMS],
3926
[AC_REQUIRE_CPP()dnl
3927
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3929
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3930
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3933
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3934
dpms_test=$withval, dpms_test="yes")
3935
if test "x$dpms_test" = xno; then
3938
AC_MSG_CHECKING(for DPMS)
3939
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3940
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3941
AC_CACHE_VAL(ac_cv_have_dpms,
3943
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3945
ac_cv_have_dpms="no"
3947
ac_save_ldflags="$LDFLAGS"
3948
ac_save_cflags="$CFLAGS"
3949
ac_save_libs="$LIBS"
3950
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
3951
LIBS="-lX11 -lXext $LIBSOCKET"
3952
CFLAGS="$CFLAGS $X_INCLUDES"
3953
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3955
#include <X11/Xproto.h>
3957
#include <X11/Xlib.h>
3958
#include <X11/extensions/dpms.h>
3960
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3961
ac_cv_have_dpms="yes", [
3962
LIBS="-lXdpms $LIBS"
3964
#include <X11/Xproto.h>
3966
#include <X11/Xlib.h>
3967
#include <X11/extensions/dpms.h>
3969
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3971
ac_cv_have_dpms="-lXdpms"
3972
],ac_cv_have_dpms="no")
3974
LDFLAGS="$ac_save_ldflags"
3975
CFLAGS="$ac_save_cflags"
3976
LIBS="$ac_save_libs"
3980
if test "$ac_cv_have_dpms" = no; then
3986
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3987
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3990
if test "$DPMS_LDFLAGS" = ""; then
3991
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3993
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3995
if test "$DPMS_INCLUDE" = ""; then
3998
DPMSINC="-I$DPMS_INCLUDE"
4004
ac_save_cflags="$CFLAGS"
4005
CFLAGS="$CFLAGS $X_INCLUDES"
4006
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
4007
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
4008
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
4009
AC_CHECK_DECL(DPMSCapable,
4010
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
4011
[#include <X11/Xlib.h>
4012
#include <X11/extensions/dpms.h>])
4013
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
4014
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
4015
AC_CHECK_DECL(DPMSInfo,
4016
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
4017
[#include <X11/Xlib.h>
4018
#include <X11/extensions/dpms.h>])
4019
CFLAGS="$ac_save_cflags"
4024
AC_DEFUN([AC_HAVE_GL],
4025
[AC_REQUIRE_CPP()dnl
4026
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4028
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
4029
test -z "$GL_INCLUDE" && GL_INCLUDE=
4031
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
4032
gl_test=$withval, gl_test="yes")
4033
if test "x$kde_use_qt_emb" = "xyes"; then
4034
# GL and Qt Embedded is a no-go for now.
4036
elif test "x$gl_test" = xno; then
4039
AC_MSG_CHECKING(for GL)
4040
AC_CACHE_VAL(ac_cv_have_gl,
4044
ac_save_ldflags=$LDFLAGS
4045
ac_save_cxxflags=$CXXFLAGS
4047
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
4048
LIBS="$LIBS -lGL -lGLU"
4049
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
4050
LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
4051
CXXFLAGS="$CFLAGS $X_INCLUDES"
4052
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
4053
AC_TRY_LINK([#include <GL/gl.h>
4056
ac_cv_have_gl="yes", ac_cv_have_gl="no")
4058
LDFLAGS=$ac_save_ldflags
4059
CXXFLAGS=$ac_save_cxxflags
4063
if test "$ac_cv_have_gl" = "no"; then
4069
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
4070
if test "$GL_LDFLAGS" = ""; then
4071
GLLIB='-lGLU -lGL $(LIB_X11)'
4073
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
4075
if test "$GL_INCLUDE" = ""; then
4078
GLINC="-I$GL_INCLUDE"
4080
AC_MSG_RESULT($ac_cv_have_gl)
4089
dnl shadow password and PAM magic - maintained by ossi@kde.org
4091
AC_DEFUN([KDE_PAM], [
4092
AC_REQUIRE([KDE_CHECK_LIBDL])
4096
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
4097
[ if test "x$withval" = "xyes"; then
4100
elif test "x$withval" = "xno"; then
4104
pam_service=$withval
4106
], [ pam_service=kde ])
4110
if test "x$want_pam" != xno; then
4111
AC_CHECK_LIB(pam, pam_start, [
4112
AC_CHECK_HEADER(security/pam_appl.h,
4113
[ pam_header=security/pam_appl.h ],
4114
[ AC_CHECK_HEADER(pam/pam_appl.h,
4115
[ pam_header=pam/pam_appl.h ],
4117
AC_MSG_WARN([PAM detected, but no headers found!
4118
Make sure you have the necessary development packages installed.])
4124
if test -z "$pam_header"; then
4125
if test "x$want_pam" = xyes; then
4126
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
4129
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
4130
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
4133
dnl darwin claims to be something special
4134
if test "$pam_header" = "pam/pam_appl.h"; then
4135
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
4138
dnl test whether struct pam_message is const (Linux) or not (Sun)
4139
AC_MSG_CHECKING(for const pam_message)
4140
AC_EGREP_HEADER([struct pam_message], $pam_header,
4141
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
4142
[AC_MSG_RESULT([const: Linux-type PAM])],
4143
[AC_MSG_RESULT([nonconst: Sun-type PAM])
4144
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
4146
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
4153
dnl DEF_PAM_SERVICE(arg name, full name, define name)
4154
AC_DEFUN([DEF_PAM_SERVICE], [
4156
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
4157
[ if test "x$use_pam" = xyes; then
4158
$3_PAM_SERVICE=$withval
4160
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
4161
You may want to enforce it by using --with-pam.])
4164
[ if test "x$use_pam" = xyes; then
4165
$3_PAM_SERVICE="$pam_service"
4168
if test -n "$$3_PAM_SERVICE"; then
4169
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4170
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4172
AC_SUBST($3_PAM_SERVICE)
4175
AC_DEFUN([KDE_SHADOWPASSWD], [
4176
AC_REQUIRE([KDE_PAM])
4178
AC_CHECK_LIB(shadow, getspent,
4179
[ LIBSHADOW="-lshadow"
4183
AC_CHECK_LIB(gen, getspent,
4187
[ AC_CHECK_FUNC(getspent,
4188
[ ac_use_shadow=yes ],
4189
[ ac_use_shadow=no ])
4195
AC_MSG_CHECKING([for shadow passwords])
4198
AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4199
[ if test "x$withval" != "xno"; then
4205
use_shadow="$ac_use_shadow"
4208
if test "x$use_shadow" = xyes; then
4210
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4217
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4218
dnl this still applies, if we could use it indirectly through pam.
4219
if test "x$use_shadow" = xyes ||
4220
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4222
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4223
SETUIDFLAGS="-m 4755 -o root";;
4225
SETUIDFLAGS="-m 4755";;
4228
AC_SUBST(SETUIDFLAGS)
4232
AC_DEFUN([KDE_PASSWDLIBS], [
4233
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4234
AC_REQUIRE([KDE_PAM])
4235
AC_REQUIRE([KDE_SHADOWPASSWD])
4237
if test "x$use_pam" = "xyes"; then
4238
PASSWDLIBS="$PAMLIBS"
4240
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4243
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4244
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
4245
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4246
dnl may need to read /etc/master.passwd).
4249
SETUIDFLAGS="-m 4755 -o root"
4255
AC_SUBST(PASSWDLIBS)
4258
AC_DEFUN([KDE_CHECK_LIBDL],
4260
AC_CHECK_LIB(dl, dlopen, [
4262
ac_cv_have_dlfcn=yes
4265
AC_CHECK_LIB(dld, shl_unload, [
4267
ac_cv_have_shload=yes
4273
AC_DEFUN([KDE_CHECK_DLOPEN],
4276
AC_CHECK_HEADERS(dlfcn.h dl.h)
4277
if test "$ac_cv_header_dlfcn_h" = "no"; then
4281
if test "$ac_cv_header_dl_h" = "no"; then
4282
ac_cv_have_shload=no
4285
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4287
AC_ARG_ENABLE(dlopen,
4288
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4289
enable_dlopen=$enableval,
4292
# override the user's opinion, if we know it better ;)
4293
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4297
if test "$ac_cv_have_dlfcn" = "yes"; then
4298
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4301
if test "$ac_cv_have_shload" = "yes"; then
4302
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4305
if test "$enable_dlopen" = no ; then
4306
test -n "$1" && eval $1
4308
test -n "$2" && eval $2
4313
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4315
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4317
AC_MSG_CHECKING([dynamic loading])
4318
eval "`egrep '^build_libtool_libs=' libtool`"
4319
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4321
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4325
AC_MSG_RESULT($dynamic_loading)
4326
if test "$dynamic_loading" = "yes"; then
4333
AC_DEFUN([KDE_ADD_INCLUDES],
4335
if test -z "$1"; then
4336
test_include="Pix.h"
4341
AC_MSG_CHECKING([for libg++ ($test_include)])
4343
AC_CACHE_VAL(kde_cv_libgpp_includes,
4345
kde_cv_libgpp_includes=no
4351
/usr/unsupported/include \
4356
if test -r "$ac_dir/$test_include"; then
4357
kde_cv_libgpp_includes=$ac_dir
4363
AC_MSG_RESULT($kde_cv_libgpp_includes)
4364
if test "$kde_cv_libgpp_includes" != "no"; then
4365
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4370
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4372
dnl This code is here specifically to handle the
4373
dnl various flavors of threading library on FreeBSD
4374
dnl 4-, 5-, and 6-, and the (weird) rules around it.
4375
dnl There may be an environment PTHREAD_LIBS that
4376
dnl specifies what to use; otherwise, search for it.
4377
dnl -pthread is special cased and unsets LIBPTHREAD
4381
if test -n "$PTHREAD_LIBS"; then
4382
if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4383
LIBPTHREAD="PTHREAD"
4385
PTHREAD_LIBS_save="$PTHREAD_LIBS"
4386
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4387
AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4388
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4389
LIBPTHREAD="$PTHREAD_LIBS_save"])
4390
PTHREAD_LIBS="$PTHREAD_LIBS_save"
4394
dnl Is this test really needed, in the face of the Tru64 test below?
4395
if test -z "$LIBPTHREAD"; then
4396
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4399
dnl This is a special Tru64 check, see BR 76171 issue #18.
4400
if test -z "$LIBPTHREAD" ; then
4401
AC_MSG_CHECKING([for pthread_create in -lpthread])
4403
LIBS="$LIBS -lpthread"
4404
AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4406
LIBPTHREAD="-lpthread"],[
4411
dnl Un-special-case for FreeBSD.
4412
if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4416
AC_SUBST(LIBPTHREAD)
4419
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4422
if test -z "$LIBPTHREAD"; then
4423
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4426
AH_VERBATIM(__svr_define, [
4427
#if defined(__SVR4) && !defined(__svr4__)
4433
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4434
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4437
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4440
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4441
LIBPTHREAD="$LIBPTHREAD -lc_r"
4443
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4444
if test "$CXX" = "KCC"; then
4445
CXXFLAGS="$CXXFLAGS --thread_safe"
4446
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4452
AC_SUBST(USE_THREADS)
4453
AC_SUBST(LIBPTHREAD)
4456
AC_DEFUN([KDE_CHECK_THREADING],
4458
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4459
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4460
dnl default is yes if libpthread is found and no if no libpthread is available
4461
if test -z "$LIBPTHREAD"; then
4462
if test -z "$USE_THREADS"; then
4463
kde_check_threading_default=no
4465
kde_check_threading_default=yes
4468
kde_check_threading_default=yes
4470
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4471
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4472
if test "x$kde_use_threading" = "xyes"; then
4473
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4477
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4479
if test "$kde_python_link_found" = no; then
4481
if test "$1" = normal; then
4482
AC_MSG_CHECKING(if a Python application links)
4484
AC_MSG_CHECKING(if Python depends on $2)
4487
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4489
kde_save_cflags="$CFLAGS"
4490
CFLAGS="$CFLAGS $PYTHONINC"
4491
kde_save_libs="$LIBS"
4492
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4493
kde_save_ldflags="$LDFLAGS"
4494
LDFLAGS="$LDFLAGS $PYTHONLIB"
4500
PySys_SetArgv(1, 0);
4502
[kde_cv_try_link_python_$1=yes],
4503
[kde_cv_try_link_python_$1=no]
4505
CFLAGS="$kde_save_cflags"
4506
LIBS="$kde_save_libs"
4507
LDFLAGS="$kde_save_ldflags"
4510
if test "$kde_cv_try_link_python_$1" = "yes"; then
4512
kde_python_link_found=yes
4513
if test ! "$1" = normal; then
4514
LIBPYTHON="$LIBPYTHON $2"
4526
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4528
AC_MSG_CHECKING([for Python directory])
4530
AC_CACHE_VAL(kde_cv_pythondir,
4532
if test -z "$PYTHONDIR"; then
4533
kde_cv_pythondir=/usr/local
4535
kde_cv_pythondir="$PYTHONDIR"
4539
AC_ARG_WITH(pythondir,
4540
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4542
ac_python_dir=$withval
4543
], ac_python_dir=$kde_cv_pythondir
4546
AC_MSG_RESULT($ac_python_dir)
4549
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4551
AC_REQUIRE([KDE_CHECK_LIBDL])
4552
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4553
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4555
if test -z "$1"; then
4561
AC_MSG_CHECKING([for Python$version])
4563
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4564
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4565
if test ! -r $python_incdir/Python.h; then
4566
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4567
python_incdir=$python_incdir/python$version
4568
if test ! -r $python_incdir/Python.h; then
4573
PYTHONINC=-I$python_incdir
4575
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4576
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4577
if test ! -r $python_libdir/libpython$version.so; then
4578
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4579
if test ! -r $python_libdir/libpython$version.a; then
4580
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4581
python_libdir=$python_libdir/python$version/config
4582
if test ! -r $python_libdir/libpython$version.a; then
4588
PYTHONLIB=-L$python_libdir
4589
kde_orig_LIBPYTHON=$LIBPYTHON
4590
if test -z "$LIBPYTHON"; then
4591
LIBPYTHON=-lpython$version
4594
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4595
python_moddir=$python_moddir/python$version
4596
if test ! -r $python_moddir/copy.py; then
4600
PYTHONMODDIR=$python_moddir
4602
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4604
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4605
LIBPYTHON=$kde_orig_LIBPYTHON
4606
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4607
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4610
dnl Note: this test is very weak
4611
kde_python_link_found=no
4612
KDE_TRY_LINK_PYTHON(normal)
4613
KDE_TRY_LINK_PYTHON(m, -lm)
4614
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4615
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4616
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4617
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4618
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4619
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4620
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4621
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4622
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4623
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4624
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4625
[AC_MSG_WARN([it seems, Python depends on another library.
4626
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4627
and contact the authors to let them know about this problem])
4630
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4634
AC_SUBST(PYTHONMODDIR)
4635
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4641
AC_DEFUN([KDE_CHECK_PYTHON],
4643
KDE_CHECK_PYTHON_INTERN("2.4",
4644
[KDE_CHECK_PYTHON_INTERN("2.3",
4645
[KDE_CHECK_PYTHON_INTERN("2.2",
4646
[KDE_CHECK_PYTHON_INTERN("2.1",
4647
[KDE_CHECK_PYTHON_INTERN("2.0",
4648
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4655
AC_DEFUN([KDE_CHECK_STL],
4659
ac_save_CXXFLAGS="$CXXFLAGS"
4660
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4662
AC_MSG_CHECKING([if C++ programs can be compiled])
4663
AC_CACHE_VAL(kde_cv_stl_works,
4667
using namespace std;
4669
string astring="Hallo Welt.";
4670
astring.erase(0, 6); // now astring is "Welt"
4672
], kde_cv_stl_works=yes,
4673
kde_cv_stl_works=no)
4676
AC_MSG_RESULT($kde_cv_stl_works)
4678
if test "$kde_cv_stl_works" = "yes"; then
4680
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4682
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4683
Check config.log for details - if you're using a Linux distribution you might miss
4684
a package named similar to libstdc++-dev.])
4687
CXXFLAGS="$ac_save_CXXFLAGS"
4691
AC_DEFUN([AC_FIND_QIMGIO],
4692
[AC_REQUIRE([AC_FIND_JPEG])
4693
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4694
AC_MSG_CHECKING([for qimgio])
4695
AC_CACHE_VAL(ac_cv_lib_qimgio,
4699
ac_save_LIBS="$LIBS"
4700
ac_save_CXXFLAGS="$CXXFLAGS"
4701
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4702
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4705
#include <qimageio.h>
4706
#include <qstring.h>
4708
QString t = "hallo";
4713
ac_cv_lib_qimgio=yes,
4714
ac_cv_lib_qimgio=no,
4715
ac_cv_lib_qimgio=no)
4716
LIBS="$ac_save_LIBS"
4717
CXXFLAGS="$ac_save_CXXFLAGS"
4720
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4721
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4723
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4726
AC_MSG_RESULT(not found)
4730
AC_DEFUN([AM_DISABLE_LIBRARIES],
4732
AC_PROVIDE([AM_ENABLE_STATIC])
4733
AC_PROVIDE([AM_ENABLE_SHARED])
4739
AC_DEFUN([AC_CHECK_UTMP_FILE],
4741
AC_MSG_CHECKING([for utmp file])
4743
AC_CACHE_VAL(kde_cv_utmp_file,
4754
if test -r "$ac_file"; then
4755
kde_cv_utmp_file=$ac_file
4761
if test "$kde_cv_utmp_file" != "no"; then
4762
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4764
AC_MSG_RESULT($kde_cv_utmp_file)
4767
AC_MSG_RESULT([non found])
4772
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4775
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4778
if test ! -s $srcdir/subdirs; then
4779
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4780
files=`cd $srcdir && ls -1`
4781
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4783
echo $i >> $srcdir/subdirs
4788
if test -s $srcdir/inst-apps; then
4789
ac_topsubdirs="`cat $srcdir/inst-apps`"
4790
elif test -s $srcdir/subdirs; then
4791
ac_topsubdirs="`cat $srcdir/subdirs`"
4794
for i in $ac_topsubdirs; do
4795
AC_MSG_CHECKING([if $i should be compiled])
4796
if test -d $srcdir/$i; then
4798
for j in $DO_NOT_COMPILE; do
4799
if test $i = $j; then
4806
AC_MSG_RESULT($install_it)
4807
vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4808
if test $install_it = "yes"; then
4809
TOPSUBDIRS="$TOPSUBDIRS $i"
4810
eval "$vari""_SUBDIR_included=yes"
4812
eval "$vari""_SUBDIR_included=no"
4816
AC_SUBST(TOPSUBDIRS)
4819
AC_DEFUN([KDE_CHECK_NAMESPACES],
4821
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4835
int Foo::Bar::i = 1;
4838
AC_DEFINE(HAVE_NAMESPACES)
4845
dnl ------------------------------------------------------------------------
4846
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4847
dnl ------------------------------------------------------------------------
4849
AC_DEFUN([AC_CHECK_S_ISSOCK],
4851
AC_MSG_CHECKING(for S_ISSOCK)
4852
AC_CACHE_VAL(ac_cv_have_s_issock,
4856
#include <sys/stat.h>
4860
int b = S_ISSOCK( buff.st_mode );
4862
ac_cv_have_s_issock=yes,
4863
ac_cv_have_s_issock=no)
4865
AC_MSG_RESULT($ac_cv_have_s_issock)
4866
if test "$ac_cv_have_s_issock" = "yes"; then
4867
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4870
AH_VERBATIM(_ISSOCK,
4872
#ifndef HAVE_S_ISSOCK
4873
#define HAVE_S_ISSOCK
4874
#define S_ISSOCK(mode) (1==0)
4880
dnl ------------------------------------------------------------------------
4881
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4882
dnl ------------------------------------------------------------------------
4884
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4886
AC_MSG_CHECKING(for MAXPATHLEN)
4887
AC_CACHE_VAL(ac_cv_maxpathlen,
4889
cat > conftest.$ac_ext <<EOF
4891
# include <stdlib.h>
4894
#include <sys/param.h>
4896
#define MAXPATHLEN 1024
4899
KDE_HELLO MAXPATHLEN
4903
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4905
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4906
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4908
ac_cv_maxpathlen=1024
4914
AC_MSG_RESULT($ac_cv_maxpathlen)
4915
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4918
AC_DEFUN([KDE_CHECK_HEADER],
4920
kde_safe_cppflags=$CPPFLAGS
4921
CPPFLAGS="$CPPFLAGS $all_includes"
4924
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4926
CPPFLAGS=$kde_safe_cppflags
4929
AC_DEFUN([KDE_CHECK_HEADERS],
4931
AH_CHECK_HEADERS([$1])
4933
kde_safe_cppflags=$CPPFLAGS
4934
CPPFLAGS="$CPPFLAGS $all_includes"
4936
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4937
CPPFLAGS=$kde_safe_cppflags
4941
AC_DEFUN([KDE_FAST_CONFIGURE],
4943
dnl makes configure fast (needs perl)
4944
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4945
with_fast_perl=$enableval, with_fast_perl=yes)
4948
AC_DEFUN([KDE_CONF_FILES],
4951
if test -f $srcdir/configure.files ; then
4952
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4955
if test -n "$val" ; then
4957
CONF_FILES="$CONF_FILES $i"
4960
AC_SUBST(CONF_FILES)
4963
dnl This sets the prefix, for arts and kdelibs
4964
dnl Do NOT use in any other module.
4965
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4966
AC_DEFUN([KDE_SET_PREFIX_CORE],
4969
dnl make $KDEDIR the default for the installation
4970
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4972
if test "x$prefix" = "xNONE"; then
4973
prefix=$ac_default_prefix
4974
ac_configure_args="$ac_configure_args --prefix=$prefix"
4976
# And delete superfluous '/' to make compares easier
4977
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4978
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4980
kde_libs_prefix='$(prefix)'
4981
kde_libs_htmldir='$(kde_htmldir)'
4982
AC_SUBST(kde_libs_prefix)
4983
AC_SUBST(kde_libs_htmldir)
4989
AC_DEFUN([KDE_SET_PREFIX],
4992
dnl We can't give real code to that macro, only a value.
4993
dnl It only matters for --help, since we set the prefix in this function anyway.
4994
AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4996
KDE_SET_DEFAULT_BINDIRS
4997
if test "x$prefix" = "xNONE"; then
4998
dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4999
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5001
dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
5002
kde_save_PATH="$PATH"
5003
PATH="$exec_prefix/bin:$prefix/bin:$PATH"
5004
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
5005
PATH="$kde_save_PATH"
5008
kde_libs_prefix=`$KDECONFIG --prefix`
5009
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
5010
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
5011
This means it has been moved since you installed it.
5012
This won't work. Please recompile kdelibs for the new prefix.
5015
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
5016
kde_libs_suffix=`$KDECONFIG --libsuffix` || kde_libs_suffix=auto
5018
AC_MSG_CHECKING([where to install])
5019
if test "x$prefix" = "xNONE"; then
5020
prefix=$kde_libs_prefix
5021
AC_MSG_RESULT([$prefix (as returned by kde-config)])
5023
dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
5024
given_prefix=$prefix
5025
AC_MSG_RESULT([$prefix (as requested)])
5028
# And delete superfluous '/' to make compares easier
5029
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5030
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5031
given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
5034
AC_SUBST(kde_libs_prefix)
5035
AC_SUBST(kde_libs_htmldir)
5041
pushdef([AC_PROG_INSTALL],
5043
dnl our own version, testing for a -p flag
5044
popdef([AC_PROG_INSTALL])
5045
dnl as AC_PROG_INSTALL works as it works we first have
5046
dnl to save if the user didn't specify INSTALL, as the
5047
dnl autoconf one overwrites INSTALL and we have no chance to find
5049
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
5050
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
5051
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
5054
if test -z "$kde_save_INSTALL_given" ; then
5055
# OK, user hasn't given any INSTALL, autoconf found one for us
5056
# now we test, if it supports the -p flag
5057
AC_MSG_CHECKING(for -p flag to install)
5058
rm -f confinst.$$.* > /dev/null 2>&1
5059
echo "Testtest" > confinst.$$.orig
5061
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
5062
if test -f confinst.$$.new ; then
5063
# OK, -p seems to do no harm to install
5064
INSTALL="${INSTALL} -p"
5069
AC_MSG_RESULT($ac_res)
5071
dnl the following tries to resolve some signs and wonders coming up
5072
dnl with different autoconf/automake versions
5074
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
5075
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
5076
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
5077
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
5078
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
5079
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
5080
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
5081
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
5082
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
5083
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
5084
dnl automake (due to broken Makefile.am or whatever) to install programs,
5085
dnl and so does not see the -s flag in automake > 1.4
5086
dnl to clean up that mess we:
5087
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
5088
dnl which cleans KDE's program with automake > 1.4;
5089
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
5090
dnl with automake<=1.4
5091
dnl note that dues to this sometimes two '-s' flags are used (if KDE
5092
dnl properly uses install-@DIR@PROGRAMS, but I don't care
5094
dnl And to all this comes, that I even can't write in comments variable
5095
dnl names used by automake, because it is so stupid to think I wanted to
5096
dnl _use_ them, therefor I have written A_M_... instead of AM_
5097
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
5099
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
5100
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
5102
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
5103
INSTALL_SCRIPT='${INSTALL}'
5107
AC_DEFUN([KDE_LANG_CPLUSPLUS],
5109
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
5110
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
5113
pushdef([AC_LANG_CPLUSPLUS],
5114
[popdef([AC_LANG_CPLUSPLUS])
5118
AC_DEFUN([KDE_CHECK_LONG_LONG],
5120
AC_MSG_CHECKING(for long long)
5121
AC_CACHE_VAL(kde_cv_c_long_long,
5129
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
5132
AC_MSG_RESULT($kde_cv_c_long_long)
5133
if test "$kde_cv_c_long_long" = yes; then
5134
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
5138
AC_DEFUN([KDE_CHECK_LIB],
5140
kde_save_LDFLAGS="$LDFLAGS"
5141
dnl AC_CHECK_LIB modifies LIBS, so save it here
5142
kde_save_LIBS="$LIBS"
5143
LDFLAGS="$LDFLAGS $all_libraries"
5145
aix*) LDFLAGS="-brtl $LDFLAGS"
5146
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
5149
AC_CHECK_LIB($1, $2, $3, $4, $5)
5150
LDFLAGS="$kde_save_LDFLAGS"
5151
LIBS="$kde_save_LIBS"
5154
AC_DEFUN([KDE_JAVA_PREFIX],
5157
base=`basename "$1"`
5158
list=`ls -1 $dir 2> /dev/null`
5159
for entry in $list; do
5160
if test -d $dir/$entry/bin; then
5163
javadirs="$javadirs $dir/$entry/bin"
5166
elif test -d $dir/$entry/jre/bin; then
5169
javadirs="$javadirs $dir/$entry/jre/bin"
5176
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5177
AC_DEFUN([KDE_CHECK_JAVA_DIR],
5181
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5182
[ ac_java_dir=$withval
5186
AC_MSG_CHECKING([for Java])
5188
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5189
if test "x$ac_java_dir" = "xno"; then
5191
kde_java_includedir=no
5192
kde_java_libjvmdir=no
5193
kde_java_libgcjdir=no
5194
kde_java_libhpidir=no
5196
if test "x$ac_java_dir" = "x"; then
5199
dnl No option set -> collect list of candidate paths
5200
if test -n "$JAVA_HOME"; then
5201
KDE_JAVA_PREFIX($JAVA_HOME)
5203
KDE_JAVA_PREFIX(/usr/j2se)
5204
KDE_JAVA_PREFIX(/usr/lib/j2se)
5205
KDE_JAVA_PREFIX(/usr/j*dk*)
5206
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5207
KDE_JAVA_PREFIX(/opt/j*sdk*)
5208
KDE_JAVA_PREFIX(/usr/lib/java*)
5209
KDE_JAVA_PREFIX(/usr/java*)
5210
KDE_JAVA_PREFIX(/usr/java/j*dk*)
5211
KDE_JAVA_PREFIX(/usr/java/j*re*)
5212
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5213
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5214
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5215
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5216
KDE_JAVA_PREFIX(/opt/java*)
5221
for dir in $PATH; do
5222
if test -d "$dir"; then
5223
javadirs="$javadirs $dir"
5229
dnl Now javadirs contains a list of paths that exist, all ending with bin/
5230
for dir in $javadirs; do
5231
dnl Check for the java executable
5232
if test -x "$dir/java"; then
5233
dnl And also check for a libjvm.so somewhere under there
5234
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5235
if test "$dir" != "/usr/bin"; then
5236
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5237
if test ! -f $libjvmdir/libjvm.so; then continue; fi
5238
jredirs="$jredirs $dir"
5243
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5247
for dir in $jredirs; do
5249
kde_java_bindir=$dir
5250
if test -x "$dir/javac"; then
5256
if test -n "$JAVAC"; then
5257
dnl this substitution might not work - well, we test for jni.h below
5258
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5260
kde_java_includedir=no
5263
dnl config option set
5264
kde_java_bindir=$ac_java_dir/bin
5265
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5266
kde_java_includedir=no
5268
kde_java_includedir=$ac_java_dir/include
5273
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5274
if test "x$kde_java_bindir" != "xno"; then
5276
dnl Look for libjvm.so
5277
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5278
dnl Look for libgcj.so
5279
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5280
dnl Look for libhpi.so and avoid green threads
5281
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5283
dnl Now check everything's fine under there
5284
dnl the include dir is our flag for having the JDK
5285
if test -d "$kde_java_includedir"; then
5286
if test ! -x "$kde_java_bindir/javac"; then
5287
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5289
if test ! -x "$kde_java_bindir/javah"; then
5290
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5292
if test ! -x "$kde_java_bindir/jar"; then
5293
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5295
if test ! -r "$kde_java_includedir/jni.h"; then
5296
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5299
jni_includes="-I$kde_java_includedir"
5300
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5301
dnl and under linux here..
5303
dnl not needed for gcj
5305
if test "x$kde_java_libgcjdir" = "x"; then
5306
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5307
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5308
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5316
if test "x$kde_java_libgcjdir" = "x"; then
5317
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5318
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5321
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5322
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5326
if test ! -x "$kde_java_bindir/java"; then
5327
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5330
dnl not needed for gcj compile
5332
if test "x$kde_java_libgcjdir" = "x"; then
5333
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5334
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5338
if test -n "$jni_includes"; then
5339
dnl Check for JNI version
5342
ac_cxxflags_safe="$CXXFLAGS"
5343
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5349
#ifndef JNI_VERSION_1_2
5352
],[ kde_jni_works=yes ],
5353
[ kde_jni_works=no ])
5355
if test $kde_jni_works = no; then
5356
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5357
You need to have Java Development Kit (JDK) version 1.2.
5359
Use --with-java to specify another location.
5360
Use --without-java to configure without java support.
5361
Or download a newer JDK and try again.
5362
See e.g. http://java.sun.com/products/jdk/1.2 ])
5365
CXXFLAGS="$ac_cxxflags_safe"
5368
dnl All tests ok, inform and subst the variables
5370
JAVAC=$kde_java_bindir/javac
5371
JAVAH=$kde_java_bindir/javah
5372
JAR=$kde_java_bindir/jar
5373
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5374
if test "x$kde_java_libgcjdir" = "x"; then
5375
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5377
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5379
AC_MSG_RESULT([java JDK in $kde_java_bindir])
5382
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5383
AC_MSG_RESULT([java JRE in $kde_java_bindir])
5385
elif test -d "/Library/Java/Home"; then
5386
kde_java_bindir="/Library/Java/Home/bin"
5387
jni_includes="-I/Library/Java/Home/include"
5389
JAVAC=$kde_java_bindir/javac
5390
JAVAH=$kde_java_bindir/javah
5391
JAR=$kde_java_bindir/jar
5392
JVMLIBS="-Wl,-framework,JavaVM"
5394
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5395
AC_MSG_RESULT([Apple Java Framework])
5397
AC_MSG_RESULT([none found])
5404
AC_SUBST(jni_includes)
5406
# for backward compat
5407
kde_cv_java_includedir=$kde_java_includedir
5408
kde_cv_java_bindir=$kde_java_bindir
5411
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5412
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5413
dnl big packages, m4_foreach is dog-slow. So use our own version of
5414
dnl it. (matz@kde.org)
5415
m4_define([mm_foreach],
5416
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5417
m4_define([mm_car], [[$1]])
5418
m4_define([mm_car2], [[$@]])
5419
m4_define([_mm_foreach],
5420
[m4_if(m4_quote($2), [], [],
5421
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5422
mm_car2(m4_shift($2)),
5424
m4_define([AC_FOREACH],
5425
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5427
AC_DEFUN([KDE_NEED_FLEX],
5430
LIBS="$LIBS $USER_LDFLAGS"
5433
if test -z "$LEXLIB"; then
5434
AC_MSG_ERROR([You need to have flex installed.])
5439
AC_DEFUN([AC_PATH_QTOPIA],
5441
dnl TODO: use AC_CACHE_VAL
5443
if test -z "$1"; then
5448
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5449
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5450
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5453
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5454
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5456
AC_REQUIRE([AC_PATH_QT])
5458
AC_MSG_CHECKING([for Qtopia])
5461
AC_SUBST(LIB_QTOPIA)
5463
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5467
AC_ARG_WITH(qtopia-dir,
5468
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5469
[ ac_qtopia_incdir="$withval"/include] )
5472
for dir in $kde_qtopia_dirs; do
5473
qtopia_incdirs="$qtopia_incdirs $dir/include"
5476
if test ! "$ac_qtopia_incdir" = "NO"; then
5477
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5481
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5482
ac_qtopia_incdir="$qtopia_incdir"
5484
if test -z "$qtopia_incdir"; then
5485
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5488
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5489
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5490
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5492
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5493
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5494
if test "$qtopia_ver" -lt "$qtopia_minver"; then
5495
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5502
ac_cxxflags_safe="$CXXFLAGS"
5503
ac_ldflags_safe="$LDFLAGS"
5504
ac_libs_safe="$LIBS"
5506
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5507
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5508
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5510
cat > conftest.$ac_ext <<EOF
5511
#include "confdefs.h"
5512
#include <qpe/qpeapplication.h>
5513
#include <qpe/version.h>
5515
int main( int argc, char **argv )
5517
QPEApplication app( argc, argv );
5522
if AC_TRY_EVAL(ac_link) && test -s conftest; then
5526
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5527
the end of config.log])
5530
CXXFLAGS="$ac_cxxflags_safe"
5531
LDFLAGS="$ac_ldflags_safe"
5532
LIBS="$ac_libs_safe"
5536
QTOPIA_INCLUDES="-I$qtopia_incdir"
5537
AC_SUBST(QTOPIA_INCLUDES)
5539
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5543
AC_DEFUN([KDE_INIT_DOXYGEN],
5545
AC_MSG_CHECKING([for Qt docs])
5547
if test "${with_qt_dir+set}" = set; then
5548
kde_qtdir="$with_qt_dir"
5551
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)
5552
AC_MSG_RESULT($QTDOCDIR)
5556
KDE_FIND_PATH(dot, DOT, [], [])
5557
if test -n "$DOT"; then
5562
AC_SUBST(KDE_HAVE_DOT)
5563
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5566
DOXYGEN_PROJECT_NAME="$1"
5567
DOXYGEN_PROJECT_NUMBER="$2"
5568
AC_SUBST(DOXYGEN_PROJECT_NAME)
5569
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5572
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5575
AC_SUBST(KDE_HAS_DOXYGEN)
5580
AC_DEFUN([AC_FIND_BZIP2],
5582
AC_MSG_CHECKING([for bzDecompress in libbz2])
5583
AC_CACHE_VAL(ac_cv_lib_bzip2,
5587
kde_save_LIBS="$LIBS"
5588
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5589
kde_save_CXXFLAGS="$CXXFLAGS"
5590
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5596
[ bz_stream s; (void) bzDecompress(&s); ],
5597
eval "ac_cv_lib_bzip2='-lbz2'",
5598
eval "ac_cv_lib_bzip2=no")
5599
LIBS="$kde_save_LIBS"
5600
CXXFLAGS="$kde_save_CXXFLAGS"
5603
AC_MSG_RESULT($ac_cv_lib_bzip2)
5605
if test ! "$ac_cv_lib_bzip2" = no; then
5608
LIBBZ2="$ac_cv_lib_bzip2"
5615
KDE_CHECK_COMPILER_FLAG(shared, [
5616
ld_shared_flag="-shared"
5618
KDE_CHECK_COMPILER_FLAG(fPIC, [
5619
cxx_shared_flag="-fPIC"
5622
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5623
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5627
kde_save_LIBS="$LIBS"
5628
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5629
kde_save_CXXFLAGS="$CXXFLAGS"
5630
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5637
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5638
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5639
eval "ac_cv_lib_bzip2_prefix=no")
5640
LIBS="$kde_save_LIBS"
5641
CXXFLAGS="$kde_save_CXXFLAGS"
5645
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5647
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5650
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5653
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5654
dnl else, we just ignore this
5658
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5661
dnl ------------------------------------------------------------------------
5662
dnl Try to find the SSL headers and libraries.
5663
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5664
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5665
dnl ------------------------------------------------------------------------
5667
AC_DEFUN([KDE_CHECK_SSL],
5669
LIBSSL="-lssl -lcrypto"
5670
AC_REQUIRE([KDE_CHECK_LIB64])
5672
ac_ssl_includes=NO ac_ssl_libraries=NO
5675
AC_ARG_WITH(ssl-dir,
5676
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5677
[ ac_ssl_includes="$withval"/include
5678
ac_ssl_libraries="$withval"/lib$kdelibsuff
5683
AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5684
[want_ssl=$withval])
5686
if test $want_ssl = yes; then
5688
AC_MSG_CHECKING(for OpenSSL)
5690
AC_CACHE_VAL(ac_cv_have_ssl,
5691
[#try to guess OpenSSL locations
5693
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5694
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5695
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5696
ac_ssl_includes="$ssl_incdir"
5698
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"
5699
if test ! "$ac_ssl_libraries" = "NO"; then
5700
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5705
for dir in $ssl_libdirs; do
5706
try="ls -1 $dir/libssl*"
5707
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5710
ac_ssl_libraries="$ssl_libdir"
5712
ac_ldflags_safe="$LDFLAGS"
5713
ac_libs_safe="$LIBS"
5715
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5716
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5718
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5724
LDFLAGS="$ac_ldflags_safe"
5725
LIBS="$ac_libs_safe"
5727
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5735
eval "$ac_cv_have_ssl"
5737
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5739
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5740
AC_MSG_RESULT($ac_ssl_rsaref)
5742
AC_MSG_CHECKING([for easter eggs])
5743
AC_MSG_RESULT([none found])
5749
if test "$have_ssl" = yes; then
5750
AC_MSG_CHECKING(for OpenSSL version)
5751
dnl Check for SSL version
5752
AC_CACHE_VAL(ac_cv_ssl_version,
5755
cat >conftest.$ac_ext <<EOF
5756
#include <openssl/opensslv.h>
5760
#ifndef OPENSSL_VERSION_NUMBER
5761
printf("ssl_version=\\"error\\"\n");
5763
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5764
printf("ssl_version=\\"old\\"\n");
5766
printf("ssl_version=\\"ok\\"\n");
5772
ac_save_CPPFLAGS=$CPPFLAGS
5773
if test "$ac_ssl_includes" != "/usr/include"; then
5774
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5777
if AC_TRY_EVAL(ac_link); then
5779
if eval `./conftest 2>&5`; then
5780
if test $ssl_version = error; then
5781
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5783
if test $ssl_version = old; then
5784
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5788
ac_cv_ssl_version="ssl_version=$ssl_version"
5790
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5791
Check config.log, and if you can't figure it out, send a mail to
5792
David Faure <faure@kde.org>, attaching your config.log])
5796
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5797
Check config.log, and if you can't figure it out, send a mail to
5798
David Faure <faure@kde.org>, attaching your config.log])
5800
CPPFLAGS=$ac_save_CPPFLAGS
5804
eval "$ac_cv_ssl_version"
5805
AC_MSG_RESULT($ssl_version)
5808
if test "$have_ssl" != yes; then
5811
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5812
ac_cv_have_ssl="have_ssl=yes \
5813
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5816
ssl_libraries="$ac_ssl_libraries"
5817
ssl_includes="$ac_ssl_includes"
5819
if test "$ac_ssl_rsaref" = yes; then
5820
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5823
if test $ssl_version = "old"; then
5824
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5830
if test "$ssl_includes" = "/usr/include"; then
5831
if test -f /usr/kerberos/include/krb5.h; then
5832
SSL_INCLUDES="-I/usr/kerberos/include"
5834
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5835
SSL_INCLUDES="-I$ssl_includes"
5838
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5841
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5844
AC_SUBST(SSL_INCLUDES)
5845
AC_SUBST(SSL_LDFLAGS)
5849
AC_DEFUN([KDE_CHECK_STRLCPY],
5851
AC_REQUIRE([AC_CHECK_STRLCAT])
5852
AC_REQUIRE([AC_CHECK_STRLCPY])
5853
AC_CHECK_SIZEOF(size_t)
5854
AC_CHECK_SIZEOF(unsigned long)
5856
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5858
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5861
],AC_MSG_RESULT([yes]),[
5864
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5865
does not apply. Please mail kde-devel@kde.org with a description of your system!
5870
AC_DEFUN([KDE_CHECK_BINUTILS],
5872
AC_MSG_CHECKING([if ld supports unversioned version maps])
5874
kde_save_LDFLAGS="$LDFLAGS"
5875
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5876
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5877
AC_TRY_LINK([int foo;],
5879
#ifdef __INTEL_COMPILER
5880
icc apparently does not support libtools version-info and version-script
5881
at the same time. Dunno where the bug is, but until somebody figured out,
5882
better disable the optional version scripts.
5886
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5887
LDFLAGS="$kde_save_LDFLAGS"
5889
AM_CONDITIONAL(include_VERSION_SCRIPT,
5890
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5892
AC_MSG_RESULT($kde_supports_versionmaps)
5895
AC_DEFUN([AM_PROG_OBJC],[
5896
AC_CHECK_PROGS(OBJC, gcc, gcc)
5897
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5898
if test "x${OBJCFLAGS-unset}" = xunset; then
5902
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5905
AC_DEFUN([KDE_CHECK_PERL],
5907
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5908
AC_MSG_ERROR([No Perl found in your $PATH.
5909
We need perl to generate some code.])
5914
AC_DEFUN([KDE_CHECK_LARGEFILE],
5917
if test "$ac_cv_sys_file_offset_bits" != no; then
5918
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5921
if test "x$ac_cv_sys_large_files" != "xno"; then
5922
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5927
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5928
dnl which allows to search for libs that get installed into the KDE prefix.
5930
dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5931
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5932
dnl also defines KSTUFF_PKG_ERRORS on error
5933
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5935
PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5936
if test "$prefix" != "$kde_libs_prefix"; then
5937
PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
5939
export PKG_CONFIG_PATH
5940
PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
5944
dnl Check for PIE support in the compiler and linker
5945
AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
5947
AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
5951
safe_CXXFLAGS=$CXXFLAGS
5952
safe_LDFLAGS=$LDFLAGS
5953
CXXFLAGS="$CXXFLAGS -fPIE"
5954
LDFLAGS="$LDFLAGS -pie"
5956
AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
5958
CXXFLAGS=$safe_CXXFLAGS
5959
LDFLAGS=$safe_LDFLAGS
5963
AC_MSG_CHECKING(if enabling -pie/fPIE support)
5966
AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
5967
[kde_has_pie_support=$enableval],
5968
[kde_has_pie_support=detect])
5970
if test "$kde_has_pie_support" = "detect"; then
5971
kde_has_pie_support=$kde_cv_val_pie_support
5974
AC_MSG_RESULT([$kde_has_pie_support])
5979
AC_SUBST([KDE_USE_FPIE])
5980
AC_SUBST([KDE_USE_PIE])
5982
if test "$kde_has_pie_support" = "yes"; then
5983
KDE_USE_FPIE="-fPIE"
5987
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5989
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
5992
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5993
# -----------------------------------------------------------
5994
# If this macro is not defined by Autoconf, define it here.
5995
m4_ifdef([AC_PROVIDE_IFELSE],
5997
[m4_define([AC_PROVIDE_IFELSE],
5998
[m4_ifdef([AC_PROVIDE_$1],
6004
AC_DEFUN([AC_PROG_LIBTOOL],
6005
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
6006
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
6007
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
6008
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6010
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
6012
dnl And a similar setup for Fortran 77 support
6013
AC_PROVIDE_IFELSE([AC_PROG_F77],
6015
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
6018
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
6019
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
6020
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
6021
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
6023
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
6025
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6027
[ifdef([AC_PROG_GCJ],
6028
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6029
ifdef([A][M_PROG_GCJ],
6030
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6031
ifdef([LT_AC_PROG_GCJ],
6032
[define([LT_AC_PROG_GCJ],
6033
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6034
])])# AC_PROG_LIBTOOL
6039
AC_DEFUN([_AC_PROG_LIBTOOL],
6040
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6041
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6042
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
6043
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
6045
# This can be used to rebuild libtool when needed
6046
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
6048
# Always use our own libtool.
6049
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
6050
AC_SUBST(LIBTOOL)dnl
6052
# Prevent multiple expansion
6053
define([AC_PROG_LIBTOOL], [])
6054
])# _AC_PROG_LIBTOOL
6059
AC_DEFUN([AC_LIBTOOL_SETUP],
6061
AC_REQUIRE([AC_ENABLE_SHARED])dnl
6062
AC_REQUIRE([AC_ENABLE_STATIC])dnl
6063
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
6064
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6065
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6066
AC_REQUIRE([AC_PROG_CC])dnl
6067
AC_REQUIRE([AC_PROG_LD])dnl
6068
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
6069
AC_REQUIRE([AC_PROG_NM])dnl
6071
AC_REQUIRE([AC_PROG_LN_S])dnl
6072
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6073
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6074
AC_REQUIRE([AC_OBJEXT])dnl
6075
AC_REQUIRE([AC_EXEEXT])dnl
6078
AC_LIBTOOL_SYS_MAX_CMD_LEN
6079
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6082
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6083
_LT_AC_PROG_ECHO_BACKSLASH
6087
# AIX sometimes has problems with the GCC collect2 program. For some
6088
# reason, if we set the COLLECT_NAMES environment variable, the problems
6089
# vanish in a puff of smoke.
6090
if test "X${COLLECT_NAMES+set}" != Xset; then
6092
export COLLECT_NAMES
6097
# Sed substitution that helps us do robust quoting. It backslashifies
6098
# metacharacters that are still active within double-quoted strings.
6099
Xsed='sed -e 1s/^X//'
6100
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
6102
# Same as above, but do not quote variable references.
6103
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
6105
# Sed substitution to delay expansion of an escaped shell variable in a
6106
# double_quote_subst'ed string.
6107
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6109
# Sed substitution to avoid accidental globbing in evaled expressions
6110
no_glob_subst='s/\*/\\\*/g'
6116
default_ofile=libtool
6117
can_build_shared=yes
6119
# All known linkers require a `.a' archive for static linking (except MSVC,
6120
# which needs '.lib').
6122
ltmain="$ac_aux_dir/ltmain.sh"
6123
ofile="$default_ofile"
6124
with_gnu_ld="$lt_cv_prog_gnu_ld"
6126
AC_CHECK_TOOL(AR, ar, false)
6127
AC_CHECK_TOOL(RANLIB, ranlib, :)
6128
AC_CHECK_TOOL(STRIP, strip, :)
6131
old_CFLAGS="$CFLAGS"
6133
# Set sane defaults for various variables
6134
test -z "$AR" && AR=ar
6135
test -z "$AR_FLAGS" && AR_FLAGS=cru
6136
test -z "$AS" && AS=as
6137
test -z "$CC" && CC=cc
6138
test -z "$LTCC" && LTCC=$CC
6139
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6140
test -z "$DLLTOOL" && DLLTOOL=dlltool
6141
test -z "$LD" && LD=ld
6142
test -z "$LN_S" && LN_S="ln -s"
6143
test -z "$MAGIC_CMD" && MAGIC_CMD=file
6144
test -z "$NM" && NM=nm
6145
test -z "$SED" && SED=sed
6146
test -z "$OBJDUMP" && OBJDUMP=objdump
6147
test -z "$RANLIB" && RANLIB=:
6148
test -z "$STRIP" && STRIP=:
6149
test -z "$ac_objext" && ac_objext=o
6151
# Determine commands to create old-style static archives.
6152
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6153
old_postinstall_cmds='chmod 644 $oldlib'
6154
old_postuninstall_cmds=
6156
if test -n "$RANLIB"; then
6159
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6162
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6165
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6168
_LT_CC_BASENAME([$compiler])
6170
# Only perform the check for file, if the check method requires it
6171
case $deplibs_check_method in
6173
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6179
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
6180
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6181
enable_win32_dll=yes, enable_win32_dll=no)
6183
AC_ARG_ENABLE([libtool-lock],
6184
[AC_HELP_STRING([--disable-libtool-lock],
6185
[avoid locking (might break parallel builds)])])
6186
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6189
[AC_HELP_STRING([--with-pic],
6190
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
6191
[pic_mode="$withval"],
6193
test -z "$pic_mode" && pic_mode=default
6195
# Use C for the default configuration in the libtool script
6197
AC_LIBTOOL_LANG_C_CONFIG
6199
])# AC_LIBTOOL_SETUP
6202
# _LT_AC_SYS_COMPILER
6203
# -------------------
6204
AC_DEFUN([_LT_AC_SYS_COMPILER],
6205
[AC_REQUIRE([AC_PROG_CC])dnl
6207
# If no C compiler was specified, use CC.
6210
# If no C compiler flags were specified, use CFLAGS.
6211
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6213
# Allow CC to be a program name with arguments.
6215
])# _LT_AC_SYS_COMPILER
6218
# _LT_CC_BASENAME(CC)
6219
# -------------------
6220
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
6221
AC_DEFUN([_LT_CC_BASENAME],
6222
[for cc_temp in $1""; do
6224
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
6225
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
6230
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6234
# _LT_COMPILER_BOILERPLATE
6235
# ------------------------
6236
# Check for compiler boilerplate output or warnings with
6237
# the simple compiler test code.
6238
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
6239
[ac_outfile=conftest.$ac_objext
6240
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
6241
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6242
_lt_compiler_boilerplate=`cat conftest.err`
6244
])# _LT_COMPILER_BOILERPLATE
6247
# _LT_LINKER_BOILERPLATE
6248
# ----------------------
6249
# Check for linker boilerplate output or warnings with
6250
# the simple link test code.
6251
AC_DEFUN([_LT_LINKER_BOILERPLATE],
6252
[ac_outfile=conftest.$ac_objext
6253
printf "$lt_simple_link_test_code" >conftest.$ac_ext
6254
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
6255
_lt_linker_boilerplate=`cat conftest.err`
6257
])# _LT_LINKER_BOILERPLATE
6260
# _LT_AC_SYS_LIBPATH_AIX
6261
# ----------------------
6262
# Links a minimal program and checks the executable
6263
# for the system default hardcoded library path. In most cases,
6264
# this is /usr/lib:/lib, but when the MPI compilers are used
6265
# the location of the communication and MPI libs are included too.
6266
# If we don't find anything, use the default library path according
6267
# to the aix ld manual.
6268
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6269
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6270
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6272
# Check for a 64-bit object if we didn't find anything.
6273
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; }
6275
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6276
])# _LT_AC_SYS_LIBPATH_AIX
6279
# _LT_AC_SHELL_INIT(ARG)
6280
# ----------------------
6281
AC_DEFUN([_LT_AC_SHELL_INIT],
6282
[ifdef([AC_DIVERSION_NOTICE],
6283
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6284
[AC_DIVERT_PUSH(NOTICE)])
6287
])# _LT_AC_SHELL_INIT
6290
# _LT_AC_PROG_ECHO_BACKSLASH
6291
# --------------------------
6292
# Add some code to the start of the generated configure script which
6293
# will find an echo command which doesn't interpret backslashes.
6294
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6295
[_LT_AC_SHELL_INIT([
6296
# Check that we are running under the correct shell.
6297
SHELL=${CONFIG_SHELL-/bin/sh}
6301
# Remove one level of quotation (which was required for Make).
6302
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6307
if test "X[$]1" = X--no-reexec; then
6308
# Discard the --no-reexec flag, and continue.
6310
elif test "X[$]1" = X--fallback-echo; then
6311
# Avoid inline document here, it may be left over
6313
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6314
# Yippee, $echo works!
6317
# Restart under the correct shell.
6318
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6321
if test "X[$]1" = X--fallback-echo; then
6322
# used as fallback echo
6330
# The HP-UX ksh and POSIX shell print the target directory to stdout
6332
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6334
if test -z "$ECHO"; then
6335
if test "X${echo_test_string+set}" != Xset; then
6336
# find a string as large as possible, as long as the shell can cope with it
6337
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6338
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6339
if (echo_test_string=`eval $cmd`) 2>/dev/null &&
6340
echo_test_string=`eval $cmd` &&
6341
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6348
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6349
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6350
test "X$echo_testing_string" = "X$echo_test_string"; then
6353
# The Solaris, AIX, and Digital Unix default echo programs unquote
6354
# backslashes. This makes it impossible to quote backslashes using
6355
# echo "$something" | sed 's/\\/\\\\/g'
6357
# So, first we look for a working echo in the user's PATH.
6359
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6360
for dir in $PATH /usr/ucb; do
6362
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6363
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6364
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6365
test "X$echo_testing_string" = "X$echo_test_string"; then
6372
if test "X$echo" = Xecho; then
6373
# We didn't find a better echo, so look for alternatives.
6374
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6375
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6376
test "X$echo_testing_string" = "X$echo_test_string"; then
6377
# This shell has a builtin print -r that does the trick.
6379
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6380
test "X$CONFIG_SHELL" != X/bin/ksh; then
6381
# If we have ksh, try running configure again with it.
6382
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6383
export ORIGINAL_CONFIG_SHELL
6384
CONFIG_SHELL=/bin/ksh
6386
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6390
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6391
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6392
test "X$echo_testing_string" = "X$echo_test_string"; then
6393
# Cool, printf works
6395
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6396
test "X$echo_testing_string" = 'X\t' &&
6397
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6398
test "X$echo_testing_string" = "X$echo_test_string"; then
6399
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6401
SHELL="$CONFIG_SHELL"
6403
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6404
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6405
test "X$echo_testing_string" = 'X\t' &&
6406
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6407
test "X$echo_testing_string" = "X$echo_test_string"; then
6408
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6410
# maybe with a smaller string...
6413
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6414
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6421
if test "$prev" != 'sed 50q "[$]0"'; then
6422
echo_test_string=`eval $prev`
6423
export echo_test_string
6424
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6426
# Oops. We lost completely, so just stick with echo.
6435
# Copy echo and quote the copy suitably for passing to libtool from
6436
# the Makefile, instead of quoting the original, which is used later.
6438
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6439
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6443
])])# _LT_AC_PROG_ECHO_BACKSLASH
6448
AC_DEFUN([_LT_AC_LOCK],
6449
[AC_ARG_ENABLE([libtool-lock],
6450
[AC_HELP_STRING([--disable-libtool-lock],
6451
[avoid locking (might break parallel builds)])])
6452
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6454
# Some flags need to be propagated to the compiler or linker for good
6458
# Find out which ABI we are using.
6459
echo 'int i;' > conftest.$ac_ext
6460
if AC_TRY_EVAL(ac_compile); then
6461
case `/usr/bin/file conftest.$ac_objext` in
6473
# Find out which ABI we are using.
6474
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6475
if AC_TRY_EVAL(ac_compile); then
6476
if test "$lt_cv_prog_gnu_ld" = yes; then
6477
case `/usr/bin/file conftest.$ac_objext` in
6479
LD="${LD-ld} -melf32bsmip"
6482
LD="${LD-ld} -melf32bmipn32"
6485
LD="${LD-ld} -melf64bmip"
6489
case `/usr/bin/file conftest.$ac_objext` in
6505
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6506
# Find out which ABI we are using.
6507
echo 'int i;' > conftest.$ac_ext
6508
if AC_TRY_EVAL(ac_compile); then
6509
case `/usr/bin/file conftest.o` in
6513
LD="${LD-ld} -m elf_i386"
6515
ppc64-*linux*|powerpc64-*linux*)
6516
LD="${LD-ld} -m elf32ppclinux"
6519
LD="${LD-ld} -m elf_s390"
6522
LD="${LD-ld} -m elf32_sparc"
6529
LD="${LD-ld} -m elf_x86_64"
6531
ppc*-*linux*|powerpc*-*linux*)
6532
LD="${LD-ld} -m elf64ppc"
6535
LD="${LD-ld} -m elf64_s390"
6538
LD="${LD-ld} -m elf64_sparc"
6548
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
6549
SAVE_CFLAGS="$CFLAGS"
6550
CFLAGS="$CFLAGS -belf"
6551
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6553
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6555
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6556
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6557
CFLAGS="$SAVE_CFLAGS"
6561
# Find out which ABI we are using.
6562
echo 'int i;' > conftest.$ac_ext
6563
if AC_TRY_EVAL(ac_compile); then
6564
case `/usr/bin/file conftest.o` in
6566
case $lt_cv_prog_gnu_ld in
6567
yes*) LD="${LD-ld} -m elf64_sparc" ;;
6568
*) LD="${LD-ld} -64" ;;
6576
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6577
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6578
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6579
AC_CHECK_TOOL(AS, as, false)
6580
AC_CHECK_TOOL(OBJDUMP, objdump, false)
6585
need_locks="$enable_libtool_lock"
6590
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6591
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6592
# ----------------------------------------------------------------
6593
# Check whether the given compiler option works
6594
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6595
[AC_REQUIRE([LT_AC_PROG_SED])
6596
AC_CACHE_CHECK([$1], [$2],
6598
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6599
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6600
lt_compiler_flag="$3"
6601
# Insert the option either (1) after the last *FLAGS variable, or
6602
# (2) before a word containing "conftest.", or (3) at the end.
6603
# Note that $ac_compile itself does not contain backslashes and begins
6604
# with a dollar sign (not a hyphen), so the echo should work correctly.
6605
# The option is referenced via a variable to avoid confusing sed.
6606
lt_compile=`echo "$ac_compile" | $SED \
6607
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
6608
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6609
-e 's:$: $lt_compiler_flag:'`
6610
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6611
(eval "$lt_compile" 2>conftest.err)
6613
cat conftest.err >&AS_MESSAGE_LOG_FD
6614
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6615
if (exit $ac_status) && test -s "$ac_outfile"; then
6616
# The compiler can only warn and ignore the option if not recognized
6617
# So say no if there are warnings other than the usual output.
6618
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
6619
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6620
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
6627
if test x"[$]$2" = xyes; then
6628
ifelse([$5], , :, [$5])
6630
ifelse([$6], , :, [$6])
6632
])# AC_LIBTOOL_COMPILER_OPTION
6635
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6636
# [ACTION-SUCCESS], [ACTION-FAILURE])
6637
# ------------------------------------------------------------
6638
# Check whether the given compiler option works
6639
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6640
[AC_CACHE_CHECK([$1], [$2],
6642
save_LDFLAGS="$LDFLAGS"
6643
LDFLAGS="$LDFLAGS $3"
6644
printf "$lt_simple_link_test_code" > conftest.$ac_ext
6645
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6646
# The linker can only warn and ignore the option if not recognized
6647
# So say no if there are warnings
6648
if test -s conftest.err; then
6649
# Append any errors to the config.log.
6650
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6651
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
6652
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
6653
if diff conftest.exp conftest.er2 >/dev/null; then
6661
LDFLAGS="$save_LDFLAGS"
6664
if test x"[$]$2" = xyes; then
6665
ifelse([$4], , :, [$4])
6667
ifelse([$5], , :, [$5])
6669
])# AC_LIBTOOL_LINKER_OPTION
6672
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6673
# --------------------------
6674
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6675
[# find the maximum length of command line arguments
6676
AC_MSG_CHECKING([the maximum length of command line arguments])
6677
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6683
# On DJGPP, this test can blow up pretty badly due to problems in libc
6684
# (any single argument exceeding 2000 bytes causes a buffer overrun
6685
# during glob expansion). Even if it were fixed, the result of this
6686
# check would be larger than it should be.
6687
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6691
# Under GNU Hurd, this test is not required because there is
6692
# no limit to the length of command line arguments.
6693
# Libtool will interpret -1 as no limit whatsoever
6694
lt_cv_sys_max_cmd_len=-1;
6698
# On Win9x/ME, this test blows up -- it succeeds, but takes
6699
# about 5 minutes as the teststring grows exponentially.
6700
# Worse, since 9x/ME are not pre-emptively multitasking,
6701
# you end up with a "frozen" computer, even though with patience
6702
# the test eventually succeeds (with a max line length of 256k).
6703
# Instead, let's just punt: use the minimum linelength reported by
6704
# all of the supported platforms: 8192 (on NT/2K/XP).
6705
lt_cv_sys_max_cmd_len=8192;
6709
# On AmigaOS with pdksh, this test takes hours, literally.
6710
# So we just punt and use a minimum line length of 8192.
6711
lt_cv_sys_max_cmd_len=8192;
6714
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6715
# This has been around since 386BSD, at least. Likely further.
6716
if test -x /sbin/sysctl; then
6717
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6718
elif test -x /usr/sbin/sysctl; then
6719
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6721
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6723
# And add a safety zone
6724
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6725
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6729
# We know the value 262144 and hardcode it with a safety zone (like BSD)
6730
lt_cv_sys_max_cmd_len=196608
6734
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6735
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6736
# nice to cause kernel panics so lets avoid the loop below.
6737
# First set a reasonable default.
6738
lt_cv_sys_max_cmd_len=16384
6740
if test -x /sbin/sysconfig; then
6741
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6742
*1*) lt_cv_sys_max_cmd_len=-1 ;;
6747
lt_cv_sys_max_cmd_len=102400
6749
sysv5* | sco5v6* | sysv4.2uw2*)
6750
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6751
if test -n "$kargmax"; then
6752
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
6754
lt_cv_sys_max_cmd_len=32768
6758
# If test is not a shell built-in, we'll probably end up computing a
6759
# maximum length that is only half of the actual maximum length, but
6761
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6762
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
6763
= "XX$teststring") >/dev/null 2>&1 &&
6764
new_result=`expr "X$teststring" : ".*" 2>&1` &&
6765
lt_cv_sys_max_cmd_len=$new_result &&
6766
test $i != 17 # 1/2 MB should be enough
6769
teststring=$teststring$teststring
6772
# Add a significant safety factor because C++ compilers can tack on massive
6773
# amounts of additional arguments before passing them to the linker.
6774
# It appears as though 1/2 is a usable value.
6775
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6779
if test -n $lt_cv_sys_max_cmd_len ; then
6780
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6784
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6787
# _LT_AC_CHECK_DLFCN
6788
# ------------------
6789
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6790
[AC_CHECK_HEADERS(dlfcn.h)dnl
6791
])# _LT_AC_CHECK_DLFCN
6794
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6795
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6796
# ---------------------------------------------------------------------
6797
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6798
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6799
if test "$cross_compiling" = yes; then :
6802
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6803
lt_status=$lt_dlunknown
6804
cat > conftest.$ac_ext <<EOF
6805
[#line __oline__ "configure"
6806
#include "confdefs.h"
6815
# define LT_DLGLOBAL RTLD_GLOBAL
6818
# define LT_DLGLOBAL DL_GLOBAL
6820
# define LT_DLGLOBAL 0
6824
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6825
find out it does not work in some platform. */
6826
#ifndef LT_DLLAZY_OR_NOW
6828
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6831
# define LT_DLLAZY_OR_NOW DL_LAZY
6834
# define LT_DLLAZY_OR_NOW RTLD_NOW
6837
# define LT_DLLAZY_OR_NOW DL_NOW
6839
# define LT_DLLAZY_OR_NOW 0
6847
extern "C" void exit (int);
6850
void fnord() { int i=42;}
6853
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6854
int status = $lt_dlunknown;
6858
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6859
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6860
/* dlclose (self); */
6868
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6869
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
6872
x$lt_dlno_uscore) $1 ;;
6873
x$lt_dlneed_uscore) $2 ;;
6874
x$lt_dlunknown|x*) $3 ;;
6877
# compilation failed
6882
])# _LT_AC_TRY_DLOPEN_SELF
6885
# AC_LIBTOOL_DLOPEN_SELF
6886
# ----------------------
6887
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6888
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6889
if test "x$enable_dlopen" != xyes; then
6890
enable_dlopen=unknown
6891
enable_dlopen_self=unknown
6892
enable_dlopen_self_static=unknown
6899
lt_cv_dlopen="load_add_on"
6901
lt_cv_dlopen_self=yes
6905
lt_cv_dlopen="LoadLibrary"
6910
lt_cv_dlopen="dlopen"
6915
# if libdl is installed we need to link against it
6916
AC_CHECK_LIB([dl], [dlopen],
6917
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6920
lt_cv_dlopen_self=yes
6925
AC_CHECK_FUNC([shl_load],
6926
[lt_cv_dlopen="shl_load"],
6927
[AC_CHECK_LIB([dld], [shl_load],
6928
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6929
[AC_CHECK_FUNC([dlopen],
6930
[lt_cv_dlopen="dlopen"],
6931
[AC_CHECK_LIB([dl], [dlopen],
6932
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6933
[AC_CHECK_LIB([svld], [dlopen],
6934
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6935
[AC_CHECK_LIB([dld], [dld_link],
6936
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6945
if test "x$lt_cv_dlopen" != xno; then
6951
case $lt_cv_dlopen in
6953
save_CPPFLAGS="$CPPFLAGS"
6954
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6956
save_LDFLAGS="$LDFLAGS"
6957
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6960
LIBS="$lt_cv_dlopen_libs $LIBS"
6962
AC_CACHE_CHECK([whether a program can dlopen itself],
6963
lt_cv_dlopen_self, [dnl
6964
_LT_AC_TRY_DLOPEN_SELF(
6965
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6966
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6969
if test "x$lt_cv_dlopen_self" = xyes; then
6970
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
6971
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6972
lt_cv_dlopen_self_static, [dnl
6973
_LT_AC_TRY_DLOPEN_SELF(
6974
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6975
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6979
CPPFLAGS="$save_CPPFLAGS"
6980
LDFLAGS="$save_LDFLAGS"
6985
case $lt_cv_dlopen_self in
6986
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6987
*) enable_dlopen_self=unknown ;;
6990
case $lt_cv_dlopen_self_static in
6991
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6992
*) enable_dlopen_self_static=unknown ;;
6995
])# AC_LIBTOOL_DLOPEN_SELF
6998
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6999
# ---------------------------------
7000
# Check to see if options -c and -o are simultaneously supported by compiler
7001
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
7002
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
7003
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
7004
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
7005
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
7006
$rm -r conftest 2>/dev/null
7010
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7012
lt_compiler_flag="-o out/conftest2.$ac_objext"
7013
# Insert the option either (1) after the last *FLAGS variable, or
7014
# (2) before a word containing "conftest.", or (3) at the end.
7015
# Note that $ac_compile itself does not contain backslashes and begins
7016
# with a dollar sign (not a hyphen), so the echo should work correctly.
7017
lt_compile=`echo "$ac_compile" | $SED \
7018
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7019
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
7020
-e 's:$: $lt_compiler_flag:'`
7021
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
7022
(eval "$lt_compile" 2>out/conftest.err)
7024
cat out/conftest.err >&AS_MESSAGE_LOG_FD
7025
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
7026
if (exit $ac_status) && test -s out/conftest2.$ac_objext
7028
# The compiler can only warn and ignore the option if not recognized
7029
# So say no if there are warnings
7030
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7031
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7032
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7033
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7036
chmod u+w . 2>&AS_MESSAGE_LOG_FD
7038
# SGI C++ compiler will create directory out/ii_files/ for
7039
# template instantiation
7040
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7041
$rm out/* && rmdir out
7046
])# AC_LIBTOOL_PROG_CC_C_O
7049
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
7050
# -----------------------------------------
7051
# Check to see if we can do hard links to lock some files if needed
7052
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
7053
[AC_REQUIRE([_LT_AC_LOCK])dnl
7055
hard_links="nottested"
7056
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
7057
# do not overwrite the value of need_locks provided by the user
7058
AC_MSG_CHECKING([if we can lock with hard links])
7061
ln conftest.a conftest.b 2>/dev/null && hard_links=no
7063
ln conftest.a conftest.b 2>&5 || hard_links=no
7064
ln conftest.a conftest.b 2>/dev/null && hard_links=no
7065
AC_MSG_RESULT([$hard_links])
7066
if test "$hard_links" = no; then
7067
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
7073
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
7078
AC_DEFUN([AC_LIBTOOL_OBJDIR],
7079
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
7080
[rm -f .libs 2>/dev/null
7081
mkdir .libs 2>/dev/null
7082
if test -d .libs; then
7085
# MS-DOS does not allow filenames that begin with a dot.
7088
rmdir .libs 2>/dev/null])
7089
objdir=$lt_cv_objdir
7090
])# AC_LIBTOOL_OBJDIR
7093
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
7094
# ----------------------------------------------
7095
# Check hardcoding attributes.
7096
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
7097
[AC_MSG_CHECKING([how to hardcode library paths into programs])
7098
_LT_AC_TAGVAR(hardcode_action, $1)=
7099
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
7100
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
7101
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
7103
# We can hardcode non-existant directories.
7104
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
7105
# If the only mechanism to avoid hardcoding is shlibpath_var, we
7106
# have to relink, otherwise we might link with an installed library
7107
# when we should be linking with a yet-to-be-installed one
7108
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
7109
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
7110
# Linking always hardcodes the temporary library directory.
7111
_LT_AC_TAGVAR(hardcode_action, $1)=relink
7113
# We can link without hardcoding, and we can hardcode nonexisting dirs.
7114
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
7117
# We cannot hardcode anything, or else we can only hardcode existing
7119
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
7121
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
7123
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
7124
# Fast installation is not supported
7125
enable_fast_install=no
7126
elif test "$shlibpath_overrides_runpath" = yes ||
7127
test "$enable_shared" = no; then
7128
# Fast installation is not necessary
7129
enable_fast_install=needless
7131
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
7134
# AC_LIBTOOL_SYS_LIB_STRIP
7135
# ------------------------
7136
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
7139
AC_MSG_CHECKING([whether stripping libraries is possible])
7140
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
7141
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
7142
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
7143
AC_MSG_RESULT([yes])
7145
# FIXME - insert some real tests, host_os isn't really good enough
7148
if test -n "$STRIP" ; then
7149
striplib="$STRIP -x"
7150
AC_MSG_RESULT([yes])
7160
])# AC_LIBTOOL_SYS_LIB_STRIP
7163
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7164
# -----------------------------
7165
# PORTME Fill in your ld.so characteristics
7166
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
7167
[AC_MSG_CHECKING([dynamic linker characteristics])
7169
libname_spec='lib$name'
7177
shlibpath_overrides_runpath=unknown
7179
dynamic_linker="$host_os ld.so"
7180
sys_lib_dlsearch_path_spec="/lib /usr/lib"
7181
if test "$GCC" = yes; then
7182
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7183
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
7184
# if the path contains ";" then we assume it to be the separator
7185
# otherwise default to the standard path separator (i.e. ":") - it is
7186
# assumed that no part of a normal pathname contains ";" but that should
7187
# okay in the real world where ";" in dirpaths is itself problematic.
7188
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7190
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
7193
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
7195
need_lib_prefix=unknown
7196
hardcode_into_libs=no
7198
# when you set need_version to no, make sure it does not cause -set_version
7199
# flags to be left without arguments
7200
need_version=unknown
7205
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
7206
shlibpath_var=LIBPATH
7208
# AIX 3 has no versioning support, so we append a major version to the name.
7209
soname_spec='${libname}${release}${shared_ext}$major'
7216
hardcode_into_libs=yes
7217
if test "$host_cpu" = ia64; then
7218
# AIX 5 supports IA64
7219
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
7220
shlibpath_var=LD_LIBRARY_PATH
7222
# With GCC up to 2.95.x, collect2 would create an import file
7223
# for dependence libraries. The import file would start with
7224
# the line `#! .'. This would cause the generated library to
7225
# depend on `.', always an invalid library. This was fixed in
7226
# development snapshots of GCC prior to 3.0.
7228
aix4 | aix4.[[01]] | aix4.[[01]].*)
7229
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7231
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7238
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
7239
# soname into executable. Probably we can add versioning support to
7240
# collect2, so additional links can be useful in future.
7241
if test "$aix_use_runtimelinking" = yes; then
7242
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
7243
# instead of lib<name>.a to let people know that these are not
7244
# typical AIX shared libraries.
7245
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7247
# We preserve .a as extension for shared libraries through AIX4.2
7248
# and later when we are not doing run time linking.
7249
library_names_spec='${libname}${release}.a $libname.a'
7250
soname_spec='${libname}${release}${shared_ext}$major'
7252
shlibpath_var=LIBPATH
7257
library_names_spec='$libname.ixlibrary $libname.a'
7258
# Create ${libname}_ixlibrary.a entries in /sys/libs.
7259
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'
7263
library_names_spec='${libname}${shared_ext}'
7264
dynamic_linker="$host_os ld.so"
7265
shlibpath_var=LIBRARY_PATH
7271
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7272
soname_spec='${libname}${release}${shared_ext}$major'
7273
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7274
shlibpath_var=LD_LIBRARY_PATH
7275
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7276
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7277
# the default ld.so.conf also contains /usr/contrib/lib and
7278
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7279
# libtool to hard-code these into programs
7282
cygwin* | mingw* | pw32*)
7283
version_type=windows
7288
case $GCC,$host_os in
7289
yes,cygwin* | yes,mingw* | yes,pw32*)
7290
library_names_spec='$libname.dll.a'
7291
# DLL is installed to $(libdir)/../bin by postinstall_cmds
7292
postinstall_cmds='base_file=`basename \${file}`~
7293
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
7294
dldir=$destdir/`dirname \$dlpath`~
7295
test -d \$dldir || mkdir -p \$dldir~
7296
$install_prog $dir/$dlname \$dldir/$dlname~
7297
chmod a+x \$dldir/$dlname'
7298
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
7299
dlpath=$dir/\$dldll~
7301
shlibpath_overrides_runpath=yes
7305
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
7306
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7307
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
7310
# MinGW DLLs use traditional 'lib' prefix
7311
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7312
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
7313
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
7314
# It is most probably a Windows format PATH printed by
7315
# mingw gcc, but we are running on Cygwin. Gcc prints its search
7316
# path with ; separators, and with drive letters. We can handle the
7317
# drive letters (cygwin fileutils understands them), so leave them,
7318
# especially as we might pass files found there to a mingw objdump,
7319
# which wouldn't understand a cygwinified path. Ahh.
7320
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
7322
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
7326
# pw32 DLLs use 'pw' prefix rather than 'lib'
7327
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
7333
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
7336
dynamic_linker='Win32 ld.exe'
7337
# FIXME: first we should search . and the directory the executable is in
7341
darwin* | rhapsody*)
7342
dynamic_linker="$host_os dyld"
7346
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7347
soname_spec='${libname}${release}${major}$shared_ext'
7348
shlibpath_overrides_runpath=yes
7349
shlibpath_var=DYLD_LIBRARY_PATH
7350
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
7351
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7352
if test "$GCC" = yes; then
7353
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"`
7355
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7357
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7364
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7365
soname_spec='${libname}${release}${shared_ext}$major'
7366
shlibpath_var=LD_LIBRARY_PATH
7373
freebsd* | dragonfly*)
7374
# DragonFly does not have aout. When/if they implement a new
7375
# versioning mechanism, adjust this.
7376
if test -x /usr/bin/objformat; then
7377
objformat=`/usr/bin/objformat`
7380
freebsd[[123]]*) objformat=aout ;;
7384
version_type=freebsd-$objformat
7385
case $version_type in
7387
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7392
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7396
shlibpath_var=LD_LIBRARY_PATH
7399
shlibpath_overrides_runpath=yes
7401
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
7402
shlibpath_overrides_runpath=yes
7403
hardcode_into_libs=yes
7405
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
7406
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
7407
shlibpath_overrides_runpath=no
7408
hardcode_into_libs=yes
7410
freebsd*) # from 4.6 on
7411
shlibpath_overrides_runpath=yes
7412
hardcode_into_libs=yes
7421
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7422
soname_spec='${libname}${release}${shared_ext}$major'
7423
shlibpath_var=LD_LIBRARY_PATH
7424
hardcode_into_libs=yes
7427
hpux9* | hpux10* | hpux11*)
7428
# Give a soname corresponding to the major version so that dld.sl refuses to
7429
# link against other versions.
7436
hardcode_into_libs=yes
7437
dynamic_linker="$host_os dld.so"
7438
shlibpath_var=LD_LIBRARY_PATH
7439
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7440
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7441
soname_spec='${libname}${release}${shared_ext}$major'
7442
if test "X$HPUX_IA64_MODE" = X32; then
7443
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7445
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7447
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7451
hardcode_into_libs=yes
7452
dynamic_linker="$host_os dld.sl"
7453
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7454
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7455
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7456
soname_spec='${libname}${release}${shared_ext}$major'
7457
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7458
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7462
dynamic_linker="$host_os dld.sl"
7463
shlibpath_var=SHLIB_PATH
7464
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7465
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7466
soname_spec='${libname}${release}${shared_ext}$major'
7469
# HP-UX runs *really* slowly unless shared libraries are mode 555.
7470
postinstall_cmds='chmod 555 $lib'
7477
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7478
soname_spec='${libname}${release}${shared_ext}$major'
7479
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
7480
shlibpath_var=LD_LIBRARY_PATH
7481
shlibpath_overrides_runpath=no
7482
hardcode_into_libs=yes
7485
irix5* | irix6* | nonstopux*)
7487
nonstopux*) version_type=nonstopux ;;
7489
if test "$lt_cv_prog_gnu_ld" = yes; then
7497
soname_spec='${libname}${release}${shared_ext}$major'
7498
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7500
irix5* | nonstopux*)
7504
case $LD in # libtool.m4 will add one of these switches to LD
7505
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7506
libsuff= shlibsuff= libmagic=32-bit;;
7507
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7508
libsuff=32 shlibsuff=N32 libmagic=N32;;
7509
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7510
libsuff=64 shlibsuff=64 libmagic=64-bit;;
7511
*) libsuff= shlibsuff= libmagic=never-match;;
7515
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7516
shlibpath_overrides_runpath=no
7517
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7518
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7519
hardcode_into_libs=yes
7522
# No shared lib support for Linux oldld, aout, or coff.
7523
linux*oldld* | linux*aout* | linux*coff*)
7527
# This must be Linux ELF.
7528
linux* | k*bsd*-gnu)
7532
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7533
soname_spec='${libname}${release}${shared_ext}$major'
7534
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7535
shlibpath_var=LD_LIBRARY_PATH
7536
shlibpath_overrides_runpath=no
7537
# This implies no fast_install, which is unacceptable.
7538
# Some rework will be needed to allow for fast_install
7539
# before this can be enabled.
7540
hardcode_into_libs=yes
7542
# Append ld.so.conf contents to the search path
7543
if test -f /etc/ld.so.conf; then
7544
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
7545
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
7548
# We used to test for /lib/ld.so.1 and disable shared libraries on
7549
# powerpc, because MkLinux only supported shared libraries with the
7550
# GNU dynamic linker. Since this was broken with cross compilers,
7551
# most powerpc-linux boxes support dynamic linking these days and
7552
# people can always --disable-shared, the test was removed, and we
7553
# assume the GNU/Linux dynamic linker is in use.
7554
dynamic_linker='GNU/Linux ld.so'
7561
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7562
soname_spec='${libname}${release}${shared_ext}$major'
7563
shlibpath_var=LD_LIBRARY_PATH
7564
shlibpath_overrides_runpath=no
7565
hardcode_into_libs=yes
7566
dynamic_linker='NetBSD ld.elf_so'
7573
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7574
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7575
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7576
dynamic_linker='NetBSD (a.out) ld.so'
7578
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7579
soname_spec='${libname}${release}${shared_ext}$major'
7580
dynamic_linker='NetBSD ld.elf_so'
7582
shlibpath_var=LD_LIBRARY_PATH
7583
shlibpath_overrides_runpath=yes
7584
hardcode_into_libs=yes
7589
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7590
shlibpath_var=LD_LIBRARY_PATH
7591
shlibpath_overrides_runpath=yes
7598
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7599
soname_spec='${libname}${release}${shared_ext}$major'
7600
shlibpath_var=LD_LIBRARY_PATH
7601
shlibpath_overrides_runpath=yes
7606
sys_lib_dlsearch_path_spec="/usr/lib"
7608
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
7610
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
7611
*) need_version=no ;;
7613
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7614
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7615
shlibpath_var=LD_LIBRARY_PATH
7616
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7618
openbsd2.[[89]] | openbsd2.[[89]].*)
7619
shlibpath_overrides_runpath=no
7622
shlibpath_overrides_runpath=yes
7626
shlibpath_overrides_runpath=yes
7631
libname_spec='$name'
7634
library_names_spec='$libname${shared_ext} $libname.a'
7635
dynamic_linker='OS/2 ld.exe'
7636
shlibpath_var=LIBPATH
7639
osf3* | osf4* | osf5*)
7643
soname_spec='${libname}${release}${shared_ext}$major'
7644
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7645
shlibpath_var=LD_LIBRARY_PATH
7646
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7647
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7654
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7655
soname_spec='${libname}${release}${shared_ext}$major'
7656
shlibpath_var=LD_LIBRARY_PATH
7657
shlibpath_overrides_runpath=yes
7658
hardcode_into_libs=yes
7659
# ldd complains unless libraries are executable
7660
postinstall_cmds='chmod +x $lib'
7665
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7666
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7667
shlibpath_var=LD_LIBRARY_PATH
7668
shlibpath_overrides_runpath=yes
7669
if test "$with_gnu_ld" = yes; then
7677
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7678
soname_spec='${libname}${release}${shared_ext}$major'
7679
shlibpath_var=LD_LIBRARY_PATH
7680
case $host_vendor in
7682
shlibpath_overrides_runpath=no
7684
export_dynamic_flag_spec='${wl}-Blargedynsym'
7685
runpath_var=LD_RUN_PATH
7693
shlibpath_overrides_runpath=no
7694
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7700
if test -d /usr/nec ;then
7702
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7703
soname_spec='$libname${shared_ext}.$major'
7704
shlibpath_var=LD_LIBRARY_PATH
7708
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7709
version_type=freebsd-elf
7712
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7713
soname_spec='${libname}${release}${shared_ext}$major'
7714
shlibpath_var=LD_LIBRARY_PATH
7715
hardcode_into_libs=yes
7716
if test "$with_gnu_ld" = yes; then
7717
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
7718
shlibpath_overrides_runpath=no
7720
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
7721
shlibpath_overrides_runpath=yes
7724
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
7728
sys_lib_dlsearch_path_spec='/usr/lib'
7733
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7734
soname_spec='${libname}${release}${shared_ext}$major'
7735
shlibpath_var=LD_LIBRARY_PATH
7742
AC_MSG_RESULT([$dynamic_linker])
7743
test "$dynamic_linker" = no && can_build_shared=no
7745
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7746
if test "$GCC" = yes; then
7747
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7749
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7754
AC_DEFUN([_LT_AC_TAGCONFIG],
7755
[AC_ARG_WITH([tags],
7756
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7757
[include additional configurations @<:@automatic@:>@])],
7758
[tagnames="$withval"])
7760
if test -f "$ltmain" && test -n "$tagnames"; then
7761
if test ! -f "${ofile}"; then
7762
AC_MSG_WARN([output file `$ofile' does not exist])
7765
if test -z "$LTCC"; then
7766
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7767
if test -z "$LTCC"; then
7768
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7770
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7773
if test -z "$LTCFLAGS"; then
7774
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
7777
# Extract list of available tagged configurations in $ofile.
7778
# Note that this assumes the entire list is on one line.
7779
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7781
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7782
for tagname in $tagnames; do
7784
# Check whether tagname contains only valid characters
7785
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7787
*) AC_MSG_ERROR([invalid tag name: $tagname])
7791
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7793
AC_MSG_ERROR([tag name \"$tagname\" already exists])
7796
# Update the list of available tags.
7797
if test -n "$tagname"; then
7798
echo appending configuration tag \"$tagname\" to $ofile
7802
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7803
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7804
(test "X$CXX" != "Xg++"))) ; then
7805
AC_LIBTOOL_LANG_CXX_CONFIG
7812
if test -n "$F77" && test "X$F77" != "Xno"; then
7813
AC_LIBTOOL_LANG_F77_CONFIG
7820
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7821
AC_LIBTOOL_LANG_GCJ_CONFIG
7828
AC_LIBTOOL_LANG_RC_CONFIG
7832
AC_MSG_ERROR([Unsupported tag name: $tagname])
7836
# Append the new tag name to the list of available tags.
7837
if test -n "$tagname" ; then
7838
available_tags="$available_tags $tagname"
7844
# Now substitute the updated list of available tags.
7845
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7846
mv "${ofile}T" "$ofile"
7850
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7853
])# _LT_AC_TAGCONFIG
7858
# enable checks for dlopen support
7859
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7860
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7861
])# AC_LIBTOOL_DLOPEN
7864
# AC_LIBTOOL_WIN32_DLL
7865
# --------------------
7866
# declare package support for building win32 DLLs
7867
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7868
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7869
])# AC_LIBTOOL_WIN32_DLL
7872
# AC_ENABLE_SHARED([DEFAULT])
7873
# ---------------------------
7874
# implement the --enable-shared flag
7875
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7876
AC_DEFUN([AC_ENABLE_SHARED],
7877
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7878
AC_ARG_ENABLE([shared],
7879
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7880
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7881
[p=${PACKAGE-default}
7883
yes) enable_shared=yes ;;
7884
no) enable_shared=no ;;
7887
# Look at the argument we got. We use all the common list separators.
7888
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7889
for pkg in $enableval; do
7891
if test "X$pkg" = "X$p"; then
7898
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7899
])# AC_ENABLE_SHARED
7904
# set the default shared flag to --disable-shared
7905
AC_DEFUN([AC_DISABLE_SHARED],
7906
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7907
AC_ENABLE_SHARED(no)
7908
])# AC_DISABLE_SHARED
7911
# AC_ENABLE_STATIC([DEFAULT])
7912
# ---------------------------
7913
# implement the --enable-static flag
7914
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7915
AC_DEFUN([AC_ENABLE_STATIC],
7916
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7917
AC_ARG_ENABLE([static],
7918
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7919
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7920
[p=${PACKAGE-default}
7922
yes) enable_static=yes ;;
7923
no) enable_static=no ;;
7926
# Look at the argument we got. We use all the common list separators.
7927
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7928
for pkg in $enableval; do
7930
if test "X$pkg" = "X$p"; then
7937
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7938
])# AC_ENABLE_STATIC
7943
# set the default static flag to --disable-static
7944
AC_DEFUN([AC_DISABLE_STATIC],
7945
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7946
AC_ENABLE_STATIC(no)
7947
])# AC_DISABLE_STATIC
7950
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7951
# ---------------------------------
7952
# implement the --enable-fast-install flag
7953
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7954
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7955
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7956
AC_ARG_ENABLE([fast-install],
7957
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7958
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7959
[p=${PACKAGE-default}
7961
yes) enable_fast_install=yes ;;
7962
no) enable_fast_install=no ;;
7964
enable_fast_install=no
7965
# Look at the argument we got. We use all the common list separators.
7966
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7967
for pkg in $enableval; do
7969
if test "X$pkg" = "X$p"; then
7970
enable_fast_install=yes
7976
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7977
])# AC_ENABLE_FAST_INSTALL
7980
# AC_DISABLE_FAST_INSTALL
7981
# -----------------------
7982
# set the default to --disable-fast-install
7983
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7984
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7985
AC_ENABLE_FAST_INSTALL(no)
7986
])# AC_DISABLE_FAST_INSTALL
7989
# AC_LIBTOOL_PICMODE([MODE])
7990
# --------------------------
7991
# implement the --with-pic flag
7992
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7993
AC_DEFUN([AC_LIBTOOL_PICMODE],
7994
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7995
pic_mode=ifelse($#,1,$1,default)
7996
])# AC_LIBTOOL_PICMODE
8001
# This is predefined starting with Autoconf 2.54, so this conditional
8002
# definition can be removed once we require Autoconf 2.54 or later.
8003
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
8004
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
8005
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
8006
then ac_cv_prog_egrep='grep -E'
8007
else ac_cv_prog_egrep='egrep'
8009
EGREP=$ac_cv_prog_egrep
8014
# AC_PATH_TOOL_PREFIX
8015
# -------------------
8016
# find a file program which can recognise shared library
8017
AC_DEFUN([AC_PATH_TOOL_PREFIX],
8018
[AC_REQUIRE([AC_PROG_EGREP])dnl
8019
AC_MSG_CHECKING([for $1])
8020
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
8022
[[\\/*] | ?:[\\/]*])
8023
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8026
lt_save_MAGIC_CMD="$MAGIC_CMD"
8027
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8028
dnl $ac_dummy forces splitting on constant user-supplied paths.
8029
dnl POSIX.2 word splitting is done only on the output of word expansions,
8030
dnl not every word. This closes a longstanding sh security hole.
8031
ac_dummy="ifelse([$2], , $PATH, [$2])"
8032
for ac_dir in $ac_dummy; do
8034
test -z "$ac_dir" && ac_dir=.
8035
if test -f $ac_dir/$1; then
8036
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
8037
if test -n "$file_magic_test_file"; then
8038
case $deplibs_check_method in
8040
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8041
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8042
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8043
$EGREP "$file_magic_regex" > /dev/null; then
8048
*** Warning: the command libtool uses to detect shared libraries,
8049
*** $file_magic_cmd, produces output that libtool cannot recognize.
8050
*** The result is that libtool may fail to recognize shared libraries
8051
*** as such. This will affect the creation of libtool libraries that
8052
*** depend on shared libraries, but programs linked with such libtool
8053
*** libraries will work regardless of this problem. Nevertheless, you
8054
*** may want to report the problem to your system manager and/or to
8055
*** bug-libtool@gnu.org
8065
MAGIC_CMD="$lt_save_MAGIC_CMD"
8068
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8069
if test -n "$MAGIC_CMD"; then
8070
AC_MSG_RESULT($MAGIC_CMD)
8074
])# AC_PATH_TOOL_PREFIX
8079
# find a file program which can recognise a shared library
8080
AC_DEFUN([AC_PATH_MAGIC],
8081
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
8082
if test -z "$lt_cv_path_MAGIC_CMD"; then
8083
if test -n "$ac_tool_prefix"; then
8084
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
8094
# find the pathname to the GNU or non-GNU linker
8095
AC_DEFUN([AC_PROG_LD],
8096
[AC_ARG_WITH([gnu-ld],
8097
[AC_HELP_STRING([--with-gnu-ld],
8098
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
8099
[test "$withval" = no || with_gnu_ld=yes],
8101
AC_REQUIRE([LT_AC_PROG_SED])dnl
8102
AC_REQUIRE([AC_PROG_CC])dnl
8103
AC_REQUIRE([AC_CANONICAL_HOST])dnl
8104
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8106
if test "$GCC" = yes; then
8107
# Check if gcc -print-prog-name=ld gives a path.
8108
AC_MSG_CHECKING([for ld used by $CC])
8111
# gcc leaves a trailing carriage return which upsets mingw
8112
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8114
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8117
# Accept absolute paths.
8118
[[\\/]]* | ?:[[\\/]]*)
8119
re_direlt='/[[^/]][[^/]]*/\.\./'
8120
# Canonicalize the pathname of ld
8121
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
8122
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8123
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
8125
test -z "$LD" && LD="$ac_prog"
8128
# If it fails, then pretend we aren't using GCC.
8132
# If it is relative, then search for the first ld in PATH.
8136
elif test "$with_gnu_ld" = yes; then
8137
AC_MSG_CHECKING([for GNU ld])
8139
AC_MSG_CHECKING([for non-GNU ld])
8141
AC_CACHE_VAL(lt_cv_path_LD,
8142
[if test -z "$LD"; then
8143
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8144
for ac_dir in $PATH; do
8146
test -z "$ac_dir" && ac_dir=.
8147
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8148
lt_cv_path_LD="$ac_dir/$ac_prog"
8149
# Check to see if the program is GNU ld. I'd rather use --version,
8150
# but apparently some variants of GNU ld only accept -v.
8151
# Break only if it was the GNU/non-GNU ld that we prefer.
8152
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
8153
*GNU* | *'with BFD'*)
8154
test "$with_gnu_ld" != no && break
8157
test "$with_gnu_ld" != yes && break
8164
lt_cv_path_LD="$LD" # Let the user override the test with a path.
8167
if test -n "$LD"; then
8172
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
8179
AC_DEFUN([AC_PROG_LD_GNU],
8180
[AC_REQUIRE([AC_PROG_EGREP])dnl
8181
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
8182
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
8183
case `$LD -v 2>&1 </dev/null` in
8184
*GNU* | *'with BFD'*)
8185
lt_cv_prog_gnu_ld=yes
8188
lt_cv_prog_gnu_ld=no
8191
with_gnu_ld=$lt_cv_prog_gnu_ld
8195
# AC_PROG_LD_RELOAD_FLAG
8196
# ----------------------
8197
# find reload flag for linker
8198
# -- PORTME Some linkers may need a different reload flag.
8199
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
8200
[AC_CACHE_CHECK([for $LD option to reload object files],
8201
lt_cv_ld_reload_flag,
8202
[lt_cv_ld_reload_flag='-r'])
8203
reload_flag=$lt_cv_ld_reload_flag
8204
case $reload_flag in
8206
*) reload_flag=" $reload_flag" ;;
8208
reload_cmds='$LD$reload_flag -o $output$reload_objs'
8211
if test "$GCC" = yes; then
8212
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
8214
reload_cmds='$LD$reload_flag -o $output$reload_objs'
8218
])# AC_PROG_LD_RELOAD_FLAG
8221
# AC_DEPLIBS_CHECK_METHOD
8222
# -----------------------
8223
# how to check for library dependencies
8224
# -- PORTME fill in with the dynamic library characteristics
8225
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
8226
[AC_CACHE_CHECK([how to recognise dependent libraries],
8227
lt_cv_deplibs_check_method,
8228
[lt_cv_file_magic_cmd='$MAGIC_CMD'
8229
lt_cv_file_magic_test_file=
8230
lt_cv_deplibs_check_method='unknown'
8231
# Need to set the preceding variable on all platforms that support
8232
# interlibrary dependencies.
8233
# 'none' -- dependencies not supported.
8234
# `unknown' -- same as none, but documents that we really don't know.
8235
# 'pass_all' -- all dependencies passed with no checks.
8236
# 'test_compile' -- check by making test program.
8237
# 'file_magic [[regex]]' -- check by looking for files in library path
8238
# which responds to the $file_magic_cmd with a given extended regex.
8239
# If you have `file' or equivalent on your system and you're not sure
8240
# whether `pass_all' will *always* work, you probably want this one.
8244
lt_cv_deplibs_check_method=pass_all
8248
lt_cv_deplibs_check_method=pass_all
8252
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
8253
lt_cv_file_magic_cmd='/usr/bin/file -L'
8254
lt_cv_file_magic_test_file=/shlib/libc.so
8258
# func_win32_libid is a shell function defined in ltmain.sh
8259
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8260
lt_cv_file_magic_cmd='func_win32_libid'
8264
# Base MSYS/MinGW do not provide the 'file' command needed by
8265
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
8266
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
8267
lt_cv_file_magic_cmd='$OBJDUMP -f'
8270
darwin* | rhapsody*)
8271
lt_cv_deplibs_check_method=pass_all
8274
freebsd* | dragonfly*)
8275
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8278
# Not sure whether the presence of OpenBSD here was a mistake.
8279
# Let's accept both of them until this is cleared up.
8280
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
8281
lt_cv_file_magic_cmd=/usr/bin/file
8282
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8286
lt_cv_deplibs_check_method=pass_all
8291
lt_cv_deplibs_check_method=pass_all
8294
hpux10.20* | hpux11*)
8295
lt_cv_file_magic_cmd=/usr/bin/file
8298
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
8299
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8302
[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]']
8303
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8306
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
8307
lt_cv_file_magic_test_file=/usr/lib/libc.sl
8313
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8314
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
8317
irix5* | irix6* | nonstopux*)
8319
*-32|*"-32 ") libmagic=32-bit;;
8320
*-n32|*"-n32 ") libmagic=N32;;
8321
*-64|*"-64 ") libmagic=64-bit;;
8322
*) libmagic=never-match;;
8324
lt_cv_deplibs_check_method=pass_all
8327
# This must be Linux ELF.
8328
linux* | k*bsd*-gnu)
8329
lt_cv_deplibs_check_method=pass_all
8332
netbsd* | netbsdelf*-gnu)
8333
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
8334
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8336
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
8341
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
8342
lt_cv_file_magic_cmd=/usr/bin/file
8343
lt_cv_file_magic_test_file=/usr/lib/libnls.so
8347
lt_cv_deplibs_check_method=unknown
8351
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8352
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
8354
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
8358
osf3* | osf4* | osf5*)
8359
lt_cv_deplibs_check_method=pass_all
8363
lt_cv_deplibs_check_method=pass_all
8367
case $host_vendor in
8369
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]]'
8370
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8373
lt_cv_deplibs_check_method=pass_all
8376
lt_cv_file_magic_cmd='/bin/file'
8377
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8380
lt_cv_file_magic_cmd='/bin/file'
8381
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8382
lt_cv_file_magic_test_file=/lib/libc.so
8385
lt_cv_deplibs_check_method=pass_all
8388
lt_cv_deplibs_check_method=pass_all
8393
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8394
lt_cv_deplibs_check_method=pass_all
8398
file_magic_cmd=$lt_cv_file_magic_cmd
8399
deplibs_check_method=$lt_cv_deplibs_check_method
8400
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8401
])# AC_DEPLIBS_CHECK_METHOD
8406
# find the pathname to a BSD-compatible name lister
8407
AC_DEFUN([AC_PROG_NM],
8408
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8409
[if test -n "$NM"; then
8410
# Let the user override the test.
8413
lt_nm_to_check="${ac_tool_prefix}nm"
8414
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
8415
lt_nm_to_check="$lt_nm_to_check nm"
8417
for lt_tmp_nm in $lt_nm_to_check; do
8418
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8419
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
8421
test -z "$ac_dir" && ac_dir=.
8422
tmp_nm="$ac_dir/$lt_tmp_nm"
8423
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8424
# Check to see if the nm accepts a BSD-compat flag.
8425
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
8426
# nm: unknown option "B" ignored
8427
# Tru64's nm complains that /dev/null is an invalid object file
8428
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8429
*/dev/null* | *'Invalid file or object type'*)
8430
lt_cv_path_NM="$tmp_nm -B"
8434
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8436
lt_cv_path_NM="$tmp_nm -p"
8440
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8441
continue # so that we can try to find one that supports BSD flags
8450
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8458
# check for math library
8459
AC_DEFUN([AC_CHECK_LIBM],
8460
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8463
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8464
# These system don't have libm, or don't need it
8467
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8468
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8471
AC_CHECK_LIB(m, cos, LIBM="-lm")
8477
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8478
# -----------------------------------
8479
# sets LIBLTDL to the link flags for the libltdl convenience library and
8480
# LTDLINCL to the include flags for the libltdl header and adds
8481
# --enable-ltdl-convenience to the configure arguments. Note that
8482
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
8483
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
8484
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
8485
# (note the single quotes!). If your package is not flat and you're not
8486
# using automake, define top_builddir and top_srcdir appropriately in
8488
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8489
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8490
case $enable_ltdl_convenience in
8491
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8492
"") enable_ltdl_convenience=yes
8493
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8495
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8496
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8497
# For backwards non-gettext consistent compatibility...
8499
])# AC_LIBLTDL_CONVENIENCE
8502
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8503
# -----------------------------------
8504
# sets LIBLTDL to the link flags for the libltdl installable library and
8505
# LTDLINCL to the include flags for the libltdl header and adds
8506
# --enable-ltdl-install to the configure arguments. Note that
8507
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
8508
# and an installed libltdl is not found, it is assumed to be `libltdl'.
8509
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
8510
# '${top_srcdir}/' (note the single quotes!). If your package is not
8511
# flat and you're not using automake, define top_builddir and top_srcdir
8512
# appropriately in the Makefiles.
8513
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8514
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8516
AC_CHECK_LIB(ltdl, lt_dlinit,
8517
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8518
[if test x"$enable_ltdl_install" = xno; then
8519
AC_MSG_WARN([libltdl not installed, but installation disabled])
8521
enable_ltdl_install=yes
8524
if test x"$enable_ltdl_install" = x"yes"; then
8525
ac_configure_args="$ac_configure_args --enable-ltdl-install"
8526
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8527
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8529
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8533
# For backwards non-gettext consistent compatibility...
8535
])# AC_LIBLTDL_INSTALLABLE
8540
# enable support for C++ libraries
8541
AC_DEFUN([AC_LIBTOOL_CXX],
8542
[AC_REQUIRE([_LT_AC_LANG_CXX])
8548
AC_DEFUN([_LT_AC_LANG_CXX],
8549
[AC_REQUIRE([AC_PROG_CXX])
8550
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8551
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8554
# _LT_AC_PROG_CXXCPP
8555
# ------------------
8556
AC_DEFUN([_LT_AC_PROG_CXXCPP],
8558
AC_REQUIRE([AC_PROG_CXX])
8559
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8560
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8561
(test "X$CXX" != "Xg++"))) ; then
8564
])# _LT_AC_PROG_CXXCPP
8568
# enable support for Fortran 77 libraries
8569
AC_DEFUN([AC_LIBTOOL_F77],
8570
[AC_REQUIRE([_LT_AC_LANG_F77])
8576
AC_DEFUN([_LT_AC_LANG_F77],
8577
[AC_REQUIRE([AC_PROG_F77])
8578
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8584
# enable support for GCJ libraries
8585
AC_DEFUN([AC_LIBTOOL_GCJ],
8586
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8592
AC_DEFUN([_LT_AC_LANG_GCJ],
8593
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8594
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8595
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8596
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8597
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8598
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8599
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8605
# enable support for Windows resource files
8606
AC_DEFUN([AC_LIBTOOL_RC],
8607
[AC_REQUIRE([LT_AC_PROG_RC])
8608
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8612
# AC_LIBTOOL_LANG_C_CONFIG
8613
# ------------------------
8614
# Ensure that the configuration vars for the C compiler are
8615
# suitably defined. Those variables are subsequently used by
8616
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8617
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8618
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8622
# Source file extension for C test sources.
8625
# Object file extension for compiled C test sources.
8627
_LT_AC_TAGVAR(objext, $1)=$objext
8629
# Code to be used in simple compile tests
8630
lt_simple_compile_test_code="int some_variable = 0;\n"
8632
# Code to be used in simple link tests
8633
lt_simple_link_test_code='int main(){return(0);}\n'
8637
# save warnings/boilerplate of simple test code
8638
_LT_COMPILER_BOILERPLATE
8639
_LT_LINKER_BOILERPLATE
8641
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8642
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8643
AC_LIBTOOL_PROG_CC_C_O($1)
8644
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8645
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8646
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8647
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8648
AC_LIBTOOL_SYS_LIB_STRIP
8649
AC_LIBTOOL_DLOPEN_SELF
8651
# Report which library types will actually be built
8652
AC_MSG_CHECKING([if libtool supports shared libraries])
8653
AC_MSG_RESULT([$can_build_shared])
8655
AC_MSG_CHECKING([whether to build shared libraries])
8656
test "$can_build_shared" = "no" && enable_shared=no
8658
# On AIX, shared libraries and static libraries use the same namespace, and
8659
# are all built from PIC.
8662
test "$enable_shared" = yes && enable_static=no
8663
if test -n "$RANLIB"; then
8664
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8665
postinstall_cmds='$RANLIB $lib'
8670
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8671
test "$enable_shared" = yes && enable_static=no
8675
AC_MSG_RESULT([$enable_shared])
8677
AC_MSG_CHECKING([whether to build static libraries])
8678
# Make sure either enable_shared or enable_static is yes.
8679
test "$enable_shared" = yes || enable_static=yes
8680
AC_MSG_RESULT([$enable_static])
8682
AC_LIBTOOL_CONFIG($1)
8686
])# AC_LIBTOOL_LANG_C_CONFIG
8689
# AC_LIBTOOL_LANG_CXX_CONFIG
8690
# --------------------------
8691
# Ensure that the configuration vars for the C compiler are
8692
# suitably defined. Those variables are subsequently used by
8693
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8694
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8695
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8697
AC_REQUIRE([AC_PROG_CXX])
8698
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
8700
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8701
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8702
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8703
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8704
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8705
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8706
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8707
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8708
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8709
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8710
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8711
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8712
_LT_AC_TAGVAR(module_cmds, $1)=
8713
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8714
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8715
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8716
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8717
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8718
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8720
# Dependencies to place before and after the object being linked:
8721
_LT_AC_TAGVAR(predep_objects, $1)=
8722
_LT_AC_TAGVAR(postdep_objects, $1)=
8723
_LT_AC_TAGVAR(predeps, $1)=
8724
_LT_AC_TAGVAR(postdeps, $1)=
8725
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8727
# Source file extension for C++ test sources.
8730
# Object file extension for compiled C++ test sources.
8732
_LT_AC_TAGVAR(objext, $1)=$objext
8734
# Code to be used in simple compile tests
8735
lt_simple_compile_test_code="int some_variable = 0;\n"
8737
# Code to be used in simple link tests
8738
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
8740
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8743
# save warnings/boilerplate of simple test code
8744
_LT_COMPILER_BOILERPLATE
8745
_LT_LINKER_BOILERPLATE
8747
# Allow CC to be a program name with arguments.
8752
lt_save_with_gnu_ld=$with_gnu_ld
8753
lt_save_path_LD=$lt_cv_path_LD
8754
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8755
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8757
$as_unset lt_cv_prog_gnu_ld
8759
if test -n "${lt_cv_path_LDCXX+set}"; then
8760
lt_cv_path_LD=$lt_cv_path_LDCXX
8762
$as_unset lt_cv_path_LD
8764
test -z "${LDCXX+set}" || LD=$LDCXX
8767
_LT_AC_TAGVAR(compiler, $1)=$CC
8768
_LT_CC_BASENAME([$compiler])
8770
# We don't want -fno-exception wen compiling C++ code, so set the
8771
# no_builtin_flag separately
8772
if test "$GXX" = yes; then
8773
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8775
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8778
if test "$GXX" = yes; then
8779
# Set up default GNU C++ configuration
8783
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8784
# archiving commands below assume that GNU ld is being used.
8785
if test "$with_gnu_ld" = yes; then
8786
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8787
_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'
8789
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8790
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8792
# If archive_cmds runs LD, not CC, wlarc should be empty
8793
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8794
# investigate it a little bit more. (MM)
8797
# ancient GNU ld didn't support --whole-archive et. al.
8798
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8799
grep 'no-whole-archive' > /dev/null; then
8800
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8802
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8808
# A generic and very simple default shared library creation
8809
# command for GNU C++ for the case where it uses the native
8810
# linker, instead of GNU ld. If possible, this setting should
8811
# overridden to take advantage of the native linker features on
8812
# the platform it is being used on.
8813
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8816
# Commands to make compiler produce verbose output that lists
8817
# what "hidden" libraries, object files and flags are used when
8818
# linking a shared library.
8819
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8827
# PORTME: fill in a description of your system's C++ link characteristics
8828
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8829
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8832
# FIXME: insert proper C++ library support
8833
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8836
if test "$host_cpu" = ia64; then
8837
# On IA64, the linker does run time linking by default, so we don't
8838
# have to do anything special.
8839
aix_use_runtimelinking=no
8840
exp_sym_flag='-Bexport'
8843
aix_use_runtimelinking=no
8845
# Test if we are trying to use run time linking or normal
8846
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
8847
# need to do runtime linking.
8848
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
8849
for ld_flag in $LDFLAGS; do
8852
aix_use_runtimelinking=yes
8860
exp_sym_flag='-bexport'
8861
no_entry_flag='-bnoentry'
8864
# When large executables or shared objects are built, AIX ld can
8865
# have problems creating the table of contents. If linking a library
8866
# or program results in "error TOC overflow" add -mminimal-toc to
8867
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8868
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8870
_LT_AC_TAGVAR(archive_cmds, $1)=''
8871
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8872
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8873
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8875
if test "$GXX" = yes; then
8876
case $host_os in aix4.[[012]]|aix4.[[012]].*)
8877
# We only want to do this on AIX 4.2 and lower, the check
8878
# below for broken collect2 doesn't work under 4.3+
8879
collect2name=`${CC} -print-prog-name=collect2`
8880
if test -f "$collect2name" && \
8881
strings "$collect2name" | grep resolve_lib_name >/dev/null
8883
# We have reworked collect2
8884
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8886
# We have old collect2
8887
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8888
# It fails to find uninstalled libraries when the uninstalled
8889
# path is not listed in the libpath. Setting hardcode_minus_L
8890
# to unsupported forces relinking
8891
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8892
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8893
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8897
shared_flag='-shared'
8898
if test "$aix_use_runtimelinking" = yes; then
8899
shared_flag="$shared_flag "'${wl}-G'
8903
if test "$host_cpu" = ia64; then
8904
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8905
# chokes on -Wl,-G. The following line is correct:
8908
if test "$aix_use_runtimelinking" = yes; then
8909
shared_flag='${wl}-G'
8911
shared_flag='${wl}-bM:SRE'
8916
# It seems that -bexpall does not export symbols beginning with
8917
# underscore (_), so it is better to generate a list of symbols to export.
8918
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8919
if test "$aix_use_runtimelinking" = yes; then
8920
# Warning - without using the other runtime loading flags (-brtl),
8921
# -berok will link without error, but may produce a broken library.
8922
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8923
# Determine the default libpath from the value encoded in an empty executable.
8924
_LT_AC_SYS_LIBPATH_AIX
8925
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8927
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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"
8929
if test "$host_cpu" = ia64; then
8930
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8931
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8932
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8934
# Determine the default libpath from the value encoded in an empty executable.
8935
_LT_AC_SYS_LIBPATH_AIX
8936
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8937
# Warning - without using the other run time loading flags,
8938
# -berok will link without error, but may produce a broken library.
8939
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8940
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8941
# Exported symbols can be pulled into shared objects from archives
8942
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8943
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8944
# This is similar to how AIX traditionally builds its shared libraries.
8945
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8951
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8952
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8953
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8954
# support --undefined. This deserves some investigation. FIXME
8955
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8957
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8962
case $cc_basename in
8964
# FIXME: insert proper C++ library support
8965
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8970
cygwin* | mingw* | pw32*)
8971
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8972
# as there is no search path for DLLs.
8973
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8974
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8975
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8976
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8978
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8979
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8980
# If the export-symbols file already is a .def file (1st line
8981
# is EXPORTS), use it as is; otherwise, prepend...
8982
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8983
cp $export_symbols $output_objdir/$soname.def;
8985
echo EXPORTS > $output_objdir/$soname.def;
8986
cat $export_symbols >> $output_objdir/$soname.def;
8988
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8990
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8993
darwin* | rhapsody*)
8995
rhapsody* | darwin1.[[012]])
8996
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8999
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9000
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9002
case ${MACOSX_DEPLOYMENT_TARGET} in
9004
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9007
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
9013
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9014
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9015
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
9016
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9017
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
9018
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9020
if test "$GXX" = yes ; then
9021
lt_int_apple_cc_single_mod=no
9022
output_verbose_link_cmd='echo'
9023
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
9024
lt_int_apple_cc_single_mod=yes
9026
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9027
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9029
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -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'
9031
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9032
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9033
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
9034
_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}'
9036
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -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}'
9038
_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}'
9040
case $cc_basename in
9042
output_verbose_link_cmd='echo'
9043
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9044
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9045
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9046
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9047
_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}'
9050
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9057
case $cc_basename in
9059
# FIXME: insert proper C++ library support
9060
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9063
# Green Hills C++ Compiler
9064
# FIXME: insert proper C++ library support
9065
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9068
# FIXME: insert proper C++ library support
9069
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9074
# C++ shared libraries reported to be fairly broken before switch to ELF
9075
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9078
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9080
freebsd* | dragonfly*)
9081
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
9083
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
9088
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9089
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9090
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9091
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9092
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9093
# but as the default
9094
# location of the library.
9096
case $cc_basename in
9098
# FIXME: insert proper C++ library support
9099
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9102
_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'
9103
# Commands to make compiler produce verbose output that lists
9104
# what "hidden" libraries, object files and flags are used when
9105
# linking a shared library.
9107
# There doesn't appear to be a way to prevent this compiler from
9108
# explicitly linking system object files so we need to strip them
9109
# from the output so that they don't get included in the library
9111
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'
9114
if test "$GXX" = yes; then
9115
_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'
9117
# FIXME: insert proper C++ library support
9118
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9124
if test $with_gnu_ld = no; then
9125
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9126
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9130
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
9133
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9139
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9140
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9143
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9144
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9145
# but as the default
9146
# location of the library.
9150
case $cc_basename in
9152
# FIXME: insert proper C++ library support
9153
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9158
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9161
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9164
_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'
9167
# Commands to make compiler produce verbose output that lists
9168
# what "hidden" libraries, object files and flags are used when
9169
# linking a shared library.
9171
# There doesn't appear to be a way to prevent this compiler from
9172
# explicitly linking system object files so we need to strip them
9173
# from the output so that they don't get included in the library
9175
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'
9178
if test "$GXX" = yes; then
9179
if test $with_gnu_ld = no; then
9182
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9185
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9188
_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'
9193
# FIXME: insert proper C++ library support
9194
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9200
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9201
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9202
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9203
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9204
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9205
# Instead, shared libraries are loaded at an image base (0x10000000 by
9206
# default) and relocated if they conflict, which is a slow very memory
9207
# consuming and fragmenting process. To avoid this, we pick a random,
9208
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9209
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
9210
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9211
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9214
case $cc_basename in
9217
_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 ${output_objdir}/so_locations -o $lib'
9219
# Archives containing C++ object files must be created using
9220
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
9221
# necessary to make sure instantiated templates are included
9223
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9226
if test "$GXX" = yes; then
9227
if test "$with_gnu_ld" = no; then
9228
_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}${output_objdir}/so_locations -o $lib'
9230
_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'
9233
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9236
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9237
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9239
linux* | k*bsd*-gnu)
9240
case $cc_basename in
9242
# Kuck and Associates, Inc. (KAI) C++ Compiler
9244
# KCC will only create a shared library if the output file
9245
# ends with ".so" (or ".sl" for HP-UX), so rename the library
9246
# to its proper name (with version) after linking.
9247
_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'
9248
_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'
9249
# Commands to make compiler produce verbose output that lists
9250
# what "hidden" libraries, object files and flags are used when
9251
# linking a shared library.
9253
# There doesn't appear to be a way to prevent this compiler from
9254
# explicitly linking system object files so we need to strip them
9255
# from the output so that they don't get included in the library
9257
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'
9259
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
9260
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9262
# Archives containing C++ object files must be created using
9263
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
9264
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9269
# version 8.0 and above of icpc choke on multiply defined symbols
9270
# if we add $predep_objects and $postdep_objects, however 7.1 and
9271
# earlier do not add the objects themselves.
9272
case `$CC -V 2>&1` in
9274
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9275
_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'
9277
*) # Version 8.0 or newer
9280
ia64*) tmp_idyn=' -i_dynamic';;
9282
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9283
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9286
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9287
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9288
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9289
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9292
# Portland Group C++ compiler
9293
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9294
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9296
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9297
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9298
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
9302
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9303
_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'
9305
runpath_var=LD_RUN_PATH
9306
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9307
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9309
# Commands to make compiler produce verbose output that lists
9310
# what "hidden" libraries, object files and flags are used when
9311
# linking a shared library.
9313
# There doesn't appear to be a way to prevent this compiler from
9314
# explicitly linking system object files so we need to strip them
9315
# from the output so that they don't get included in the library
9317
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'
9322
# FIXME: insert proper C++ library support
9323
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9326
# FIXME: insert proper C++ library support
9327
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9330
case $cc_basename in
9332
# FIXME: insert proper C++ library support
9333
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9336
# FIXME: insert proper C++ library support
9337
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9341
netbsd* | netbsdelf*-gnu)
9342
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9343
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9345
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9346
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9347
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9349
# Workaround some broken pre-1.5 toolchains
9350
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9353
# C++ shared libraries are fairly broken
9354
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9357
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9358
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9359
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9360
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9361
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9362
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
9363
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9364
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9366
output_verbose_link_cmd='echo'
9369
case $cc_basename in
9371
# Kuck and Associates, Inc. (KAI) C++ Compiler
9373
# KCC will only create a shared library if the output file
9374
# ends with ".so" (or ".sl" for HP-UX), so rename the library
9375
# to its proper name (with version) after linking.
9376
_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'
9378
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9379
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9381
# Archives containing C++ object files must be created using
9382
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
9383
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9387
# Rational C++ 2.4.1
9388
# FIXME: insert proper C++ library support
9389
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9392
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9393
_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 ${output_objdir}/so_locations -o $lib'
9395
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9396
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9398
# Commands to make compiler produce verbose output that lists
9399
# what "hidden" libraries, object files and flags are used when
9400
# linking a shared library.
9402
# There doesn't appear to be a way to prevent this compiler from
9403
# explicitly linking system object files so we need to strip them
9404
# from the output so that they don't get included in the library
9406
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'
9409
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9410
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9411
_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}${output_objdir}/so_locations -o $lib'
9413
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9414
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9416
# Commands to make compiler produce verbose output that lists
9417
# what "hidden" libraries, object files and flags are used when
9418
# linking a shared library.
9419
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9422
# FIXME: insert proper C++ library support
9423
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9429
case $cc_basename in
9431
# Kuck and Associates, Inc. (KAI) C++ Compiler
9433
# KCC will only create a shared library if the output file
9434
# ends with ".so" (or ".sl" for HP-UX), so rename the library
9435
# to its proper name (with version) after linking.
9436
_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'
9438
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9439
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9441
# Archives containing C++ object files must be created using
9442
# the KAI C++ compiler.
9443
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9446
# Rational C++ 2.4.1
9447
# FIXME: insert proper C++ library support
9448
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9451
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9452
_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 ${output_objdir}/so_locations -o $lib'
9453
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9454
echo "-hidden">> $lib.exp~
9455
$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 ${output_objdir}/so_locations -o $lib~
9458
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9459
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9461
# Commands to make compiler produce verbose output that lists
9462
# what "hidden" libraries, object files and flags are used when
9463
# linking a shared library.
9465
# There doesn't appear to be a way to prevent this compiler from
9466
# explicitly linking system object files so we need to strip them
9467
# from the output so that they don't get included in the library
9469
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'
9472
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9473
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9474
_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}${output_objdir}/so_locations -o $lib'
9476
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9477
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9479
# Commands to make compiler produce verbose output that lists
9480
# what "hidden" libraries, object files and flags are used when
9481
# linking a shared library.
9482
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9485
# FIXME: insert proper C++ library support
9486
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9492
# FIXME: insert proper C++ library support
9493
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9496
case $cc_basename in
9499
# FIXME: insert proper C++ library support
9500
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9504
# FIXME: insert proper C++ library support
9505
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9508
# FIXME: insert proper C++ library support
9509
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9514
case $cc_basename in
9516
# Sun C++ 4.2, 5.x and Centerline C++
9517
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
9518
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9519
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9520
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9521
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9523
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9524
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9526
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9528
# The C++ compiler is used as linker so we must use $wl
9529
# flag to pass the commands to the underlying system
9530
# linker. We must also pass each convience library through
9531
# to the system linker between allextract/defaultextract.
9532
# The C++ compiler will combine linker options so we
9533
# cannot just pass the convience library names through
9535
# Supported since Solaris 2.6 (maybe 2.5.1?)
9536
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
9539
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9541
output_verbose_link_cmd='echo'
9543
# Archives containing C++ object files must be created using
9544
# "CC -xar", where "CC" is the Sun C++ compiler. This is
9545
# necessary to make sure instantiated templates are included
9547
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9550
# Green Hills C++ Compiler
9551
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9553
# The C++ compiler must be used to create the archive.
9554
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9557
# GNU C++ compiler with Solaris linker
9558
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9559
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9560
if $CC --version | grep -v '^2\.7' > /dev/null; then
9561
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9562
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9563
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9565
# Commands to make compiler produce verbose output that lists
9566
# what "hidden" libraries, object files and flags are used when
9567
# linking a shared library.
9568
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9570
# g++ 2.7 appears to require `-G' NOT `-shared' on this
9572
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9573
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9574
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
9576
# Commands to make compiler produce verbose output that lists
9577
# what "hidden" libraries, object files and flags are used when
9578
# linking a shared library.
9579
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9582
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9587
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9588
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9589
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9590
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9591
runpath_var='LD_RUN_PATH'
9593
case $cc_basename in
9595
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9596
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9599
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9600
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9604
sysv5* | sco3.2v5* | sco5v6*)
9605
# Note: We can NOT use -z defs as we might desire, because we do not
9606
# link with -lc, and that would cause any symbols used from libc to
9607
# always be unresolved, which means just about no library would
9608
# ever link correctly. If we're not using GNU ld we use -z text
9609
# though, which does catch some bad symbols but isn't as heavy-handed
9611
# For security reasons, it is highly recommended that you always
9612
# use absolute paths for naming shared libraries, and exclude the
9613
# DT_RUNPATH tag from executables and libraries. But doing so
9614
# requires that you compile everything twice, which is a pain.
9615
# So that behaviour is only enabled if SCOABSPATH is set to a
9616
# non-empty value in the environment. Most likely only useful for
9617
# creating official distributions of packages.
9618
# This is a hack until libtool officially supports absolute path
9619
# names for shared libraries.
9620
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9621
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9622
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9623
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9624
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
9625
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9626
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9627
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9628
runpath_var='LD_RUN_PATH'
9630
case $cc_basename in
9632
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9633
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9636
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9637
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
9642
case $cc_basename in
9644
# NonStop-UX NCC 3.20
9645
# FIXME: insert proper C++ library support
9646
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9649
# FIXME: insert proper C++ library support
9650
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9655
# FIXME: insert proper C++ library support
9656
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9659
# FIXME: insert proper C++ library support
9660
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9663
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9664
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9666
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9667
_LT_AC_TAGVAR(LD, $1)="$LD"
9669
AC_LIBTOOL_POSTDEP_PREDEP($1)
9670
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9671
AC_LIBTOOL_PROG_CC_C_O($1)
9672
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9673
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9674
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9675
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9677
AC_LIBTOOL_CONFIG($1)
9684
with_gnu_ldcxx=$with_gnu_ld
9685
with_gnu_ld=$lt_save_with_gnu_ld
9686
lt_cv_path_LDCXX=$lt_cv_path_LD
9687
lt_cv_path_LD=$lt_save_path_LD
9688
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9689
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9690
])# AC_LIBTOOL_LANG_CXX_CONFIG
9692
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9693
# ------------------------------------
9694
# Figure out "hidden" library dependencies from verbose
9695
# compiler output when linking a shared library.
9696
# Parse the compiler output and extract the necessary
9697
# objects, libraries and library flags.
9698
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9699
dnl we can't use the lt_simple_compile_test_code here,
9700
dnl because it contains code intended for an executable,
9701
dnl not a library. It's possible we should let each
9702
dnl tag define a new lt_????_link_test_code variable,
9703
dnl but it's only used here...
9704
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9706
void foo (void) { a = 0; }
9708
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9712
Foo (void) { a = 0; }
9717
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9725
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9728
public void bar (void) {
9734
dnl Parse the compiler output and extract the necessary
9735
dnl objects, libraries and library flags.
9736
if AC_TRY_EVAL(ac_compile); then
9737
# Parse the compiler output and extract the necessary
9738
# objects, libraries and library flags.
9740
# Sentinel used to keep track of whether or not we are before
9741
# the conftest object file.
9742
pre_test_object_deps_done=no
9744
# The `*' in the case matches for architectures that use `case' in
9745
# $output_verbose_cmd can trigger glob expansion during the loop
9746
# eval without this substitution.
9747
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
9749
for p in `eval $output_verbose_link_cmd`; do
9753
# Some compilers place space between "-{L,R}" and the path.
9756
|| test $p = "-R"; then
9763
if test "$pre_test_object_deps_done" = no; then
9766
# Internal compiler library paths should come after those
9767
# provided the user. The postdeps already come after the
9768
# user supplied libs so there is no need to process them.
9769
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9770
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9772
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9775
# The "-l" case would never come before the object being
9776
# linked, so don't bother handling this case.
9779
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9780
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9782
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9788
# This assumes that the test object file only shows up
9789
# once in the compiler output.
9790
if test "$p" = "conftest.$objext"; then
9791
pre_test_object_deps_done=yes
9795
if test "$pre_test_object_deps_done" = no; then
9796
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9797
_LT_AC_TAGVAR(predep_objects, $1)="$p"
9799
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9802
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9803
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
9805
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9810
*) ;; # Ignore the rest.
9818
echo "libtool.m4: error: problem compiling $1 test program"
9821
$rm -f confest.$objext
9823
# PORTME: override above test on systems where it is broken
9827
# Interix 3.5 installs completely hosed .la files for C++, so rather than
9828
# hack all around it, let's just trust "g++" to DTRT.
9829
_LT_AC_TAGVAR(predep_objects,$1)=
9830
_LT_AC_TAGVAR(postdep_objects,$1)=
9831
_LT_AC_TAGVAR(postdeps,$1)=
9835
case $cc_basename in
9837
# Adding this requires a known-good setup of shared libraries for
9838
# Sun compiler versions before 5.6, else PIC objects from an old
9839
# archive will be linked into the output, leading to subtle bugs.
9840
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
9847
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9848
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9850
])# AC_LIBTOOL_POSTDEP_PREDEP
9852
# AC_LIBTOOL_LANG_F77_CONFIG
9853
# --------------------------
9854
# Ensure that the configuration vars for the C compiler are
9855
# suitably defined. Those variables are subsequently used by
9856
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9857
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9858
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9859
[AC_REQUIRE([AC_PROG_F77])
9860
AC_LANG_PUSH(Fortran 77)
9862
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9863
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9864
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9865
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9866
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9867
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9868
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9869
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9870
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9871
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9872
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9873
_LT_AC_TAGVAR(module_cmds, $1)=
9874
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9875
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9876
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9877
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9878
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9879
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9881
# Source file extension for f77 test sources.
9884
# Object file extension for compiled f77 test sources.
9886
_LT_AC_TAGVAR(objext, $1)=$objext
9888
# Code to be used in simple compile tests
9889
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
9891
# Code to be used in simple link tests
9892
lt_simple_link_test_code=" program t\n end\n"
9894
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9897
# save warnings/boilerplate of simple test code
9898
_LT_COMPILER_BOILERPLATE
9899
_LT_LINKER_BOILERPLATE
9901
# Allow CC to be a program name with arguments.
9905
_LT_AC_TAGVAR(compiler, $1)=$CC
9906
_LT_CC_BASENAME([$compiler])
9908
AC_MSG_CHECKING([if libtool supports shared libraries])
9909
AC_MSG_RESULT([$can_build_shared])
9911
AC_MSG_CHECKING([whether to build shared libraries])
9912
test "$can_build_shared" = "no" && enable_shared=no
9914
# On AIX, shared libraries and static libraries use the same namespace, and
9915
# are all built from PIC.
9918
test "$enable_shared" = yes && enable_static=no
9919
if test -n "$RANLIB"; then
9920
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9921
postinstall_cmds='$RANLIB $lib'
9925
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9926
test "$enable_shared" = yes && enable_static=no
9930
AC_MSG_RESULT([$enable_shared])
9932
AC_MSG_CHECKING([whether to build static libraries])
9933
# Make sure either enable_shared or enable_static is yes.
9934
test "$enable_shared" = yes || enable_static=yes
9935
AC_MSG_RESULT([$enable_static])
9937
_LT_AC_TAGVAR(GCC, $1)="$G77"
9938
_LT_AC_TAGVAR(LD, $1)="$LD"
9940
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9941
AC_LIBTOOL_PROG_CC_C_O($1)
9942
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9943
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9944
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9945
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9947
AC_LIBTOOL_CONFIG($1)
9951
])# AC_LIBTOOL_LANG_F77_CONFIG
9954
# AC_LIBTOOL_LANG_GCJ_CONFIG
9955
# --------------------------
9956
# Ensure that the configuration vars for the C compiler are
9957
# suitably defined. Those variables are subsequently used by
9958
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9959
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9960
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9963
# Source file extension for Java test sources.
9966
# Object file extension for compiled Java test sources.
9968
_LT_AC_TAGVAR(objext, $1)=$objext
9970
# Code to be used in simple compile tests
9971
lt_simple_compile_test_code="class foo {}\n"
9973
# Code to be used in simple link tests
9974
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
9976
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9979
# save warnings/boilerplate of simple test code
9980
_LT_COMPILER_BOILERPLATE
9981
_LT_LINKER_BOILERPLATE
9983
# Allow CC to be a program name with arguments.
9987
_LT_AC_TAGVAR(compiler, $1)=$CC
9988
_LT_CC_BASENAME([$compiler])
9990
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9991
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9993
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9995
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9996
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9997
AC_LIBTOOL_PROG_CC_C_O($1)
9998
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9999
AC_LIBTOOL_PROG_LD_SHLIBS($1)
10000
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
10001
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
10003
AC_LIBTOOL_CONFIG($1)
10007
])# AC_LIBTOOL_LANG_GCJ_CONFIG
10010
# AC_LIBTOOL_LANG_RC_CONFIG
10011
# -------------------------
10012
# Ensure that the configuration vars for the Windows resource compiler are
10013
# suitably defined. Those variables are subsequently used by
10014
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
10015
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
10016
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
10019
# Source file extension for RC test sources.
10022
# Object file extension for compiled RC test sources.
10024
_LT_AC_TAGVAR(objext, $1)=$objext
10026
# Code to be used in simple compile tests
10027
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
10029
# Code to be used in simple link tests
10030
lt_simple_link_test_code="$lt_simple_compile_test_code"
10032
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10033
_LT_AC_SYS_COMPILER
10035
# save warnings/boilerplate of simple test code
10036
_LT_COMPILER_BOILERPLATE
10037
_LT_LINKER_BOILERPLATE
10039
# Allow CC to be a program name with arguments.
10043
_LT_AC_TAGVAR(compiler, $1)=$CC
10044
_LT_CC_BASENAME([$compiler])
10045
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10047
AC_LIBTOOL_CONFIG($1)
10051
])# AC_LIBTOOL_LANG_RC_CONFIG
10054
# AC_LIBTOOL_CONFIG([TAGNAME])
10055
# ----------------------------
10056
# If TAGNAME is not passed, then create an initial libtool script
10057
# with a default configuration from the untagged config vars. Otherwise
10058
# add code to config.status for appending the configuration named by
10059
# TAGNAME from the matching tagged config vars.
10060
AC_DEFUN([AC_LIBTOOL_CONFIG],
10061
[# The else clause should only fire when bootstrapping the
10062
# libtool distribution, otherwise you forgot to ship ltmain.sh
10063
# with your package, and you will get complaints that there are
10064
# no rules to generate ltmain.sh.
10065
if test -f "$ltmain"; then
10066
# See if we are running on zsh, and set the options which allow our commands through
10067
# without removal of \ escapes.
10068
if test -n "${ZSH_VERSION+set}" ; then
10069
setopt NO_GLOB_SUBST
10071
# Now quote all the things that may contain metacharacters while being
10072
# careful not to overquote the AC_SUBSTed values. We take copies of the
10073
# variables and quote the copies for generation of the libtool script.
10074
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10076
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10077
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10078
deplibs_check_method reload_flag reload_cmds need_locks \
10079
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10080
lt_cv_sys_global_symbol_to_c_name_address \
10081
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10082
old_postinstall_cmds old_postuninstall_cmds \
10083
_LT_AC_TAGVAR(compiler, $1) \
10084
_LT_AC_TAGVAR(CC, $1) \
10085
_LT_AC_TAGVAR(LD, $1) \
10086
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
10087
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
10088
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
10089
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
10090
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
10091
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
10092
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
10093
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
10094
_LT_AC_TAGVAR(old_archive_cmds, $1) \
10095
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
10096
_LT_AC_TAGVAR(predep_objects, $1) \
10097
_LT_AC_TAGVAR(postdep_objects, $1) \
10098
_LT_AC_TAGVAR(predeps, $1) \
10099
_LT_AC_TAGVAR(postdeps, $1) \
10100
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
10101
_LT_AC_TAGVAR(archive_cmds, $1) \
10102
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
10103
_LT_AC_TAGVAR(postinstall_cmds, $1) \
10104
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
10105
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
10106
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
10107
_LT_AC_TAGVAR(no_undefined_flag, $1) \
10108
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
10109
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
10110
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
10111
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
10112
_LT_AC_TAGVAR(hardcode_automatic, $1) \
10113
_LT_AC_TAGVAR(module_cmds, $1) \
10114
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
10115
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
10116
_LT_AC_TAGVAR(exclude_expsyms, $1) \
10117
_LT_AC_TAGVAR(include_expsyms, $1); do
10120
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
10121
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
10122
_LT_AC_TAGVAR(archive_cmds, $1) | \
10123
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
10124
_LT_AC_TAGVAR(module_cmds, $1) | \
10125
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
10126
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
10127
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
10128
extract_expsyms_cmds | reload_cmds | finish_cmds | \
10129
postinstall_cmds | postuninstall_cmds | \
10130
old_postinstall_cmds | old_postuninstall_cmds | \
10131
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10132
# Double-quote double-evaled strings.
10133
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10136
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10142
*'\[$]0 --fallback-echo"')
10143
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
10148
[cfgfile="${ofile}T"
10149
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10151
AC_MSG_NOTICE([creating $ofile])],
10152
[cfgfile="$ofile"])
10154
cat <<__EOF__ >> "$cfgfile"
10158
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10159
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10160
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
10162
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10163
# Free Software Foundation, Inc.
10165
# This file is part of GNU Libtool:
10166
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10168
# This program is free software; you can redistribute it and/or modify
10169
# it under the terms of the GNU General Public License as published by
10170
# the Free Software Foundation; either version 2 of the License, or
10171
# (at your option) any later version.
10173
# This program is distributed in the hope that it will be useful, but
10174
# WITHOUT ANY WARRANTY; without even the implied warranty of
10175
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10176
# General Public License for more details.
10178
# You should have received a copy of the GNU General Public License
10179
# along with this program; if not, write to the Free Software
10180
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10182
# As a special exception to the GNU General Public License, if you
10183
# distribute this file as part of a program that contains a
10184
# configuration script generated by Autoconf, you may include it under
10185
# the same distribution terms that you use for the rest of that program.
10187
# A sed program that does not truncate output.
10190
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
10191
Xsed="$SED -e 1s/^X//"
10193
# The HP-UX ksh and POSIX shell print the target directory to stdout
10194
# if CDPATH is set.
10195
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10197
# The names of the tagged configurations supported by this script.
10200
# ### BEGIN LIBTOOL CONFIG],
10201
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
10203
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10205
# Shell to use when invoking shell scripts.
10208
# Whether or not to build shared libraries.
10209
build_libtool_libs=$enable_shared
10211
# Whether or not to build static libraries.
10212
build_old_libs=$enable_static
10214
# Whether or not to add -lc for building shared libraries.
10215
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
10217
# Whether or not to disallow shared libs when runtime libs are static
10218
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
10220
# Whether or not to optimize for fast installation.
10221
fast_install=$enable_fast_install
10224
host_alias=$host_alias
10228
# The build system.
10229
build_alias=$build_alias
10233
# An echo program that does not interpret backslashes.
10238
AR_FLAGS=$lt_AR_FLAGS
10243
# LTCC compiler flags.
10244
LTCFLAGS=$lt_LTCFLAGS
10246
# A language-specific compiler.
10247
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
10249
# Is the compiler the GNU C compiler?
10250
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
10255
# The linker used to build libraries.
10256
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
10258
# Whether we need hard or soft links.
10261
# A BSD-compatible nm program.
10264
# A symbol stripping program
10267
# Used to examine libraries when file_magic_cmd begins "file"
10268
MAGIC_CMD=$MAGIC_CMD
10270
# Used on cygwin: DLL creation program.
10273
# Used on cygwin: object dumper.
10276
# Used on cygwin: assembler.
10279
# The name of the directory that contains temporary libtool files.
10282
# How to create reloadable object files.
10283
reload_flag=$lt_reload_flag
10284
reload_cmds=$lt_reload_cmds
10286
# How to pass a linker flag through the compiler.
10287
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10289
# Object file suffix (normally "o").
10290
objext="$ac_objext"
10292
# Old archive suffix (normally "a").
10295
# Shared library suffix (normally ".so").
10296
shrext_cmds='$shrext_cmds'
10298
# Executable file suffix (normally "").
10301
# Additional compiler flags for building library objects.
10302
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
10305
# What is the maximum length of a command?
10306
max_cmd_len=$lt_cv_sys_max_cmd_len
10308
# Does compiler simultaneously support -c and -o options?
10309
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
10311
# Must we lock files when doing compilation?
10312
need_locks=$lt_need_locks
10314
# Do we need the lib prefix for modules?
10315
need_lib_prefix=$need_lib_prefix
10317
# Do we need a version for libraries?
10318
need_version=$need_version
10320
# Whether dlopen is supported.
10321
dlopen_support=$enable_dlopen
10323
# Whether dlopen of programs is supported.
10324
dlopen_self=$enable_dlopen_self
10326
# Whether dlopen of statically linked programs is supported.
10327
dlopen_self_static=$enable_dlopen_self_static
10329
# Compiler flag to prevent dynamic linking.
10330
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
10332
# Compiler flag to turn off builtin functions.
10333
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
10335
# Compiler flag to allow reflexive dlopens.
10336
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
10338
# Compiler flag to generate shared objects directly from archives.
10339
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
10341
# Compiler flag to generate thread-safe objects.
10342
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
10344
# Library versioning type.
10345
version_type=$version_type
10347
# Format of library name prefix.
10348
libname_spec=$lt_libname_spec
10350
# List of archive names. First name is the real one, the rest are links.
10351
# The last name is the one that the linker finds with -lNAME.
10352
library_names_spec=$lt_library_names_spec
10354
# The coded name of the library, if different from the real name.
10355
soname_spec=$lt_soname_spec
10357
# Commands used to build and install an old-style archive.
10359
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
10360
old_postinstall_cmds=$lt_old_postinstall_cmds
10361
old_postuninstall_cmds=$lt_old_postuninstall_cmds
10363
# Create an old-style archive from a shared archive.
10364
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
10366
# Create a temporary old-style archive to link instead of a shared archive.
10367
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
10369
# Commands used to build and install a shared archive.
10370
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
10371
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
10372
postinstall_cmds=$lt_postinstall_cmds
10373
postuninstall_cmds=$lt_postuninstall_cmds
10375
# Commands used to build a loadable module (assumed same as above if empty)
10376
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
10377
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
10379
# Commands to strip libraries.
10380
old_striplib=$lt_old_striplib
10381
striplib=$lt_striplib
10383
# Dependencies to place before the objects being linked to create a
10385
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
10387
# Dependencies to place after the objects being linked to create a
10389
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
10391
# Dependencies to place before the objects being linked to create a
10393
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
10395
# Dependencies to place after the objects being linked to create a
10397
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
10399
# The library search path used internally by the compiler when linking
10400
# a shared library.
10401
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
10403
# Method to check whether dependent libraries are shared objects.
10404
deplibs_check_method=$lt_deplibs_check_method
10406
# Command to use when deplibs_check_method == file_magic.
10407
file_magic_cmd=$lt_file_magic_cmd
10409
# Flag that allows shared libraries with undefined symbols to be built.
10410
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
10412
# Flag that forces no undefined symbols.
10413
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
10415
# Commands used to finish a libtool library installation in a directory.
10416
finish_cmds=$lt_finish_cmds
10418
# Same as above, but a single script fragment to be evaled but not shown.
10419
finish_eval=$lt_finish_eval
10421
# Take the output of nm and produce a listing of raw symbols and C names.
10422
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10424
# Transform the output of nm in a proper C declaration
10425
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10427
# Transform the output of nm in a C name address pair
10428
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10430
# This is the shared library runtime path variable.
10431
runpath_var=$runpath_var
10433
# This is the shared library path variable.
10434
shlibpath_var=$shlibpath_var
10436
# Is shlibpath searched before the hard-coded library search path?
10437
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10439
# How to hardcode a shared library path into an executable.
10440
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
10442
# Whether we should hardcode library paths into libraries.
10443
hardcode_into_libs=$hardcode_into_libs
10445
# Flag to hardcode \$libdir into a binary during linking.
10446
# This must work even if \$libdir does not exist.
10447
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
10449
# If ld is used when linking, flag to hardcode \$libdir into
10450
# a binary during linking. This must work even if \$libdir does
10452
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
10454
# Whether we need a single -rpath flag with a separated argument.
10455
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
10457
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10458
# resulting binary.
10459
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
10461
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10462
# resulting binary.
10463
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
10465
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10466
# the resulting binary.
10467
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
10469
# Set to yes if building a shared library automatically hardcodes DIR into the library
10470
# and all subsequent libraries and executables linked against it.
10471
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
10473
# Variables whose values should be saved in libtool wrapper scripts and
10474
# restored at relink time.
10475
variables_saved_for_relink="$variables_saved_for_relink"
10477
# Whether libtool must link a program against all its dependency libraries.
10478
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
10480
# Compile-time system search path for libraries
10481
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10483
# Run-time system search path for libraries
10484
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10486
# Fix the shell variable \$srcfile for the compiler.
10487
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
10489
# Set to yes if exported symbols are required.
10490
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
10492
# The commands to list exported symbols.
10493
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
10495
# The commands to extract the exported symbol list from a shared archive.
10496
extract_expsyms_cmds=$lt_extract_expsyms_cmds
10498
# Symbols that should not be listed in the preloaded symbols.
10499
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
10501
# Symbols that must always be exported.
10502
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10505
[# ### END LIBTOOL CONFIG],
10506
[# ### END LIBTOOL TAG CONFIG: $tagname])
10513
cat <<\EOF >> "$cfgfile"
10515
# AIX sometimes has problems with the GCC collect2 program. For some
10516
# reason, if we set the COLLECT_NAMES environment variable, the problems
10517
# vanish in a puff of smoke.
10518
if test "X${COLLECT_NAMES+set}" != Xset; then
10520
export COLLECT_NAMES
10526
# We use sed instead of cat because bash on DJGPP gets confused if
10527
# if finds mixed CR/LF and LF-only lines. Since sed operates in
10528
# text mode, it properly converts lines to CR/LF. This bash problem
10529
# is reportedly fixed, but why not run on old versions too?
10530
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10532
mv -f "$cfgfile" "$ofile" || \
10533
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10537
# If there is no Makefile yet, we rely on a make rule to execute
10538
# `config.status --recheck' to rerun these tests and create the
10539
# libtool script then.
10540
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10541
if test -f "$ltmain_in"; then
10542
test -f Makefile && make "$ltmain"
10545
])# AC_LIBTOOL_CONFIG
10548
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10549
# -------------------------------------------
10550
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10551
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10553
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10555
if test "$GCC" = yes; then
10556
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10558
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10559
lt_cv_prog_compiler_rtti_exceptions,
10560
[-fno-rtti -fno-exceptions], [],
10561
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10563
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10566
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10567
# ---------------------------------
10568
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10569
[AC_REQUIRE([AC_CANONICAL_HOST])
10570
AC_REQUIRE([AC_PROG_NM])
10571
AC_REQUIRE([AC_OBJEXT])
10572
# Check for command to grab the raw symbol name followed by C symbol from nm.
10573
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10574
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10576
# These are sane defaults that work on at least a few old systems.
10577
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
10579
# Character class describing NM global symbol codes.
10580
symcode='[[BCDEGRST]]'
10582
# Regexp to match symbols that can be accessed directly from C.
10583
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10585
# Transform an extracted symbol line into a proper C declaration
10586
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10588
# Transform an extracted symbol line into symbol name and symbol address
10589
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'"
10591
# Define system-specific variables.
10596
cygwin* | mingw* | pw32*)
10597
symcode='[[ABCDGISTW]]'
10599
hpux*) # Its linker distinguishes data from code symbols
10600
if test "$host_cpu" = ia64; then
10601
symcode='[[ABCDEGRST]]'
10603
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10604
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'"
10606
linux* | k*bsd*-gnu)
10607
if test "$host_cpu" = ia64; then
10608
symcode='[[ABCDGIRSTW]]'
10609
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10610
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'"
10613
irix* | nonstopux*)
10614
symcode='[[BCDEGRST]]'
10617
symcode='[[BCDEGQRST]]'
10628
sysv5* | sco5v6* | unixware* | OpenUNIX*)
10632
symcode='[[DFNSTU]]'
10636
# Handle CRLF in mingw tool chain
10640
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10644
# If we're using GNU nm, then use its standard symbol codes.
10645
case `$NM -V 2>&1` in
10646
*GNU* | *'with BFD'*)
10647
symcode='[[ABCDGIRSTW]]' ;;
10650
# Try without a prefix undercore, then with it.
10651
for ac_symprfx in "" "_"; do
10653
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
10654
symxfrm="\\1 $ac_symprfx\\2 \\2"
10656
# Write the raw and C identifiers.
10657
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
10659
# Check to see that the pipe works correctly.
10663
cat > conftest.$ac_ext <<EOF
10668
void nm_test_func(){}
10672
int main(){nm_test_var='a';nm_test_func();return(0);}
10675
if AC_TRY_EVAL(ac_compile); then
10676
# Now try to grab the symbols.
10678
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10679
# Try sorting and uniquifying the output.
10680
if sort "$nlist" | uniq > "$nlist"T; then
10681
mv -f "$nlist"T "$nlist"
10686
# Make sure that we snagged all the symbols we need.
10687
if grep ' nm_test_var$' "$nlist" >/dev/null; then
10688
if grep ' nm_test_func$' "$nlist" >/dev/null; then
10689
cat <<EOF > conftest.$ac_ext
10695
# Now generate the symbol file.
10696
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10698
cat <<EOF >> conftest.$ac_ext
10699
#if defined (__STDC__) && __STDC__
10700
# define lt_ptr_t void *
10702
# define lt_ptr_t char *
10706
/* The mapping between symbol names and symbols. */
10711
lt_preloaded_symbols[[]] =
10714
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10715
cat <<\EOF >> conftest.$ac_ext
10723
# Now try linking the two files.
10724
mv conftest.$ac_objext conftstm.$ac_objext
10725
lt_save_LIBS="$LIBS"
10726
lt_save_CFLAGS="$CFLAGS"
10727
LIBS="conftstm.$ac_objext"
10728
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10729
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10732
LIBS="$lt_save_LIBS"
10733
CFLAGS="$lt_save_CFLAGS"
10735
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10738
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10741
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10744
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10745
cat conftest.$ac_ext >&5
10747
rm -f conftest* conftst*
10749
# Do not use the global_symbol_pipe unless it works.
10750
if test "$pipe_works" = yes; then
10753
lt_cv_sys_global_symbol_pipe=
10757
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10758
lt_cv_sys_global_symbol_to_cdecl=
10760
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10761
AC_MSG_RESULT(failed)
10765
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10768
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10769
# ---------------------------------------
10770
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10771
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10772
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10773
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10775
AC_MSG_CHECKING([for $compiler option to produce PIC])
10776
ifelse([$1],[CXX],[
10777
# C++ specific cases for pic, static, wl, etc.
10778
if test "$GXX" = yes; then
10779
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10780
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10784
# All AIX code is PIC.
10785
if test "$host_cpu" = ia64; then
10786
# AIX 5 now supports IA64 processor
10787
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10791
# FIXME: we need at least 68020 code to build shared libraries, but
10792
# adding the `-m68020' flag to GCC prevents building anything better,
10794
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10796
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10797
# PIC is the default for these OSes.
10799
mingw* | os2* | pw32*)
10800
# This hack is so that the source file can tell whether it is being
10801
# built for inclusion in a dll (and should export symbols for example).
10802
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10804
darwin* | rhapsody*)
10805
# PIC is the default on this platform
10806
# Common symbols not allowed in MH_DYLIB files
10807
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10810
# DJGPP does not support shared libraries at all
10811
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10814
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
10815
# Instead, we relocate shared libraries at runtime.
10818
if test -d /usr/nec; then
10819
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10823
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10824
# not for PA HP-UX.
10829
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10834
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10840
# All AIX code is PIC.
10841
if test "$host_cpu" = ia64; then
10842
# AIX 5 now supports IA64 processor
10843
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10845
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10849
case $cc_basename in
10851
# Green Hills C++ Compiler
10852
# _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"
10857
# PIC is the default on this platform
10858
# Common symbols not allowed in MH_DYLIB files
10859
case $cc_basename in
10861
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
10862
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10867
case $cc_basename in
10869
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10872
# Green Hills C++ Compiler
10873
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10879
freebsd* | dragonfly*)
10880
# FreeBSD uses GNU C++
10882
hpux9* | hpux10* | hpux11*)
10883
case $cc_basename in
10885
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10886
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10887
if test "$host_cpu" != ia64; then
10888
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10892
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10893
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10899
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10908
# This is c89, which is MS Visual C++ (no shared libs)
10909
# Anyone wants to do a port?
10911
irix5* | irix6* | nonstopux*)
10912
case $cc_basename in
10914
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10915
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10916
# CC pic flag -KPIC is the default.
10922
linux* | k*bsd*-gnu)
10923
case $cc_basename in
10926
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10927
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10931
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10932
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10933
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10936
# Portland Group C++ compiler.
10937
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10938
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
10939
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10943
# Make sure the PIC flag is empty. It appears that all Alpha
10944
# Linux and Compaq Tru64 Unix objects are PIC.
10945
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10946
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10957
case $cc_basename in
10959
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10965
netbsd* | netbsdelf*-gnu)
10967
osf3* | osf4* | osf5*)
10968
case $cc_basename in
10970
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10973
# Rational C++ 2.4.1
10974
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10977
# Digital/Compaq C++
10978
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10979
# Make sure the PIC flag is empty. It appears that all Alpha
10980
# Linux and Compaq Tru64 Unix objects are PIC.
10981
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10982
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10991
case $cc_basename in
10993
# Sun C++ 4.2, 5.x and Centerline C++
10994
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10995
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10996
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10999
# Green Hills C++ Compiler
11000
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
11007
case $cc_basename in
11010
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11011
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11015
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11022
case $cc_basename in
11024
# NonStop-UX NCC 3.20
11025
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11031
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11032
case $cc_basename in
11034
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11035
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11036
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11043
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11049
if test "$GCC" = yes; then
11050
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11051
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11055
# All AIX code is PIC.
11056
if test "$host_cpu" = ia64; then
11057
# AIX 5 now supports IA64 processor
11058
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11063
# FIXME: we need at least 68020 code to build shared libraries, but
11064
# adding the `-m68020' flag to GCC prevents building anything better,
11066
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
11069
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11070
# PIC is the default for these OSes.
11073
mingw* | pw32* | os2*)
11074
# This hack is so that the source file can tell whether it is being
11075
# built for inclusion in a dll (and should export symbols for example).
11076
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11079
darwin* | rhapsody*)
11080
# PIC is the default on this platform
11081
# Common symbols not allowed in MH_DYLIB files
11082
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
11086
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
11087
# Instead, we relocate shared libraries at runtime.
11091
# Just because we use GCC doesn't mean we suddenly get shared libraries
11092
# on systems that don't support them.
11093
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11098
if test -d /usr/nec; then
11099
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
11104
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11105
# not for PA HP-UX.
11111
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11117
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
11121
# PORTME Check for flag to pass linker flags through the system compiler.
11124
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11125
if test "$host_cpu" = ia64; then
11126
# AIX 5 now supports IA64 processor
11127
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11129
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
11133
# PIC is the default on this platform
11134
# Common symbols not allowed in MH_DYLIB files
11135
case $cc_basename in
11137
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
11138
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11143
mingw* | pw32* | os2*)
11144
# This hack is so that the source file can tell whether it is being
11145
# built for inclusion in a dll (and should export symbols for example).
11146
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
11149
hpux9* | hpux10* | hpux11*)
11150
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11151
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11152
# not for PA HP-UX.
11158
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
11161
# Is there a better lt_prog_compiler_static that works with the bundled CC?
11162
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
11165
irix5* | irix6* | nonstopux*)
11166
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11167
# PIC (with -KPIC) is the default.
11168
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11172
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11173
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11176
linux* | k*bsd*-gnu)
11177
case $cc_basename in
11179
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11180
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11181
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
11183
pgcc* | pgf77* | pgf90* | pgf95*)
11184
# Portland Group compilers (*not* the Pentium gcc compiler,
11185
# which looks to be a dead project)
11186
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11187
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
11188
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11191
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11192
# All Alpha code is PIC.
11193
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11198
osf3* | osf4* | osf5*)
11199
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11200
# All OSF/1 code is PIC.
11201
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
11205
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11206
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11207
case $cc_basename in
11208
f77* | f90* | f95*)
11209
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
11211
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
11216
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
11217
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
11218
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11221
sysv4 | sysv4.2uw2* | sysv4.3*)
11222
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11223
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11224
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11228
if test -d /usr/nec ;then
11229
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
11230
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11234
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11235
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11236
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
11237
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11241
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
11242
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11246
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
11247
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
11251
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
11256
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
11259
# Check to make sure the PIC flag actually works.
11261
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
11262
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
11263
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
11264
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
11265
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
11267
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
11269
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11270
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
11273
# For platforms which do not support PIC, -DPIC is meaningless:
11275
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
11278
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
11283
# Check to make sure the static flag actually works.
11285
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
11286
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
11287
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
11288
$lt_tmp_static_flag,
11290
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
11294
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
11295
# ------------------------------------
11296
# See if the linker supports building shared libraries.
11297
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
11298
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
11299
ifelse([$1],[CXX],[
11300
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11303
# If we're using GNU nm, then we don't want the "-C" option.
11304
# -C means demangle to AIX nm, but means don't demangle with GNU nm
11305
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11306
_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'
11308
_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'
11312
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
11315
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
11317
linux* | k*bsd*-gnu)
11318
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
11321
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11326
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11327
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11328
_LT_AC_TAGVAR(archive_cmds, $1)=
11329
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
11330
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
11331
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
11332
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11333
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11334
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
11335
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11336
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
11337
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11338
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11339
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11340
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11341
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
11342
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
11343
_LT_AC_TAGVAR(module_cmds, $1)=
11344
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
11345
_LT_AC_TAGVAR(always_export_symbols, $1)=no
11346
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11347
# include_expsyms should be a list of space-separated symbols to be *always*
11348
# included in the symbol list
11349
_LT_AC_TAGVAR(include_expsyms, $1)=
11350
# exclude_expsyms can be an extended regexp of symbols to exclude
11351
# it will be wrapped by ` (' and `)$', so one must not match beginning or
11352
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
11353
# as well as any symbol that contains `d'.
11354
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
11355
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11356
# platforms (ab)use it in PIC code, but their linkers get confused if
11357
# the symbol is explicitly referenced. Since portable code cannot
11358
# rely on this symbol name, it's probably fine to never include it in
11359
# preloaded symbol tables.
11360
extract_expsyms_cmds=
11361
# Just being paranoid about ensuring that cc_basename is set.
11362
_LT_CC_BASENAME([$compiler])
11364
cygwin* | mingw* | pw32*)
11365
# FIXME: the MSVC++ port hasn't been tested in a loooong time
11366
# When not using gcc, we currently assume that we are using
11367
# Microsoft Visual C++.
11368
if test "$GCC" != yes; then
11373
# we just hope/assume this is gcc and not c89 (= MSVC++)
11381
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
11382
if test "$with_gnu_ld" = yes; then
11383
# If archive_cmds runs LD, not CC, wlarc should be empty
11386
# Set some defaults for GNU ld with shared library support. These
11387
# are reset later if shared libraries are not supported. Putting them
11388
# here allows them to be overridden if necessary.
11389
runpath_var=LD_RUN_PATH
11390
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
11391
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
11392
# ancient GNU ld didn't support --whole-archive et. al.
11393
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
11394
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11396
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11398
supports_anon_versioning=no
11399
case `$LD -v 2>/dev/null` in
11400
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
11401
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11402
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11403
*\ 2.11.*) ;; # other 2.11 versions
11404
*) supports_anon_versioning=yes ;;
11407
# See if GNU ld supports shared libraries.
11409
aix3* | aix4* | aix5*)
11410
# On AIX/PPC, the GNU linker is very broken
11411
if test "$host_cpu" != ia64; then
11412
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11415
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
11416
*** to be unable to reliably create shared libraries on AIX.
11417
*** Therefore, libtool is disabling shared libraries support. If you
11418
*** really care for shared libraries, you may want to modify your PATH
11419
*** so that a non-GNU linker is found, and then restart.
11426
_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)'
11427
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11428
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11430
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
11431
# that the semantics of dynamic libraries on AmigaOS, at least up
11432
# to version 4, is to share data among multiple programs linked
11433
# with the same dynamic library. Since this doesn't match the
11434
# behavior of shared libraries on other platforms, we can't use
11436
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11440
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11441
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11442
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11443
# support --undefined. This deserves some investigation. FIXME
11444
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11446
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11450
cygwin* | mingw* | pw32*)
11451
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
11452
# as there is no search path for DLLs.
11453
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11454
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11455
_LT_AC_TAGVAR(always_export_symbols, $1)=no
11456
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11457
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
11459
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11460
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11461
# If the export-symbols file already is a .def file (1st line
11462
# is EXPORTS), use it as is; otherwise, prepend...
11463
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11464
cp $export_symbols $output_objdir/$soname.def;
11466
echo EXPORTS > $output_objdir/$soname.def;
11467
cat $export_symbols >> $output_objdir/$soname.def;
11469
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11471
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11476
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11477
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11478
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11479
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11480
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11481
# Instead, shared libraries are loaded at an image base (0x10000000 by
11482
# default) and relocated if they conflict, which is a slow very memory
11483
# consuming and fragmenting process. To avoid this, we pick a random,
11484
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11485
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
11486
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11487
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11490
linux* | k*bsd*-gnu)
11491
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11493
case $cc_basename,$host_cpu in
11494
pgcc*) # Portland Group C compiler
11495
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11496
tmp_addflag=' $pic_flag'
11498
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
11499
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11500
tmp_addflag=' $pic_flag -Mnomain' ;;
11501
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
11502
tmp_addflag=' -i_dynamic' ;;
11503
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
11504
tmp_addflag=' -i_dynamic -nofor_main' ;;
11505
ifc* | ifort*) # Intel Fortran compiler
11506
tmp_addflag=' -nofor_main' ;;
11508
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11510
if test $supports_anon_versioning = yes; then
11511
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
11512
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11513
$echo "local: *; };" >> $output_objdir/$libname.ver~
11514
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11516
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
11518
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11522
netbsd* | netbsdelf*-gnu)
11523
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11524
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11527
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11528
_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'
11533
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
11534
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11537
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11538
*** create shared libraries on Solaris systems. Therefore, libtool
11539
*** is disabling shared libraries support. We urge you to upgrade GNU
11540
*** binutils to release 2.9.1 or newer. Another option is to modify
11541
*** your PATH or compiler configuration so that the native linker is
11542
*** used, and then restart.
11545
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11546
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11547
_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'
11549
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11553
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11554
case `$LD -v 2>&1` in
11555
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
11556
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11559
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11560
*** reliably create shared libraries on SCO systems. Therefore, libtool
11561
*** is disabling shared libraries support. We urge you to upgrade GNU
11562
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
11563
*** your PATH or compiler configuration so that the native linker is
11564
*** used, and then restart.
11569
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11570
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
11571
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
11572
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
11574
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11581
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11583
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11584
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11588
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11589
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11590
_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'
11592
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11597
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
11599
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11600
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
11601
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
11604
# PORTME fill in a description of your system's linker (not GNU ld)
11607
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11608
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
11609
_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'
11610
# Note: this linker hardcodes the directories in LIBPATH if there
11611
# are no directories specified by -L.
11612
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11613
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11614
# Neither direct hardcoding nor static linking is supported with a
11616
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11621
if test "$host_cpu" = ia64; then
11622
# On IA64, the linker does run time linking by default, so we don't
11623
# have to do anything special.
11624
aix_use_runtimelinking=no
11625
exp_sym_flag='-Bexport'
11628
# If we're using GNU nm, then we don't want the "-C" option.
11629
# -C means demangle to AIX nm, but means don't demangle with GNU nm
11630
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
11631
_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'
11633
_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'
11635
aix_use_runtimelinking=no
11637
# Test if we are trying to use run time linking or normal
11638
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
11639
# need to do runtime linking.
11640
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
11641
for ld_flag in $LDFLAGS; do
11642
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11643
aix_use_runtimelinking=yes
11650
exp_sym_flag='-bexport'
11651
no_entry_flag='-bnoentry'
11654
# When large executables or shared objects are built, AIX ld can
11655
# have problems creating the table of contents. If linking a library
11656
# or program results in "error TOC overflow" add -mminimal-toc to
11657
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11658
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11660
_LT_AC_TAGVAR(archive_cmds, $1)=''
11661
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11662
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
11663
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11665
if test "$GCC" = yes; then
11666
case $host_os in aix4.[[012]]|aix4.[[012]].*)
11667
# We only want to do this on AIX 4.2 and lower, the check
11668
# below for broken collect2 doesn't work under 4.3+
11669
collect2name=`${CC} -print-prog-name=collect2`
11670
if test -f "$collect2name" && \
11671
strings "$collect2name" | grep resolve_lib_name >/dev/null
11673
# We have reworked collect2
11674
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11676
# We have old collect2
11677
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
11678
# It fails to find uninstalled libraries when the uninstalled
11679
# path is not listed in the libpath. Setting hardcode_minus_L
11680
# to unsupported forces relinking
11681
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11682
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11683
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11687
shared_flag='-shared'
11688
if test "$aix_use_runtimelinking" = yes; then
11689
shared_flag="$shared_flag "'${wl}-G'
11693
if test "$host_cpu" = ia64; then
11694
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11695
# chokes on -Wl,-G. The following line is correct:
11698
if test "$aix_use_runtimelinking" = yes; then
11699
shared_flag='${wl}-G'
11701
shared_flag='${wl}-bM:SRE'
11706
# It seems that -bexpall does not export symbols beginning with
11707
# underscore (_), so it is better to generate a list of symbols to export.
11708
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
11709
if test "$aix_use_runtimelinking" = yes; then
11710
# Warning - without using the other runtime loading flags (-brtl),
11711
# -berok will link without error, but may produce a broken library.
11712
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11713
# Determine the default libpath from the value encoded in an empty executable.
11714
_LT_AC_SYS_LIBPATH_AIX
11715
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11716
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $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"
11718
if test "$host_cpu" = ia64; then
11719
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11720
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11721
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
11723
# Determine the default libpath from the value encoded in an empty executable.
11724
_LT_AC_SYS_LIBPATH_AIX
11725
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11726
# Warning - without using the other run time loading flags,
11727
# -berok will link without error, but may produce a broken library.
11728
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11729
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11730
# Exported symbols can be pulled into shared objects from archives
11731
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
11732
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11733
# This is similar to how AIX traditionally builds its shared libraries.
11734
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11740
_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)'
11741
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11742
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11743
# see comment about different semantics on the GNU ld section
11744
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11748
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11751
cygwin* | mingw* | pw32*)
11752
# When not using gcc, we currently assume that we are using
11753
# Microsoft Visual C++.
11754
# hardcode_libdir_flag_spec is actually meaningless, as there is
11755
# no search path for DLLs.
11756
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11757
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11758
# Tell ltmain to make .lib files, not .a files.
11760
# Tell ltmain to make .dll files, not .so files.
11762
# FIXME: Setting linknames here is a bad hack.
11763
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11764
# The linker will automatically build a .lib file if we build a DLL.
11765
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11766
# FIXME: Should let the user specify the lib program.
11767
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11768
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
11769
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11772
darwin* | rhapsody*)
11774
rhapsody* | darwin1.[[012]])
11775
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
11778
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11779
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11781
case ${MACOSX_DEPLOYMENT_TARGET} in
11783
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11786
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
11792
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11793
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11794
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11795
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11796
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
11797
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11798
if test "$GCC" = yes ; then
11799
output_verbose_link_cmd='echo'
11800
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
11801
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11802
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11803
_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}'
11804
_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}'
11806
case $cc_basename in
11808
output_verbose_link_cmd='echo'
11809
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
11810
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11811
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11812
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11813
_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}'
11816
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11823
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11824
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11825
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11829
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11832
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11833
# support. Future versions do this automatically, but an explicit c++rt0.o
11834
# does not break anything, and helps significantly (at the cost of a little
11837
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11838
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11839
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11840
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11843
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
11845
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11846
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11847
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11848
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11851
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11852
freebsd* | dragonfly*)
11853
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
11854
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11855
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11856
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11860
if test "$GCC" = yes; then
11861
_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'
11863
_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'
11865
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11866
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11867
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11869
# hardcode_minus_L: Not really in the search PATH,
11870
# but as the default location of the library.
11871
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11872
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11876
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11877
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11879
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11881
if test "$with_gnu_ld" = no; then
11882
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11883
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11885
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11886
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11888
# hardcode_minus_L: Not really in the search PATH,
11889
# but as the default location of the library.
11890
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11895
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11898
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11901
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11904
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11910
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11913
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11916
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11920
if test "$with_gnu_ld" = no; then
11921
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11922
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11926
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11927
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11928
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11931
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11932
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11934
# hardcode_minus_L: Not really in the search PATH,
11935
# but as the default location of the library.
11936
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11942
irix5* | irix6* | nonstopux*)
11943
if test "$GCC" = yes; then
11944
_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'
11946
_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'
11947
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11949
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11950
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11951
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11954
netbsd* | netbsdelf*-gnu)
11955
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11956
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11958
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11960
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11961
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11962
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11966
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11967
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11968
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11969
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11970
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11974
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11975
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11976
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11977
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11978
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11979
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11980
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11983
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11984
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11985
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11988
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11989
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11996
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11997
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11998
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11999
_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'
12000
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
12004
if test "$GCC" = yes; then
12005
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
12006
_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'
12008
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12009
_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'
12011
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12012
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12015
osf4* | osf5*) # as osf3* with the addition of -msym flag
12016
if test "$GCC" = yes; then
12017
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
12018
_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'
12019
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
12021
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
12022
_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'
12023
_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~
12024
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
12026
# Both c and cxx compiler support -rpath directly
12027
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
12029
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
12033
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
12034
if test "$GCC" = yes; then
12036
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12037
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12038
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
12041
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12042
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12043
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
12045
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
12046
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12048
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
12050
# The compiler driver will combine linker options so we
12051
# cannot just pass the convience library names through
12052
# without $wl, iff we do not link with $LD.
12053
# Luckily, gcc supports the same syntax we need for Sun Studio.
12054
# Supported since Solaris 2.6 (maybe 2.5.1?)
12057
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
12059
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
12062
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12066
if test "x$host_vendor" = xsequent; then
12067
# Use $CC to link under sequent, because it throws in some extra .o
12068
# files that make .init and .fini sections work.
12069
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12071
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12073
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12074
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
12075
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
12076
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12080
case $host_vendor in
12082
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12083
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
12086
## LD is ld it makes a PLAMLIB
12087
## CC just makes a GrossModule.
12088
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12089
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
12090
_LT_AC_TAGVAR(hardcode_direct, $1)=no
12093
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12094
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
12097
runpath_var='LD_RUN_PATH'
12098
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12102
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12103
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12104
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
12108
if test -d /usr/nec; then
12109
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12110
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12111
runpath_var=LD_RUN_PATH
12112
hardcode_runpath_var=yes
12113
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
12117
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
12118
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12119
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12120
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12121
runpath_var='LD_RUN_PATH'
12123
if test "$GCC" = yes; then
12124
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12125
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12127
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12128
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12132
sysv5* | sco3.2v5* | sco5v6*)
12133
# Note: We can NOT use -z defs as we might desire, because we do not
12134
# link with -lc, and that would cause any symbols used from libc to
12135
# always be unresolved, which means just about no library would
12136
# ever link correctly. If we're not using GNU ld we use -z text
12137
# though, which does catch some bad symbols but isn't as heavy-handed
12139
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
12140
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
12141
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12142
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12143
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
12144
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
12145
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
12146
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
12147
runpath_var='LD_RUN_PATH'
12149
if test "$GCC" = yes; then
12150
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12151
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12153
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12154
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12159
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12160
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
12161
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
12165
_LT_AC_TAGVAR(ld_shlibs, $1)=no
12170
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
12171
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
12174
# Do we need to explicitly link libc?
12176
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
12178
# Assume -lc should be added
12179
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12181
if test "$enable_shared" = yes && test "$GCC" = yes; then
12182
case $_LT_AC_TAGVAR(archive_cmds, $1) in
12184
# FIXME: we may have to deal with multi-command sequences.
12187
# Test whether the compiler implicitly links with -lc since on some
12188
# systems, -lgcc has to come before -lc. If gcc already passes -lc
12189
# to ld, don't add -lc before -lgcc.
12190
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
12192
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
12194
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
12197
libobjs=conftest.$ac_objext
12199
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
12200
pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
12206
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
12207
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
12208
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
12210
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
12212
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
12214
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
12216
cat conftest.err 1>&5
12219
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
12225
])# AC_LIBTOOL_PROG_LD_SHLIBS
12228
# _LT_AC_FILE_LTDLL_C
12229
# -------------------
12230
# Be careful that the start marker always follows a newline.
12231
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
12232
# /* ltdll.c starts here */
12233
# #define WIN32_LEAN_AND_MEAN
12234
# #include <windows.h>
12235
# #undef WIN32_LEAN_AND_MEAN
12236
# #include <stdio.h>
12238
# #ifndef __CYGWIN__
12239
# # ifdef __CYGWIN32__
12240
# # define __CYGWIN__ __CYGWIN32__
12244
# #ifdef __cplusplus
12247
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
12248
# #ifdef __cplusplus
12252
# #ifdef __CYGWIN__
12253
# #include <cygwin/cygwin_dll.h>
12254
# DECLARE_CYGWIN_DLL( DllMain );
12256
# HINSTANCE __hDllInstance_base;
12259
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
12261
# __hDllInstance_base = hInst;
12264
# /* ltdll.c ends here */
12265
])# _LT_AC_FILE_LTDLL_C
12268
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
12269
# ---------------------------------
12270
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
12274
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
12275
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
12276
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
12277
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
12278
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12279
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
12280
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
12282
# This is just to silence aclocal about the macro not being used
12283
ifelse([AC_DISABLE_FAST_INSTALL])
12285
AC_DEFUN([LT_AC_PROG_GCJ],
12286
[AC_CHECK_TOOL(GCJ, gcj, no)
12287
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
12291
AC_DEFUN([LT_AC_PROG_RC],
12292
[AC_CHECK_TOOL(RC, windres, no)
12295
# NOTE: This macro has been submitted for inclusion into #
12296
# GNU Autoconf as AC_PROG_SED. When it is available in #
12297
# a released version of Autoconf we should remove this #
12298
# macro and use it instead. #
12301
# Check for a fully-functional sed program, that truncates
12302
# as few characters as possible. Prefer GNU sed if found.
12303
AC_DEFUN([LT_AC_PROG_SED],
12304
[AC_MSG_CHECKING([for a sed that does not truncate output])
12305
AC_CACHE_VAL(lt_cv_path_SED,
12306
[# Loop through the user's path and test for sed and gsed.
12307
# Then use that list of sed's as ones to test for truncation.
12308
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12309
for as_dir in $PATH
12312
test -z "$as_dir" && as_dir=.
12313
for lt_ac_prog in sed gsed; do
12314
for ac_exec_ext in '' $ac_executable_extensions; do
12315
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
12316
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
12323
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
12324
# along with /bin/sed that truncates output.
12325
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
12326
test ! -f $lt_ac_sed && continue
12327
cat /dev/null > conftest.in
12329
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
12330
# Check for GNU sed and select it if it is found.
12331
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
12332
lt_cv_path_SED=$lt_ac_sed
12336
cat conftest.in conftest.in >conftest.tmp
12337
mv conftest.tmp conftest.in
12338
cp conftest.in conftest.nl
12340
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
12341
cmp -s conftest.out conftest.nl || break
12342
# 10000 chars as input seems more than enough
12343
test $lt_ac_count -gt 10 && break
12344
lt_ac_count=`expr $lt_ac_count + 1`
12345
if test $lt_ac_count -gt $lt_ac_max; then
12346
lt_ac_max=$lt_ac_count
12347
lt_cv_path_SED=$lt_ac_sed
12352
SED=$lt_cv_path_SED
12353
AC_MSG_RESULT([$SED])
12356
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
12357
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
12358
dnl also defines GSTUFF_PKG_ERRORS on error
12359
AC_DEFUN([PKG_CHECK_MODULES], [
12362
if test -z "$PKG_CONFIG"; then
12363
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
12366
if test "$PKG_CONFIG" = "no" ; then
12367
echo "*** The pkg-config script could not be found. Make sure it is"
12368
echo "*** in your path, or set the PKG_CONFIG environment variable"
12369
echo "*** to the full path to pkg-config."
12370
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
12372
PKG_CONFIG_MIN_VERSION=0.9.0
12373
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12374
AC_MSG_CHECKING(for $2)
12376
if $PKG_CONFIG --exists "$2" ; then
12380
AC_MSG_CHECKING($1_CFLAGS)
12381
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
12382
AC_MSG_RESULT($$1_CFLAGS)
12384
AC_MSG_CHECKING($1_LIBS)
12385
$1_LIBS=`$PKG_CONFIG --libs "$2"`
12386
AC_MSG_RESULT($$1_LIBS)
12390
## If we have a custom action on failure, don't print errors, but
12391
## do set a variable so people can do so.
12392
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
12393
ifelse([$4], ,echo $$1_PKG_ERRORS,)
12396
AC_SUBST($1_CFLAGS)
12399
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12400
echo "*** See http://www.freedesktop.org/software/pkgconfig"
12404
if test $succeeded = yes; then
12405
ifelse([$3], , :, [$3])
12407
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
12413
# AM_CONDITIONAL -*- Autoconf -*-
12415
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
12417
# This program is free software; you can redistribute it and/or modify
12418
# it under the terms of the GNU General Public License as published by
12419
# the Free Software Foundation; either version 2, or (at your option)
12420
# any later version.
12422
# This program is distributed in the hope that it will be useful,
12423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12425
# GNU General Public License for more details.
12427
# You should have received a copy of the GNU General Public License
12428
# along with this program; if not, write to the Free Software
12429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12436
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12437
# -------------------------------------
12438
# Define a conditional.
12439
AC_DEFUN([AM_CONDITIONAL],
12440
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
12441
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12442
AC_SUBST([$1_TRUE])
12443
AC_SUBST([$1_FALSE])
12451
AC_CONFIG_COMMANDS_PRE(
12452
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
12453
AC_MSG_ERROR([conditional "$1" was never defined.
12454
Usually this means the macro was only invoked conditionally.])
12457
# Do all the work for Automake. -*- Autoconf -*-
12459
# This macro actually does too much some checks are only needed if
12460
# your package does certain things. But this isn't really a big deal.
12462
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
12463
# Free Software Foundation, Inc.
12465
# This program is free software; you can redistribute it and/or modify
12466
# it under the terms of the GNU General Public License as published by
12467
# the Free Software Foundation; either version 2, or (at your option)
12468
# any later version.
12470
# This program is distributed in the hope that it will be useful,
12471
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12472
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12473
# GNU General Public License for more details.
12475
# You should have received a copy of the GNU General Public License
12476
# along with this program; if not, write to the Free Software
12477
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12484
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
12485
# the ones we care about.
12486
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
12488
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
12489
# AM_INIT_AUTOMAKE([OPTIONS])
12490
# -----------------------------------------------
12491
# The call with PACKAGE and VERSION arguments is the old style
12492
# call (pre autoconf-2.50), which is being phased out. PACKAGE
12493
# and VERSION should now be passed to AC_INIT and removed from
12494
# the call to AM_INIT_AUTOMAKE.
12495
# We support both call styles for the transition. After
12496
# the next Automake release, Autoconf can make the AC_INIT
12497
# arguments mandatory, and then we can depend on a new Autoconf
12498
# release and drop the old call support.
12499
AC_DEFUN([AM_INIT_AUTOMAKE],
12500
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
12501
AC_REQUIRE([AC_PROG_INSTALL])dnl
12502
# test to see if srcdir already configured
12503
if test "`cd $srcdir && pwd`" != "`pwd`" &&
12504
test -f $srcdir/config.status; then
12505
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
12508
# test whether we have cygpath
12509
if test -z "$CYGPATH_W"; then
12510
if (cygpath --version) >/dev/null 2>/dev/null; then
12511
CYGPATH_W='cygpath -w'
12516
AC_SUBST([CYGPATH_W])
12518
# Define the identity of the package.
12519
dnl Distinguish between old-style and new-style calls.
12521
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
12522
AC_SUBST([PACKAGE], [$1])dnl
12523
AC_SUBST([VERSION], [$2])],
12524
[_AM_SET_OPTIONS([$1])dnl
12525
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
12526
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
12528
_AM_IF_OPTION([no-define],,
12529
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
12530
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
12532
# Some tools Automake needs.
12533
AC_REQUIRE([AM_SANITY_CHECK])dnl
12534
AC_REQUIRE([AC_ARG_PROGRAM])dnl
12535
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
12536
AM_MISSING_PROG(AUTOCONF, autoconf)
12537
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
12538
AM_MISSING_PROG(AUTOHEADER, autoheader)
12539
AM_MISSING_PROG(MAKEINFO, makeinfo)
12540
AM_MISSING_PROG(AMTAR, tar)
12542
AM_PROG_INSTALL_STRIP
12543
# We need awk for the "check" target. The system "awk" is bad on
12545
AC_REQUIRE([AC_PROG_AWK])dnl
12546
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
12547
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
12549
_AM_IF_OPTION([no-dependencies],,
12550
[AC_PROVIDE_IFELSE([AC_PROG_CC],
12551
[_AM_DEPENDENCIES(CC)],
12552
[define([AC_PROG_CC],
12553
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
12554
AC_PROVIDE_IFELSE([AC_PROG_CXX],
12555
[_AM_DEPENDENCIES(CXX)],
12556
[define([AC_PROG_CXX],
12557
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
12562
# When config.status generates a header, we must update the stamp-h file.
12563
# This file resides in the same directory as the config header
12564
# that is generated. The stamp files are numbered to have different names.
12566
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
12567
# loop where config.status creates the headers, so we can generate
12568
# our stamp files there.
12569
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
12570
[# Compute $1's index in $config_headers.
12572
for _am_header in $config_headers :; do
12573
case $_am_header in
12577
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
12580
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
12582
# Copyright 2002 Free Software Foundation, Inc.
12584
# This program is free software; you can redistribute it and/or modify
12585
# it under the terms of the GNU General Public License as published by
12586
# the Free Software Foundation; either version 2, or (at your option)
12587
# any later version.
12589
# This program is distributed in the hope that it will be useful,
12590
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12591
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12592
# GNU General Public License for more details.
12594
# You should have received a copy of the GNU General Public License
12595
# along with this program; if not, write to the Free Software
12596
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
12598
# AM_AUTOMAKE_VERSION(VERSION)
21
12599
# ----------------------------
22
12600
# Automake X.Y traces this macro to ensure aclocal.m4 has been
23
12601
# generated from the m4 files accompanying Automake X.Y.
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
12602
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
26
12604
# AM_SET_CURRENT_AUTOMAKE_VERSION
27
12605
# -------------------------------
28
12606
# Call AM_AUTOMAKE_VERSION so it can be traced.
29
12607
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30
12608
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
12609
[AM_AUTOMAKE_VERSION([1.7.9])])
12611
# Helper functions for option handling. -*- Autoconf -*-
12613
# Copyright 2001, 2002 Free Software Foundation, Inc.
12615
# This program is free software; you can redistribute it and/or modify
12616
# it under the terms of the GNU General Public License as published by
12617
# the Free Software Foundation; either version 2, or (at your option)
12618
# any later version.
12620
# This program is distributed in the hope that it will be useful,
12621
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12622
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12623
# GNU General Public License for more details.
12625
# You should have received a copy of the GNU General Public License
12626
# along with this program; if not, write to the Free Software
12627
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12632
# _AM_MANGLE_OPTION(NAME)
12633
# -----------------------
12634
AC_DEFUN([_AM_MANGLE_OPTION],
12635
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
12637
# _AM_SET_OPTION(NAME)
12638
# ------------------------------
12639
# Set option NAME. Presently that only means defining a flag for this option.
12640
AC_DEFUN([_AM_SET_OPTION],
12641
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
12643
# _AM_SET_OPTIONS(OPTIONS)
12644
# ----------------------------------
12645
# OPTIONS is a space-separated list of Automake options.
12646
AC_DEFUN([_AM_SET_OPTIONS],
12647
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
12649
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
12650
# -------------------------------------------
12651
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12652
AC_DEFUN([_AM_IF_OPTION],
12653
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
12656
# Check to make sure that the build environment is sane.
12659
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
12661
# This program is free software; you can redistribute it and/or modify
12662
# it under the terms of the GNU General Public License as published by
12663
# the Free Software Foundation; either version 2, or (at your option)
12664
# any later version.
12666
# This program is distributed in the hope that it will be useful,
12667
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12668
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12669
# GNU General Public License for more details.
12671
# You should have received a copy of the GNU General Public License
12672
# along with this program; if not, write to the Free Software
12673
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12680
AC_DEFUN([AM_SANITY_CHECK],
12681
[AC_MSG_CHECKING([whether build environment is sane])
12684
echo timestamp > conftest.file
12685
# Do `set' in a subshell so we don't clobber the current shell's
12686
# arguments. Must try -L first in case configure is actually a
12687
# symlink; some systems play weird games with the mod time of symlinks
12688
# (eg FreeBSD returns the mod time of the symlink's containing
12691
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
12692
if test "$[*]" = "X"; then
12694
set X `ls -t $srcdir/configure conftest.file`
12696
rm -f conftest.file
12697
if test "$[*]" != "X $srcdir/configure conftest.file" \
12698
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
12700
# If neither matched, then we have a broken ls. This can happen
12701
# if, for instance, CONFIG_SHELL is bash and it inherits a
12702
# broken ls alias from the environment. This has actually
12703
# happened. Such a system could not be considered "sane".
12704
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
12705
alias in your environment])
12708
test "$[2]" = conftest.file
12714
AC_MSG_ERROR([newly created file is older than distributed files!
12715
Check your system clock])
12717
AC_MSG_RESULT(yes)])
12722
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
12724
# This program is free software; you can redistribute it and/or modify
12725
# it under the terms of the GNU General Public License as published by
12726
# the Free Software Foundation; either version 2, or (at your option)
12727
# any later version.
12729
# This program is distributed in the hope that it will be useful,
12730
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12731
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12732
# GNU General Public License for more details.
12734
# You should have received a copy of the GNU General Public License
12735
# along with this program; if not, write to the Free Software
12736
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12741
# AM_MISSING_PROG(NAME, PROGRAM)
12742
# ------------------------------
12743
AC_DEFUN([AM_MISSING_PROG],
12744
[AC_REQUIRE([AM_MISSING_HAS_RUN])
12745
$1=${$1-"${am_missing_run}$2"}
12749
# AM_MISSING_HAS_RUN
12750
# ------------------
12751
# Define MISSING if not defined so far and test if it supports --run.
12752
# If it does, set am_missing_run to use it, otherwise, to nothing.
12753
AC_DEFUN([AM_MISSING_HAS_RUN],
12754
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12755
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
12756
# Use eval to expand $SHELL
12757
if eval "$MISSING --run true"; then
12758
am_missing_run="$MISSING --run "
12761
AC_MSG_WARN([`missing' script is too old or missing])
12765
# AM_AUX_DIR_EXPAND
12767
# Copyright 2001 Free Software Foundation, Inc.
12769
# This program is free software; you can redistribute it and/or modify
12770
# it under the terms of the GNU General Public License as published by
12771
# the Free Software Foundation; either version 2, or (at your option)
12772
# any later version.
12774
# This program is distributed in the hope that it will be useful,
12775
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12776
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12777
# GNU General Public License for more details.
12779
# You should have received a copy of the GNU General Public License
12780
# along with this program; if not, write to the Free Software
12781
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41
12784
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
12785
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to