3
dnl This file is part of the KDE libraries/packages
4
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
7
dnl This file is free software; you can redistribute it and/or
8
dnl modify it under the terms of the GNU Library General Public
9
dnl License as published by the Free Software Foundation; either
10
dnl version 2 of the License, or (at your option) any later version.
12
dnl This library is distributed in the hope that it will be useful,
13
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
dnl Library General Public License for more details.
17
dnl You should have received a copy of the GNU Library General Public License
18
dnl along with this library; see the file COPYING.LIB. If not, write to
19
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
dnl Boston, MA 02111-1307, USA.
23
dnl Please do not modify this file unless you expect your modifications to be
24
dnl carried into every other module in the repository.
26
dnl Single-module modifications are best placed in configure.in for kdelibs
27
dnl and kdebase or configure.in.in if present.
30
dnl Internal subroutine of AC_PATH_X.
31
dnl Set ac_x_includes and/or ac_x_libraries.
32
AC_DEFUN([KDE_PATH_X_DIRECT],
34
AC_REQUIRE([KDE_CHECK_LIB64])
36
if test "$ac_x_includes" = NO; then
37
# Guess where to find include files, by looking for this one X11 .h file.
38
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
40
# First, try using that file with no special directory specified.
41
AC_TRY_CPP([#include <$x_direct_test_include>],
42
[# We can compile using X headers with no special include directory.
44
[# Look for the header file in a standard set of common directories.
45
# Check X11 before X11Rn because it is often a symlink to the current release.
57
/usr/local/X11/include \
58
/usr/local/X11R6/include \
59
/usr/local/X11R5/include \
60
/usr/local/X11R4/include \
62
/usr/local/include/X11 \
63
/usr/local/include/X11R6 \
64
/usr/local/include/X11R5 \
65
/usr/local/include/X11R4 \
69
/usr/XFree86/include/X11 \
73
/usr/unsupported/include \
75
/usr/local/x11r5/include \
76
/usr/lpp/Xamples/include \
78
/usr/openwin/include \
79
/usr/openwin/share/include \
82
if test -r "$ac_dir/$x_direct_test_include"; then
87
fi # $ac_x_includes = NO
89
if test "$ac_x_libraries" = NO; then
90
# Check for the libraries.
92
test -z "$x_direct_test_library" && x_direct_test_library=Xt
93
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
95
# See if we find them without any special options.
96
# Don't add to $LIBS permanently.
98
LIBS="-l$x_direct_test_library $LIBS"
99
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
100
[LIBS="$ac_save_LIBS"
101
# We can link X programs with no special library path.
103
[LIBS="$ac_save_LIBS"
104
# First see if replacing the include by lib works.
105
# Check X11 before X11Rn because it is often a symlink to the current release.
106
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
107
/usr/X11/lib${kdelibsuff} \
108
/usr/X11R6/lib${kdelibsuff} \
109
/usr/X11R5/lib${kdelibsuff} \
110
/usr/X11R4/lib${kdelibsuff} \
112
/usr/lib${kdelibsuff}/X11 \
113
/usr/lib${kdelibsuff}/X11R6 \
114
/usr/lib${kdelibsuff}/X11R5 \
115
/usr/lib${kdelibsuff}/X11R4 \
117
/usr/local/X11/lib${kdelibsuff} \
118
/usr/local/X11R6/lib${kdelibsuff} \
119
/usr/local/X11R5/lib${kdelibsuff} \
120
/usr/local/X11R4/lib${kdelibsuff} \
122
/usr/local/lib${kdelibsuff}/X11 \
123
/usr/local/lib${kdelibsuff}/X11R6 \
124
/usr/local/lib${kdelibsuff}/X11R5 \
125
/usr/local/lib${kdelibsuff}/X11R4 \
127
/usr/X386/lib${kdelibsuff} \
128
/usr/x386/lib${kdelibsuff} \
129
/usr/XFree86/lib${kdelibsuff}/X11 \
131
/usr/lib${kdelibsuff} \
132
/usr/local/lib${kdelibsuff} \
133
/usr/unsupported/lib${kdelibsuff} \
134
/usr/athena/lib${kdelibsuff} \
135
/usr/local/x11r5/lib${kdelibsuff} \
136
/usr/lpp/Xamples/lib${kdelibsuff} \
137
/lib/usr/lib${kdelibsuff}/X11 \
139
/usr/openwin/lib${kdelibsuff} \
140
/usr/openwin/share/lib${kdelibsuff} \
143
dnl Don't even attempt the hair of trying to link an X program!
144
for ac_extension in a so sl; do
145
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
146
ac_x_libraries=$ac_dir
151
fi # $ac_x_libraries = NO
155
dnl ------------------------------------------------------------------------
156
dnl Find a file (or one of more files in a list of dirs)
157
dnl ------------------------------------------------------------------------
159
AC_DEFUN([AC_FIND_FILE],
166
echo "configure: __oline__: $i/$j" >&AC_FD_CC
167
if test -r "$i/$j"; then
168
echo "taking that" >&AC_FD_CC
176
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
177
dnl if-not-found, test-parameter, prepend-path)
179
dnl Look for program-name in list-of-dirs+$PATH.
180
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
181
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
182
dnl test-parameter: if set, the program is executed with this arg,
183
dnl and only a successful exit code is required.
184
AC_DEFUN([KDE_FIND_PATH],
186
AC_MSG_CHECKING([for $1])
187
if test -n "$$2"; then
190
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
192
AC_CACHE_VAL(kde_cv_path_$kde_cache,
201
if test -z "$6"; then dnl Append dirs in PATH (default)
203
else dnl Prepend dirs in PATH (if 6th arg is set)
209
if test -x "$dir/$1"; then
212
evalstr="$dir/$1 $5 2>&1 "
213
if eval $evalstr; then
214
kde_cv_path="$dir/$1"
218
kde_cv_path="$dir/$1"
224
eval "kde_cv_path_$kde_cache=$kde_cv_path"
228
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
232
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
233
AC_MSG_RESULT(not found)
236
AC_MSG_RESULT($kde_cv_path)
242
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
244
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
245
Please check whether you installed Qt correctly.
246
You need to have a running moc binary.
247
configure tried to run $ac_cv_path_moc and the test didn't
248
succeed. If configure shouldn't have tried this one, set
249
the environment variable MOC to the right one before running
254
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
256
AC_MSG_WARN([No Qt ui compiler (uic) found!
257
Please check whether you installed Qt correctly.
258
You need to have a running uic binary.
259
configure tried to run $ac_cv_path_uic and the test didn't
260
succeed. If configure shouldn't have tried this one, set
261
the environment variable UIC to the right one before running
267
AC_DEFUN([KDE_CHECK_UIC_FLAG],
269
AC_MSG_CHECKING([whether uic supports -$1 ])
270
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
271
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
273
cat >conftest.ui <<EOT
274
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
276
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
277
if AC_TRY_EVAL(ac_uic_testrun); then
278
eval "kde_cv_prog_uic_$kde_cache=yes"
280
eval "kde_cv_prog_uic_$kde_cache=no"
285
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
297
dnl ------------------------------------------------------------------------
298
dnl Find the meta object compiler and the ui compiler in the PATH,
299
dnl in $QTDIR/bin, and some more usual places
300
dnl ------------------------------------------------------------------------
302
AC_DEFUN([AC_PATH_QT_MOC_UIC],
304
AC_REQUIRE([KDE_CHECK_PERL])
306
for dir in $kde_qt_dirs; do
307
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
309
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
310
if test ! "$ac_qt_bindir" = "NO"; then
311
qt_bindirs="$ac_qt_bindir $qt_bindirs"
314
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
315
if test -z "$UIC_NOT_NEEDED"; then
316
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
317
if test -z "$UIC_PATH" ; then
318
KDE_UIC_ERROR_MESSAGE
323
if test $kde_qtver = 3; then
324
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
325
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
327
if test x$ac_uic_supports_libpath = xyes; then
328
UIC="$UIC -L \$(kde_widgetdir)"
330
if test x$ac_uic_supports_nounload = xyes; then
336
UIC="echo uic not available: "
343
if test $kde_qtver = 3; then
350
AC_DEFUN([KDE_1_CHECK_PATHS],
352
KDE_1_CHECK_PATH_HEADERS
356
if test -n "$USE_RPATH"; then
358
if test -n "$kde_libraries"; then
359
KDE_TEST_RPATH="-R $kde_libraries"
362
if test -n "$qt_libraries"; then
363
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
366
if test -n "$x_libraries"; then
367
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
370
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
373
AC_MSG_CHECKING([for KDE libraries installed])
374
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
376
if AC_TRY_EVAL(ac_link) && test -s conftest; then
379
AC_MSG_ERROR([your system fails at linking a small KDE application!
380
Check, if your compiler is installed correctly and if you have used the
381
same compiler to compile Qt and kdelibs as you did use now.
382
For more details about this problem, look at the end of config.log.])
385
if eval `KDEDIR= ./conftest 2>&5`; then
391
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
392
kde_have_all_paths=yes
394
KDE_SET_PATHS($kde_result)
398
AC_DEFUN([KDE_SET_PATHS],
400
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
401
kde_htmldir=\"$kde_htmldir\" \
402
kde_appsdir=\"$kde_appsdir\" \
403
kde_icondir=\"$kde_icondir\" \
404
kde_sounddir=\"$kde_sounddir\" \
405
kde_datadir=\"$kde_datadir\" \
406
kde_locale=\"$kde_locale\" \
407
kde_cgidir=\"$kde_cgidir\" \
408
kde_confdir=\"$kde_confdir\" \
409
kde_kcfgdir=\"$kde_kcfgdir\" \
410
kde_mimedir=\"$kde_mimedir\" \
411
kde_toolbardir=\"$kde_toolbardir\" \
412
kde_wallpaperdir=\"$kde_wallpaperdir\" \
413
kde_templatesdir=\"$kde_templatesdir\" \
414
kde_bindir=\"$kde_bindir\" \
415
kde_servicesdir=\"$kde_servicesdir\" \
416
kde_servicetypesdir=\"$kde_servicetypesdir\" \
417
kde_moduledir=\"$kde_moduledir\" \
418
kde_styledir=\"$kde_styledir\" \
419
kde_widgetdir=\"$kde_widgetdir\" \
420
xdg_appsdir=\"$xdg_appsdir\" \
421
xdg_menudir=\"$xdg_menudir\" \
422
xdg_directorydir=\"$xdg_directorydir\" \
426
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
428
if test "$1" = "default"; then
430
if test -z "$kde_htmldir"; then
431
kde_htmldir='\${datadir}/doc/HTML'
433
if test -z "$kde_appsdir"; then
434
kde_appsdir='\${datadir}/applnk'
436
if test -z "$kde_icondir"; then
437
kde_icondir='\${datadir}/icons'
439
if test -z "$kde_sounddir"; then
440
kde_sounddir='\${datadir}/sounds'
442
if test -z "$kde_datadir"; then
443
kde_datadir='\${datadir}/apps'
445
if test -z "$kde_locale"; then
446
kde_locale='\${datadir}/locale'
448
if test -z "$kde_cgidir"; then
449
kde_cgidir='\${exec_prefix}/cgi-bin'
451
if test -z "$kde_confdir"; then
452
kde_confdir='\${datadir}/config'
454
if test -z "$kde_kcfgdir"; then
455
kde_kcfgdir='\${datadir}/config.kcfg'
457
if test -z "$kde_mimedir"; then
458
kde_mimedir='\${datadir}/mimelnk'
460
if test -z "$kde_toolbardir"; then
461
kde_toolbardir='\${datadir}/toolbar'
463
if test -z "$kde_wallpaperdir"; then
464
kde_wallpaperdir='\${datadir}/wallpapers'
466
if test -z "$kde_templatesdir"; then
467
kde_templatesdir='\${datadir}/templates'
469
if test -z "$kde_bindir"; then
470
kde_bindir='\${exec_prefix}/bin'
472
if test -z "$kde_servicesdir"; then
473
kde_servicesdir='\${datadir}/services'
475
if test -z "$kde_servicetypesdir"; then
476
kde_servicetypesdir='\${datadir}/servicetypes'
478
if test -z "$kde_moduledir"; then
479
if test "$kde_qtver" = "2"; then
480
kde_moduledir='\${libdir}/kde2'
482
kde_moduledir='\${libdir}/kde3'
485
if test -z "$kde_styledir"; then
486
kde_styledir='\${libdir}/kde3/plugins/styles'
488
if test -z "$kde_widgetdir"; then
489
kde_widgetdir='\${libdir}/kde3/plugins/designer'
491
if test -z "$xdg_appsdir"; then
492
xdg_appsdir='\${datadir}/applications/kde'
494
if test -z "$xdg_menudir"; then
495
xdg_menudir='\${sysconfdir}/xdg/menus'
497
if test -z "$xdg_directorydir"; then
498
xdg_directorydir='\${datadir}/desktop-directories'
501
KDE_SET_PATHS(defaults)
505
if test $kde_qtver = 1; then
506
AC_MSG_RESULT([compiling])
509
AC_MSG_ERROR([path checking not yet supported for KDE 2])
515
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
516
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
517
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
518
test -z "$kde_datadir" || test -z "$kde_locale" ||
519
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
520
test -z "$kde_kcfgdir" ||
521
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
522
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
523
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
524
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
525
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
526
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
527
test "x$kde_have_all_paths" != "xyes"; then
528
kde_have_all_paths=no
532
AC_DEFUN([KDE_MISSING_PROG_ERROR],
534
AC_MSG_ERROR([The important program $1 was not found!
535
Please check whether you installed KDE correctly.
539
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
541
AC_MSG_ERROR([The important program $1 was not found!
542
Please check whether you installed aRts correctly or use
543
--without-arts to compile without aRts support (this will remove functionality).
547
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
549
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
550
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
551
if test -n "$KDEDIRS"; then
554
for dir in $KDEDIRS; do
555
kde_default_bindirs="$dir/bin $kde_default_bindirs "
561
AC_DEFUN([KDE_SUBST_PROGRAMS],
564
AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
565
[build_arts=$withval],
568
AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
569
if test "$build_arts" = "no"; then
570
AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
573
KDE_SET_DEFAULT_BINDIRS
574
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
575
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
576
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
577
if test "$build_arts" '!=' "no"; then
578
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
579
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
581
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
585
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
589
if test "$kde_qtver" = "3"; then
590
if test "$kde_qtsubver" -le 1; then
593
if test "$kde_qtsubver" -le 2; then
599
if test -n "$kde32ornewer"; then
600
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
601
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
603
if test -n "$kde33ornewer"; then
604
KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
605
AC_SUBST(MAKEKDEWIDGETS)
607
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
609
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
610
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
611
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
612
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
613
if test "$KDE_XSL_STYLESHEET" = "NO"; then
614
KDE_XSL_STYLESHEET=""
616
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
620
DCOP_DEPENDENCIES='$(DCOPIDL)'
621
if test -n "$kde32ornewer"; then
622
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
623
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
624
AC_SUBST(KCONFIG_COMPILER)
625
AC_SUBST(KCFG_DEPENDENCIES)
629
AC_SUBST(DCOPIDL2CPP)
630
AC_SUBST(DCOP_DEPENDENCIES)
632
AC_SUBST(ARTSCCONFIG)
634
AC_SUBST(KDE_XSL_STYLESHEET)
638
AC_DEFUN([AC_CREATE_KFSSTND],
640
AC_REQUIRE([AC_CHECK_RPATH])
642
AC_MSG_CHECKING([for KDE paths])
645
AC_CACHE_VAL(kde_cv_all_paths,
647
KDE_SET_DEFAULT_PATHS($1)
650
eval "$kde_cv_all_paths"
651
KDE_CHECK_PATHS_FOR_COMPLETENESS
652
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
653
# wrong values were cached, may be, we can set better ones
655
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
656
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
657
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
658
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
662
xdg_appsdir = xdg_menudir= xdg_directorydir=
663
KDE_SET_DEFAULT_PATHS($1)
664
eval "$kde_cv_all_paths"
665
KDE_CHECK_PATHS_FOR_COMPLETENESS
666
kde_result="$kde_result (cache overridden)"
668
if test "$kde_have_all_paths" = "no"; then
669
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
670
Since it had compiled and linked before, it must be a strange problem on your system.
671
Look at config.log for details. If you are not able to fix this, look at
672
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
673
(If you're using an egcs version on Linux, you may update binutils!)
677
AC_MSG_RESULT($kde_result)
686
AC_DEFUN([AC_SUBST_KFSSTND],
688
AC_SUBST(kde_htmldir)
689
AC_SUBST(kde_appsdir)
690
AC_SUBST(kde_icondir)
691
AC_SUBST(kde_sounddir)
692
AC_SUBST(kde_datadir)
694
AC_SUBST(kde_confdir)
695
AC_SUBST(kde_kcfgdir)
696
AC_SUBST(kde_mimedir)
697
AC_SUBST(kde_wallpaperdir)
699
dnl X Desktop Group standards
700
AC_SUBST(xdg_appsdir)
701
AC_SUBST(xdg_menudir)
702
AC_SUBST(xdg_directorydir)
704
AC_SUBST(kde_templatesdir)
705
AC_SUBST(kde_servicesdir)
706
AC_SUBST(kde_servicetypesdir)
707
AC_SUBST(kde_moduledir)
708
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
709
AC_SUBST(kde_styledir)
710
AC_SUBST(kde_widgetdir)
711
if test "$kde_qtver" = 1; then
712
kde_minidir="$kde_icondir/mini"
714
# for KDE 1 - this breaks KDE2 apps using minidir, but
715
# that's the plan ;-/
716
kde_minidir="/dev/null"
718
dnl AC_SUBST(kde_minidir)
719
dnl AC_SUBST(kde_cgidir)
720
dnl AC_SUBST(kde_toolbardir)
723
AC_DEFUN([KDE_MISC_TESTS],
725
dnl Checks for libraries.
726
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
728
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
731
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
732
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
733
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
734
You should install libcrypt from another source or configure with PAM
739
if test $kde_have_crypt = yes; then
740
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
743
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
744
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
745
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
746
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
748
AC_CHECK_FUNC(inet_ntoa)
749
if test $ac_cv_func_inet_ntoa = no; then
750
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
752
AC_CHECK_FUNC(connect)
753
if test $ac_cv_func_connect = no; then
754
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
758
AC_CHECK_FUNC(remove)
759
if test $ac_cv_func_remove = no; then
760
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
763
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
764
AC_CHECK_FUNC(shmat, ,
765
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
767
# more headers that need to be explicitly included on darwin
768
AC_CHECK_HEADERS(sys/types.h stdint.h)
770
# sys/bitypes.h is needed for uint32_t and friends on Tru64
771
AC_CHECK_HEADERS(sys/bitypes.h)
773
# darwin requires a poll emulation library
774
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
776
# for some image handling on Mac OS X
777
AC_CHECK_HEADERS(Carbon/Carbon.h)
779
# CoreAudio framework
780
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
781
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
782
FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
787
AC_SUBST(FRAMEWORK_COREAUDIO)
788
LIBSOCKET="$X_EXTRA_LIBS"
790
AC_SUBST(X_EXTRA_LIBS)
791
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
794
case $host in dnl this *is* LynxOS specific
796
AC_MSG_CHECKING([LynxOS header file wrappers])
797
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
798
AC_MSG_RESULT(disabled)
799
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
807
# darwin needs this to initialize the environment
808
AC_CHECK_HEADERS(crt_externs.h)
809
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
811
AH_VERBATIM(_DARWIN_ENVIRON,
813
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
814
# include <sys/time.h>
815
# include <crt_externs.h>
816
# define environ (*_NSGetEnviron())
820
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
823
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
824
* that defines bzero.
832
AC_CHECK_FUNCS([vsnprintf snprintf])
836
* On HP-UX, the declaration of vsnprintf() is needed every time !
839
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
849
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
853
int snprintf(char *str, size_t n, char const *fmt, ...);
859
dnl ------------------------------------------------------------------------
860
dnl Find the header files and libraries for X-Windows. Extended the
862
dnl ------------------------------------------------------------------------
866
AC_REQUIRE([KDE_MISC_TESTS])dnl
867
AC_REQUIRE([KDE_CHECK_LIB64])
871
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
872
kde_use_qt_emb=$enableval,
878
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
879
kde_use_qt_emb_palm=$enableval,
880
kde_use_qt_emb_palm=no
885
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
886
kde_use_qt_mac=$enableval,
890
# used to disable x11-specific stuff on special platforms
891
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
893
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
895
AC_MSG_CHECKING(for X)
897
AC_CACHE_VAL(kde_cv_have_x,
898
[# One or both of the vars are not set, and there is no cached value.
899
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
902
kde_x_includes=$x_includes
904
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
907
kde_x_libraries=$x_libraries
910
# below we use the standard autoconf calls
911
ac_x_libraries=$kde_x_libraries
912
ac_x_includes=$kde_x_includes
915
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
916
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
917
dnl location. The correct location is /usr/lib32 or an undefined value
918
dnl (the linker is smart enough to pick the correct default library).
919
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
920
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
921
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
922
dnl x_includes should be left alone.
930
if test -z "$ac_x_includes"; then
933
if test -z "$ac_x_libraries"; then
934
ac_x_libraries="/usr/lib${kdelibsuff}"
937
#from now on we use our own again
939
# when the user already gave --x-includes, we ignore
940
# what the standard autoconf macros told us.
941
if test "$kde_x_includes" = NO; then
942
kde_x_includes=$ac_x_includes
945
# for --x-libraries too
946
if test "$kde_x_libraries" = NO; then
947
kde_x_libraries=$ac_x_libraries
950
if test "$kde_x_includes" = NO; then
951
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
954
if test "$kde_x_libraries" = NO; then
955
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
958
# Record where we found X for the cache.
959
kde_cv_have_x="have_x=yes \
960
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
963
eval "$kde_cv_have_x"
965
if test "$have_x" != yes; then
966
AC_MSG_RESULT($have_x)
969
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
972
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
974
x_includes="."; dnl better than nothing :-
976
x_includes=$kde_x_includes
977
X_INCLUDES="-I$x_includes"
980
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
982
x_libraries="/usr/lib"; dnl better than nothing :-
984
x_libraries=$kde_x_libraries
985
X_LDFLAGS="-L$x_libraries"
987
all_includes="$X_INCLUDES"
988
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
990
# Check for libraries that X11R6 Xt/Xaw programs need.
991
ac_save_LDFLAGS="$LDFLAGS"
992
LDFLAGS="$LDFLAGS $X_LDFLAGS"
993
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
994
# check for ICE first), but we must link in the order -lSM -lICE or
995
# we get undefined symbols. So assume we have SM if we have ICE.
996
# These have to be linked with before -lX11, unlike the other
997
# libraries we check for below, so use a different variable.
998
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
999
AC_CHECK_LIB(ICE, IceConnectionNumber,
1000
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1001
LDFLAGS="$ac_save_LDFLAGS"
1003
LIB_X11='-lX11 $(LIBSOCKET)'
1005
AC_MSG_CHECKING(for libXext)
1006
AC_CACHE_VAL(kde_cv_have_libXext,
1008
kde_ldflags_safe="$LDFLAGS"
1009
kde_libs_safe="$LIBS"
1011
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1012
LIBS="-lXext -lX11 $LIBSOCKET"
1017
# include <stdlib.h>
1021
printf("hello Xext\n");
1023
kde_cv_have_libXext=yes,
1024
kde_cv_have_libXext=no
1027
LDFLAGS=$kde_ldflags_safe
1031
AC_MSG_RESULT($kde_cv_have_libXext)
1033
if test "$kde_cv_have_libXext" = "no"; then
1034
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1035
can't find it itself, we stop here assuming that make wouldn't find
1042
elif test "$kde_use_qt_emb" = "yes"; then
1043
dnl We're using QT Embedded
1045
CXXFLAGS="$CXXFLAGS -fno-rtti"
1046
QTE_NORTTI="-fno-rtti -DQWS"
1056
elif test "$kde_use_qt_mac" = "yes"; then
1057
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1058
dnl be included to get the information) --Sam
1059
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1060
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1071
AC_SUBST(X_PRE_LIBS)
1073
AC_SUBST(LIB_XRENDER)
1075
AC_SUBST(X_INCLUDES)
1077
AC_SUBST(x_includes)
1078
AC_SUBST(x_libraries)
1079
AC_SUBST(QTE_NORTTI)
1084
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1086
AC_REQUIRE([KDE_USE_QT])
1087
cat > conftest.$ac_ext <<EOF
1088
#include "confdefs.h"
1089
#include <qglobal.h>
1090
#include <qapplication.h>
1092
if test "$kde_qtver" = "2"; then
1093
cat >> conftest.$ac_ext <<EOF
1095
#include <qstring.h>
1099
if test $kde_qtsubver -gt 0; then
1100
cat >> conftest.$ac_ext <<EOF
1101
#if QT_VERSION < 210
1108
if test "$kde_qtver" = "3"; then
1109
cat >> conftest.$ac_ext <<EOF
1110
#include <qcursor.h>
1111
#include <qstylefactory.h>
1112
#include <private/qucomextra_p.h>
1116
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1117
cat >> conftest.$ac_ext <<EOF
1123
if test "$kde_qtver" = "2"; then
1124
cat >> conftest.$ac_ext <<EOF
1125
QStringList *t = new QStringList();
1128
if test $kde_qtsubver -gt 0; then
1129
cat >> conftest.$ac_ext <<EOF
1131
s.setLatin1("Elvis is alive", 14);
1135
if test "$kde_qtver" = "3"; then
1136
cat >> conftest.$ac_ext <<EOF
1137
(void)QStyleFactory::create(QString::null);
1138
QCursor c(Qt::WhatsThisCursor);
1141
cat >> conftest.$ac_ext <<EOF
1147
AC_DEFUN([KDE_USE_QT],
1149
if test -z "$1"; then
1150
# Current default Qt version: 3.3
1154
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1155
# following is the check if subversion isnt found in passed argument
1156
if test "$kde_qtsubver" = "$1"; then
1159
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1160
if test "$kde_qtver" = "1"; then
1165
if test -z "$2"; then
1166
if test "$kde_qtver" = "2"; then
1167
if test $kde_qtsubver -gt 0; then
1168
kde_qt_minversion=">= Qt 2.2.2"
1170
kde_qt_minversion=">= Qt 2.0.2"
1173
if test "$kde_qtver" = "3"; then
1174
if test $kde_qtsubver -gt 0; then
1175
if test $kde_qtsubver -gt 1; then
1176
if test $kde_qtsubver -gt 2; then
1177
kde_qt_minversion=">= Qt 3.3"
1179
kde_qt_minversion=">= Qt 3.2"
1182
kde_qt_minversion=">= Qt 3.1 (20021021)"
1185
kde_qt_minversion=">= Qt 3.0"
1188
if test "$kde_qtver" = "1"; then
1189
kde_qt_minversion=">= 1.42 and < 2.0"
1192
kde_qt_minversion="$2"
1195
if test -z "$3"; then
1196
if test $kde_qtver = 3; then
1197
if test $kde_qtsubver -gt 0; then
1198
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1199
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1200
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1202
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1205
if test $kde_qtver = 2; then
1206
if test $kde_qtsubver -gt 0; then
1207
kde_qt_verstring="QT_VERSION >= 222"
1209
kde_qt_verstring="QT_VERSION >= 200"
1212
if test $kde_qtver = 1; then
1213
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1216
kde_qt_verstring="$3"
1219
if test $kde_qtver = 3; then
1220
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1222
if test $kde_qtver = 2; then
1223
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1225
if test $kde_qtver = 1; then
1226
kde_qt_dirs="$QTDIR /usr/lib/qt"
1230
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1232
AC_REQUIRE([KDE_USE_QT])
1233
AC_MSG_CHECKING([if Qt compiles without flags])
1234
AC_CACHE_VAL(kde_cv_qt_direct,
1238
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1239
ac_LIBRARY_PATH="$LIBRARY_PATH"
1240
ac_cxxflags_safe="$CXXFLAGS"
1241
ac_ldflags_safe="$LDFLAGS"
1242
ac_libs_safe="$LIBS"
1244
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1245
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1246
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1247
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1249
LIBS="$LIBQT $LIBSOCKET"
1252
export LD_LIBRARY_PATH
1256
KDE_PRINT_QT_PROGRAM
1258
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1259
kde_cv_qt_direct="yes"
1261
kde_cv_qt_direct="no"
1262
echo "configure: failed program was:" >&AC_FD_CC
1263
cat conftest.$ac_ext >&AC_FD_CC
1267
CXXFLAGS="$ac_cxxflags_safe"
1268
LDFLAGS="$ac_ldflags_safe"
1269
LIBS="$ac_libs_safe"
1271
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1272
export LD_LIBRARY_PATH
1273
LIBRARY_PATH="$ac_LIBRARY_PATH"
1278
if test "$kde_cv_qt_direct" = "yes"; then
1287
dnl ------------------------------------------------------------------------
1288
dnl Try to find the Qt headers and libraries.
1289
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1290
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1291
dnl ------------------------------------------------------------------------
1293
AC_DEFUN([AC_PATH_QT_1_3],
1295
AC_REQUIRE([K_PATH_X])
1296
AC_REQUIRE([KDE_USE_QT])
1297
AC_REQUIRE([KDE_CHECK_LIB64])
1299
dnl ------------------------------------------------------------------------
1300
dnl Add configure flag to enable linking to MT version of Qt library.
1301
dnl ------------------------------------------------------------------------
1305
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1306
kde_use_qt_mt=$enableval,
1308
if test $kde_qtver = 3; then
1318
dnl ------------------------------------------------------------------------
1319
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1320
dnl ------------------------------------------------------------------------
1324
if test "x$kde_use_qt_mt" = "xyes"; then
1326
if test "x$kde_use_threading" = "xyes"; then
1327
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1328
KDE_MT_LDFLAGS="$USE_THREADS"
1329
KDE_MT_LIBS="$LIBPTHREAD"
1334
AC_SUBST(KDE_MT_LDFLAGS)
1335
AC_SUBST(KDE_MT_LIBS)
1337
kde_qt_was_given=yes
1339
dnl ------------------------------------------------------------------------
1340
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1341
dnl ------------------------------------------------------------------------
1342
if test -z "$LIBQT_GLOB"; then
1343
if test "x$kde_use_qt_emb" = "xyes"; then
1344
LIBQT_GLOB="libqte.*"
1346
LIBQT_GLOB="libqt.*"
1350
if test -z "$LIBQT"; then
1351
dnl ------------------------------------------------------------
1352
dnl If we got --enable-embedded then adjust the Qt library name.
1353
dnl ------------------------------------------------------------
1354
if test "x$kde_use_qt_emb" = "xyes"; then
1360
kde_int_qt="-l$qtlib"
1366
if test -z "$LIBQPE"; then
1367
dnl ------------------------------------------------------------
1368
dnl If we got --enable-palmtop then add -lqpe to the link line
1369
dnl ------------------------------------------------------------
1370
if test "x$kde_use_qt_emb" = "xyes"; then
1371
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1381
dnl ------------------------------------------------------------------------
1382
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1383
dnl ------------------------------------------------------------------------
1385
if test "x$kde_use_qt_mt" = "xyes"; then
1386
if test -z "$LIBQT"; then
1388
kde_int_qt="-l$qtlib-mt"
1391
kde_int_qt="$qtlib-mt"
1393
LIBQT_GLOB="lib$qtlib-mt.*"
1394
USING_QT_MT="using -mt"
1399
if test $kde_qtver != 1; then
1401
AC_REQUIRE([AC_FIND_PNG])
1402
AC_REQUIRE([AC_FIND_JPEG])
1403
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1406
if test $kde_qtver = 3; then
1407
AC_REQUIRE([KDE_CHECK_LIBDL])
1408
LIBQT="$LIBQT $LIBDL"
1411
AC_MSG_CHECKING([for Qt])
1413
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1414
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1416
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1420
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1421
[ ac_qt_includes="$withval"/include
1422
ac_qt_libraries="$withval"/lib${kdelibsuff}
1423
ac_qt_bindir="$withval"/bin
1426
AC_ARG_WITH(qt-includes,
1427
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1429
ac_qt_includes="$withval"
1432
kde_qt_libs_given=no
1434
AC_ARG_WITH(qt-libraries,
1435
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1436
[ ac_qt_libraries="$withval"
1437
kde_qt_libs_given=yes
1440
AC_CACHE_VAL(ac_cv_have_qt,
1441
[#try to guess Qt locations
1444
for dir in $kde_qt_dirs; do
1445
qt_incdirs="$qt_incdirs $dir/include $dir"
1447
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
1448
if test ! "$ac_qt_includes" = "NO"; then
1449
qt_incdirs="$ac_qt_includes $qt_incdirs"
1452
if test "$kde_qtver" != "1"; then
1453
kde_qt_header=qstyle.h
1455
kde_qt_header=qglobal.h
1458
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1459
ac_qt_includes="$qt_incdir"
1462
for dir in $kde_qt_dirs; do
1463
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1465
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1466
if test ! "$ac_qt_libraries" = "NO"; then
1467
qt_libdir=$ac_qt_libraries
1469
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1470
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1472
for dir in $qt_libdirs; do
1473
try="ls -1 $dir/${LIBQT_GLOB}"
1474
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1477
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1478
if test -e "$a"; then
1479
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1484
ac_qt_libraries="$qt_libdir"
1489
ac_cxxflags_safe="$CXXFLAGS"
1490
ac_ldflags_safe="$LDFLAGS"
1491
ac_libs_safe="$LIBS"
1493
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1494
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1495
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1497
KDE_PRINT_QT_PROGRAM
1499
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1502
echo "configure: failed program was:" >&AC_FD_CC
1503
cat conftest.$ac_ext >&AC_FD_CC
1504
ac_qt_libraries="NO"
1507
CXXFLAGS="$ac_cxxflags_safe"
1508
LDFLAGS="$ac_ldflags_safe"
1509
LIBS="$ac_libs_safe"
1512
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1513
ac_cv_have_qt="have_qt=no"
1516
if test "$ac_qt_includes" = NO; then
1517
if test "$ac_qt_libraries" = NO; then
1518
ac_qt_notfound="(headers and libraries)";
1520
ac_qt_notfound="(headers)";
1523
if test "x$kde_use_qt_mt" = "xyes"; then
1525
Make sure that you have compiled Qt with thread support!"
1526
ac_qt_notfound="(library $qtlib-mt)";
1528
ac_qt_notfound="(library $qtlib)";
1532
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1533
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1539
eval "$ac_cv_have_qt"
1541
if test "$have_qt" != yes; then
1542
AC_MSG_RESULT([$have_qt]);
1544
ac_cv_have_qt="have_qt=yes \
1545
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1546
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1548
qt_libraries="$ac_qt_libraries"
1549
qt_includes="$ac_qt_includes"
1552
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1553
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1556
AC_SUBST(qt_libraries)
1557
AC_SUBST(qt_includes)
1559
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1562
QT_INCLUDES="-I$qt_includes"
1563
all_includes="$QT_INCLUDES $all_includes"
1566
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1569
QT_LDFLAGS="-L$qt_libraries"
1570
all_libraries="$QT_LDFLAGS $all_libraries"
1572
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1574
AC_SUBST(QT_INCLUDES)
1575
AC_SUBST(QT_LDFLAGS)
1580
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1581
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1583
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1585
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1586
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1587
if test -e "$a"; then
1588
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1599
AC_DEFUN([AC_PATH_QT],
1604
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1606
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1608
if test x$ac_uic_supports_libpath = xyes; then
1610
AC_MSG_CHECKING([if UIC has KDE plugins available])
1611
AC_CACHE_VAL(kde_cv_uic_plugins,
1613
cat > actest.ui << EOF
1614
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1615
<class>NewConnectionDialog</class>
1616
<widget class="QDialog">
1617
<widget class="KLineEdit">
1618
<property name="name">
1619
<cstring>testInput</cstring>
1628
kde_cv_uic_plugins=no
1629
kde_line="$UIC_PATH -L $kde_widgetdir"
1630
if test x$ac_uic_supports_nounload = xyes; then
1631
kde_line="$kde_line -nounload"
1633
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1634
if AC_TRY_EVAL(kde_line); then
1635
# if you're trying to debug this check and think it's incorrect,
1636
# better check your installation. The check _is_ correct - your
1637
# installation is not.
1638
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1639
kde_cv_uic_plugins=yes
1642
rm -f actest.ui actest.cpp
1645
AC_MSG_RESULT([$kde_cv_uic_plugins])
1646
if test "$kde_cv_uic_plugins" != yes; then
1648
you need to install kdelibs first.
1650
If you did install kdelibs, then the Qt version that is picked up by
1651
this configure is not the same version you used to compile kdelibs.
1652
The Qt Plugin installed by kdelibs is *ONLY* loadable if its the
1653
same Qt version, compiled with the same compiler and the same Qt
1654
configuration settings.
1660
AC_DEFUN([KDE_CHECK_FINAL],
1662
AC_ARG_ENABLE(final,
1663
AC_HELP_STRING([--enable-final],
1664
[build size optimized apps (experimental - needs lots of memory)]),
1665
kde_use_final=$enableval, kde_use_final=no)
1667
if test "x$kde_use_final" = "xyes"; then
1668
KDE_USE_FINAL_TRUE=""
1669
KDE_USE_FINAL_FALSE="#"
1671
KDE_USE_FINAL_TRUE="#"
1672
KDE_USE_FINAL_FALSE=""
1674
AC_SUBST(KDE_USE_FINAL_TRUE)
1675
AC_SUBST(KDE_USE_FINAL_FALSE)
1678
AC_DEFUN([KDE_CHECK_CLOSURE],
1680
AC_ARG_ENABLE(closure,
1681
AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1682
kde_use_closure=$enableval, kde_use_closure=no)
1685
if test "x$kde_use_closure" = "xyes"; then
1686
KDE_USE_CLOSURE_TRUE=""
1687
KDE_USE_CLOSURE_FALSE="#"
1688
# CXXFLAGS="$CXXFLAGS $REPO"
1690
KDE_USE_CLOSURE_TRUE="#"
1691
KDE_USE_CLOSURE_FALSE=""
1695
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1696
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1697
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1698
[KDE_NO_UNDEFINED=""])],
1699
[KDE_NO_UNDEFINED=""])
1703
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1704
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1705
AC_SUBST(KDE_NO_UNDEFINED)
1708
dnl Check if the linker supports --enable-new-dtags and --as-needed
1709
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1711
AC_ARG_ENABLE(new_ldflags,
1712
AC_HELP_STRING([--enable-new-ldflags],
1713
[enable the new linker flags]),
1714
kde_use_new_ldflags=$enableval,
1715
kde_use_new_ldflags=no)
1717
LDFLAGS_AS_NEEDED=""
1718
LDFLAGS_NEW_DTAGS=""
1719
if test "x$kde_use_new_ldflags" = "xyes"; then
1720
LDFLAGS_NEW_DTAGS=""
1721
KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1722
[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1724
KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1725
[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1727
AC_SUBST(LDFLAGS_AS_NEEDED)
1728
AC_SUBST(LDFLAGS_NEW_DTAGS)
1731
AC_DEFUN([KDE_CHECK_NMCHECK],
1733
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1734
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1736
if test "$kde_use_nmcheck" = "yes"; then
1737
KDE_USE_NMCHECK_TRUE=""
1738
KDE_USE_NMCHECK_FALSE="#"
1740
KDE_USE_NMCHECK_TRUE="#"
1741
KDE_USE_NMCHECK_FALSE=""
1743
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1744
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1747
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1749
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1751
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1755
dnl ------------------------------------------------------------------------
1756
dnl Now, the same with KDE
1757
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1758
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1759
dnl ------------------------------------------------------------------------
1761
AC_DEFUN([AC_BASE_PATH_KDE],
1763
AC_REQUIRE([KDE_CHECK_STL])
1764
AC_REQUIRE([AC_PATH_QT])dnl
1765
AC_REQUIRE([KDE_CHECK_LIB64])
1768
AC_MSG_CHECKING([for KDE])
1770
if test "${prefix}" != NONE; then
1771
kde_includes=${includedir}
1772
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1774
kde_libraries=${libdir}
1775
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1784
AC_CACHE_VAL(ac_cv_have_kde,
1785
[#try to guess kde locations
1787
if test "$kde_qtver" = 1; then
1788
kde_check_header="ksock.h"
1789
kde_check_lib="libkdecore.la"
1791
kde_check_header="ksharedptr.h"
1792
kde_check_lib="libkio.la"
1795
if test -z "$1"; then
1797
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"
1798
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1799
kde_incdirs="$ac_kde_includes $kde_incdirs"
1800
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1801
ac_kde_includes="$kde_incdir"
1803
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1805
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1806
So, check this please and use another prefix!])
1809
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}"
1810
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1811
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1812
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1813
ac_kde_libraries="$kde_libdir"
1816
dnl this might be somewhere else
1817
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1819
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1821
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1822
So, check this please and use another prefix!])
1825
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1827
I can't find the designer plugins. These are required and should have been installed
1831
if test -n "$kde_widgetdir"; then
1832
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1836
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1837
ac_cv_have_kde="have_kde=no"
1839
ac_cv_have_kde="have_kde=yes \
1840
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1843
else dnl test -z $1, e.g. from kdelibs
1845
ac_cv_have_kde="have_kde=no"
1850
eval "$ac_cv_have_kde"
1852
if test "$have_kde" != "yes"; then
1853
if test "${prefix}" = NONE; then
1854
ac_kde_prefix="$ac_default_prefix"
1856
ac_kde_prefix="$prefix"
1858
if test "$exec_prefix" = NONE; then
1859
ac_kde_exec_prefix="$ac_kde_prefix"
1860
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1862
ac_kde_exec_prefix="$exec_prefix"
1863
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1866
kde_libraries="${libdir}"
1867
kde_includes="${includedir}"
1870
ac_cv_have_kde="have_kde=yes \
1871
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1872
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1874
kde_libraries="$ac_kde_libraries"
1875
kde_includes="$ac_kde_includes"
1877
AC_SUBST(kde_libraries)
1878
AC_SUBST(kde_includes)
1880
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1883
KDE_INCLUDES="-I$kde_includes"
1884
all_includes="$KDE_INCLUDES $all_includes"
1887
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1889
KDE_LDFLAGS="-L$kde_libraries"
1890
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1891
all_libraries="$KDE_LDFLAGS $all_libraries"
1894
AC_SUBST(KDE_LDFLAGS)
1895
AC_SUBST(KDE_INCLUDES)
1897
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1899
all_libraries="$all_libraries $USER_LDFLAGS"
1900
all_includes="$all_includes $USER_INCLUDES"
1901
AC_SUBST(all_includes)
1902
AC_SUBST(all_libraries)
1904
if test -z "$1"; then
1905
KDE_CHECK_UIC_PLUGINS
1908
ac_kde_libraries="$kde_libdir"
1915
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1917
AC_MSG_CHECKING(for extra includes)
1918
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1919
kde_use_extra_includes="$withval",
1920
kde_use_extra_includes=NONE
1923
if test -n "$kde_use_extra_includes" && \
1924
test "$kde_use_extra_includes" != "NONE"; then
1928
for dir in $kde_use_extra_includes; do
1929
kde_extra_includes="$kde_extra_includes $dir"
1930
USER_INCLUDES="$USER_INCLUDES -I$dir"
1933
kde_use_extra_includes="added"
1935
kde_use_extra_includes="no"
1937
AC_SUBST(USER_INCLUDES)
1939
AC_MSG_RESULT($kde_use_extra_includes)
1942
AC_MSG_CHECKING(for extra libs)
1943
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1944
kde_use_extra_libs=$withval,
1945
kde_use_extra_libs=NONE
1947
if test -n "$kde_use_extra_libs" && \
1948
test "$kde_use_extra_libs" != "NONE"; then
1952
for dir in $kde_use_extra_libs; do
1953
kde_extra_libs="$kde_extra_libs $dir"
1954
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1955
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1958
kde_use_extra_libs="added"
1960
kde_use_extra_libs="no"
1963
AC_SUBST(USER_LDFLAGS)
1965
AC_MSG_RESULT($kde_use_extra_libs)
1969
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1971
AC_MSG_CHECKING([for KDE headers installed])
1974
cat > conftest.$ac_ext <<EOF
1976
# include <stdlib.h>
1979
#include "confdefs.h"
1983
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1984
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1985
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1986
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1987
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1988
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1989
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1990
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1991
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1992
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1993
printf("kde_wallpaperdir=\\"%s\\"\n",
1994
KApplication::kde_wallpaperdir().data());
1995
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1996
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1997
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1998
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1999
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2000
printf("kde_styledir=\\"/tmp/dummy\\"\n");
2001
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2002
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2003
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2004
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2005
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2010
ac_save_CPPFLAGS=$CPPFLAGS
2011
CPPFLAGS="$all_includes $CPPFLAGS"
2012
if AC_TRY_EVAL(ac_compile); then
2015
AC_MSG_ERROR([your system is not able to compile a small KDE application!
2016
Check, if you installed the KDE header files correctly.
2017
For more details about this problem, look at the end of config.log.])
2019
CPPFLAGS=$ac_save_CPPFLAGS
2024
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2026
AC_MSG_CHECKING(for kde-qt-addon)
2027
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2029
kde_ldflags_safe="$LDFLAGS"
2030
kde_libs_safe="$LIBS"
2031
kde_cxxflags_safe="$CXXFLAGS"
2033
LIBS="-lkde-qt-addon $LIBQT $LIBS"
2034
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2035
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2043
kde_cv_have_kdeqtaddon=yes,
2044
kde_cv_have_kdeqtaddon=no
2047
LDFLAGS=$kde_ldflags_safe
2049
CXXFLAGS=$kde_cxxflags_safe
2052
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2054
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2055
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2056
It is a separate package (and CVS module) named kde-qt-addon.])
2060
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2062
AC_REQUIRE([KDE_MISC_TESTS])
2063
AC_REQUIRE([KDE_CHECK_LIBDL])
2064
AC_REQUIRE([K_PATH_X])
2066
if test $kde_qtver = 3; then
2067
AC_SUBST(LIB_KDECORE, "-lkdecore")
2068
AC_SUBST(LIB_KDEUI, "-lkdeui")
2069
AC_SUBST(LIB_KIO, "-lkio")
2070
AC_SUBST(LIB_KJS, "-lkjs")
2071
AC_SUBST(LIB_SMB, "-lsmb")
2072
AC_SUBST(LIB_KAB, "-lkab")
2073
AC_SUBST(LIB_KABC, "-lkabc")
2074
AC_SUBST(LIB_KHTML, "-lkhtml")
2075
AC_SUBST(LIB_KSPELL, "-lkspell")
2076
AC_SUBST(LIB_KPARTS, "-lkparts")
2077
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2078
AC_SUBST(LIB_KUTILS, "-lkutils")
2079
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2080
AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2081
AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2082
AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2083
# these are for backward compatibility
2084
AC_SUBST(LIB_KSYCOCA, "-lkio")
2085
AC_SUBST(LIB_KFILE, "-lkio")
2086
elif test $kde_qtver = 2; then
2087
AC_SUBST(LIB_KDECORE, "-lkdecore")
2088
AC_SUBST(LIB_KDEUI, "-lkdeui")
2089
AC_SUBST(LIB_KIO, "-lkio")
2090
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2091
AC_SUBST(LIB_SMB, "-lsmb")
2092
AC_SUBST(LIB_KFILE, "-lkfile")
2093
AC_SUBST(LIB_KAB, "-lkab")
2094
AC_SUBST(LIB_KHTML, "-lkhtml")
2095
AC_SUBST(LIB_KSPELL, "-lkspell")
2096
AC_SUBST(LIB_KPARTS, "-lkparts")
2097
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2099
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2100
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2101
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2102
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2103
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2107
AC_DEFUN([AC_PATH_KDE],
2110
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2112
if test "$enableval" = "no";
2113
then ac_use_path_checking="default"
2114
else ac_use_path_checking=""
2118
if test "$kde_qtver" = 1;
2119
then ac_use_path_checking=""
2120
else ac_use_path_checking="default"
2125
AC_CREATE_KFSSTND($ac_use_path_checking)
2128
KDE_CREATE_LIBS_ALIASES
2131
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2132
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2134
AC_MSG_CHECKING(for $1)
2135
AC_CACHE_VAL(kde_cv_func_$1,
2139
save_CXXFLAGS="$CXXFLAGS"
2140
kde_safe_LIBS="$LIBS"
2141
LIBS="$LIBS $X_EXTRA_LIBS"
2142
if test "$GXX" = "yes"; then
2143
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2153
CXXFLAGS="$save_CXXFLAGS"
2154
LIBS="$kde_safe_LIBS"
2158
AC_MSG_RESULT($kde_cv_func_$1)
2160
AC_MSG_CHECKING([if $1 needs custom prototype])
2161
AC_CACHE_VAL(kde_cv_proto_$1,
2163
if test "x$kde_cv_func_$1" = xyes; then
2167
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2168
kde_cv_proto_$1="yes - in libkdefakes"
2171
kde_cv_proto_$1=unknown
2176
if test "x$kde_cv_proto_$1" = xunknown; then
2181
LIBS="$LIBS $X_EXTRA_LIBS"
2190
[ kde_cv_func_$1=yes
2191
kde_cv_proto_$1=yes ],
2192
[kde_cv_proto_$1="$1 unavailable"]
2198
AC_MSG_RESULT($kde_cv_proto_$1)
2200
if test "x$kde_cv_func_$1" = xyes; then
2201
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2204
if test "x$kde_cv_proto_$1" = xno; then
2205
AC_DEFINE(HAVE_$5_PROTO, 1,
2206
[Define if you have the $1 prototype])
2209
AH_VERBATIM([_HAVE_$5_PROTO],
2211
#if !defined(HAVE_$5_PROTO)
2223
AC_DEFUN([AC_CHECK_SETENV],
2225
KDE_CHECK_FUNC_EXT(setenv, [
2228
[setenv("VAR", "VALUE", 1);],
2229
[int setenv (const char *, const char *, int)],
2233
AC_DEFUN([AC_CHECK_UNSETENV],
2235
KDE_CHECK_FUNC_EXT(unsetenv, [
2239
[void unsetenv (const char *)],
2243
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2245
KDE_CHECK_FUNC_EXT(getdomainname, [
2252
getdomainname(buffer, 200);
2254
[#include <sys/types.h>
2255
int getdomainname (char *, size_t)],
2259
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2261
KDE_CHECK_FUNC_EXT(gethostname, [
2267
gethostname(buffer, 200);
2269
[int gethostname (char *, unsigned int)],
2273
AC_DEFUN([AC_CHECK_USLEEP],
2275
KDE_CHECK_FUNC_EXT(usleep, [
2281
[int usleep (unsigned int)],
2286
AC_DEFUN([AC_CHECK_RANDOM],
2288
KDE_CHECK_FUNC_EXT(random, [
2294
[long int random(void)],
2297
KDE_CHECK_FUNC_EXT(srandom, [
2303
[void srandom(unsigned int)],
2308
AC_DEFUN([AC_CHECK_INITGROUPS],
2310
KDE_CHECK_FUNC_EXT(initgroups, [
2311
#include <sys/types.h>
2317
initgroups(buffer, 27);
2319
[int initgroups(const char *, gid_t)],
2323
AC_DEFUN([AC_CHECK_MKSTEMPS],
2325
KDE_CHECK_FUNC_EXT(mkstemps, [
2330
mkstemps("/tmp/aaaXXXXXX", 6);
2332
[int mkstemps(char *, int)],
2336
AC_DEFUN([AC_CHECK_MKSTEMP],
2338
KDE_CHECK_FUNC_EXT(mkstemp, [
2343
mkstemp("/tmp/aaaXXXXXX");
2345
[int mkstemp(char *)],
2349
AC_DEFUN([AC_CHECK_MKDTEMP],
2351
KDE_CHECK_FUNC_EXT(mkdtemp, [
2356
mkdtemp("/tmp/aaaXXXXXX");
2358
[char *mkdtemp(char *)],
2363
AC_DEFUN([AC_CHECK_RES_INIT],
2365
AC_MSG_CHECKING([if res_init needs -lresolv])
2366
kde_libs_safe="$LIBS"
2367
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2370
#include <sys/types.h>
2371
#include <netinet/in.h>
2372
#include <arpa/nameser.h>
2379
LIBRESOLV="-lresolv"
2381
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2383
[ AC_MSG_RESULT(no) ]
2388
KDE_CHECK_FUNC_EXT(res_init,
2390
#include <sys/types.h>
2391
#include <netinet/in.h>
2392
#include <arpa/nameser.h>
2396
[int res_init(void)],
2400
AC_DEFUN([AC_CHECK_STRLCPY],
2402
KDE_CHECK_FUNC_EXT(strlcpy, [
2406
strlcpy(buf, "KDE function test", sizeof(buf));
2408
[unsigned long strlcpy(char*, const char*, unsigned long)],
2412
AC_DEFUN([AC_CHECK_STRLCAT],
2414
KDE_CHECK_FUNC_EXT(strlcat, [
2419
strlcat(buf, "KDE function test", sizeof(buf));
2421
[unsigned long strlcat(char*, const char*, unsigned long)],
2425
AC_DEFUN([AC_CHECK_RES_QUERY],
2427
KDE_CHECK_FUNC_EXT(res_query, [
2428
#include <sys/types.h>
2429
#include <netinet/in.h>
2430
#include <arpa/nameser.h>
2435
res_query(NULL, 0, 0, NULL, 0);
2437
[int res_query(const char *, int, int, unsigned char *, int)],
2441
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2443
KDE_CHECK_FUNC_EXT(dn_skipname, [
2444
#include <sys/types.h>
2445
#include <netinet/in.h>
2446
#include <arpa/nameser.h>
2450
dn_skipname (NULL, NULL);
2452
[int dn_skipname (unsigned char *, unsigned char *)],
2457
AC_DEFUN([AC_FIND_GIF],
2458
[AC_MSG_CHECKING([for giflib])
2459
AC_CACHE_VAL(ac_cv_lib_gif,
2460
[ac_save_LIBS="$LIBS"
2461
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2462
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2464
LIBS="$all_libraries -lgif"
2471
int GifLastError(void);
2475
/* We use char because int might match the return type of a gcc2
2476
builtin and then its argument prototype would still apply. */
2478
[return GifLastError();],
2479
eval "ac_cv_lib_gif=yes",
2480
eval "ac_cv_lib_gif=no")
2481
LIBS="$ac_save_LIBS"
2483
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2485
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2487
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2491
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2493
AC_MSG_CHECKING([for libjpeg$2])
2494
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2496
ac_save_LIBS="$LIBS"
2497
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2498
ac_save_CFLAGS="$CFLAGS"
2499
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2501
[/* Override any gcc2 internal prototype to avoid an error. */
2502
struct jpeg_decompress_struct;
2503
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2508
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2509
int version, size_t structsize);
2513
/* We use char because int might match the return type of a gcc2
2514
builtin and then its argument prototype would still apply. */
2516
[jpeg_CreateDecompress(0L, 0, 0);],
2517
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2518
eval "ac_cv_lib_jpeg_$1=no")
2519
LIBS="$ac_save_LIBS"
2520
CFLAGS="$ac_save_CFLAGS"
2523
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2524
LIBJPEG="$ac_cv_lib_jpeg_$1"
2525
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2533
AC_DEFUN([AC_FIND_JPEG],
2535
dnl first look for libraries
2536
KDE_FIND_JPEG_HELPER(6b, 6b,
2537
KDE_FIND_JPEG_HELPER(normal, [],
2544
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2545
dnl requires system dependent includes loaded before it)
2546
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2547
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2548
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2550
dnl if headers _and_ libraries are missing, this is no error, and we
2551
dnl continue with a warning (the user will get no jpeg support in khtml)
2552
dnl if only one is missing, it means a configuration error, but we still
2554
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2555
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2557
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2559
There is an installation error in jpeg support. You seem to have only one
2560
of either the headers _or_ the libraries installed. You may need to either
2561
provide correct --with-extra-... options, or the development package of
2562
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2563
Disabling JPEG support.
2566
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2573
AH_VERBATIM(_AC_CHECK_JPEG,
2575
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2576
* headers and I'm too lazy to write a configure test as long as only
2577
* unixware is related
2580
#define HAVE_BOOLEAN
2585
AC_DEFUN([KDE_CHECK_QT_JPEG],
2587
if test -n "$LIBJPEG"; then
2588
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2589
AC_CACHE_VAL(kde_cv_qt_jpeg,
2593
ac_save_LIBS="$LIBS"
2594
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2595
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2596
ac_save_CXXFLAGS="$CXXFLAGS"
2597
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2599
[#include <qapplication.h>],
2603
QApplication app(argc, argv);],
2604
eval "kde_cv_qt_jpeg=no",
2605
eval "kde_cv_qt_jpeg=yes")
2606
LIBS="$ac_save_LIBS"
2607
CXXFLAGS="$ac_save_CXXFLAGS"
2612
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2614
LIBJPEG_QT='$(LIBJPEG)'
2622
AC_DEFUN([AC_FIND_ZLIB],
2624
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2625
AC_MSG_CHECKING([for libz])
2626
AC_CACHE_VAL(ac_cv_lib_z,
2628
kde_save_LIBS="$LIBS"
2629
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2630
kde_save_CFLAGS="$CFLAGS"
2631
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2638
gzFile f = (gzFile) 0;
2639
/* this would segfault.. but we only link, don't run */
2640
(void) gzgets(f, buf, sizeof(buf));
2642
return (zlibVersion() == ZLIB_VERSION);
2644
eval "ac_cv_lib_z='-lz'",
2645
eval "ac_cv_lib_z=no")
2646
LIBS="$kde_save_LIBS"
2647
CFLAGS="$kde_save_CFLAGS"
2649
if test ! "$ac_cv_lib_z" = no; then
2650
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2652
AC_MSG_RESULT($ac_cv_lib_z)
2654
AC_MSG_ERROR(not found.
2655
Possibly configure picks up an outdated version
2656
installed by XFree86. Remove it from your system.
2658
Check your installation and look into config.log)
2664
AC_DEFUN([KDE_TRY_TIFFLIB],
2666
AC_MSG_CHECKING([for libtiff $1])
2668
AC_CACHE_VAL(kde_cv_libtiff_$1,
2672
kde_save_LIBS="$LIBS"
2673
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2674
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2676
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2678
kde_save_CXXFLAGS="$CXXFLAGS"
2679
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2685
[return (TIFFOpen( "", "r") == 0); ],
2687
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2689
kde_cv_libtiff_$1=no
2692
LIBS="$kde_save_LIBS"
2693
CXXFLAGS="$kde_save_CXXFLAGS"
2697
if test "$kde_cv_libtiff_$1" = "no"; then
2702
LIBTIFF="$kde_cv_libtiff_$1"
2704
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2710
AC_DEFUN([AC_FIND_TIFF],
2712
AC_REQUIRE([K_PATH_X])
2713
AC_REQUIRE([AC_FIND_ZLIB])
2714
AC_REQUIRE([AC_FIND_JPEG])
2715
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2717
KDE_TRY_TIFFLIB(tiff, [],
2718
KDE_TRY_TIFFLIB(tiff34))
2724
AC_DEFUN([AC_FIND_PNG],
2726
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2727
AC_REQUIRE([AC_FIND_ZLIB])
2728
AC_MSG_CHECKING([for libpng])
2729
AC_CACHE_VAL(ac_cv_lib_png,
2731
kde_save_LIBS="$LIBS"
2732
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2733
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2735
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2737
kde_save_CFLAGS="$CFLAGS"
2738
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2745
png_structp png_ptr = png_create_read_struct( /* image ptr */
2746
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2747
return( png_ptr != 0 );
2749
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2750
eval "ac_cv_lib_png=no"
2752
LIBS="$kde_save_LIBS"
2753
CFLAGS="$kde_save_CFLAGS"
2755
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2756
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2757
LIBPNG="$ac_cv_lib_png"
2759
AC_MSG_RESULT($ac_cv_lib_png)
2768
AC_DEFUN([AC_FIND_JASPER],
2770
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2771
AC_REQUIRE([AC_FIND_JPEG])
2772
AC_MSG_CHECKING([for jasper])
2773
AC_CACHE_VAL(ac_cv_jasper,
2775
kde_save_LIBS="$LIBS"
2776
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2777
kde_save_CFLAGS="$CFLAGS"
2778
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2782
#include<jasper/jasper.h>
2785
return( jas_init() );
2787
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2788
eval "ac_cv_jasper=no"
2790
LIBS="$kde_save_LIBS"
2791
CFLAGS="$kde_save_CFLAGS"
2793
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2794
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2795
LIB_JASPER="$ac_cv_jasper"
2796
AC_MSG_RESULT($ac_cv_jasper)
2801
AC_SUBST(LIB_JASPER)
2804
AC_DEFUN([AC_CHECK_BOOL],
2806
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2809
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2811
AC_MSG_CHECKING(if you need GNU extensions)
2812
AC_CACHE_VAL(ac_cv_gnu_extensions,
2814
cat > conftest.c << EOF
2815
#include <features.h>
2817
#ifdef __GNU_LIBRARY__
2822
if (eval "$ac_cpp conftest.c") 2>&5 |
2823
egrep "yes" >/dev/null 2>&1; then
2825
ac_cv_gnu_extensions=yes
2827
ac_cv_gnu_extensions=no
2831
AC_MSG_RESULT($ac_cv_gnu_extensions)
2832
if test "$ac_cv_gnu_extensions" = "yes"; then
2833
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2837
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2839
AC_MSG_CHECKING([whether $CXX supports -$1])
2840
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2841
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2845
save_CXXFLAGS="$CXXFLAGS"
2846
CXXFLAGS="$CXXFLAGS -$1"
2847
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2848
CXXFLAGS="$save_CXXFLAGS"
2851
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2862
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2864
AC_MSG_CHECKING([whether $CC supports -$1])
2865
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2866
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2870
save_CFLAGS="$CFLAGS"
2871
CFLAGS="$CFLAGS -$1"
2872
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2873
CFLAGS="$save_CFLAGS"
2876
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2888
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2889
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2890
dnl it's all white-space separated
2891
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2894
if test -n "$__val"; then
2900
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2901
*) # Careful to not add spaces, where there were none, because otherwise
2902
# libtool gets confused, if we change e.g. CXX
2903
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2912
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2914
AC_MSG_CHECKING([whether $CC is blacklisted])
2916
dnl In theory we have tu run this test against $CC and $CXX
2917
dnl in C and in C++ mode, because its perfectly legal for
2918
dnl the user to mix compiler versions, since C has a defined
2921
dnl For now, we assume the user is not on crack.
2925
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2930
kde_bad_compiler=no,
2931
kde_bad_compiler=yes
2934
AC_MSG_RESULT($kde_bad_compiler)
2936
if test "$kde_bad_compiler" = "yes"; then
2939
This particular compiler version is blacklisted because it
2940
is known to miscompile KDE. Please use a newer version, or
2941
if that is not yet available, choose an older version.
2943
Please do not report a bug or bother us reporting this
2944
configure error. We know about it, and we introduced
2945
it by intention to avoid untraceable bugs or crashes in KDE.
2952
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2953
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2955
if test "x$kde_use_qt_emb" != "xyes"; then
2956
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2957
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2959
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2960
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2964
AC_DEFUN([AC_CHECK_COMPILERS],
2966
AC_ARG_ENABLE(debug,
2967
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2971
kde_use_debug_code="yes"
2972
kde_use_debug_define=no
2975
kde_use_debug_code="full"
2976
kde_use_debug_define=no
2979
kde_use_debug_code="no"
2980
kde_use_debug_define=yes
2984
[kde_use_debug_code="no"
2985
kde_use_debug_define=no
2988
dnl Just for configure --help
2989
AC_ARG_ENABLE(dummyoption,
2990
AC_HELP_STRING([--disable-debug],
2991
[disables debug output and debug symbols [default=no]]),
2994
AC_ARG_ENABLE(strict,
2995
AC_HELP_STRING([--enable-strict],
2996
[compiles with strict compiler options (may not work!)]),
2998
if test $enableval = "no"; then
2999
kde_use_strict_options="no"
3001
kde_use_strict_options="yes"
3003
], [kde_use_strict_options="no"])
3005
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3007
if test $enableval = "no"; then
3008
kde_use_warnings="no"
3010
kde_use_warnings="yes"
3012
], [kde_use_warnings="yes"])
3014
dnl enable warnings for debug build
3015
if test "$kde_use_debug_code" != "no"; then
3016
kde_use_warnings=yes
3019
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3020
[kde_use_profiling=$enableval],
3021
[kde_use_profiling="no"]
3024
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3031
if test "$GCC" = "yes"; then
3032
if test "$kde_use_debug_code" != "no"; then
3033
if test $kde_use_debug_code = "full"; then
3034
CFLAGS="-g3 -fno-inline $CFLAGS"
3036
CFLAGS="-g -O2 $CFLAGS"
3039
CFLAGS="-O2 $CFLAGS"
3043
if test "$kde_use_debug_define" = "yes"; then
3044
CFLAGS="-DNDEBUG $CFLAGS"
3049
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3050
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3053
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3057
CXXFLAGS=" $CXXFLAGS"
3061
KDE_CHECK_FOR_BAD_COMPILER
3063
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3064
if test "$kde_use_debug_code" != "no"; then
3065
if test "$CXX" = "KCC"; then
3066
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3068
if test "$kde_use_debug_code" = "full"; then
3069
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3071
CXXFLAGS="-g -O2 $CXXFLAGS"
3074
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3076
dnl convenience compiler flags
3077
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3078
AC_SUBST(WOVERLOADED_VIRTUAL)
3080
if test "$CXX" = "KCC"; then
3081
CXXFLAGS="+K3 $CXXFLAGS"
3083
CXXFLAGS="-O2 $CXXFLAGS"
3088
if test "$kde_use_debug_define" = "yes"; then
3089
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3092
if test "$kde_use_profiling" = "yes"; then
3093
KDE_CHECK_COMPILER_FLAG(pg,
3095
CFLAGS="-pg $CFLAGS"
3096
CXXFLAGS="-pg $CXXFLAGS"
3100
if test "$kde_use_warnings" = "yes"; then
3101
if test "$GCC" = "yes"; then
3102
dnl ### FIXME: remove -Wno-non-virtual-dtor for KDE 4
3103
CXXFLAGS="-Wall -W -Wpointer-arith -Wno-non-virtual-dtor $CXXFLAGS"
3106
CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3107
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3108
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3109
KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3112
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3113
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3114
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
3118
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3119
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3123
AC_HELP_STRING([--enable-pch],
3124
[enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3125
[ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3127
HAVE_GCC_VISIBILITY=0
3128
AC_SUBST([HAVE_GCC_VISIBILITY])
3130
if test "$GXX" = "yes"; then
3131
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3132
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3133
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3134
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
3135
ENABLE_PERMISSIVE_FLAG="-fpermissive"
3137
if test "$kde_use_pch" = "yes"; then
3138
AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3140
if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3141
kde_gcc_supports_pch=yes
3144
kde_gcc_supports_pch=no
3147
if test "$kde_gcc_supports_pch" = "yes"; then
3148
AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3149
if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3150
kde_gcc_supports_pch=yes
3153
kde_gcc_supports_pch=no
3157
rm -f conftest.h conftest.h.gch
3160
AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3161
if test "$CXX" = "KCC"; then
3162
dnl unfortunately we currently cannot disable exception support in KCC
3163
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3164
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3165
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
3167
if test "$kde_use_pch" = "yes"; then
3168
dnl TODO: support --pch-dir!
3169
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3170
dnl the below works (but the dir must exist), but it's
3171
dnl useless for a whole package.
3172
dnl The are precompiled headers for each source file, so when compiling
3173
dnl from scratch, it doesn't make a difference, and they take up
3174
dnl around ~5Mb _per_ sourcefile.
3175
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3176
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3178
dnl this flag controls inlining. by default KCC inlines in optimisation mode
3179
dnl all implementations that are defined inside the class {} declaration.
3180
dnl because of templates-compatibility with broken gcc compilers, this
3181
dnl can cause excessive inlining. This flag limits it to a sane level
3182
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3183
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3184
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3185
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3186
dnl Some source files are shared between multiple executables
3187
dnl (or libraries) and some of those need template instantiations.
3188
dnl In that case KCC needs to compile those sources with
3189
dnl --one_instantiation_per_object. To make it easy for us we compile
3190
dnl _all_ objects with that flag (--one_per is a shorthand).
3191
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3193
AC_SUBST(USE_EXCEPTIONS)
3194
dnl obsolete macro - provided to keep things going
3199
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3200
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3201
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3203
if test "$GXX" = yes; then
3204
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3205
if test ! -f $libstdcpp; then
3206
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])
3212
AC_VALIDIFY_CXXFLAGS
3216
if test "$GCC" = yes; then
3219
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3221
AC_ARG_ENABLE(coverage,
3222
AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3223
if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3224
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3225
ac_coverage_linker="-lgcc"
3226
elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3227
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3228
ac_coverage_linker=""
3230
AC_MSG_ERROR([coverage with your compiler is not supported])
3232
CFLAGS="$CFLAGS $ac_coverage_compiler"
3233
CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3234
LDFLAGS="$LDFLAGS $ac_coverage_linker"
3237
AC_SUBST(NOOPT_CXXFLAGS)
3238
AC_SUBST(NOOPT_CFLAGS)
3239
AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3241
KDE_CHECK_NEW_LDFLAGS
3246
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3249
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3251
AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3256
safe_CXXFLAGS=$CXXFLAGS
3257
safe_LDFLAGS=$LDFLAGS
3258
CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3259
LDFLAGS="$LDFLAGS -shared -fPIC"
3263
/* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3265
int some_function( void ) __attribute__ ((visibility("default")));
3266
int some_function( void )
3268
std::string s("blafasel");
3271
], [/* elvis is alive */],
3272
kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3274
CXXFLAGS=$safe_CXXFLAGS
3275
LDFLAGS=$safe_LDFLAGS
3280
if test x$kde_cv_val_gcc_visibility_bug = xno; then
3281
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3286
AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY],
3288
if test "$GXX" = "yes"; then
3289
KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
3291
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3292
KDE_CHECK_VISIBILITY_GCC_BUG
3294
HAVE_GCC_VISIBILITY=1
3295
AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3300
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3302
AC_REQUIRE([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY])
3305
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3307
[A]M_DEPENDENCIES(CC)
3308
[A]M_DEPENDENCIES(CXX)
3311
dnl just a wrapper to clean up configure.in
3312
AC_DEFUN([KDE_PROG_LIBTOOL],
3314
AC_REQUIRE([AC_CHECK_COMPILERS])
3315
AC_REQUIRE([AC_ENABLE_SHARED])
3316
AC_REQUIRE([AC_ENABLE_STATIC])
3318
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3319
AC_REQUIRE([KDE_CHECK_LIB64])
3327
LIBTOOL_SHELL="/bin/sh ./libtool"
3328
# LIBTOOL="$LIBTOOL --silent"
3329
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3330
AC_SUBST(KDE_PLUGIN)
3332
# we patch configure quite some so we better keep that consistent for incremental runs
3333
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3336
AC_DEFUN([KDE_CHECK_LIB64],
3338
kdelibsuff="$kde_libs_suffix"
3339
if test -z "$kdelibsuff"; then
3342
AC_ARG_ENABLE(libsuffix,
3343
AC_HELP_STRING([--enable-libsuffix],
3344
[/lib directory suffix (64,32,none[=default])]),
3345
kdelibsuff=$enableval)
3346
# TODO: add an auto case that compiles a little C app to check
3347
# where the glibc is
3348
if test "$kdelibsuff" = "no"; then
3351
if test -z "$kdelibsuff"; then
3352
AC_MSG_RESULT([not using lib directory suffix])
3353
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3355
if test "$libdir" = '${exec_prefix}/lib'; then
3356
libdir="$libdir${kdelibsuff}"
3357
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3359
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3360
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3364
AC_DEFUN([KDE_CHECK_TYPES],
3365
[ AC_CHECK_SIZEOF(int, 4)dnl
3366
AC_CHECK_SIZEOF(short)dnl
3367
AC_CHECK_SIZEOF(long, 4)dnl
3368
AC_CHECK_SIZEOF(char *, 4)dnl
3371
dnl Not used - kept for compat only?
3372
AC_DEFUN([KDE_DO_IT_ALL],
3376
AM_INIT_AUTOMAKE($1, $2)
3377
AM_DISABLE_LIBRARIES
3378
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3385
AC_DEFUN([AC_CHECK_RPATH],
3387
AC_MSG_CHECKING(for rpath)
3388
AC_ARG_ENABLE(rpath,
3389
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3390
USE_RPATH=$enableval, USE_RPATH=yes)
3392
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3394
KDE_RPATH="-R \$(libdir)"
3396
if test "$kde_libraries" != "$libdir"; then
3397
KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3400
if test -n "$qt_libraries"; then
3401
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3403
dnl $x_libraries is set to /usr/lib in case
3404
if test -n "$X_LDFLAGS"; then
3405
X_RPATH="-R \$(x_libraries)"
3406
KDE_RPATH="$KDE_RPATH $X_RPATH"
3408
if test -n "$KDE_EXTRA_RPATH"; then
3409
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3412
AC_SUBST(KDE_EXTRA_RPATH)
3415
AC_MSG_RESULT($USE_RPATH)
3418
dnl Check for the type of the third argument of getsockname
3419
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3421
AC_MSG_CHECKING(for socklen_t)
3422
AC_CACHE_VAL(kde_cv_socklen_t,
3427
#include <sys/types.h>
3428
#include <sys/socket.h>
3432
getpeername(0,0,&len);
3435
kde_cv_socklen_t=yes
3436
kde_cv_socklen_t_equiv=socklen_t
3440
AC_MSG_RESULT($kde_cv_socklen_t)
3441
if test $kde_cv_socklen_t = no; then
3442
AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3443
AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3445
kde_cv_socklen_t_equiv=int
3447
for t in int size_t unsigned long "unsigned long"; do
3449
#include <sys/types.h>
3450
#include <sys/socket.h>
3454
getpeername(0,0,&len);
3457
kde_cv_socklen_t_equiv="$t"
3463
AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3465
AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3466
[type to use in place of socklen_t if not defined])
3467
AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3468
[type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3471
dnl This is a merge of some macros out of the gettext aclocal.m4
3472
dnl since we don't need anything, I took the things we need
3473
dnl the copyright for them is:
3475
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3476
dnl This Makefile.in is free software; the Free Software Foundation
3477
dnl gives unlimited permission to copy and/or distribute it,
3478
dnl with or without modifications, as long as this notice is preserved.
3480
dnl This program is distributed in the hope that it will be useful,
3481
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3482
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3483
dnl PARTICULAR PURPOSE.
3485
dnl for this file it is relicensed under LGPL
3487
AC_DEFUN([AM_KDE_WITH_NLS],
3489
dnl If we use NLS figure out what method
3491
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3492
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3493
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3495
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3496
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3503
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3504
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3506
dnl Test whether we really found GNU xgettext.
3507
if test "$XGETTEXT" != ":"; then
3508
dnl If it is no GNU xgettext we define it as : so that the
3509
dnl Makefiles still can work.
3510
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3514
[found xgettext programs is not GNU xgettext; ignore it])
3522
# Search path for a program which passes the given test.
3523
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3526
# Stephan Kulow: I appended a _KDE against name conflicts
3528
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3529
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3530
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3531
[# Extract the first word of "$2", so it can be a program name with args.
3532
set dummy $2; ac_word=[$]2
3533
AC_MSG_CHECKING([for $ac_word])
3534
AC_CACHE_VAL(ac_cv_path_$1,
3537
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3540
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3541
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3542
test -z "$ac_dir" && ac_dir=.
3543
if test -f $ac_dir/$ac_word; then
3545
ac_cv_path_$1="$ac_dir/$ac_word"
3551
dnl If no 4th arg is given, leave the cache variable unset,
3552
dnl so AC_PATH_PROGS will keep looking.
3553
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3558
if test -n "[$]$1"; then
3559
AC_MSG_RESULT([$]$1)
3567
# Check whether LC_MESSAGES is available in <locale.h>.
3568
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3572
AC_DEFUN([AM_LC_MESSAGES],
3573
[if test $ac_cv_header_locale_h = yes; then
3574
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3575
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3576
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3577
if test $am_cv_val_LC_MESSAGES = yes; then
3578
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3582
dnl From Jim Meyering.
3583
dnl FIXME: migrate into libit.
3585
AC_DEFUN([AM_FUNC_OBSTACK],
3586
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3587
[AC_TRY_LINK([#include "obstack.h"],
3588
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3589
am_cv_func_obstack=yes,
3590
am_cv_func_obstack=no)])
3591
if test $am_cv_func_obstack = yes; then
3592
AC_DEFINE(HAVE_OBSTACK)
3594
LIBOBJS="$LIBOBJS obstack.o"
3598
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3599
dnl FIXME: Migrate into libit
3601
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3602
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3603
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3604
am_cv_lib_error_at_line=yes,
3605
am_cv_lib_error_at_line=no)])
3606
if test $am_cv_lib_error_at_line = no; then
3607
LIBOBJS="$LIBOBJS error.o"
3609
AC_SUBST(LIBOBJS)dnl
3612
# Macro to add for using GNU gettext.
3613
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3616
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3618
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3619
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3620
AC_REQUIRE([AC_PROG_RANLIB])dnl
3621
AC_REQUIRE([AC_HEADER_STDC])dnl
3622
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3623
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3624
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3625
AC_REQUIRE([AC_FUNC_MMAP])dnl
3626
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3627
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3628
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3629
__argz_count __argz_stringify __argz_next])
3631
AC_MSG_CHECKING(for stpcpy)
3632
AC_CACHE_VAL(kde_cv_func_stpcpy,
3634
kde_safe_cxxflags=$CXXFLAGS
3643
stpcpy(buffer, buffer);
3645
kde_cv_func_stpcpy=yes,
3646
kde_cv_func_stpcpy=no)
3648
CXXFLAGS=$kde_safe_cxxflags
3650
AC_MSG_RESULT($kde_cv_func_stpcpy)
3651
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3652
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3657
if test "x$CATOBJEXT" != "x"; then
3658
if test "x$ALL_LINGUAS" = "x"; then
3661
AC_MSG_CHECKING(for catalogs to be installed)
3663
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3664
case "$ALL_LINGUAS" in
3665
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3668
LINGUAS=$NEW_LINGUAS
3669
AC_MSG_RESULT($LINGUAS)
3672
dnl Construct list of names of catalog files to be constructed.
3673
if test -n "$LINGUAS"; then
3674
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3680
AC_DEFUN([AC_HAVE_XPM],
3681
[AC_REQUIRE_CPP()dnl
3682
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3684
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3685
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3687
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3688
xpm_test=$withval, xpm_test="yes")
3689
if test "x$xpm_test" = xno; then
3692
AC_MSG_CHECKING(for XPM)
3693
AC_CACHE_VAL(ac_cv_have_xpm,
3695
ac_save_ldflags="$LDFLAGS"
3696
ac_save_cflags="$CFLAGS"
3697
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3698
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3700
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3702
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3703
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3704
AC_TRY_LINK([#include <X11/xpm.h>],[],
3705
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3706
LDFLAGS="$ac_save_ldflags"
3707
CFLAGS="$ac_save_cflags"
3710
if test "$ac_cv_have_xpm" = no; then
3716
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3717
if test "$XPM_LDFLAGS" = ""; then
3718
XPMLIB='-lXpm $(LIB_X11)'
3720
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3722
if test "$XPM_INCLUDE" = ""; then
3725
XPMINC="-I$XPM_INCLUDE"
3735
AC_DEFUN([AC_HAVE_DPMS],
3736
[AC_REQUIRE_CPP()dnl
3737
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3739
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3740
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3743
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3744
dpms_test=$withval, dpms_test="yes")
3745
if test "x$dpms_test" = xno; then
3748
AC_MSG_CHECKING(for DPMS)
3749
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3750
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3751
AC_CACHE_VAL(ac_cv_have_dpms,
3753
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3755
ac_cv_have_dpms="no"
3757
ac_save_ldflags="$LDFLAGS"
3758
ac_save_cflags="$CFLAGS"
3759
ac_save_libs="$LIBS"
3760
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3761
CFLAGS="$CFLAGS $X_INCLUDES"
3762
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3764
#include <X11/Xproto.h>
3766
#include <X11/Xlib.h>
3767
#include <X11/extensions/dpms.h>
3769
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3770
ac_cv_have_dpms="yes", [
3771
LDFLAGS="$ac_save_ldflags"
3772
CFLAGS="$ac_save_cflags"
3773
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3774
LIBS="$LIBS -lXdpms"
3775
CFLAGS="$CFLAGS $X_INCLUDES"
3776
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3778
#include <X11/Xproto.h>
3780
#include <X11/Xlib.h>
3781
#include <X11/extensions/dpms.h>
3783
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3785
ac_cv_have_dpms="-lXdpms"
3786
],ac_cv_have_dpms="no")
3788
LDFLAGS="$ac_save_ldflags"
3789
CFLAGS="$ac_save_cflags"
3790
LIBS="$ac_save_libs"
3794
if test "$ac_cv_have_dpms" = no; then
3800
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3801
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3804
if test "$DPMS_LDFLAGS" = ""; then
3805
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3807
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3809
if test "$DPMS_INCLUDE" = ""; then
3812
DPMSINC="-I$DPMS_INCLUDE"
3818
ac_save_cflags="$CFLAGS"
3819
CFLAGS="$CFLAGS $X_INCLUDES"
3820
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3821
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3822
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3823
AC_CHECK_DECL(DPMSCapable,
3824
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3825
[#include <X11/extensions/dpms.h>])
3826
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3827
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3828
AC_CHECK_DECL(DPMSInfo,
3829
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3830
[#include <X11/extensions/dpms.h>])
3831
CFLAGS="$ac_save_cflags"
3836
AC_DEFUN([AC_HAVE_GL],
3837
[AC_REQUIRE_CPP()dnl
3838
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3840
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3841
test -z "$GL_INCLUDE" && GL_INCLUDE=
3843
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3844
gl_test=$withval, gl_test="yes")
3845
if test "x$kde_use_qt_emb" = "xyes"; then
3846
# GL and Qt Embedded is a no-go for now.
3848
elif test "x$gl_test" = xno; then
3851
AC_MSG_CHECKING(for GL)
3852
AC_CACHE_VAL(ac_cv_have_gl,
3856
ac_save_ldflags=$LDFLAGS
3857
ac_save_cxxflags=$CXXFLAGS
3859
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
3860
LIBS="$LIBS -lGL -lGLU"
3861
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
3862
LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
3863
CXXFLAGS="$CFLAGS $X_INCLUDES"
3864
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3865
AC_TRY_LINK([#include <GL/gl.h>
3868
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3870
LDFLAGS=$ac_save_ldflags
3871
CXXFLAGS=$ac_save_cxxflags
3875
if test "$ac_cv_have_gl" = "no"; then
3881
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3882
if test "$GL_LDFLAGS" = ""; then
3883
GLLIB='-lGLU -lGL $(LIB_X11)'
3885
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3887
if test "$GL_INCLUDE" = ""; then
3890
GLINC="-I$GL_INCLUDE"
3892
AC_MSG_RESULT($ac_cv_have_gl)
3901
dnl shadow password and PAM magic - maintained by ossi@kde.org
3903
AC_DEFUN([KDE_PAM], [
3904
AC_REQUIRE([KDE_CHECK_LIBDL])
3908
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3909
[ if test "x$withval" = "xyes"; then
3912
elif test "x$withval" = "xno"; then
3916
pam_service=$withval
3918
], [ pam_service=kde ])
3922
if test "x$want_pam" != xno; then
3923
AC_CHECK_LIB(pam, pam_start, [
3924
AC_CHECK_HEADER(security/pam_appl.h,
3925
[ pam_header=security/pam_appl.h ],
3926
[ AC_CHECK_HEADER(pam/pam_appl.h,
3927
[ pam_header=pam/pam_appl.h ],
3929
AC_MSG_WARN([PAM detected, but no headers found!
3930
Make sure you have the necessary development packages installed.])
3936
if test -z "$pam_header"; then
3937
if test "x$want_pam" = xyes; then
3938
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3941
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3942
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3945
dnl darwin claims to be something special
3946
if test "$pam_header" = "pam/pam_appl.h"; then
3947
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3950
dnl test whether struct pam_message is const (Linux) or not (Sun)
3951
AC_MSG_CHECKING(for const pam_message)
3952
AC_EGREP_HEADER([struct pam_message], $pam_header,
3953
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3954
[AC_MSG_RESULT([const: Linux-type PAM])],
3955
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3956
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3958
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3965
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3966
AC_DEFUN([DEF_PAM_SERVICE], [
3968
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3969
[ if test "x$use_pam" = xyes; then
3970
$3_PAM_SERVICE=$withval
3972
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3973
You may want to enforce it by using --with-pam.])
3976
[ if test "x$use_pam" = xyes; then
3977
$3_PAM_SERVICE="$pam_service"
3980
if test -n "$$3_PAM_SERVICE"; then
3981
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3982
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3984
AC_SUBST($3_PAM_SERVICE)
3987
AC_DEFUN([KDE_SHADOWPASSWD], [
3988
AC_REQUIRE([KDE_PAM])
3990
AC_CHECK_LIB(shadow, getspent,
3991
[ LIBSHADOW="-lshadow"
3995
AC_CHECK_LIB(gen, getspent,
3999
[ AC_CHECK_FUNC(getspent,
4000
[ ac_use_shadow=yes ],
4001
[ ac_use_shadow=no ])
4007
AC_MSG_CHECKING([for shadow passwords])
4010
AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4011
[ if test "x$withval" != "xno"; then
4017
use_shadow="$ac_use_shadow"
4020
if test "x$use_shadow" = xyes; then
4022
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4029
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4030
dnl this still applies, if we could use it indirectly through pam.
4031
if test "x$use_shadow" = xyes ||
4032
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4034
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4035
SETUIDFLAGS="-m 4755 -o root";;
4037
SETUIDFLAGS="-m 4755";;
4040
AC_SUBST(SETUIDFLAGS)
4044
AC_DEFUN([KDE_PASSWDLIBS], [
4045
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4046
AC_REQUIRE([KDE_PAM])
4047
AC_REQUIRE([KDE_SHADOWPASSWD])
4049
if test "x$use_pam" = "xyes"; then
4050
PASSWDLIBS="$PAMLIBS"
4052
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4055
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4056
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
4057
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4058
dnl may need to read /etc/master.passwd).
4061
SETUIDFLAGS="-m 4755 -o root"
4067
AC_SUBST(PASSWDLIBS)
4070
AC_DEFUN([KDE_CHECK_LIBDL],
4072
AC_CHECK_LIB(dl, dlopen, [
4074
ac_cv_have_dlfcn=yes
4077
AC_CHECK_LIB(dld, shl_unload, [
4079
ac_cv_have_shload=yes
4085
AC_DEFUN([KDE_CHECK_DLOPEN],
4088
AC_CHECK_HEADERS(dlfcn.h dl.h)
4089
if test "$ac_cv_header_dlfcn_h" = "no"; then
4093
if test "$ac_cv_header_dl_h" = "no"; then
4094
ac_cv_have_shload=no
4097
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4099
AC_ARG_ENABLE(dlopen,
4100
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4101
enable_dlopen=$enableval,
4104
# override the user's opinion, if we know it better ;)
4105
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4109
if test "$ac_cv_have_dlfcn" = "yes"; then
4110
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4113
if test "$ac_cv_have_shload" = "yes"; then
4114
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4117
if test "$enable_dlopen" = no ; then
4118
test -n "$1" && eval $1
4120
test -n "$2" && eval $2
4125
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4127
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4129
AC_MSG_CHECKING([dynamic loading])
4130
eval "`egrep '^build_libtool_libs=' libtool`"
4131
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4133
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4137
AC_MSG_RESULT($dynamic_loading)
4138
if test "$dynamic_loading" = "yes"; then
4145
AC_DEFUN([KDE_ADD_INCLUDES],
4147
if test -z "$1"; then
4148
test_include="Pix.h"
4153
AC_MSG_CHECKING([for libg++ ($test_include)])
4155
AC_CACHE_VAL(kde_cv_libgpp_includes,
4157
kde_cv_libgpp_includes=no
4163
/usr/unsupported/include \
4168
if test -r "$ac_dir/$test_include"; then
4169
kde_cv_libgpp_includes=$ac_dir
4175
AC_MSG_RESULT($kde_cv_libgpp_includes)
4176
if test "$kde_cv_libgpp_includes" != "no"; then
4177
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4182
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4184
dnl This code is here specifically to handle the
4185
dnl various flavors of threading library on FreeBSD
4186
dnl 4-, 5-, and 6-, and the (weird) rules around it.
4187
dnl There may be an environment PTHREAD_LIBS that
4188
dnl specifies what to use; otherwise, search for it.
4189
dnl -pthread is special cased and unsets LIBPTHREAD
4193
if test -n "$PTHREAD_LIBS"; then
4194
if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4195
LIBPTHREAD="PTHREAD"
4197
PTHREAD_LIBS_save="$PTHREAD_LIBS"
4198
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4199
AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4200
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4201
LIBPTHREAD="$PTHREAD_LIBS_save"])
4202
PTHREAD_LIBS="$PTHREAD_LIBS_save"
4206
dnl Is this test really needed, in the face of the Tru64 test below?
4207
if test -z "$LIBPTHREAD"; then
4208
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4211
dnl This is a special Tru64 check, see BR 76171 issue #18.
4212
if test -z "$LIBPTHREAD" ; then
4213
AC_MSG_CHECKING([for pthread_create in -lpthread])
4215
LIBS="$LIBS -lpthread"
4216
AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4218
LIBPTHREAD="-lpthread"],[
4223
dnl Un-special-case for FreeBSD.
4224
if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4228
AC_SUBST(LIBPTHREAD)
4231
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4234
if test -z "$LIBPTHREAD"; then
4235
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4238
AH_VERBATIM(__svr_define, [
4239
#if defined(__SVR4) && !defined(__svr4__)
4245
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4246
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4249
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4252
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4253
LIBPTHREAD="$LIBPTHREAD -lc_r"
4255
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4256
if test "$CXX" = "KCC"; then
4257
CXXFLAGS="$CXXFLAGS --thread_safe"
4258
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4264
AC_SUBST(USE_THREADS)
4265
AC_SUBST(LIBPTHREAD)
4268
AC_DEFUN([KDE_CHECK_THREADING],
4270
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4271
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4272
dnl default is yes if libpthread is found and no if no libpthread is available
4273
if test -z "$LIBPTHREAD"; then
4274
if test -z "$USE_THREADS"; then
4275
kde_check_threading_default=no
4277
kde_check_threading_default=yes
4280
kde_check_threading_default=yes
4282
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4283
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4284
if test "x$kde_use_threading" = "xyes"; then
4285
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4289
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4291
if test "$kde_python_link_found" = no; then
4293
if test "$1" = normal; then
4294
AC_MSG_CHECKING(if a Python application links)
4296
AC_MSG_CHECKING(if Python depends on $2)
4299
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4301
kde_save_cflags="$CFLAGS"
4302
CFLAGS="$CFLAGS $PYTHONINC"
4303
kde_save_libs="$LIBS"
4304
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4305
kde_save_ldflags="$LDFLAGS"
4306
LDFLAGS="$LDFLAGS $PYTHONLIB"
4312
PySys_SetArgv(1, 0);
4314
[kde_cv_try_link_python_$1=yes],
4315
[kde_cv_try_link_python_$1=no]
4317
CFLAGS="$kde_save_cflags"
4318
LIBS="$kde_save_libs"
4319
LDFLAGS="$kde_save_ldflags"
4322
if test "$kde_cv_try_link_python_$1" = "yes"; then
4324
kde_python_link_found=yes
4325
if test ! "$1" = normal; then
4326
LIBPYTHON="$LIBPYTHON $2"
4338
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4340
AC_MSG_CHECKING([for Python directory])
4342
AC_CACHE_VAL(kde_cv_pythondir,
4344
if test -z "$PYTHONDIR"; then
4345
kde_cv_pythondir=/usr/local
4347
kde_cv_pythondir="$PYTHONDIR"
4351
AC_ARG_WITH(pythondir,
4352
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4354
ac_python_dir=$withval
4355
], ac_python_dir=$kde_cv_pythondir
4358
AC_MSG_RESULT($ac_python_dir)
4361
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4363
AC_REQUIRE([KDE_CHECK_LIBDL])
4364
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4365
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4367
if test -z "$1"; then
4373
AC_MSG_CHECKING([for Python$version])
4375
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4376
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4377
if test ! -r $python_incdir/Python.h; then
4378
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4379
python_incdir=$python_incdir/python$version
4380
if test ! -r $python_incdir/Python.h; then
4385
PYTHONINC=-I$python_incdir
4387
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4388
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4389
if test ! -r $python_libdir/libpython$version.so; then
4390
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4391
if test ! -r $python_libdir/libpython$version.a; then
4392
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4393
python_libdir=$python_libdir/python$version/config
4394
if test ! -r $python_libdir/libpython$version.a; then
4400
PYTHONLIB=-L$python_libdir
4401
kde_orig_LIBPYTHON=$LIBPYTHON
4402
if test -z "$LIBPYTHON"; then
4403
LIBPYTHON=-lpython$version
4406
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4407
python_moddir=$python_moddir/python$version
4408
if test ! -r $python_moddir/copy.py; then
4412
PYTHONMODDIR=$python_moddir
4414
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4416
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4417
LIBPYTHON=$kde_orig_LIBPYTHON
4418
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4419
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4422
dnl Note: this test is very weak
4423
kde_python_link_found=no
4424
KDE_TRY_LINK_PYTHON(normal)
4425
KDE_TRY_LINK_PYTHON(m, -lm)
4426
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4427
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4428
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4429
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4430
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4431
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4432
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4433
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4434
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4435
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4436
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4437
[AC_MSG_WARN([it seems, Python depends on another library.
4438
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4439
and contact the authors to let them know about this problem])
4442
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4446
AC_SUBST(PYTHONMODDIR)
4447
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4453
AC_DEFUN([KDE_CHECK_PYTHON],
4455
KDE_CHECK_PYTHON_INTERN("2.4",
4456
[KDE_CHECK_PYTHON_INTERN("2.3",
4457
[KDE_CHECK_PYTHON_INTERN("2.2",
4458
[KDE_CHECK_PYTHON_INTERN("2.1",
4459
[KDE_CHECK_PYTHON_INTERN("2.0",
4460
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4467
AC_DEFUN([KDE_CHECK_STL],
4471
ac_save_CXXFLAGS="$CXXFLAGS"
4472
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4474
AC_MSG_CHECKING([if C++ programs can be compiled])
4475
AC_CACHE_VAL(kde_cv_stl_works,
4479
using namespace std;
4481
string astring="Hallo Welt.";
4482
astring.erase(0, 6); // now astring is "Welt"
4484
], kde_cv_stl_works=yes,
4485
kde_cv_stl_works=no)
4488
AC_MSG_RESULT($kde_cv_stl_works)
4490
if test "$kde_cv_stl_works" = "yes"; then
4492
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4494
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4495
Check config.log for details - if you're using a Linux distribution you might miss
4496
a package named similar to libstdc++-dev.])
4499
CXXFLAGS="$ac_save_CXXFLAGS"
4503
AC_DEFUN([AC_FIND_QIMGIO],
4504
[AC_REQUIRE([AC_FIND_JPEG])
4505
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4506
AC_MSG_CHECKING([for qimgio])
4507
AC_CACHE_VAL(ac_cv_lib_qimgio,
4511
ac_save_LIBS="$LIBS"
4512
ac_save_CXXFLAGS="$CXXFLAGS"
4513
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4514
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4517
#include <qimageio.h>
4518
#include <qstring.h>
4520
QString t = "hallo";
4525
ac_cv_lib_qimgio=yes,
4526
ac_cv_lib_qimgio=no,
4527
ac_cv_lib_qimgio=no)
4528
LIBS="$ac_save_LIBS"
4529
CXXFLAGS="$ac_save_CXXFLAGS"
4532
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4533
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4535
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4538
AC_MSG_RESULT(not found)
4542
AC_DEFUN([AM_DISABLE_LIBRARIES],
4544
AC_PROVIDE([AM_ENABLE_STATIC])
4545
AC_PROVIDE([AM_ENABLE_SHARED])
4551
AC_DEFUN([AC_CHECK_UTMP_FILE],
4553
AC_MSG_CHECKING([for utmp file])
4555
AC_CACHE_VAL(kde_cv_utmp_file,
4566
if test -r "$ac_file"; then
4567
kde_cv_utmp_file=$ac_file
4573
if test "$kde_cv_utmp_file" != "no"; then
4574
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4576
AC_MSG_RESULT($kde_cv_utmp_file)
4579
AC_MSG_RESULT([non found])
4584
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4587
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4590
if test ! -s $srcdir/subdirs; then
4591
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4592
files=`cd $srcdir && ls -1`
4593
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4595
echo $i >> $srcdir/subdirs
4600
if test -s $srcdir/inst-apps; then
4601
ac_topsubdirs="`cat $srcdir/inst-apps`"
4602
elif test -s $srcdir/subdirs; then
4603
ac_topsubdirs="`cat $srcdir/subdirs`"
4606
for i in $ac_topsubdirs; do
4607
AC_MSG_CHECKING([if $i should be compiled])
4608
if test -d $srcdir/$i; then
4610
for j in $DO_NOT_COMPILE; do
4611
if test $i = $j; then
4618
AC_MSG_RESULT($install_it)
4619
vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4620
if test $install_it = "yes"; then
4621
TOPSUBDIRS="$TOPSUBDIRS $i"
4622
eval "$vari""_SUBDIR_included=yes"
4624
eval "$vari""_SUBDIR_included=no"
4628
AC_SUBST(TOPSUBDIRS)
4631
AC_DEFUN([KDE_CHECK_NAMESPACES],
4633
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4647
int Foo::Bar::i = 1;
4650
AC_DEFINE(HAVE_NAMESPACES)
4657
dnl ------------------------------------------------------------------------
4658
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4659
dnl ------------------------------------------------------------------------
4661
AC_DEFUN([AC_CHECK_S_ISSOCK],
4663
AC_MSG_CHECKING(for S_ISSOCK)
4664
AC_CACHE_VAL(ac_cv_have_s_issock,
4668
#include <sys/stat.h>
4672
int b = S_ISSOCK( buff.st_mode );
4674
ac_cv_have_s_issock=yes,
4675
ac_cv_have_s_issock=no)
4677
AC_MSG_RESULT($ac_cv_have_s_issock)
4678
if test "$ac_cv_have_s_issock" = "yes"; then
4679
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4682
AH_VERBATIM(_ISSOCK,
4684
#ifndef HAVE_S_ISSOCK
4685
#define HAVE_S_ISSOCK
4686
#define S_ISSOCK(mode) (1==0)
4692
dnl ------------------------------------------------------------------------
4693
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4694
dnl ------------------------------------------------------------------------
4696
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4698
AC_MSG_CHECKING(for MAXPATHLEN)
4699
AC_CACHE_VAL(ac_cv_maxpathlen,
4701
cat > conftest.$ac_ext <<EOF
4703
# include <stdlib.h>
4706
#include <sys/param.h>
4708
#define MAXPATHLEN 1024
4711
KDE_HELLO MAXPATHLEN
4715
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4717
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4718
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4720
ac_cv_maxpathlen=1024
4726
AC_MSG_RESULT($ac_cv_maxpathlen)
4727
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4730
AC_DEFUN([KDE_CHECK_HEADER],
4732
kde_safe_cppflags=$CPPFLAGS
4733
CPPFLAGS="$CPPFLAGS $all_includes"
4736
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4738
CPPFLAGS=$kde_safe_cppflags
4741
AC_DEFUN([KDE_CHECK_HEADERS],
4743
AH_CHECK_HEADERS([$1])
4745
kde_safe_cppflags=$CPPFLAGS
4746
CPPFLAGS="$CPPFLAGS $all_includes"
4748
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4749
CPPFLAGS=$kde_safe_cppflags
4753
AC_DEFUN([KDE_FAST_CONFIGURE],
4755
dnl makes configure fast (needs perl)
4756
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4757
with_fast_perl=$enableval, with_fast_perl=yes)
4760
AC_DEFUN([KDE_CONF_FILES],
4763
if test -f $srcdir/configure.files ; then
4764
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4767
if test -n "$val" ; then
4769
CONF_FILES="$CONF_FILES $i"
4772
AC_SUBST(CONF_FILES)
4775
dnl This sets the prefix, for arts and kdelibs
4776
dnl Do NOT use in any other module.
4777
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4778
AC_DEFUN([KDE_SET_PREFIX_CORE],
4781
dnl make $KDEDIR the default for the installation
4782
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4784
if test "x$prefix" = "xNONE"; then
4785
prefix=$ac_default_prefix
4786
ac_configure_args="$ac_configure_args --prefix=$prefix"
4788
# And delete superfluous '/' to make compares easier
4789
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4790
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4792
kde_libs_prefix='$(prefix)'
4793
kde_libs_htmldir='$(kde_htmldir)'
4794
AC_SUBST(kde_libs_prefix)
4795
AC_SUBST(kde_libs_htmldir)
4801
AC_DEFUN([KDE_SET_PREFIX],
4804
dnl We can't give real code to that macro, only a value.
4805
dnl It only matters for --help, since we set the prefix in this function anyway.
4806
AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4808
KDE_SET_DEFAULT_BINDIRS
4809
if test "x$prefix" = "xNONE"; then
4810
dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4811
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4813
dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4814
kde_save_PATH="$PATH"
4815
PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4816
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4817
PATH="$kde_save_PATH"
4820
kde_libs_prefix=`$KDECONFIG --prefix`
4821
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4822
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4823
This means it has been moved since you installed it.
4824
This won't work. Please recompile kdelibs for the new prefix.
4827
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4828
kde_libs_suffix=`$KDECONFIG --libsuffix`
4830
AC_MSG_CHECKING([where to install])
4831
if test "x$prefix" = "xNONE"; then
4832
prefix=$kde_libs_prefix
4833
AC_MSG_RESULT([$prefix (as returned by kde-config)])
4835
dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4836
given_prefix=$prefix
4837
AC_MSG_RESULT([$prefix (as requested)])
4840
# And delete superfluous '/' to make compares easier
4841
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4842
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4843
given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4846
AC_SUBST(kde_libs_prefix)
4847
AC_SUBST(kde_libs_htmldir)
4853
pushdef([AC_PROG_INSTALL],
4855
dnl our own version, testing for a -p flag
4856
popdef([AC_PROG_INSTALL])
4857
dnl as AC_PROG_INSTALL works as it works we first have
4858
dnl to save if the user didn't specify INSTALL, as the
4859
dnl autoconf one overwrites INSTALL and we have no chance to find
4861
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4862
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4863
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4866
if test -z "$kde_save_INSTALL_given" ; then
4867
# OK, user hasn't given any INSTALL, autoconf found one for us
4868
# now we test, if it supports the -p flag
4869
AC_MSG_CHECKING(for -p flag to install)
4870
rm -f confinst.$$.* > /dev/null 2>&1
4871
echo "Testtest" > confinst.$$.orig
4873
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4874
if test -f confinst.$$.new ; then
4875
# OK, -p seems to do no harm to install
4876
INSTALL="${INSTALL} -p"
4881
AC_MSG_RESULT($ac_res)
4883
dnl the following tries to resolve some signs and wonders coming up
4884
dnl with different autoconf/automake versions
4886
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4887
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4888
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4889
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4890
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4891
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4892
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4893
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4894
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4895
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4896
dnl automake (due to broken Makefile.am or whatever) to install programs,
4897
dnl and so does not see the -s flag in automake > 1.4
4898
dnl to clean up that mess we:
4899
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4900
dnl which cleans KDE's program with automake > 1.4;
4901
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4902
dnl with automake<=1.4
4903
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4904
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4906
dnl And to all this comes, that I even can't write in comments variable
4907
dnl names used by automake, because it is so stupid to think I wanted to
4908
dnl _use_ them, therefor I have written A_M_... instead of AM_
4909
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4911
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4912
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4914
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4915
INSTALL_SCRIPT='${INSTALL}'
4919
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4921
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4922
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4925
pushdef([AC_LANG_CPLUSPLUS],
4926
[popdef([AC_LANG_CPLUSPLUS])
4930
AC_DEFUN([KDE_CHECK_LONG_LONG],
4932
AC_MSG_CHECKING(for long long)
4933
AC_CACHE_VAL(kde_cv_c_long_long,
4941
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4944
AC_MSG_RESULT($kde_cv_c_long_long)
4945
if test "$kde_cv_c_long_long" = yes; then
4946
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4950
AC_DEFUN([KDE_CHECK_LIB],
4952
kde_save_LDFLAGS="$LDFLAGS"
4953
dnl AC_CHECK_LIB modifies LIBS, so save it here
4954
kde_save_LIBS="$LIBS"
4955
LDFLAGS="$LDFLAGS $all_libraries"
4957
aix*) LDFLAGS="-brtl $LDFLAGS"
4958
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4961
AC_CHECK_LIB($1, $2, $3, $4, $5)
4962
LDFLAGS="$kde_save_LDFLAGS"
4963
LIBS="$kde_save_LIBS"
4966
AC_DEFUN([KDE_JAVA_PREFIX],
4969
base=`basename "$1"`
4970
list=`ls -1 $dir 2> /dev/null`
4971
for entry in $list; do
4972
if test -d $dir/$entry/bin; then
4975
javadirs="$javadirs $dir/$entry/bin"
4978
elif test -d $dir/$entry/jre/bin; then
4981
javadirs="$javadirs $dir/$entry/jre/bin"
4988
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4989
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4993
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4994
[ ac_java_dir=$withval
4998
AC_MSG_CHECKING([for Java])
5000
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5001
if test "x$ac_java_dir" = "xno"; then
5003
kde_java_includedir=no
5004
kde_java_libjvmdir=no
5005
kde_java_libgcjdir=no
5006
kde_java_libhpidir=no
5008
if test "x$ac_java_dir" = "x"; then
5011
dnl No option set -> collect list of candidate paths
5012
if test -n "$JAVA_HOME"; then
5013
KDE_JAVA_PREFIX($JAVA_HOME)
5015
KDE_JAVA_PREFIX(/usr/j2se)
5016
KDE_JAVA_PREFIX(/usr/lib/j2se)
5017
KDE_JAVA_PREFIX(/usr/j*dk*)
5018
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5019
KDE_JAVA_PREFIX(/opt/j*sdk*)
5020
KDE_JAVA_PREFIX(/usr/lib/java*)
5021
KDE_JAVA_PREFIX(/usr/java*)
5022
KDE_JAVA_PREFIX(/usr/java/j*dk*)
5023
KDE_JAVA_PREFIX(/usr/java/j*re*)
5024
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5025
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5026
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5027
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5028
KDE_JAVA_PREFIX(/opt/java*)
5033
for dir in $PATH; do
5034
if test -d "$dir"; then
5035
javadirs="$javadirs $dir"
5041
dnl Now javadirs contains a list of paths that exist, all ending with bin/
5042
for dir in $javadirs; do
5043
dnl Check for the java executable
5044
if test -x "$dir/java"; then
5045
dnl And also check for a libjvm.so somewhere under there
5046
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5047
if test "$dir" != "/usr/bin"; then
5048
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5049
if test ! -f $libjvmdir/libjvm.so; then continue; fi
5050
jredirs="$jredirs $dir"
5055
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5059
for dir in $jredirs; do
5061
kde_java_bindir=$dir
5062
if test -x "$dir/javac"; then
5068
if test -n "$JAVAC"; then
5069
dnl this substitution might not work - well, we test for jni.h below
5070
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5072
kde_java_includedir=no
5075
dnl config option set
5076
kde_java_bindir=$ac_java_dir/bin
5077
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5078
kde_java_includedir=no
5080
kde_java_includedir=$ac_java_dir/include
5085
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5086
if test "x$kde_java_bindir" != "xno"; then
5088
dnl Look for libjvm.so
5089
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5090
dnl Look for libgcj.so
5091
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5092
dnl Look for libhpi.so and avoid green threads
5093
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5095
dnl Now check everything's fine under there
5096
dnl the include dir is our flag for having the JDK
5097
if test -d "$kde_java_includedir"; then
5098
if test ! -x "$kde_java_bindir/javac"; then
5099
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5101
if test ! -x "$kde_java_bindir/javah"; then
5102
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5104
if test ! -x "$kde_java_bindir/jar"; then
5105
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5107
if test ! -r "$kde_java_includedir/jni.h"; then
5108
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5111
jni_includes="-I$kde_java_includedir"
5112
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5113
dnl and under linux here..
5115
dnl not needed for gcj
5117
if test "x$kde_java_libgcjdir" = "x"; then
5118
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5119
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5120
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5128
if test "x$kde_java_libgcjdir" = "x"; then
5129
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5130
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5133
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5134
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5138
if test ! -x "$kde_java_bindir/java"; then
5139
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5142
dnl not needed for gcj compile
5144
if test "x$kde_java_libgcjdir" = "x"; then
5145
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5146
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5150
if test -n "$jni_includes"; then
5151
dnl Check for JNI version
5154
ac_cxxflags_safe="$CXXFLAGS"
5155
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5161
#ifndef JNI_VERSION_1_2
5164
],[ kde_jni_works=yes ],
5165
[ kde_jni_works=no ])
5167
if test $kde_jni_works = no; then
5168
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5169
You need to have Java Development Kit (JDK) version 1.2.
5171
Use --with-java to specify another location.
5172
Use --without-java to configure without java support.
5173
Or download a newer JDK and try again.
5174
See e.g. http://java.sun.com/products/jdk/1.2 ])
5177
CXXFLAGS="$ac_cxxflags_safe"
5180
dnl All tests ok, inform and subst the variables
5182
JAVAC=$kde_java_bindir/javac
5183
JAVAH=$kde_java_bindir/javah
5184
JAR=$kde_java_bindir/jar
5185
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5186
if test "x$kde_java_libgcjdir" = "x"; then
5187
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5189
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5191
AC_MSG_RESULT([java JDK in $kde_java_bindir])
5194
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5195
AC_MSG_RESULT([java JRE in $kde_java_bindir])
5197
elif test -d "/Library/Java/Home"; then
5198
kde_java_bindir="/Library/Java/Home/bin"
5199
jni_includes="-I/Library/Java/Home/include"
5201
JAVAC=$kde_java_bindir/javac
5202
JAVAH=$kde_java_bindir/javah
5203
JAR=$kde_java_bindir/jar
5204
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
5206
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5207
AC_MSG_RESULT([Apple Java Framework])
5209
AC_MSG_RESULT([none found])
5216
AC_SUBST(jni_includes)
5218
# for backward compat
5219
kde_cv_java_includedir=$kde_java_includedir
5220
kde_cv_java_bindir=$kde_java_bindir
5223
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5224
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5225
dnl big packages, m4_foreach is dog-slow. So use our own version of
5226
dnl it. (matz@kde.org)
5227
m4_define([mm_foreach],
5228
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5229
m4_define([mm_car], [[$1]])
5230
m4_define([mm_car2], [[$@]])
5231
m4_define([_mm_foreach],
5232
[m4_if(m4_quote($2), [], [],
5233
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5234
mm_car2(m4_shift($2)),
5236
m4_define([AC_FOREACH],
5237
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5239
AC_DEFUN([KDE_NEED_FLEX],
5242
LIBS="$LIBS $USER_LDFLAGS"
5245
if test -z "$LEXLIB"; then
5246
AC_MSG_ERROR([You need to have flex installed.])
5251
AC_DEFUN([AC_PATH_QTOPIA],
5253
dnl TODO: use AC_CACHE_VAL
5255
if test -z "$1"; then
5260
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5261
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5262
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5265
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5266
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5268
AC_REQUIRE([AC_PATH_QT])
5270
AC_MSG_CHECKING([for Qtopia])
5273
AC_SUBST(LIB_QTOPIA)
5275
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5279
AC_ARG_WITH(qtopia-dir,
5280
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5281
[ ac_qtopia_incdir="$withval"/include] )
5284
for dir in $kde_qtopia_dirs; do
5285
qtopia_incdirs="$qtopia_incdirs $dir/include"
5288
if test ! "$ac_qtopia_incdir" = "NO"; then
5289
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5293
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5294
ac_qtopia_incdir="$qtopia_incdir"
5296
if test -z "$qtopia_incdir"; then
5297
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5300
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5301
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5302
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5304
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5305
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5306
if test "$qtopia_ver" -lt "$qtopia_minver"; then
5307
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5314
ac_cxxflags_safe="$CXXFLAGS"
5315
ac_ldflags_safe="$LDFLAGS"
5316
ac_libs_safe="$LIBS"
5318
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5319
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5320
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5322
cat > conftest.$ac_ext <<EOF
5323
#include "confdefs.h"
5324
#include <qpe/qpeapplication.h>
5325
#include <qpe/version.h>
5327
int main( int argc, char **argv )
5329
QPEApplication app( argc, argv );
5334
if AC_TRY_EVAL(ac_link) && test -s conftest; then
5338
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5339
the end of config.log])
5342
CXXFLAGS="$ac_cxxflags_safe"
5343
LDFLAGS="$ac_ldflags_safe"
5344
LIBS="$ac_libs_safe"
5348
QTOPIA_INCLUDES="-I$qtopia_incdir"
5349
AC_SUBST(QTOPIA_INCLUDES)
5351
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5355
AC_DEFUN([KDE_INIT_DOXYGEN],
5357
AC_MSG_CHECKING([for Qt docs])
5359
if test "${with_qt_dir+set}" = set; then
5360
kde_qtdir="$with_qt_dir"
5363
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)
5364
AC_MSG_RESULT($QTDOCDIR)
5368
KDE_FIND_PATH(dot, DOT, [], [])
5369
if test -n "$DOT"; then
5374
AC_SUBST(KDE_HAVE_DOT)
5375
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5378
DOXYGEN_PROJECT_NAME="$1"
5379
DOXYGEN_PROJECT_NUMBER="$2"
5380
AC_SUBST(DOXYGEN_PROJECT_NAME)
5381
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5384
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5387
AC_SUBST(KDE_HAS_DOXYGEN)
5392
AC_DEFUN([AC_FIND_BZIP2],
5394
AC_MSG_CHECKING([for bzDecompress in libbz2])
5395
AC_CACHE_VAL(ac_cv_lib_bzip2,
5399
kde_save_LIBS="$LIBS"
5400
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5401
kde_save_CXXFLAGS="$CXXFLAGS"
5402
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5408
[ bz_stream s; (void) bzDecompress(&s); ],
5409
eval "ac_cv_lib_bzip2='-lbz2'",
5410
eval "ac_cv_lib_bzip2=no")
5411
LIBS="$kde_save_LIBS"
5412
CXXFLAGS="$kde_save_CXXFLAGS"
5415
AC_MSG_RESULT($ac_cv_lib_bzip2)
5417
if test ! "$ac_cv_lib_bzip2" = no; then
5420
LIBBZ2="$ac_cv_lib_bzip2"
5427
KDE_CHECK_COMPILER_FLAG(shared, [
5428
ld_shared_flag="-shared"
5430
KDE_CHECK_COMPILER_FLAG(fPIC, [
5431
cxx_shared_flag="-fPIC"
5434
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5435
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5439
kde_save_LIBS="$LIBS"
5440
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5441
kde_save_CXXFLAGS="$CXXFLAGS"
5442
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5449
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5450
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5451
eval "ac_cv_lib_bzip2_prefix=no")
5452
LIBS="$kde_save_LIBS"
5453
CXXFLAGS="$kde_save_CXXFLAGS"
5457
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5459
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5462
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5465
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5466
dnl else, we just ignore this
5470
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5473
dnl ------------------------------------------------------------------------
5474
dnl Try to find the SSL headers and libraries.
5475
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5476
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5477
dnl ------------------------------------------------------------------------
5479
AC_DEFUN([KDE_CHECK_SSL],
5481
LIBSSL="-lssl -lcrypto"
5482
AC_REQUIRE([KDE_CHECK_LIB64])
5484
ac_ssl_includes=NO ac_ssl_libraries=NO
5487
AC_ARG_WITH(ssl-dir,
5488
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5489
[ ac_ssl_includes="$withval"/include
5490
ac_ssl_libraries="$withval"/lib$kdelibsuff
5495
AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5496
[want_ssl=$withval])
5498
if test $want_ssl = yes; then
5500
AC_MSG_CHECKING(for OpenSSL)
5502
AC_CACHE_VAL(ac_cv_have_ssl,
5503
[#try to guess OpenSSL locations
5505
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5506
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5507
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5508
ac_ssl_includes="$ssl_incdir"
5510
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"
5511
if test ! "$ac_ssl_libraries" = "NO"; then
5512
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5517
for dir in $ssl_libdirs; do
5518
try="ls -1 $dir/libssl*"
5519
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5522
ac_ssl_libraries="$ssl_libdir"
5524
ac_ldflags_safe="$LDFLAGS"
5525
ac_libs_safe="$LIBS"
5527
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5528
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5530
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5536
LDFLAGS="$ac_ldflags_safe"
5537
LIBS="$ac_libs_safe"
5539
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5547
eval "$ac_cv_have_ssl"
5549
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5551
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5552
AC_MSG_RESULT($ac_ssl_rsaref)
5554
AC_MSG_CHECKING([for easter eggs])
5555
AC_MSG_RESULT([none found])
5561
if test "$have_ssl" = yes; then
5562
AC_MSG_CHECKING(for OpenSSL version)
5563
dnl Check for SSL version
5564
AC_CACHE_VAL(ac_cv_ssl_version,
5567
cat >conftest.$ac_ext <<EOF
5568
#include <openssl/opensslv.h>
5572
#ifndef OPENSSL_VERSION_NUMBER
5573
printf("ssl_version=\\"error\\"\n");
5575
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5576
printf("ssl_version=\\"old\\"\n");
5578
printf("ssl_version=\\"ok\\"\n");
5584
ac_save_CPPFLAGS=$CPPFLAGS
5585
if test "$ac_ssl_includes" != "/usr/include"; then
5586
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5589
if AC_TRY_EVAL(ac_link); then
5591
if eval `./conftest 2>&5`; then
5592
if test $ssl_version = error; then
5593
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5595
if test $ssl_version = old; then
5596
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5600
ac_cv_ssl_version="ssl_version=$ssl_version"
5602
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5603
Check config.log, and if you can't figure it out, send a mail to
5604
David Faure <faure@kde.org>, attaching your config.log])
5608
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5609
Check config.log, and if you can't figure it out, send a mail to
5610
David Faure <faure@kde.org>, attaching your config.log])
5612
CPPFLAGS=$ac_save_CPPFLAGS
5616
eval "$ac_cv_ssl_version"
5617
AC_MSG_RESULT($ssl_version)
5620
if test "$have_ssl" != yes; then
5623
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5624
ac_cv_have_ssl="have_ssl=yes \
5625
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5628
ssl_libraries="$ac_ssl_libraries"
5629
ssl_includes="$ac_ssl_includes"
5631
if test "$ac_ssl_rsaref" = yes; then
5632
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5635
if test $ssl_version = "old"; then
5636
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5642
if test "$ssl_includes" = "/usr/include"; then
5643
if test -f /usr/kerberos/include/krb5.h; then
5644
SSL_INCLUDES="-I/usr/kerberos/include"
5646
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5647
SSL_INCLUDES="-I$ssl_includes"
5650
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5653
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5656
AC_SUBST(SSL_INCLUDES)
5657
AC_SUBST(SSL_LDFLAGS)
5661
AC_DEFUN([KDE_CHECK_STRLCPY],
5663
AC_REQUIRE([AC_CHECK_STRLCAT])
5664
AC_REQUIRE([AC_CHECK_STRLCPY])
5665
AC_CHECK_SIZEOF(size_t)
5666
AC_CHECK_SIZEOF(unsigned long)
5668
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5670
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5673
],AC_MSG_RESULT([yes]),[
5676
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5677
does not apply. Please mail kde-devel@kde.org with a description of your system!
5682
AC_DEFUN([KDE_CHECK_BINUTILS],
5684
AC_MSG_CHECKING([if ld supports unversioned version maps])
5686
kde_save_LDFLAGS="$LDFLAGS"
5687
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5688
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5689
AC_TRY_LINK([int foo;],
5691
#ifdef __INTEL_COMPILER
5692
icc apparently does not support libtools version-info and version-script
5693
at the same time. Dunno where the bug is, but until somebody figured out,
5694
better disable the optional version scripts.
5698
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5699
LDFLAGS="$kde_save_LDFLAGS"
5701
AM_CONDITIONAL(include_VERSION_SCRIPT,
5702
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5704
AC_MSG_RESULT($kde_supports_versionmaps)
5707
AC_DEFUN([AM_PROG_OBJC],[
5708
AC_CHECK_PROGS(OBJC, gcc, gcc)
5709
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5710
if test "x${OBJCFLAGS-unset}" = xunset; then
5714
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5717
AC_DEFUN([KDE_CHECK_PERL],
5719
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5720
AC_MSG_ERROR([No Perl found in your $PATH.
5721
We need perl to generate some code.])
5726
AC_DEFUN([KDE_CHECK_LARGEFILE],
5729
if test "$ac_cv_sys_file_offset_bits" != no; then
5730
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5733
if test "x$ac_cv_sys_large_files" != "xno"; then
5734
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5739
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5740
dnl which allows to search for libs that get installed into the KDE prefix.
5742
dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5743
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5744
dnl also defines KSTUFF_PKG_ERRORS on error
5745
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5747
PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5748
if test "$prefix" != "$kde_libs_prefix"; then
5749
PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5751
export PKG_CONFIG_PATH
5752
PKG_CHECK_MODULES($1,$2,$3,$4)
5755
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5756
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5757
## Free Software Foundation, Inc.
5758
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5760
## This program is free software; you can redistribute it and/or modify
5761
## it under the terms of the GNU General Public License as published by
5762
## the Free Software Foundation; either version 2 of the License, or
5763
## (at your option) any later version.
5765
## This program is distributed in the hope that it will be useful, but
5766
## WITHOUT ANY WARRANTY; without even the implied warranty of
5767
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5768
## General Public License for more details.
5770
## You should have received a copy of the GNU General Public License
5771
## along with this program; if not, write to the Free Software
5772
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5774
## As a special exception to the GNU General Public License, if you
5775
## distribute this file as part of a program that contains a
5776
## configuration script generated by Autoconf, you may include it under
5777
## the same distribution terms that you use for the rest of that program.
5779
# serial 47 AC_PROG_LIBTOOL
5782
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5783
# -----------------------------------------------------------
5784
# If this macro is not defined by Autoconf, define it here.
5785
m4_ifdef([AC_PROVIDE_IFELSE],
5787
[m4_define([AC_PROVIDE_IFELSE],
5788
[m4_ifdef([AC_PROVIDE_$1],
5794
AC_DEFUN([AC_PROG_LIBTOOL],
5795
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5796
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5797
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5798
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5800
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5802
dnl And a similar setup for Fortran 77 support
5803
AC_PROVIDE_IFELSE([AC_PROG_F77],
5805
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5808
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5809
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5810
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5811
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5813
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5815
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5817
[ifdef([AC_PROG_GCJ],
5818
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5819
ifdef([A][M_PROG_GCJ],
5820
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5821
ifdef([LT_AC_PROG_GCJ],
5822
[define([LT_AC_PROG_GCJ],
5823
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5824
])])# AC_PROG_LIBTOOL
5829
AC_DEFUN([_AC_PROG_LIBTOOL],
5830
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5831
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5832
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5833
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5835
# This can be used to rebuild libtool when needed
5836
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5838
# Always use our own libtool.
5839
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5840
AC_SUBST(LIBTOOL)dnl
5842
# Prevent multiple expansion
5843
define([AC_PROG_LIBTOOL], [])
5844
])# _AC_PROG_LIBTOOL
5849
AC_DEFUN([AC_LIBTOOL_SETUP],
5851
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5852
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5853
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5854
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5855
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5856
AC_REQUIRE([AC_PROG_CC])dnl
5857
AC_REQUIRE([AC_PROG_LD])dnl
5858
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5859
AC_REQUIRE([AC_PROG_NM])dnl
5861
AC_REQUIRE([AC_PROG_LN_S])dnl
5862
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5863
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5864
AC_REQUIRE([AC_OBJEXT])dnl
5865
AC_REQUIRE([AC_EXEEXT])dnl
5868
AC_LIBTOOL_SYS_MAX_CMD_LEN
5869
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5872
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5873
_LT_AC_PROG_ECHO_BACKSLASH
5877
# AIX sometimes has problems with the GCC collect2 program. For some
5878
# reason, if we set the COLLECT_NAMES environment variable, the problems
5879
# vanish in a puff of smoke.
5880
if test "X${COLLECT_NAMES+set}" != Xset; then
5882
export COLLECT_NAMES
5887
# Sed substitution that helps us do robust quoting. It backslashifies
5888
# metacharacters that are still active within double-quoted strings.
5889
Xsed='sed -e s/^X//'
5890
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5892
# Same as above, but do not quote variable references.
5893
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5895
# Sed substitution to delay expansion of an escaped shell variable in a
5896
# double_quote_subst'ed string.
5897
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5899
# Sed substitution to avoid accidental globbing in evaled expressions
5900
no_glob_subst='s/\*/\\\*/g'
5906
default_ofile=libtool
5907
can_build_shared=yes
5909
# All known linkers require a `.a' archive for static linking (except M$VC,
5910
# which needs '.lib').
5912
ltmain="$ac_aux_dir/ltmain.sh"
5913
ofile="$default_ofile"
5914
with_gnu_ld="$lt_cv_prog_gnu_ld"
5916
AC_CHECK_TOOL(AR, ar, false)
5917
AC_CHECK_TOOL(RANLIB, ranlib, :)
5918
AC_CHECK_TOOL(STRIP, strip, :)
5921
old_CFLAGS="$CFLAGS"
5923
# Set sane defaults for various variables
5924
test -z "$AR" && AR=ar
5925
test -z "$AR_FLAGS" && AR_FLAGS=cru
5926
test -z "$AS" && AS=as
5927
test -z "$CC" && CC=cc
5928
test -z "$LTCC" && LTCC=$CC
5929
test -z "$DLLTOOL" && DLLTOOL=dlltool
5930
test -z "$LD" && LD=ld
5931
test -z "$LN_S" && LN_S="ln -s"
5932
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5933
test -z "$NM" && NM=nm
5934
test -z "$SED" && SED=sed
5935
test -z "$OBJDUMP" && OBJDUMP=objdump
5936
test -z "$RANLIB" && RANLIB=:
5937
test -z "$STRIP" && STRIP=:
5938
test -z "$ac_objext" && ac_objext=o
5940
# Determine commands to create old-style static archives.
5941
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5942
old_postinstall_cmds='chmod 644 $oldlib'
5943
old_postuninstall_cmds=
5945
if test -n "$RANLIB"; then
5948
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5951
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5954
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5957
# Only perform the check for file, if the check method requires it
5958
case $deplibs_check_method in
5960
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5966
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5967
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5968
enable_win32_dll=yes, enable_win32_dll=no)
5970
AC_ARG_ENABLE([libtool-lock],
5971
[AC_HELP_STRING([--disable-libtool-lock],
5972
[avoid locking (might break parallel builds)])])
5973
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5976
[AC_HELP_STRING([--with-pic],
5977
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5978
[pic_mode="$withval"],
5980
test -z "$pic_mode" && pic_mode=default
5982
# Use C for the default configuration in the libtool script
5984
AC_LIBTOOL_LANG_C_CONFIG
5986
])# AC_LIBTOOL_SETUP
5989
# _LT_AC_SYS_COMPILER
5990
# -------------------
5991
AC_DEFUN([_LT_AC_SYS_COMPILER],
5992
[AC_REQUIRE([AC_PROG_CC])dnl
5994
# If no C compiler was specified, use CC.
5997
# Allow CC to be a program name with arguments.
5999
])# _LT_AC_SYS_COMPILER
6002
# _LT_AC_SYS_LIBPATH_AIX
6003
# ----------------------
6004
# Links a minimal program and checks the executable
6005
# for the system default hardcoded library path. In most cases,
6006
# this is /usr/lib:/lib, but when the MPI compilers are used
6007
# the location of the communication and MPI libs are included too.
6008
# If we don't find anything, use the default library path according
6009
# to the aix ld manual.
6010
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6011
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6012
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6014
# Check for a 64-bit object if we didn't find anything.
6015
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; }
6017
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6018
])# _LT_AC_SYS_LIBPATH_AIX
6021
# _LT_AC_SHELL_INIT(ARG)
6022
# ----------------------
6023
AC_DEFUN([_LT_AC_SHELL_INIT],
6024
[ifdef([AC_DIVERSION_NOTICE],
6025
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6026
[AC_DIVERT_PUSH(NOTICE)])
6029
])# _LT_AC_SHELL_INIT
6032
# _LT_AC_PROG_ECHO_BACKSLASH
6033
# --------------------------
6034
# Add some code to the start of the generated configure script which
6035
# will find an echo command which doesn't interpret backslashes.
6036
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6037
[_LT_AC_SHELL_INIT([
6038
# Check that we are running under the correct shell.
6039
SHELL=${CONFIG_SHELL-/bin/sh}
6043
# Remove one level of quotation (which was required for Make).
6044
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6049
if test "X[$]1" = X--no-reexec; then
6050
# Discard the --no-reexec flag, and continue.
6052
elif test "X[$]1" = X--fallback-echo; then
6053
# Avoid inline document here, it may be left over
6055
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6056
# Yippee, $echo works!
6059
# Restart under the correct shell.
6060
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6063
if test "X[$]1" = X--fallback-echo; then
6064
# used as fallback echo
6072
# The HP-UX ksh and POSIX shell print the target directory to stdout
6074
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6076
if test -z "$ECHO"; then
6077
if test "X${echo_test_string+set}" != Xset; then
6078
# find a string as large as possible, as long as the shell can cope with it
6079
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6080
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6081
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6082
echo_test_string="`eval $cmd`" &&
6083
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6090
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6091
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6092
test "X$echo_testing_string" = "X$echo_test_string"; then
6095
# The Solaris, AIX, and Digital Unix default echo programs unquote
6096
# backslashes. This makes it impossible to quote backslashes using
6097
# echo "$something" | sed 's/\\/\\\\/g'
6099
# So, first we look for a working echo in the user's PATH.
6101
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6102
for dir in $PATH /usr/ucb; do
6104
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6105
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6106
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6107
test "X$echo_testing_string" = "X$echo_test_string"; then
6114
if test "X$echo" = Xecho; then
6115
# We didn't find a better echo, so look for alternatives.
6116
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6117
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6118
test "X$echo_testing_string" = "X$echo_test_string"; then
6119
# This shell has a builtin print -r that does the trick.
6121
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6122
test "X$CONFIG_SHELL" != X/bin/ksh; then
6123
# If we have ksh, try running configure again with it.
6124
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6125
export ORIGINAL_CONFIG_SHELL
6126
CONFIG_SHELL=/bin/ksh
6128
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6132
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6133
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6134
test "X$echo_testing_string" = "X$echo_test_string"; then
6135
# Cool, printf works
6137
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6138
test "X$echo_testing_string" = 'X\t' &&
6139
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6140
test "X$echo_testing_string" = "X$echo_test_string"; then
6141
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6143
SHELL="$CONFIG_SHELL"
6145
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6146
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6147
test "X$echo_testing_string" = 'X\t' &&
6148
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6149
test "X$echo_testing_string" = "X$echo_test_string"; then
6150
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6152
# maybe with a smaller string...
6155
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6156
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6163
if test "$prev" != 'sed 50q "[$]0"'; then
6164
echo_test_string=`eval $prev`
6165
export echo_test_string
6166
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6168
# Oops. We lost completely, so just stick with echo.
6177
# Copy echo and quote the copy suitably for passing to libtool from
6178
# the Makefile, instead of quoting the original, which is used later.
6180
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6181
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6185
])])# _LT_AC_PROG_ECHO_BACKSLASH
6190
AC_DEFUN([_LT_AC_LOCK],
6191
[AC_ARG_ENABLE([libtool-lock],
6192
[AC_HELP_STRING([--disable-libtool-lock],
6193
[avoid locking (might break parallel builds)])])
6194
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6196
# Some flags need to be propagated to the compiler or linker for good
6200
# Find out which ABI we are using.
6201
echo 'int i;' > conftest.$ac_ext
6202
if AC_TRY_EVAL(ac_compile); then
6203
case `/usr/bin/file conftest.$ac_objext` in
6215
# Find out which ABI we are using.
6216
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6217
if AC_TRY_EVAL(ac_compile); then
6218
if test "$lt_cv_prog_gnu_ld" = yes; then
6219
case `/usr/bin/file conftest.$ac_objext` in
6221
LD="${LD-ld} -melf32bsmip"
6224
LD="${LD-ld} -melf32bmipn32"
6227
LD="${LD-ld} -melf64bmip"
6231
case `/usr/bin/file conftest.$ac_objext` in
6247
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6248
# Find out which ABI we are using.
6249
echo 'int i;' > conftest.$ac_ext
6250
if AC_TRY_EVAL(ac_compile); then
6251
case "`/usr/bin/file conftest.o`" in
6256
LD="${LD-ld} -m elf_i386"
6259
LD="${LD-ld} -m elf32ppclinux"
6262
LD="${LD-ld} -m elf_s390"
6265
LD="${LD-ld} -m elf32_sparc"
6273
LD="${LD-ld} -m elf_x86_64"
6275
ppc*-*linux*|powerpc*-*linux*)
6276
LD="${LD-ld} -m elf64ppc"
6279
LD="${LD-ld} -m elf64_s390"
6282
LD="${LD-ld} -m elf64_sparc"
6292
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
6293
SAVE_CFLAGS="$CFLAGS"
6294
CFLAGS="$CFLAGS -belf"
6295
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6297
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6299
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6300
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6301
CFLAGS="$SAVE_CFLAGS"
6304
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6305
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6306
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6307
AC_CHECK_TOOL(AS, as, false)
6308
AC_CHECK_TOOL(OBJDUMP, objdump, false)
6313
need_locks="$enable_libtool_lock"
6318
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6319
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6320
# ----------------------------------------------------------------
6321
# Check whether the given compiler option works
6322
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6323
[AC_REQUIRE([LT_AC_PROG_SED])
6324
AC_CACHE_CHECK([$1], [$2],
6326
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6327
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6328
lt_compiler_flag="$3"
6329
# Insert the option either (1) after the last *FLAGS variable, or
6330
# (2) before a word containing "conftest.", or (3) at the end.
6331
# Note that $ac_compile itself does not contain backslashes and begins
6332
# with a dollar sign (not a hyphen), so the echo should work correctly.
6333
# The option is referenced via a variable to avoid confusing sed.
6334
lt_compile=`echo "$ac_compile" | $SED \
6335
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6336
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6337
-e 's:$: $lt_compiler_flag:'`
6338
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6339
(eval "$lt_compile" 2>conftest.err)
6341
cat conftest.err >&AS_MESSAGE_LOG_FD
6342
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6343
if (exit $ac_status) && test -s "$ac_outfile"; then
6344
# The compiler can only warn and ignore the option if not recognized
6345
# So say no if there are warnings
6346
if test ! -s conftest.err; then
6353
if test x"[$]$2" = xyes; then
6354
ifelse([$5], , :, [$5])
6356
ifelse([$6], , :, [$6])
6358
])# AC_LIBTOOL_COMPILER_OPTION
6361
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6362
# [ACTION-SUCCESS], [ACTION-FAILURE])
6363
# ------------------------------------------------------------
6364
# Check whether the given compiler option works
6365
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6366
[AC_CACHE_CHECK([$1], [$2],
6368
save_LDFLAGS="$LDFLAGS"
6369
LDFLAGS="$LDFLAGS $3"
6370
printf "$lt_simple_link_test_code" > conftest.$ac_ext
6371
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6372
# The compiler can only warn and ignore the option if not recognized
6373
# So say no if there are warnings
6374
if test -s conftest.err; then
6375
# Append any errors to the config.log.
6376
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6382
LDFLAGS="$save_LDFLAGS"
6385
if test x"[$]$2" = xyes; then
6386
ifelse([$4], , :, [$4])
6388
ifelse([$5], , :, [$5])
6390
])# AC_LIBTOOL_LINKER_OPTION
6393
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6394
# --------------------------
6395
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6396
[# find the maximum length of command line arguments
6397
AC_MSG_CHECKING([the maximum length of command line arguments])
6398
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6404
# On DJGPP, this test can blow up pretty badly due to problems in libc
6405
# (any single argument exceeding 2000 bytes causes a buffer overrun
6406
# during glob expansion). Even if it were fixed, the result of this
6407
# check would be larger than it should be.
6408
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6412
# Under GNU Hurd, this test is not required because there is
6413
# no limit to the length of command line arguments.
6414
# Libtool will interpret -1 as no limit whatsoever
6415
lt_cv_sys_max_cmd_len=-1;
6419
# On Win9x/ME, this test blows up -- it succeeds, but takes
6420
# about 5 minutes as the teststring grows exponentially.
6421
# Worse, since 9x/ME are not pre-emptively multitasking,
6422
# you end up with a "frozen" computer, even though with patience
6423
# the test eventually succeeds (with a max line length of 256k).
6424
# Instead, let's just punt: use the minimum linelength reported by
6425
# all of the supported platforms: 8192 (on NT/2K/XP).
6426
lt_cv_sys_max_cmd_len=8192;
6430
# If test is not a shell built-in, we'll probably end up computing a
6431
# maximum length that is only half of the actual maximum length, but
6433
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6434
= "XX$testring") >/dev/null 2>&1 &&
6435
new_result=`expr "X$testring" : ".*" 2>&1` &&
6436
lt_cv_sys_max_cmd_len=$new_result &&
6437
test $i != 17 # 1/2 MB should be enough
6440
testring=$testring$testring
6443
# Add a significant safety factor because C++ compilers can tack on massive
6444
# amounts of additional arguments before passing them to the linker.
6445
# It appears as though 1/2 is a usable value.
6446
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6450
if test -n $lt_cv_sys_max_cmd_len ; then
6451
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6455
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6458
# _LT_AC_CHECK_DLFCN
6459
# --------------------
6460
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6461
[AC_CHECK_HEADERS(dlfcn.h)dnl
6462
])# _LT_AC_CHECK_DLFCN
6465
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6466
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6467
# ------------------------------------------------------------------
6468
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6469
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6470
if test "$cross_compiling" = yes; then :
6473
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6474
lt_status=$lt_dlunknown
6475
cat > conftest.$ac_ext <<EOF
6476
[#line __oline__ "configure"
6477
#include "confdefs.h"
6486
# define LT_DLGLOBAL RTLD_GLOBAL
6489
# define LT_DLGLOBAL DL_GLOBAL
6491
# define LT_DLGLOBAL 0
6495
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6496
find out it does not work in some platform. */
6497
#ifndef LT_DLLAZY_OR_NOW
6499
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6502
# define LT_DLLAZY_OR_NOW DL_LAZY
6505
# define LT_DLLAZY_OR_NOW RTLD_NOW
6508
# define LT_DLLAZY_OR_NOW DL_NOW
6510
# define LT_DLLAZY_OR_NOW 0
6518
extern "C" void exit (int);
6521
void fnord() { int i=42;}
6524
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6525
int status = $lt_dlunknown;
6529
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6530
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6531
/* dlclose (self); */
6537
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6538
(./conftest; exit; ) 2>/dev/null
6541
x$lt_dlno_uscore) $1 ;;
6542
x$lt_dlneed_uscore) $2 ;;
6543
x$lt_unknown|x*) $3 ;;
6546
# compilation failed
6551
])# _LT_AC_TRY_DLOPEN_SELF
6554
# AC_LIBTOOL_DLOPEN_SELF
6555
# -------------------
6556
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6557
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6558
if test "x$enable_dlopen" != xyes; then
6559
enable_dlopen=unknown
6560
enable_dlopen_self=unknown
6561
enable_dlopen_self_static=unknown
6568
lt_cv_dlopen="load_add_on"
6570
lt_cv_dlopen_self=yes
6574
lt_cv_dlopen="LoadLibrary"
6579
lt_cv_dlopen="dlopen"
6584
# if libdl is installed we need to link against it
6585
AC_CHECK_LIB([dl], [dlopen],
6586
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6589
lt_cv_dlopen_self=yes
6594
AC_CHECK_FUNC([shl_load],
6595
[lt_cv_dlopen="shl_load"],
6596
[AC_CHECK_LIB([dld], [shl_load],
6597
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6598
[AC_CHECK_FUNC([dlopen],
6599
[lt_cv_dlopen="dlopen"],
6600
[AC_CHECK_LIB([dl], [dlopen],
6601
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6602
[AC_CHECK_LIB([svld], [dlopen],
6603
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6604
[AC_CHECK_LIB([dld], [dld_link],
6605
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6614
if test "x$lt_cv_dlopen" != xno; then
6620
case $lt_cv_dlopen in
6622
save_CPPFLAGS="$CPPFLAGS"
6623
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6625
save_LDFLAGS="$LDFLAGS"
6626
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6629
LIBS="$lt_cv_dlopen_libs $LIBS"
6631
AC_CACHE_CHECK([whether a program can dlopen itself],
6632
lt_cv_dlopen_self, [dnl
6633
_LT_AC_TRY_DLOPEN_SELF(
6634
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6635
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6638
if test "x$lt_cv_dlopen_self" = xyes; then
6639
LDFLAGS="$LDFLAGS $link_static_flag"
6640
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6641
lt_cv_dlopen_self_static, [dnl
6642
_LT_AC_TRY_DLOPEN_SELF(
6643
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6644
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6648
CPPFLAGS="$save_CPPFLAGS"
6649
LDFLAGS="$save_LDFLAGS"
6654
case $lt_cv_dlopen_self in
6655
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6656
*) enable_dlopen_self=unknown ;;
6659
case $lt_cv_dlopen_self_static in
6660
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6661
*) enable_dlopen_self_static=unknown ;;
6664
])# AC_LIBTOOL_DLOPEN_SELF
6667
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6668
# ---------------------------------
6669
# Check to see if options -c and -o are simultaneously supported by compiler
6670
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6671
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6672
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6673
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6674
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6675
$rm -r conftest 2>/dev/null
6679
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6681
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6682
# that will create temporary files in the current directory regardless of
6683
# the output directory. Thus, making CWD read-only will cause this test
6684
# to fail, enabling locking or at least warning the user not to do parallel
6688
lt_compiler_flag="-o out/conftest2.$ac_objext"
6689
# Insert the option either (1) after the last *FLAGS variable, or
6690
# (2) before a word containing "conftest.", or (3) at the end.
6691
# Note that $ac_compile itself does not contain backslashes and begins
6692
# with a dollar sign (not a hyphen), so the echo should work correctly.
6693
lt_compile=`echo "$ac_compile" | $SED \
6694
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6695
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6696
-e 's:$: $lt_compiler_flag:'`
6697
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6698
(eval "$lt_compile" 2>out/conftest.err)
6700
cat out/conftest.err >&AS_MESSAGE_LOG_FD
6701
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6702
if (exit $ac_status) && test -s out/conftest2.$ac_objext
6704
# The compiler can only warn and ignore the option if not recognized
6705
# So say no if there are warnings
6706
if test ! -s out/conftest.err; then
6707
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6717
])# AC_LIBTOOL_PROG_CC_C_O
6720
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6721
# -----------------------------------------
6722
# Check to see if we can do hard links to lock some files if needed
6723
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6724
[AC_REQUIRE([_LT_AC_LOCK])dnl
6726
hard_links="nottested"
6727
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6728
# do not overwrite the value of need_locks provided by the user
6729
AC_MSG_CHECKING([if we can lock with hard links])
6732
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6734
ln conftest.a conftest.b 2>&5 || hard_links=no
6735
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6736
AC_MSG_RESULT([$hard_links])
6737
if test "$hard_links" = no; then
6738
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6744
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6749
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6750
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6751
[rm -f .libs 2>/dev/null
6752
mkdir .libs 2>/dev/null
6753
if test -d .libs; then
6756
# MS-DOS does not allow filenames that begin with a dot.
6759
rmdir .libs 2>/dev/null])
6760
objdir=$lt_cv_objdir
6761
])# AC_LIBTOOL_OBJDIR
6764
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6765
# ----------------------------------------------
6766
# Check hardcoding attributes.
6767
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6768
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6769
_LT_AC_TAGVAR(hardcode_action, $1)=
6770
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6771
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6772
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6774
# We can hardcode non-existant directories.
6775
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6776
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6777
# have to relink, otherwise we might link with an installed library
6778
# when we should be linking with a yet-to-be-installed one
6779
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6780
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6781
# Linking always hardcodes the temporary library directory.
6782
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6784
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6785
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6788
# We cannot hardcode anything, or else we can only hardcode existing
6790
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6792
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6794
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6795
# Fast installation is not supported
6796
enable_fast_install=no
6797
elif test "$shlibpath_overrides_runpath" = yes ||
6798
test "$enable_shared" = no; then
6799
# Fast installation is not necessary
6800
enable_fast_install=needless
6802
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6805
# AC_LIBTOOL_SYS_LIB_STRIP
6806
# ------------------------
6807
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6810
AC_MSG_CHECKING([whether stripping libraries is possible])
6811
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6812
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6813
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6814
AC_MSG_RESULT([yes])
6816
# FIXME - insert some real tests, host_os isn't really good enough
6819
if test -n "$STRIP" ; then
6820
striplib="$STRIP -x"
6821
AC_MSG_RESULT([yes])
6831
])# AC_LIBTOOL_SYS_LIB_STRIP
6834
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6835
# -----------------------------
6836
# PORTME Fill in your ld.so characteristics
6837
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6838
[AC_MSG_CHECKING([dynamic linker characteristics])
6840
libname_spec='lib$name'
6848
shlibpath_overrides_runpath=unknown
6850
dynamic_linker="$host_os ld.so"
6851
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6852
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6853
need_lib_prefix=unknown
6854
hardcode_into_libs=no
6856
# when you set need_version to no, make sure it does not cause -set_version
6857
# flags to be left without arguments
6858
need_version=unknown
6863
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6864
shlibpath_var=LIBPATH
6866
# AIX 3 has no versioning support, so we append a major version to the name.
6867
soname_spec='${libname}${release}${shared_ext}$major'
6874
hardcode_into_libs=yes
6875
if test "$host_cpu" = ia64; then
6876
# AIX 5 supports IA64
6877
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6878
shlibpath_var=LD_LIBRARY_PATH
6880
# With GCC up to 2.95.x, collect2 would create an import file
6881
# for dependence libraries. The import file would start with
6882
# the line `#! .'. This would cause the generated library to
6883
# depend on `.', always an invalid library. This was fixed in
6884
# development snapshots of GCC prior to 3.0.
6886
aix4 | aix4.[[01]] | aix4.[[01]].*)
6887
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6889
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6896
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6897
# soname into executable. Probably we can add versioning support to
6898
# collect2, so additional links can be useful in future.
6899
if test "$aix_use_runtimelinking" = yes; then
6900
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6901
# instead of lib<name>.a to let people know that these are not
6902
# typical AIX shared libraries.
6903
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6905
# We preserve .a as extension for shared libraries through AIX4.2
6906
# and later when we are not doing run time linking.
6907
library_names_spec='${libname}${release}.a $libname.a'
6908
soname_spec='${libname}${release}${shared_ext}$major'
6910
shlibpath_var=LIBPATH
6915
library_names_spec='$libname.ixlibrary $libname.a'
6916
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6917
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'
6921
library_names_spec='${libname}${shared_ext}'
6922
dynamic_linker="$host_os ld.so"
6923
shlibpath_var=LIBRARY_PATH
6929
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6930
soname_spec='${libname}${release}${shared_ext}$major'
6931
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6932
shlibpath_var=LD_LIBRARY_PATH
6933
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6934
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6935
# the default ld.so.conf also contains /usr/contrib/lib and
6936
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6937
# libtool to hard-code these into programs
6940
cygwin* | mingw* | pw32*)
6941
version_type=windows
6946
case $GCC,$host_os in
6947
yes,cygwin* | yes,mingw* | yes,pw32*)
6948
library_names_spec='$libname.dll.a'
6949
# DLL is installed to $(libdir)/../bin by postinstall_cmds
6950
postinstall_cmds='base_file=`basename \${file}`~
6951
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6952
dldir=$destdir/`dirname \$dlpath`~
6953
test -d \$dldir || mkdir -p \$dldir~
6954
$install_prog $dir/$dlname \$dldir/$dlname'
6955
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6956
dlpath=$dir/\$dldll~
6958
shlibpath_overrides_runpath=yes
6962
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
6963
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6964
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6967
# MinGW DLLs use traditional 'lib' prefix
6968
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6969
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6970
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6971
# It is most probably a Windows format PATH printed by
6972
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6973
# path with ; separators, and with drive letters. We can handle the
6974
# drive letters (cygwin fileutils understands them), so leave them,
6975
# especially as we might pass files found there to a mingw objdump,
6976
# which wouldn't understand a cygwinified path. Ahh.
6977
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6979
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6983
# pw32 DLLs use 'pw' prefix rather than 'lib'
6984
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6990
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6993
dynamic_linker='Win32 ld.exe'
6994
# FIXME: first we should search . and the directory the executable is in
6998
darwin* | rhapsody*)
6999
dynamic_linker="$host_os dyld"
7003
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7004
soname_spec='${libname}${release}${major}$shared_ext'
7005
shlibpath_overrides_runpath=yes
7006
shlibpath_var=DYLD_LIBRARY_PATH
7007
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
7008
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7009
if test "$GCC" = yes; then
7010
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"`
7012
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7014
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7021
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7022
soname_spec='${libname}${release}${shared_ext}$major'
7023
shlibpath_var=LD_LIBRARY_PATH
7034
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7035
soname_spec='${libname}${release}${shared_ext}$major'
7036
shlibpath_var=LD_LIBRARY_PATH
7037
shlibpath_overrides_runpath=no
7038
hardcode_into_libs=yes
7039
dynamic_linker='GNU ld.so'
7043
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7044
version_type=freebsd-$objformat
7045
case $version_type in
7047
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7052
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7056
shlibpath_var=LD_LIBRARY_PATH
7059
shlibpath_overrides_runpath=yes
7061
freebsd3.[01]* | freebsdelf3.[01]*)
7062
shlibpath_overrides_runpath=yes
7063
hardcode_into_libs=yes
7066
shlibpath_overrides_runpath=no
7067
hardcode_into_libs=yes
7076
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7077
soname_spec='${libname}${release}${shared_ext}$major'
7078
shlibpath_var=LD_LIBRARY_PATH
7079
hardcode_into_libs=yes
7082
hpux9* | hpux10* | hpux11*)
7083
# Give a soname corresponding to the major version so that dld.sl refuses to
7084
# link against other versions.
7091
hardcode_into_libs=yes
7092
dynamic_linker="$host_os dld.so"
7093
shlibpath_var=LD_LIBRARY_PATH
7094
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7095
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7096
soname_spec='${libname}${release}${shared_ext}$major'
7097
if test "X$HPUX_IA64_MODE" = X32; then
7098
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7100
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7102
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7106
hardcode_into_libs=yes
7107
dynamic_linker="$host_os dld.sl"
7108
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7109
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7110
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7111
soname_spec='${libname}${release}${shared_ext}$major'
7112
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7113
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7117
dynamic_linker="$host_os dld.sl"
7118
shlibpath_var=SHLIB_PATH
7119
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7120
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7121
soname_spec='${libname}${release}${shared_ext}$major'
7124
# HP-UX runs *really* slowly unless shared libraries are mode 555.
7125
postinstall_cmds='chmod 555 $lib'
7128
irix5* | irix6* | nonstopux*)
7130
nonstopux*) version_type=nonstopux ;;
7132
if test "$lt_cv_prog_gnu_ld" = yes; then
7140
soname_spec='${libname}${release}${shared_ext}$major'
7141
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7143
irix5* | nonstopux*)
7147
case $LD in # libtool.m4 will add one of these switches to LD
7148
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7149
libsuff= shlibsuff= libmagic=32-bit;;
7150
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7151
libsuff=32 shlibsuff=N32 libmagic=N32;;
7152
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7153
libsuff=64 shlibsuff=64 libmagic=64-bit;;
7154
*) libsuff= shlibsuff= libmagic=never-match;;
7158
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7159
shlibpath_overrides_runpath=no
7160
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7161
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7162
hardcode_into_libs=yes
7165
# No shared lib support for Linux oldld, aout, or coff.
7166
linux*oldld* | linux*aout* | linux*coff*)
7170
# This must be Linux ELF.
7175
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7176
soname_spec='${libname}${release}${shared_ext}$major'
7177
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7179
if test "x$LINUX_64_MODE" = x64; then
7180
# Some platforms are per default 64-bit, so there's no /lib64
7181
if test -d /lib64; then
7185
shlibpath_var=LD_LIBRARY_PATH
7186
shlibpath_overrides_runpath=no
7187
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7188
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7189
# This implies no fast_install, which is unacceptable.
7190
# Some rework will be needed to allow for fast_install
7191
# before this can be enabled.
7192
hardcode_into_libs=yes
7194
# We used to test for /lib/ld.so.1 and disable shared libraries on
7195
# powerpc, because MkLinux only supported shared libraries with the
7196
# GNU dynamic linker. Since this was broken with cross compilers,
7197
# most powerpc-linux boxes support dynamic linking these days and
7198
# people can always --disable-shared, the test was removed, and we
7199
# assume the GNU/Linux dynamic linker is in use.
7200
dynamic_linker='GNU/Linux ld.so'
7207
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7208
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7209
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7210
dynamic_linker='NetBSD (a.out) ld.so'
7212
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7213
soname_spec='${libname}${release}${shared_ext}$major'
7214
dynamic_linker='NetBSD ld.elf_so'
7216
shlibpath_var=LD_LIBRARY_PATH
7217
shlibpath_overrides_runpath=yes
7218
hardcode_into_libs=yes
7223
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7224
shlibpath_var=LD_LIBRARY_PATH
7225
shlibpath_overrides_runpath=yes
7232
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7233
soname_spec='${libname}${release}${shared_ext}$major'
7234
shlibpath_var=LD_LIBRARY_PATH
7235
shlibpath_overrides_runpath=yes
7242
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7243
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7244
shlibpath_var=LD_LIBRARY_PATH
7245
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7247
openbsd2.[[89]] | openbsd2.[[89]].*)
7248
shlibpath_overrides_runpath=no
7251
shlibpath_overrides_runpath=yes
7255
shlibpath_overrides_runpath=yes
7260
libname_spec='$name'
7263
library_names_spec='$libname${shared_ext} $libname.a'
7264
dynamic_linker='OS/2 ld.exe'
7265
shlibpath_var=LIBPATH
7268
osf3* | osf4* | osf5*)
7272
soname_spec='${libname}${release}${shared_ext}$major'
7273
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7274
shlibpath_var=LD_LIBRARY_PATH
7275
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7276
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7281
soname_spec='${libname}${release}${shared_ext}$major'
7282
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7283
shlibpath_var=LD_LIBRARY_PATH
7290
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7291
soname_spec='${libname}${release}${shared_ext}$major'
7292
shlibpath_var=LD_LIBRARY_PATH
7293
shlibpath_overrides_runpath=yes
7294
hardcode_into_libs=yes
7295
# ldd complains unless libraries are executable
7296
postinstall_cmds='chmod +x $lib'
7301
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7302
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7303
shlibpath_var=LD_LIBRARY_PATH
7304
shlibpath_overrides_runpath=yes
7305
if test "$with_gnu_ld" = yes; then
7311
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7313
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7314
soname_spec='${libname}${release}${shared_ext}$major'
7315
shlibpath_var=LD_LIBRARY_PATH
7316
case $host_vendor in
7318
shlibpath_overrides_runpath=no
7320
export_dynamic_flag_spec='${wl}-Blargedynsym'
7321
runpath_var=LD_RUN_PATH
7329
shlibpath_overrides_runpath=no
7330
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7336
if test -d /usr/nec ;then
7338
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7339
soname_spec='$libname${shared_ext}.$major'
7340
shlibpath_var=LD_LIBRARY_PATH
7346
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7347
soname_spec='${libname}${release}${shared_ext}$major'
7348
shlibpath_var=LD_LIBRARY_PATH
7355
AC_MSG_RESULT([$dynamic_linker])
7356
test "$dynamic_linker" = no && can_build_shared=no
7357
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7362
AC_DEFUN([_LT_AC_TAGCONFIG],
7363
[AC_ARG_WITH([tags],
7364
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7365
[include additional configurations @<:@automatic@:>@])],
7366
[tagnames="$withval"])
7368
if test -f "$ltmain" && test -n "$tagnames"; then
7369
if test ! -f "${ofile}"; then
7370
AC_MSG_WARN([output file `$ofile' does not exist])
7373
if test -z "$LTCC"; then
7374
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7375
if test -z "$LTCC"; then
7376
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7378
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7382
# Extract list of available tagged configurations in $ofile.
7383
# Note that this assumes the entire list is on one line.
7384
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7386
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7387
for tagname in $tagnames; do
7389
# Check whether tagname contains only valid characters
7390
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7392
*) AC_MSG_ERROR([invalid tag name: $tagname])
7396
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7398
AC_MSG_ERROR([tag name \"$tagname\" already exists])
7401
# Update the list of available tags.
7402
if test -n "$tagname"; then
7403
echo appending configuration tag \"$tagname\" to $ofile
7407
if test -n "$CXX" && test "X$CXX" != "Xno"; then
7408
AC_LIBTOOL_LANG_CXX_CONFIG
7415
if test -n "$F77" && test "X$F77" != "Xno"; then
7416
AC_LIBTOOL_LANG_F77_CONFIG
7423
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7424
AC_LIBTOOL_LANG_GCJ_CONFIG
7431
AC_LIBTOOL_LANG_RC_CONFIG
7435
AC_MSG_ERROR([Unsupported tag name: $tagname])
7439
# Append the new tag name to the list of available tags.
7440
if test -n "$tagname" ; then
7441
available_tags="$available_tags $tagname"
7447
# Now substitute the updated list of available tags.
7448
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7449
mv "${ofile}T" "$ofile"
7453
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7456
])# _LT_AC_TAGCONFIG
7461
# enable checks for dlopen support
7462
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7463
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7464
])# AC_LIBTOOL_DLOPEN
7467
# AC_LIBTOOL_WIN32_DLL
7468
# --------------------
7469
# declare package support for building win32 dll's
7470
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7471
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7472
])# AC_LIBTOOL_WIN32_DLL
7475
# AC_ENABLE_SHARED([DEFAULT])
7476
# ---------------------------
7477
# implement the --enable-shared flag
7478
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7479
AC_DEFUN([AC_ENABLE_SHARED],
7480
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7481
AC_ARG_ENABLE([shared],
7482
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7483
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7484
[p=${PACKAGE-default}
7486
yes) enable_shared=yes ;;
7487
no) enable_shared=no ;;
7490
# Look at the argument we got. We use all the common list separators.
7491
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7492
for pkg in $enableval; do
7494
if test "X$pkg" = "X$p"; then
7501
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7502
])# AC_ENABLE_SHARED
7507
#- set the default shared flag to --disable-shared
7508
AC_DEFUN([AC_DISABLE_SHARED],
7509
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7510
AC_ENABLE_SHARED(no)
7511
])# AC_DISABLE_SHARED
7514
# AC_ENABLE_STATIC([DEFAULT])
7515
# ---------------------------
7516
# implement the --enable-static flag
7517
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7518
AC_DEFUN([AC_ENABLE_STATIC],
7519
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7520
AC_ARG_ENABLE([static],
7521
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7522
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7523
[p=${PACKAGE-default}
7525
yes) enable_static=yes ;;
7526
no) enable_static=no ;;
7529
# Look at the argument we got. We use all the common list separators.
7530
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7531
for pkg in $enableval; do
7533
if test "X$pkg" = "X$p"; then
7540
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7541
])# AC_ENABLE_STATIC
7546
# set the default static flag to --disable-static
7547
AC_DEFUN([AC_DISABLE_STATIC],
7548
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7549
AC_ENABLE_STATIC(no)
7550
])# AC_DISABLE_STATIC
7553
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7554
# ---------------------------------
7555
# implement the --enable-fast-install flag
7556
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7557
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7558
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7559
AC_ARG_ENABLE([fast-install],
7560
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7561
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7562
[p=${PACKAGE-default}
7564
yes) enable_fast_install=yes ;;
7565
no) enable_fast_install=no ;;
7567
enable_fast_install=no
7568
# Look at the argument we got. We use all the common list separators.
7569
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7570
for pkg in $enableval; do
7572
if test "X$pkg" = "X$p"; then
7573
enable_fast_install=yes
7579
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7580
])# AC_ENABLE_FAST_INSTALL
7583
# AC_DISABLE_FAST_INSTALL
7584
# -----------------------
7585
# set the default to --disable-fast-install
7586
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7587
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7588
AC_ENABLE_FAST_INSTALL(no)
7589
])# AC_DISABLE_FAST_INSTALL
7592
# AC_LIBTOOL_PICMODE([MODE])
7593
# --------------------------
7594
# implement the --with-pic flag
7595
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7596
AC_DEFUN([AC_LIBTOOL_PICMODE],
7597
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7598
pic_mode=ifelse($#,1,$1,default)
7599
])# AC_LIBTOOL_PICMODE
7604
# This is predefined starting with Autoconf 2.54, so this conditional
7605
# definition can be removed once we require Autoconf 2.54 or later.
7606
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7607
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7608
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7609
then ac_cv_prog_egrep='grep -E'
7610
else ac_cv_prog_egrep='egrep'
7612
EGREP=$ac_cv_prog_egrep
7617
# AC_PATH_TOOL_PREFIX
7618
# -------------------
7619
# find a file program which can recognise shared library
7620
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7621
[AC_REQUIRE([AC_PROG_EGREP])dnl
7622
AC_MSG_CHECKING([for $1])
7623
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7625
[[\\/*] | ?:[\\/]*])
7626
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7629
lt_save_MAGIC_CMD="$MAGIC_CMD"
7630
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7631
dnl $ac_dummy forces splitting on constant user-supplied paths.
7632
dnl POSIX.2 word splitting is done only on the output of word expansions,
7633
dnl not every word. This closes a longstanding sh security hole.
7634
ac_dummy="ifelse([$2], , $PATH, [$2])"
7635
for ac_dir in $ac_dummy; do
7637
test -z "$ac_dir" && ac_dir=.
7638
if test -f $ac_dir/$1; then
7639
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7640
if test -n "$file_magic_test_file"; then
7641
case $deplibs_check_method in
7643
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7644
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7645
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7646
$EGREP "$file_magic_regex" > /dev/null; then
7651
*** Warning: the command libtool uses to detect shared libraries,
7652
*** $file_magic_cmd, produces output that libtool cannot recognize.
7653
*** The result is that libtool may fail to recognize shared libraries
7654
*** as such. This will affect the creation of libtool libraries that
7655
*** depend on shared libraries, but programs linked with such libtool
7656
*** libraries will work regardless of this problem. Nevertheless, you
7657
*** may want to report the problem to your system manager and/or to
7658
*** bug-libtool@gnu.org
7668
MAGIC_CMD="$lt_save_MAGIC_CMD"
7671
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7672
if test -n "$MAGIC_CMD"; then
7673
AC_MSG_RESULT($MAGIC_CMD)
7677
])# AC_PATH_TOOL_PREFIX
7682
# find a file program which can recognise a shared library
7683
AC_DEFUN([AC_PATH_MAGIC],
7684
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7685
if test -z "$lt_cv_path_MAGIC_CMD"; then
7686
if test -n "$ac_tool_prefix"; then
7687
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7697
# find the pathname to the GNU or non-GNU linker
7698
AC_DEFUN([AC_PROG_LD],
7699
[AC_ARG_WITH([gnu-ld],
7700
[AC_HELP_STRING([--with-gnu-ld],
7701
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7702
[test "$withval" = no || with_gnu_ld=yes],
7704
AC_REQUIRE([LT_AC_PROG_SED])dnl
7705
AC_REQUIRE([AC_PROG_CC])dnl
7706
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7707
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7709
if test "$GCC" = yes; then
7710
# Check if gcc -print-prog-name=ld gives a path.
7711
AC_MSG_CHECKING([for ld used by $CC])
7714
# gcc leaves a trailing carriage return which upsets mingw
7715
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7717
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7720
# Accept absolute paths.
7721
[[\\/]]* | ?:[[\\/]]*)
7722
re_direlt='/[[^/]][[^/]]*/\.\./'
7723
# Canonicalize the pathname of ld
7724
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7725
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7726
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7728
test -z "$LD" && LD="$ac_prog"
7731
# If it fails, then pretend we aren't using GCC.
7735
# If it is relative, then search for the first ld in PATH.
7739
elif test "$with_gnu_ld" = yes; then
7740
AC_MSG_CHECKING([for GNU ld])
7742
AC_MSG_CHECKING([for non-GNU ld])
7744
AC_CACHE_VAL(lt_cv_path_LD,
7745
[if test -z "$LD"; then
7746
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7747
for ac_dir in $PATH; do
7749
test -z "$ac_dir" && ac_dir=.
7750
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7751
lt_cv_path_LD="$ac_dir/$ac_prog"
7752
# Check to see if the program is GNU ld. I'd rather use --version,
7753
# but apparently some GNU ld's only accept -v.
7754
# Break only if it was the GNU/non-GNU ld that we prefer.
7755
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7756
*GNU* | *'with BFD'*)
7757
test "$with_gnu_ld" != no && break
7760
test "$with_gnu_ld" != yes && break
7767
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7770
if test -n "$LD"; then
7775
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7782
AC_DEFUN([AC_PROG_LD_GNU],
7783
[AC_REQUIRE([AC_PROG_EGREP])dnl
7784
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7785
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7786
case `$LD -v 2>&1 </dev/null` in
7787
*GNU* | *'with BFD'*)
7788
lt_cv_prog_gnu_ld=yes
7791
lt_cv_prog_gnu_ld=no
7794
with_gnu_ld=$lt_cv_prog_gnu_ld
7798
# AC_PROG_LD_RELOAD_FLAG
7799
# ----------------------
7800
# find reload flag for linker
7801
# -- PORTME Some linkers may need a different reload flag.
7802
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7803
[AC_CACHE_CHECK([for $LD option to reload object files],
7804
lt_cv_ld_reload_flag,
7805
[lt_cv_ld_reload_flag='-r'])
7806
reload_flag=$lt_cv_ld_reload_flag
7807
case $reload_flag in
7809
*) reload_flag=" $reload_flag" ;;
7811
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7812
])# AC_PROG_LD_RELOAD_FLAG
7815
# AC_DEPLIBS_CHECK_METHOD
7816
# -----------------------
7817
# how to check for library dependencies
7818
# -- PORTME fill in with the dynamic library characteristics
7819
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7820
[AC_CACHE_CHECK([how to recognise dependent libraries],
7821
lt_cv_deplibs_check_method,
7822
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7823
lt_cv_file_magic_test_file=
7824
lt_cv_deplibs_check_method='unknown'
7825
# Need to set the preceding variable on all platforms that support
7826
# interlibrary dependencies.
7827
# 'none' -- dependencies not supported.
7828
# `unknown' -- same as none, but documents that we really don't know.
7829
# 'pass_all' -- all dependencies passed with no checks.
7830
# 'test_compile' -- check by making test program.
7831
# 'file_magic [[regex]]' -- check by looking for files in library path
7832
# which responds to the $file_magic_cmd with a given extended regex.
7833
# If you have `file' or equivalent on your system and you're not sure
7834
# whether `pass_all' will *always* work, you probably want this one.
7838
lt_cv_deplibs_check_method=pass_all
7842
lt_cv_deplibs_check_method=pass_all
7846
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7847
lt_cv_file_magic_cmd='/usr/bin/file -L'
7848
lt_cv_file_magic_test_file=/shlib/libc.so
7852
lt_cv_deplibs_check_method=pass_all
7856
# win32_libid is a shell function defined in ltmain.sh
7857
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7858
lt_cv_file_magic_cmd='win32_libid'
7861
darwin* | rhapsody*)
7862
# this will be overwritten by pass_all, but leave it in just in case
7863
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7864
lt_cv_file_magic_cmd='/usr/bin/file -L'
7866
rhapsody* | darwin1.[[012]])
7867
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7870
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7873
lt_cv_deplibs_check_method=pass_all
7877
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7880
# Not sure whether the presence of OpenBSD here was a mistake.
7881
# Let's accept both of them until this is cleared up.
7882
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7883
lt_cv_file_magic_cmd=/usr/bin/file
7884
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7888
lt_cv_deplibs_check_method=pass_all
7893
lt_cv_deplibs_check_method=pass_all
7896
hpux10.20* | hpux11*)
7897
lt_cv_file_magic_cmd=/usr/bin/file
7900
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7901
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7904
[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]']
7905
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7908
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7909
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7914
irix5* | irix6* | nonstopux*)
7916
irix5* | nonstopux*)
7917
# this will be overridden with pass_all, but let us keep it just in case
7918
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7922
*-32|*"-32 ") libmagic=32-bit;;
7923
*-n32|*"-n32 ") libmagic=N32;;
7924
*-64|*"-64 ") libmagic=64-bit;;
7925
*) libmagic=never-match;;
7927
# this will be overridden with pass_all, but let us keep it just in case
7928
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7931
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7932
lt_cv_deplibs_check_method=pass_all
7935
# This must be Linux ELF.
7938
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7939
lt_cv_deplibs_check_method=pass_all ;;
7940
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7942
lt_cv_deplibs_check_method=pass_all ;;
7944
# glibc up to 2.1.1 does not perform some relocations on ARM
7945
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7947
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7951
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7952
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7954
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7959
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7960
lt_cv_file_magic_cmd=/usr/bin/file
7961
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7965
lt_cv_deplibs_check_method=unknown
7969
lt_cv_file_magic_cmd=/usr/bin/file
7970
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7971
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7972
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7974
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7978
osf3* | osf4* | osf5*)
7979
# this will be overridden with pass_all, but let us keep it just in case
7980
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7981
lt_cv_file_magic_test_file=/shlib/libc.so
7982
lt_cv_deplibs_check_method=pass_all
7986
lt_cv_deplibs_check_method=pass_all
7990
lt_cv_deplibs_check_method=pass_all
7991
lt_cv_file_magic_test_file=/lib/libc.so
7994
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7995
case $host_vendor in
7997
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]]'
7998
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8001
lt_cv_deplibs_check_method=pass_all
8004
lt_cv_file_magic_cmd='/bin/file'
8005
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8008
lt_cv_file_magic_cmd='/bin/file'
8009
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8010
lt_cv_file_magic_test_file=/lib/libc.so
8013
lt_cv_deplibs_check_method=pass_all
8018
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
8019
lt_cv_deplibs_check_method=pass_all
8023
file_magic_cmd=$lt_cv_file_magic_cmd
8024
deplibs_check_method=$lt_cv_deplibs_check_method
8025
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8026
])# AC_DEPLIBS_CHECK_METHOD
8031
# find the pathname to a BSD-compatible name lister
8032
AC_DEFUN([AC_PROG_NM],
8033
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8034
[if test -n "$NM"; then
8035
# Let the user override the test.
8038
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8039
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
8041
test -z "$ac_dir" && ac_dir=.
8042
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
8043
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8044
# Check to see if the nm accepts a BSD-compat flag.
8045
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
8046
# nm: unknown option "B" ignored
8047
# Tru64's nm complains that /dev/null is an invalid object file
8048
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8049
*/dev/null* | *'Invalid file or object type'*)
8050
lt_cv_path_NM="$tmp_nm -B"
8054
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8056
lt_cv_path_NM="$tmp_nm -p"
8060
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8061
continue # so that we can try to find one that supports BSD flags
8068
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8076
# check for math library
8077
AC_DEFUN([AC_CHECK_LIBM],
8078
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8081
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8082
# These system don't have libm, or don't need it
8085
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8086
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8089
AC_CHECK_LIB(m, cos, LIBM="-lm")
8095
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8096
# -----------------------------------
8097
# sets LIBLTDL to the link flags for the libltdl convenience library and
8098
# LTDLINCL to the include flags for the libltdl header and adds
8099
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
8100
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8101
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
8102
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
8103
# '${top_srcdir}/' (note the single quotes!). If your package is not
8104
# flat and you're not using automake, define top_builddir and
8105
# top_srcdir appropriately in the Makefiles.
8106
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8107
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8108
case $enable_ltdl_convenience in
8109
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8110
"") enable_ltdl_convenience=yes
8111
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8113
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8114
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8115
# For backwards non-gettext consistent compatibility...
8117
])# AC_LIBLTDL_CONVENIENCE
8120
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8121
# -----------------------------------
8122
# sets LIBLTDL to the link flags for the libltdl installable library and
8123
# LTDLINCL to the include flags for the libltdl header and adds
8124
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
8125
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8126
# DIRECTORY is not provided and an installed libltdl is not found, it is
8127
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
8128
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8129
# quotes!). If your package is not flat and you're not using automake,
8130
# define top_builddir and top_srcdir appropriately in the Makefiles.
8131
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8132
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8133
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8134
AC_CHECK_LIB(ltdl, lt_dlinit,
8135
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8136
[if test x"$enable_ltdl_install" = xno; then
8137
AC_MSG_WARN([libltdl not installed, but installation disabled])
8139
enable_ltdl_install=yes
8142
if test x"$enable_ltdl_install" = x"yes"; then
8143
ac_configure_args="$ac_configure_args --enable-ltdl-install"
8144
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8145
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8147
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8151
# For backwards non-gettext consistent compatibility...
8153
])# AC_LIBLTDL_INSTALLABLE
8158
# enable support for C++ libraries
8159
AC_DEFUN([AC_LIBTOOL_CXX],
8160
[AC_REQUIRE([_LT_AC_LANG_CXX])
8166
AC_DEFUN([_LT_AC_LANG_CXX],
8167
[AC_REQUIRE([AC_PROG_CXX])
8168
AC_REQUIRE([AC_PROG_CXXCPP])
8169
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8175
# enable support for Fortran 77 libraries
8176
AC_DEFUN([AC_LIBTOOL_F77],
8177
[AC_REQUIRE([_LT_AC_LANG_F77])
8183
AC_DEFUN([_LT_AC_LANG_F77],
8184
[AC_REQUIRE([AC_PROG_F77])
8185
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8191
# enable support for GCJ libraries
8192
AC_DEFUN([AC_LIBTOOL_GCJ],
8193
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8199
AC_DEFUN([_LT_AC_LANG_GCJ],
8200
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8201
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8202
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8203
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8204
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8205
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8206
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8212
# enable support for Windows resource files
8213
AC_DEFUN([AC_LIBTOOL_RC],
8214
[AC_REQUIRE([LT_AC_PROG_RC])
8215
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8219
# AC_LIBTOOL_LANG_C_CONFIG
8220
# ------------------------
8221
# Ensure that the configuration vars for the C compiler are
8222
# suitably defined. Those variables are subsequently used by
8223
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8224
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8225
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8229
# Source file extension for C test sources.
8232
# Object file extension for compiled C test sources.
8234
_LT_AC_TAGVAR(objext, $1)=$objext
8236
# Code to be used in simple compile tests
8237
lt_simple_compile_test_code="int some_variable = 0;\n"
8239
# Code to be used in simple link tests
8240
lt_simple_link_test_code='int main(){return(0);}\n'
8245
# Check for any special shared library compilation flags.
8247
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8248
if test "$GCC" = no; then
8251
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8255
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8256
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8257
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
8259
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8260
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8266
# Check to make sure the static flag actually works.
8268
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8269
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8270
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8272
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8276
## There is no encapsulation within the following macros, do not change
8277
## the running order or otherwise move them around unless you know exactly
8278
## what you are doing...
8279
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8280
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8281
AC_LIBTOOL_PROG_CC_C_O($1)
8282
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8283
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8284
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8285
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8286
AC_LIBTOOL_SYS_LIB_STRIP
8287
AC_LIBTOOL_DLOPEN_SELF($1)
8289
# Report which librarie types wil actually be built
8290
AC_MSG_CHECKING([if libtool supports shared libraries])
8291
AC_MSG_RESULT([$can_build_shared])
8293
AC_MSG_CHECKING([whether to build shared libraries])
8294
test "$can_build_shared" = "no" && enable_shared=no
8296
# On AIX, shared libraries and static libraries use the same namespace, and
8297
# are all built from PIC.
8300
test "$enable_shared" = yes && enable_static=no
8301
if test -n "$RANLIB"; then
8302
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8303
postinstall_cmds='$RANLIB $lib'
8308
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8309
test "$enable_shared" = yes && enable_static=no
8312
darwin* | rhapsody*)
8313
if test "$GCC" = yes; then
8314
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8316
rhapsody* | darwin1.[[012]])
8317
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8320
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8321
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8323
case ${MACOSX_DEPLOYMENT_TARGET} in
8325
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8328
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8334
output_verbose_link_cmd='echo'
8335
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8336
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8337
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8338
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8339
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8340
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8341
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8342
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8343
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8344
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8346
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8350
AC_MSG_RESULT([$enable_shared])
8352
AC_MSG_CHECKING([whether to build static libraries])
8353
# Make sure either enable_shared or enable_static is yes.
8354
test "$enable_shared" = yes || enable_static=yes
8355
AC_MSG_RESULT([$enable_static])
8357
AC_LIBTOOL_CONFIG($1)
8361
])# AC_LIBTOOL_LANG_C_CONFIG
8364
# AC_LIBTOOL_LANG_CXX_CONFIG
8365
# --------------------------
8366
# Ensure that the configuration vars for the C compiler are
8367
# suitably defined. Those variables are subsequently used by
8368
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8369
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8370
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8372
AC_REQUIRE([AC_PROG_CXX])
8373
AC_REQUIRE([AC_PROG_CXXCPP])
8375
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8376
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8377
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8378
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8379
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8380
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8381
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8382
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8383
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8384
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8385
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8386
_LT_AC_TAGVAR(module_cmds, $1)=
8387
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8388
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8389
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8390
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8391
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8392
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8394
# Dependencies to place before and after the object being linked:
8395
_LT_AC_TAGVAR(predep_objects, $1)=
8396
_LT_AC_TAGVAR(postdep_objects, $1)=
8397
_LT_AC_TAGVAR(predeps, $1)=
8398
_LT_AC_TAGVAR(postdeps, $1)=
8399
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8401
# Source file extension for C++ test sources.
8404
# Object file extension for compiled C++ test sources.
8406
_LT_AC_TAGVAR(objext, $1)=$objext
8408
# Code to be used in simple compile tests
8409
lt_simple_compile_test_code="int some_variable = 0;\n"
8411
# Code to be used in simple link tests
8412
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8414
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8417
# Allow CC to be a program name with arguments.
8422
lt_save_with_gnu_ld=$with_gnu_ld
8423
lt_save_path_LD=$lt_cv_path_LD
8424
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8425
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8427
unset lt_cv_prog_gnu_ld
8429
if test -n "${lt_cv_path_LDCXX+set}"; then
8430
lt_cv_path_LD=$lt_cv_path_LDCXX
8434
test -z "${LDCXX+set}" || LD=$LDCXX
8437
_LT_AC_TAGVAR(compiler, $1)=$CC
8438
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8440
# We don't want -fno-exception wen compiling C++ code, so set the
8441
# no_builtin_flag separately
8442
if test "$GXX" = yes; then
8443
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8445
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8448
if test "$GXX" = yes; then
8449
# Set up default GNU C++ configuration
8453
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8454
# archiving commands below assume that GNU ld is being used.
8455
if test "$with_gnu_ld" = yes; then
8456
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8457
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8459
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8460
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8462
# If archive_cmds runs LD, not CC, wlarc should be empty
8463
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8464
# investigate it a little bit more. (MM)
8467
# ancient GNU ld didn't support --whole-archive et. al.
8468
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8469
grep 'no-whole-archive' > /dev/null; then
8470
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8472
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8478
# A generic and very simple default shared library creation
8479
# command for GNU C++ for the case where it uses the native
8480
# linker, instead of GNU ld. If possible, this setting should
8481
# overridden to take advantage of the native linker features on
8482
# the platform it is being used on.
8483
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8486
# Commands to make compiler produce verbose output that lists
8487
# what "hidden" libraries, object files and flags are used when
8488
# linking a shared library.
8489
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8497
# PORTME: fill in a description of your system's C++ link characteristics
8498
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8499
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8502
# FIXME: insert proper C++ library support
8503
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8506
if test "$host_cpu" = ia64; then
8507
# On IA64, the linker does run time linking by default, so we don't
8508
# have to do anything special.
8509
aix_use_runtimelinking=no
8510
exp_sym_flag='-Bexport'
8513
# KDE requires run time linking. Make it the default.
8514
aix_use_runtimelinking=yes
8515
exp_sym_flag='-bexport'
8516
no_entry_flag='-bnoentry'
8519
# When large executables or shared objects are built, AIX ld can
8520
# have problems creating the table of contents. If linking a library
8521
# or program results in "error TOC overflow" add -mminimal-toc to
8522
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8523
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8525
_LT_AC_TAGVAR(archive_cmds, $1)=''
8526
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8527
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8528
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8530
if test "$GXX" = yes; then
8531
case $host_os in aix4.[012]|aix4.[012].*)
8532
# We only want to do this on AIX 4.2 and lower, the check
8533
# below for broken collect2 doesn't work under 4.3+
8534
collect2name=`${CC} -print-prog-name=collect2`
8535
if test -f "$collect2name" && \
8536
strings "$collect2name" | grep resolve_lib_name >/dev/null
8538
# We have reworked collect2
8539
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8541
# We have old collect2
8542
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8543
# It fails to find uninstalled libraries when the uninstalled
8544
# path is not listed in the libpath. Setting hardcode_minus_L
8545
# to unsupported forces relinking
8546
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8547
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8548
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8551
shared_flag='-shared'
8554
if test "$host_cpu" = ia64; then
8555
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8556
# chokes on -Wl,-G. The following line is correct:
8559
if test "$aix_use_runtimelinking" = yes; then
8560
shared_flag='-qmkshrobj ${wl}-G'
8562
shared_flag='-qmkshrobj'
8567
# Let the compiler handle the export list.
8568
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8569
if test "$aix_use_runtimelinking" = yes; then
8570
# Warning - without using the other runtime loading flags (-brtl),
8571
# -berok will link without error, but may produce a broken library.
8572
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8573
# Determine the default libpath from the value encoded in an empty executable.
8574
_LT_AC_SYS_LIBPATH_AIX
8575
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8577
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8578
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8580
if test "$host_cpu" = ia64; then
8581
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8582
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8583
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8585
# Determine the default libpath from the value encoded in an empty executable.
8586
_LT_AC_SYS_LIBPATH_AIX
8587
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8588
# Warning - without using the other run time loading flags,
8589
# -berok will link without error, but may produce a broken library.
8590
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8591
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8592
# -bexpall does not export symbols beginning with underscore (_)
8593
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8594
# Exported symbols can be pulled into shared objects from archives
8595
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8596
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8597
# This is similar to how AIX traditionally builds it's shared libraries.
8598
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8603
case $cc_basename in
8605
# FIXME: insert proper C++ library support
8606
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8611
cygwin* | mingw* | pw32*)
8612
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8613
# as there is no search path for DLLs.
8614
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8615
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8616
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8617
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8619
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8620
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8621
# If the export-symbols file already is a .def file (1st line
8622
# is EXPORTS), use it as is; otherwise, prepend...
8623
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8624
cp $export_symbols $output_objdir/$soname.def;
8626
echo EXPORTS > $output_objdir/$soname.def;
8627
cat $export_symbols >> $output_objdir/$soname.def;
8629
$CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8631
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8635
darwin* | rhapsody*)
8636
if test "$GXX" = yes; then
8637
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8639
rhapsody* | darwin1.[[012]])
8640
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8643
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8644
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8646
case ${MACOSX_DEPLOYMENT_TARGET} in
8648
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8651
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8657
lt_int_apple_cc_single_mod=no
8658
output_verbose_link_cmd='echo'
8659
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8660
lt_int_apple_cc_single_mod=yes
8662
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8663
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8665
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8667
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8669
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8670
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8671
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8673
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8675
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8676
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8677
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8678
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8679
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8680
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8682
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8687
case $cc_basename in
8689
# FIXME: insert proper C++ library support
8690
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8693
# Green Hills C++ Compiler
8694
# FIXME: insert proper C++ library support
8695
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8698
# FIXME: insert proper C++ library support
8699
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8704
# C++ shared libraries reported to be fairly broken before switch to ELF
8705
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8708
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8711
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8713
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8718
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8719
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8720
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8721
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8722
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8723
# but as the default
8724
# location of the library.
8726
case $cc_basename in
8728
# FIXME: insert proper C++ library support
8729
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8732
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8733
# Commands to make compiler produce verbose output that lists
8734
# what "hidden" libraries, object files and flags are used when
8735
# linking a shared library.
8737
# There doesn't appear to be a way to prevent this compiler from
8738
# explicitly linking system object files so we need to strip them
8739
# from the output so that they don't get included in the library
8741
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
8744
if test "$GXX" = yes; then
8745
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8747
# FIXME: insert proper C++ library support
8748
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8754
if test $with_gnu_ld = no; then
8757
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8758
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8759
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8762
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8765
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8766
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8767
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8773
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8774
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8777
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8778
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8779
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8780
# but as the default
8781
# location of the library.
8784
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8785
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8786
# but as the default
8787
# location of the library.
8791
case $cc_basename in
8793
# FIXME: insert proper C++ library support
8794
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8799
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8802
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8805
# Commands to make compiler produce verbose output that lists
8806
# what "hidden" libraries, object files and flags are used when
8807
# linking a shared library.
8809
# There doesn't appear to be a way to prevent this compiler from
8810
# explicitly linking system object files so we need to strip them
8811
# from the output so that they don't get included in the library
8813
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'
8816
if test "$GXX" = yes; then
8817
if test $with_gnu_ld = no; then
8820
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8823
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8828
# FIXME: insert proper C++ library support
8829
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8835
case $cc_basename in
8838
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8840
# Archives containing C++ object files must be created using
8841
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8842
# necessary to make sure instantiated templates are included
8844
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8847
if test "$GXX" = yes; then
8848
if test "$with_gnu_ld" = no; then
8849
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8851
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8854
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8857
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8858
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8861
case $cc_basename in
8863
# Kuck and Associates, Inc. (KAI) C++ Compiler
8865
# KCC will only create a shared library if the output file
8866
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8867
# to its proper name (with version) after linking.
8868
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8869
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8870
# Commands to make compiler produce verbose output that lists
8871
# what "hidden" libraries, object files and flags are used when
8872
# linking a shared library.
8874
# There doesn't appear to be a way to prevent this compiler from
8875
# explicitly linking system object files so we need to strip them
8876
# from the output so that they don't get included in the library
8878
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'
8880
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8881
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8883
# Archives containing C++ object files must be created using
8884
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8885
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8890
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8891
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8892
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8893
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8894
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8895
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8899
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8900
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8902
runpath_var=LD_RUN_PATH
8903
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8904
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8906
# Commands to make compiler produce verbose output that lists
8907
# what "hidden" libraries, object files and flags are used when
8908
# linking a shared library.
8910
# There doesn't appear to be a way to prevent this compiler from
8911
# explicitly linking system object files so we need to strip them
8912
# from the output so that they don't get included in the library
8914
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'
8919
# FIXME: insert proper C++ library support
8920
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8923
# FIXME: insert proper C++ library support
8924
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8927
case $cc_basename in
8929
# FIXME: insert proper C++ library support
8930
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8933
# FIXME: insert proper C++ library support
8934
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8939
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8940
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8942
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8943
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8944
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8946
# Workaround some broken pre-1.5 toolchains
8947
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8950
case $cc_basename in
8952
# Kuck and Associates, Inc. (KAI) C++ Compiler
8954
# KCC will only create a shared library if the output file
8955
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8956
# to its proper name (with version) after linking.
8957
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8959
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8960
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8962
# Archives containing C++ object files must be created using
8963
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8964
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8968
# Rational C++ 2.4.1
8969
# FIXME: insert proper C++ library support
8970
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8973
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8974
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8976
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8977
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8979
# Commands to make compiler produce verbose output that lists
8980
# what "hidden" libraries, object files and flags are used when
8981
# linking a shared library.
8983
# There doesn't appear to be a way to prevent this compiler from
8984
# explicitly linking system object files so we need to strip them
8985
# from the output so that they don't get included in the library
8987
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'
8990
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8991
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8992
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8994
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8995
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8997
# Commands to make compiler produce verbose output that lists
8998
# what "hidden" libraries, object files and flags are used when
8999
# linking a shared library.
9000
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9003
# FIXME: insert proper C++ library support
9004
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9010
case $cc_basename in
9012
# Kuck and Associates, Inc. (KAI) C++ Compiler
9014
# KCC will only create a shared library if the output file
9015
# ends with ".so" (or ".sl" for HP-UX), so rename the library
9016
# to its proper name (with version) after linking.
9017
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9019
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9020
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9022
# Archives containing C++ object files must be created using
9023
# the KAI C++ compiler.
9024
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9027
# Rational C++ 2.4.1
9028
# FIXME: insert proper C++ library support
9029
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9032
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9033
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9034
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9035
echo "-hidden">> $lib.exp~
9036
$CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
9039
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9040
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9042
# Commands to make compiler produce verbose output that lists
9043
# what "hidden" libraries, object files and flags are used when
9044
# linking a shared library.
9046
# There doesn't appear to be a way to prevent this compiler from
9047
# explicitly linking system object files so we need to strip them
9048
# from the output so that they don't get included in the library
9050
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'
9053
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9054
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9055
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9057
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9058
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9060
# Commands to make compiler produce verbose output that lists
9061
# what "hidden" libraries, object files and flags are used when
9062
# linking a shared library.
9063
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9066
# FIXME: insert proper C++ library support
9067
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9073
# FIXME: insert proper C++ library support
9074
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9077
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9078
case $cc_basename in
9080
# FIXME: insert proper C++ library support
9081
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9084
# FIXME: insert proper C++ library support
9085
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9090
case $cc_basename in
9093
# FIXME: insert proper C++ library support
9094
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9098
# FIXME: insert proper C++ library support
9099
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9102
# FIXME: insert proper C++ library support
9103
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9108
case $cc_basename in
9110
# Sun C++ 4.2, 5.x and Centerline C++
9111
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9112
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9113
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9114
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9116
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9117
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9119
solaris2.[0-5] | solaris2.[0-5].*) ;;
9121
# The C++ compiler is used as linker so we must use $wl
9122
# flag to pass the commands to the underlying system
9124
# Supported since Solaris 2.6 (maybe 2.5.1?)
9125
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9128
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9130
# Commands to make compiler produce verbose output that lists
9131
# what "hidden" libraries, object files and flags are used when
9132
# linking a shared library.
9134
# There doesn't appear to be a way to prevent this compiler from
9135
# explicitly linking system object files so we need to strip them
9136
# from the output so that they don't get included in the library
9138
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
9140
# Archives containing C++ object files must be created using
9141
# "CC -xar", where "CC" is the Sun C++ compiler. This is
9142
# necessary to make sure instantiated templates are included
9144
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9147
# Green Hills C++ Compiler
9148
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9150
# The C++ compiler must be used to create the archive.
9151
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9154
# GNU C++ compiler with Solaris linker
9155
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9156
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9157
if $CC --version | grep -v '^2\.7' > /dev/null; then
9158
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9159
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9160
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9162
# Commands to make compiler produce verbose output that lists
9163
# what "hidden" libraries, object files and flags are used when
9164
# linking a shared library.
9165
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9167
# g++ 2.7 appears to require `-G' NOT `-shared' on this
9169
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9170
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9171
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9173
# Commands to make compiler produce verbose output that lists
9174
# what "hidden" libraries, object files and flags are used when
9175
# linking a shared library.
9176
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9179
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9184
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9185
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9188
case $cc_basename in
9190
# NonStop-UX NCC 3.20
9191
# FIXME: insert proper C++ library support
9192
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9195
# FIXME: insert proper C++ library support
9196
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9201
# FIXME: insert proper C++ library support
9202
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9205
# FIXME: insert proper C++ library support
9206
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9209
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9210
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9212
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9213
_LT_AC_TAGVAR(LD, $1)="$LD"
9216
## There is no encapsulation within the following macros, do not change
9217
## the running order or otherwise move them around unless you know exactly
9218
## what you are doing...
9219
AC_LIBTOOL_POSTDEP_PREDEP($1)
9220
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9221
AC_LIBTOOL_PROG_CC_C_O($1)
9222
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9223
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9224
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9225
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9226
AC_LIBTOOL_SYS_LIB_STRIP
9227
AC_LIBTOOL_DLOPEN_SELF($1)
9229
AC_LIBTOOL_CONFIG($1)
9236
with_gnu_ldcxx=$with_gnu_ld
9237
with_gnu_ld=$lt_save_with_gnu_ld
9238
lt_cv_path_LDCXX=$lt_cv_path_LD
9239
lt_cv_path_LD=$lt_save_path_LD
9240
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9241
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9242
])# AC_LIBTOOL_LANG_CXX_CONFIG
9244
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9245
# ------------------------
9246
# Figure out "hidden" library dependencies from verbose
9247
# compiler output when linking a shared library.
9248
# Parse the compiler output and extract the necessary
9249
# objects, libraries and library flags.
9250
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9251
dnl we can't use the lt_simple_compile_test_code here,
9252
dnl because it contains code intended for an executable,
9253
dnl not a library. It's possible we should let each
9254
dnl tag define a new lt_????_link_test_code variable,
9255
dnl but it's only used here...
9256
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9258
void foo (void) { a = 0; }
9260
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9264
Foo (void) { a = 0; }
9269
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9277
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9280
public void bar (void) {
9286
dnl Parse the compiler output and extract the necessary
9287
dnl objects, libraries and library flags.
9288
if AC_TRY_EVAL(ac_compile); then
9289
# Parse the compiler output and extract the necessary
9290
# objects, libraries and library flags.
9292
# Sentinel used to keep track of whether or not we are before
9293
# the conftest object file.
9294
pre_test_object_deps_done=no
9296
# The `*' in the case matches for architectures that use `case' in
9297
# $output_verbose_cmd can trigger glob expansion during the loop
9298
# eval without this substitution.
9299
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9301
for p in `eval $output_verbose_link_cmd`; do
9305
# Some compilers place space between "-{L,R}" and the path.
9308
|| test $p = "-R"; then
9315
if test "$pre_test_object_deps_done" = no; then
9318
# Internal compiler library paths should come after those
9319
# provided the user. The postdeps already come after the
9320
# user supplied libs so there is no need to process them.
9321
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9322
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9324
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9327
# The "-l" case would never come before the object being
9328
# linked, so don't bother handling this case.
9331
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9332
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9334
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9339
*.$objext|*.$libext)
9340
# This assumes that the test object file only shows up
9341
# once in the compiler output.
9342
if test "$p" = "conftest.$objext"; then
9343
pre_test_object_deps_done=yes
9347
if test "$pre_test_object_deps_done" = no; then
9348
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9349
_LT_AC_TAGVAR(predep_objects, $1)="$p"
9351
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9354
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9355
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
9357
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9362
*) ;; # Ignore the rest.
9370
echo "libtool.m4: error: problem compiling $1 test program"
9373
$rm -f confest.$objext
9375
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9376
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9378
])# AC_LIBTOOL_POSTDEP_PREDEP
9380
# AC_LIBTOOL_LANG_F77_CONFIG
9381
# ------------------------
9382
# Ensure that the configuration vars for the C compiler are
9383
# suitably defined. Those variables are subsequently used by
9384
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9385
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9386
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9387
[AC_REQUIRE([AC_PROG_F77])
9388
AC_LANG_PUSH(Fortran 77)
9390
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9391
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9392
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9393
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9394
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9395
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9396
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9397
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9398
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9399
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9400
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9401
_LT_AC_TAGVAR(module_cmds, $1)=
9402
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9403
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9404
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9405
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9406
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9407
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9409
# Source file extension for f77 test sources.
9412
# Object file extension for compiled f77 test sources.
9414
_LT_AC_TAGVAR(objext, $1)=$objext
9416
# Code to be used in simple compile tests
9417
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
9419
# Code to be used in simple link tests
9420
lt_simple_link_test_code=" program t\n end\n"
9422
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9425
# Allow CC to be a program name with arguments.
9429
_LT_AC_TAGVAR(compiler, $1)=$CC
9430
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9432
AC_MSG_CHECKING([if libtool supports shared libraries])
9433
AC_MSG_RESULT([$can_build_shared])
9435
AC_MSG_CHECKING([whether to build shared libraries])
9436
test "$can_build_shared" = "no" && enable_shared=no
9438
# On AIX, shared libraries and static libraries use the same namespace, and
9439
# are all built from PIC.
9442
test "$enable_shared" = yes && enable_static=no
9443
if test -n "$RANLIB"; then
9444
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9445
postinstall_cmds='$RANLIB $lib'
9449
test "$enable_shared" = yes && enable_static=no
9452
AC_MSG_RESULT([$enable_shared])
9454
AC_MSG_CHECKING([whether to build static libraries])
9455
# Make sure either enable_shared or enable_static is yes.
9456
test "$enable_shared" = yes || enable_static=yes
9457
AC_MSG_RESULT([$enable_static])
9459
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9461
_LT_AC_TAGVAR(GCC, $1)="$G77"
9462
_LT_AC_TAGVAR(LD, $1)="$LD"
9464
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9465
AC_LIBTOOL_PROG_CC_C_O($1)
9466
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9467
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9468
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9469
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9470
AC_LIBTOOL_SYS_LIB_STRIP
9473
AC_LIBTOOL_CONFIG($1)
9477
])# AC_LIBTOOL_LANG_F77_CONFIG
9480
# AC_LIBTOOL_LANG_GCJ_CONFIG
9481
# --------------------------
9482
# Ensure that the configuration vars for the C compiler are
9483
# suitably defined. Those variables are subsequently used by
9484
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9485
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9486
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9489
# Source file extension for Java test sources.
9492
# Object file extension for compiled Java test sources.
9494
_LT_AC_TAGVAR(objext, $1)=$objext
9496
# Code to be used in simple compile tests
9497
lt_simple_compile_test_code="class foo {}\n"
9499
# Code to be used in simple link tests
9500
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9502
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9505
# Allow CC to be a program name with arguments.
9509
_LT_AC_TAGVAR(compiler, $1)=$CC
9511
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9512
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9515
## There is no encapsulation within the following macros, do not change
9516
## the running order or otherwise move them around unless you know exactly
9517
## what you are doing...
9518
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9519
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9520
AC_LIBTOOL_PROG_CC_C_O($1)
9521
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9522
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9523
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9524
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9525
AC_LIBTOOL_SYS_LIB_STRIP
9526
AC_LIBTOOL_DLOPEN_SELF($1)
9528
AC_LIBTOOL_CONFIG($1)
9532
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9535
# AC_LIBTOOL_LANG_RC_CONFIG
9536
# --------------------------
9537
# Ensure that the configuration vars for the Windows resource compiler are
9538
# suitably defined. Those variables are subsequently used by
9539
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9540
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9541
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9544
# Source file extension for RC test sources.
9547
# Object file extension for compiled RC test sources.
9549
_LT_AC_TAGVAR(objext, $1)=$objext
9551
# Code to be used in simple compile tests
9552
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9554
# Code to be used in simple link tests
9555
lt_simple_link_test_code="$lt_simple_compile_test_code"
9557
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9560
# Allow CC to be a program name with arguments.
9564
_LT_AC_TAGVAR(compiler, $1)=$CC
9565
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9567
AC_LIBTOOL_CONFIG($1)
9571
])# AC_LIBTOOL_LANG_RC_CONFIG
9574
# AC_LIBTOOL_CONFIG([TAGNAME])
9575
# ----------------------------
9576
# If TAGNAME is not passed, then create an initial libtool script
9577
# with a default configuration from the untagged config vars. Otherwise
9578
# add code to config.status for appending the configuration named by
9579
# TAGNAME from the matching tagged config vars.
9580
AC_DEFUN([AC_LIBTOOL_CONFIG],
9581
[# The else clause should only fire when bootstrapping the
9582
# libtool distribution, otherwise you forgot to ship ltmain.sh
9583
# with your package, and you will get complaints that there are
9584
# no rules to generate ltmain.sh.
9585
if test -f "$ltmain"; then
9586
# See if we are running on zsh, and set the options which allow our commands through
9587
# without removal of \ escapes.
9588
if test -n "${ZSH_VERSION+set}" ; then
9589
setopt NO_GLOB_SUBST
9591
# Now quote all the things that may contain metacharacters while being
9592
# careful not to overquote the AC_SUBSTed values. We take copies of the
9593
# variables and quote the copies for generation of the libtool script.
9594
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9595
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9596
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9597
deplibs_check_method reload_flag reload_cmds need_locks \
9598
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9599
lt_cv_sys_global_symbol_to_c_name_address \
9600
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9601
old_postinstall_cmds old_postuninstall_cmds \
9602
_LT_AC_TAGVAR(compiler, $1) \
9603
_LT_AC_TAGVAR(CC, $1) \
9604
_LT_AC_TAGVAR(LD, $1) \
9605
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9606
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9607
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9608
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9609
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9610
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9611
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9612
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9613
_LT_AC_TAGVAR(old_archive_cmds, $1) \
9614
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9615
_LT_AC_TAGVAR(predep_objects, $1) \
9616
_LT_AC_TAGVAR(postdep_objects, $1) \
9617
_LT_AC_TAGVAR(predeps, $1) \
9618
_LT_AC_TAGVAR(postdeps, $1) \
9619
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9620
_LT_AC_TAGVAR(archive_cmds, $1) \
9621
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9622
_LT_AC_TAGVAR(postinstall_cmds, $1) \
9623
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
9624
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9625
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
9626
_LT_AC_TAGVAR(no_undefined_flag, $1) \
9627
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
9628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9629
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9630
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9631
_LT_AC_TAGVAR(hardcode_automatic, $1) \
9632
_LT_AC_TAGVAR(module_cmds, $1) \
9633
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
9634
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9635
_LT_AC_TAGVAR(exclude_expsyms, $1) \
9636
_LT_AC_TAGVAR(include_expsyms, $1); do
9639
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
9640
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9641
_LT_AC_TAGVAR(archive_cmds, $1) | \
9642
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9643
_LT_AC_TAGVAR(module_cmds, $1) | \
9644
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9645
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9646
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9647
extract_expsyms_cmds | reload_cmds | finish_cmds | \
9648
postinstall_cmds | postuninstall_cmds | \
9649
old_postinstall_cmds | old_postuninstall_cmds | \
9650
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9651
# Double-quote double-evaled strings.
9652
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9655
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9661
*'\[$]0 --fallback-echo"')
9662
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9667
[cfgfile="${ofile}T"
9668
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9670
AC_MSG_NOTICE([creating $ofile])],
9673
cat <<__EOF__ >> "$cfgfile"
9677
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9678
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9679
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9681
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9682
# Free Software Foundation, Inc.
9684
# This file is part of GNU Libtool:
9685
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9687
# This program is free software; you can redistribute it and/or modify
9688
# it under the terms of the GNU General Public License as published by
9689
# the Free Software Foundation; either version 2 of the License, or
9690
# (at your option) any later version.
9692
# This program is distributed in the hope that it will be useful, but
9693
# WITHOUT ANY WARRANTY; without even the implied warranty of
9694
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9695
# General Public License for more details.
9697
# You should have received a copy of the GNU General Public License
9698
# along with this program; if not, write to the Free Software
9699
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9701
# As a special exception to the GNU General Public License, if you
9702
# distribute this file as part of a program that contains a
9703
# configuration script generated by Autoconf, you may include it under
9704
# the same distribution terms that you use for the rest of that program.
9706
# A sed program that does not truncate output.
9709
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9710
Xsed="$SED -e s/^X//"
9712
# The HP-UX ksh and POSIX shell print the target directory to stdout
9714
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9716
# The names of the tagged configurations supported by this script.
9719
# ### BEGIN LIBTOOL CONFIG],
9720
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9722
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9724
# Shell to use when invoking shell scripts.
9727
# Whether or not to build shared libraries.
9728
build_libtool_libs=$enable_shared
9730
# Whether or not to build static libraries.
9731
build_old_libs=$enable_static
9733
# Whether or not to add -lc for building shared libraries.
9734
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9736
# Whether or not to disallow shared libs when runtime libs are static
9737
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9739
# Whether or not to optimize for fast installation.
9740
fast_install=$enable_fast_install
9743
host_alias=$host_alias
9746
# An echo program that does not interpret backslashes.
9751
AR_FLAGS=$lt_AR_FLAGS
9756
# A language-specific compiler.
9757
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9759
# Is the compiler the GNU C compiler?
9760
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9765
# The linker used to build libraries.
9766
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9768
# Whether we need hard or soft links.
9771
# A BSD-compatible nm program.
9774
# A symbol stripping program
9777
# Used to examine libraries when file_magic_cmd begins "file"
9778
MAGIC_CMD=$MAGIC_CMD
9780
# Used on cygwin: DLL creation program.
9783
# Used on cygwin: object dumper.
9786
# Used on cygwin: assembler.
9789
# The name of the directory that contains temporary libtool files.
9792
# How to create reloadable object files.
9793
reload_flag=$lt_reload_flag
9794
reload_cmds=$lt_reload_cmds
9796
# How to pass a linker flag through the compiler.
9797
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9799
# Object file suffix (normally "o").
9802
# Old archive suffix (normally "a").
9805
# Shared library suffix (normally ".so").
9808
# Executable file suffix (normally "").
9811
# Additional compiler flags for building library objects.
9812
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9815
# What is the maximum length of a command?
9816
max_cmd_len=$lt_cv_sys_max_cmd_len
9818
# Does compiler simultaneously support -c and -o options?
9819
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9821
# Must we lock files when doing compilation ?
9822
need_locks=$lt_need_locks
9824
# Do we need the lib prefix for modules?
9825
need_lib_prefix=$need_lib_prefix
9827
# Do we need a version for libraries?
9828
need_version=$need_version
9830
# Whether dlopen is supported.
9831
dlopen_support=$enable_dlopen
9833
# Whether dlopen of programs is supported.
9834
dlopen_self=$enable_dlopen_self
9836
# Whether dlopen of statically linked programs is supported.
9837
dlopen_self_static=$enable_dlopen_self_static
9839
# Compiler flag to prevent dynamic linking.
9840
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9842
# Compiler flag to turn off builtin functions.
9843
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9845
# Compiler flag to allow reflexive dlopens.
9846
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9848
# Compiler flag to generate shared objects directly from archives.
9849
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9851
# Compiler flag to generate thread-safe objects.
9852
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9854
# Library versioning type.
9855
version_type=$version_type
9857
# Format of library name prefix.
9858
libname_spec=$lt_libname_spec
9860
# List of archive names. First name is the real one, the rest are links.
9861
# The last name is the one that the linker finds with -lNAME.
9862
library_names_spec=$lt_library_names_spec
9864
# The coded name of the library, if different from the real name.
9865
soname_spec=$lt_soname_spec
9867
# Commands used to build and install an old-style archive.
9869
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9870
old_postinstall_cmds=$lt_old_postinstall_cmds
9871
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9873
# Create an old-style archive from a shared archive.
9874
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9876
# Create a temporary old-style archive to link instead of a shared archive.
9877
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9879
# Commands used to build and install a shared archive.
9880
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9881
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9882
postinstall_cmds=$lt_postinstall_cmds
9883
postuninstall_cmds=$lt_postuninstall_cmds
9885
# Commands used to build a loadable module (assumed same as above if empty)
9886
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9887
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9889
# Commands to strip libraries.
9890
old_striplib=$lt_old_striplib
9891
striplib=$lt_striplib
9893
# Dependencies to place before the objects being linked to create a
9895
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9897
# Dependencies to place after the objects being linked to create a
9899
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9901
# Dependencies to place before the objects being linked to create a
9903
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9905
# Dependencies to place after the objects being linked to create a
9907
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9909
# The library search path used internally by the compiler when linking
9911
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9913
# Method to check whether dependent libraries are shared objects.
9914
deplibs_check_method=$lt_deplibs_check_method
9916
# Command to use when deplibs_check_method == file_magic.
9917
file_magic_cmd=$lt_file_magic_cmd
9919
# Flag that allows shared libraries with undefined symbols to be built.
9920
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9922
# Flag that forces no undefined symbols.
9923
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9925
# Commands used to finish a libtool library installation in a directory.
9926
finish_cmds=$lt_finish_cmds
9928
# Same as above, but a single script fragment to be evaled but not shown.
9929
finish_eval=$lt_finish_eval
9931
# Take the output of nm and produce a listing of raw symbols and C names.
9932
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9934
# Transform the output of nm in a proper C declaration
9935
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9937
# Transform the output of nm in a C name address pair
9938
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9940
# This is the shared library runtime path variable.
9941
runpath_var=$runpath_var
9943
# This is the shared library path variable.
9944
shlibpath_var=$shlibpath_var
9946
# Is shlibpath searched before the hard-coded library search path?
9947
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9949
# How to hardcode a shared library path into an executable.
9950
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9952
# Whether we should hardcode library paths into libraries.
9953
hardcode_into_libs=$hardcode_into_libs
9955
# Flag to hardcode \$libdir into a binary during linking.
9956
# This must work even if \$libdir does not exist.
9957
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9959
# If ld is used when linking, flag to hardcode \$libdir into
9960
# a binary during linking. This must work even if \$libdir does
9962
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9964
# Whether we need a single -rpath flag with a separated argument.
9965
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9967
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9969
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9971
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9973
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9975
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9976
# the resulting binary.
9977
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9979
# Set to yes if building a shared library automatically hardcodes DIR into the library
9980
# and all subsequent libraries and executables linked against it.
9981
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9983
# Variables whose values should be saved in libtool wrapper scripts and
9984
# restored at relink time.
9985
variables_saved_for_relink="$variables_saved_for_relink"
9987
# Whether libtool must link a program against all its dependency libraries.
9988
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9990
# Compile-time system search path for libraries
9991
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9993
# Run-time system search path for libraries
9994
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9996
# Fix the shell variable \$srcfile for the compiler.
9997
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9999
# Set to yes if exported symbols are required.
10000
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
10002
# The commands to list exported symbols.
10003
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
10005
# The commands to extract the exported symbol list from a shared archive.
10006
extract_expsyms_cmds=$lt_extract_expsyms_cmds
10008
# Symbols that should not be listed in the preloaded symbols.
10009
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
10011
# Symbols that must always be exported.
10012
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10015
[# ### END LIBTOOL CONFIG],
10016
[# ### END LIBTOOL TAG CONFIG: $tagname])
10023
cat <<\EOF >> "$cfgfile"
10025
# AIX sometimes has problems with the GCC collect2 program. For some
10026
# reason, if we set the COLLECT_NAMES environment variable, the problems
10027
# vanish in a puff of smoke.
10028
if test "X${COLLECT_NAMES+set}" != Xset; then
10030
export COLLECT_NAMES
10036
# We use sed instead of cat because bash on DJGPP gets confused if
10037
# if finds mixed CR/LF and LF-only lines. Since sed operates in
10038
# text mode, it properly converts lines to CR/LF. This bash problem
10039
# is reportedly fixed, but why not run on old versions too?
10040
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10042
mv -f "$cfgfile" "$ofile" || \
10043
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10047
# If there is no Makefile yet, we rely on a make rule to execute
10048
# `config.status --recheck' to rerun these tests and create the
10049
# libtool script then.
10050
test -f Makefile && make "$ltmain"
10052
])# AC_LIBTOOL_CONFIG
10055
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10056
# -------------------------------------------
10057
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10058
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10060
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10062
if test "$GCC" = yes; then
10063
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10065
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10066
lt_cv_prog_compiler_rtti_exceptions,
10067
[-fno-rtti -fno-exceptions], [],
10068
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10070
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10073
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10074
# ---------------------------------
10075
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10076
[AC_REQUIRE([AC_CANONICAL_HOST])
10077
AC_REQUIRE([AC_PROG_NM])
10078
AC_REQUIRE([AC_OBJEXT])
10079
# Check for command to grab the raw symbol name followed by C symbol from nm.
10080
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10081
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10083
# These are sane defaults that work on at least a few old systems.
10084
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
10086
# Character class describing NM global symbol codes.
10087
symcode='[[BCDEGRST]]'
10089
# Regexp to match symbols that can be accessed directly from C.
10090
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10092
# Transform the above into a raw symbol and a C symbol.
10093
symxfrm='\1 \2\3 \3'
10095
# Transform an extracted symbol line into a proper C declaration
10096
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10098
# Transform an extracted symbol line into symbol name and symbol address
10099
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'"
10101
# Define system-specific variables.
10106
cygwin* | mingw* | pw32*)
10107
symcode='[[ABCDGISTW]]'
10109
hpux*) # Its linker distinguishes data from code symbols
10110
if test "$host_cpu" = ia64; then
10111
symcode='[[ABCDEGRST]]'
10113
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10114
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'"
10116
irix* | nonstopux*)
10117
symcode='[[BCDEGRST]]'
10120
symcode='[[BCDEGQRST]]'
10126
symcode='[[DFNSTU]]'
10130
# Handle CRLF in mingw tool chain
10134
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10138
# If we're using GNU nm, then use its standard symbol codes.
10139
case `$NM -V 2>&1` in
10140
*GNU* | *'with BFD'*)
10141
symcode='[[ABCDGISTW]]' ;;
10144
# Try without a prefix undercore, then with it.
10145
for ac_symprfx in "" "_"; do
10147
# Write the raw and C identifiers.
10148
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10150
# Check to see that the pipe works correctly.
10154
cat > conftest.$ac_ext <<EOF
10159
void nm_test_func(){}
10163
int main(){nm_test_var='a';nm_test_func();return(0);}
10166
if AC_TRY_EVAL(ac_compile); then
10167
# Now try to grab the symbols.
10169
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10170
# Try sorting and uniquifying the output.
10171
if sort "$nlist" | uniq > "$nlist"T; then
10172
mv -f "$nlist"T "$nlist"
10177
# Make sure that we snagged all the symbols we need.
10178
if grep ' nm_test_var$' "$nlist" >/dev/null; then
10179
if grep ' nm_test_func$' "$nlist" >/dev/null; then
10180
cat <<EOF > conftest.$ac_ext
10186
# Now generate the symbol file.
10187
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10189
cat <<EOF >> conftest.$ac_ext
10190
#if defined (__STDC__) && __STDC__
10191
# define lt_ptr_t void *
10193
# define lt_ptr_t char *
10197
/* The mapping between symbol names and symbols. */
10202
lt_preloaded_symbols[[]] =
10205
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10206
cat <<\EOF >> conftest.$ac_ext
10214
# Now try linking the two files.
10215
mv conftest.$ac_objext conftstm.$ac_objext
10216
lt_save_LIBS="$LIBS"
10217
lt_save_CFLAGS="$CFLAGS"
10218
LIBS="conftstm.$ac_objext"
10219
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10220
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10223
LIBS="$lt_save_LIBS"
10224
CFLAGS="$lt_save_CFLAGS"
10226
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10229
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10232
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10235
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10236
cat conftest.$ac_ext >&5
10238
rm -f conftest* conftst*
10240
# Do not use the global_symbol_pipe unless it works.
10241
if test "$pipe_works" = yes; then
10244
lt_cv_sys_global_symbol_pipe=
10248
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10249
lt_cv_sys_global_symbol_to_cdecl=
10251
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10252
AC_MSG_RESULT(failed)
10256
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10259
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10260
# ---------------------------------------
10261
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10262
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10263
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10264
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10266
AC_MSG_CHECKING([for $compiler option to produce PIC])
10267
ifelse([$1],[CXX],[
10268
# C++ specific cases for pic, static, wl, etc.
10269
if test "$GXX" = yes; then
10270
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10271
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10275
# All AIX code is PIC.
10276
if test "$host_cpu" = ia64; then
10277
# AIX 5 now supports IA64 processor
10278
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10282
# FIXME: we need at least 68020 code to build shared libraries, but
10283
# adding the `-m68020' flag to GCC prevents building anything better,
10285
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10287
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10288
# PIC is the default for these OSes.
10290
mingw* | os2* | pw32*)
10291
# This hack is so that the source file can tell whether it is being
10292
# built for inclusion in a dll (and should export symbols for example).
10293
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10295
darwin* | rhapsody*)
10296
# PIC is the default on this platform
10297
# Common symbols not allowed in MH_DYLIB files
10298
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10301
# DJGPP does not support shared libraries at all
10302
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10305
if test -d /usr/nec; then
10306
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10310
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10311
# not for PA HP-UX.
10312
case "$host_cpu" in
10316
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10321
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10327
# All AIX code is PIC.
10328
if test "$host_cpu" = ia64; then
10329
# AIX 5 now supports IA64 processor
10330
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10332
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10336
case $cc_basename in
10338
# Green Hills C++ Compiler
10339
# _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"
10344
case $cc_basename in
10346
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10349
# Green Hills C++ Compiler
10350
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10357
# FreeBSD uses GNU C++
10359
hpux9* | hpux10* | hpux11*)
10360
case $cc_basename in
10362
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10363
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10364
if test "$host_cpu" != ia64; then
10365
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10369
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10370
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10371
case "$host_cpu" in
10376
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10384
irix5* | irix6* | nonstopux*)
10385
case $cc_basename in
10387
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10388
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10389
# CC pic flag -KPIC is the default.
10396
case $cc_basename in
10399
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10400
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10404
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10405
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10406
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10410
# Make sure the PIC flag is empty. It appears that all Alpha
10411
# Linux and Compaq Tru64 Unix objects are PIC.
10412
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10413
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10424
case $cc_basename in
10426
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10434
osf3* | osf4* | osf5*)
10435
case $cc_basename in
10437
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10440
# Rational C++ 2.4.1
10441
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10444
# Digital/Compaq C++
10445
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10446
# Make sure the PIC flag is empty. It appears that all Alpha
10447
# Linux and Compaq Tru64 Unix objects are PIC.
10448
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10449
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10458
case $cc_basename in
10460
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10467
case $cc_basename in
10469
# Sun C++ 4.2, 5.x and Centerline C++
10470
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10471
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10472
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10475
# Green Hills C++ Compiler
10476
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10483
case $cc_basename in
10486
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10487
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10491
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10498
case $cc_basename in
10500
# NonStop-UX NCC 3.20
10501
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10512
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10518
if test "$GCC" = yes; then
10519
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10520
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10524
# All AIX code is PIC.
10525
if test "$host_cpu" = ia64; then
10526
# AIX 5 now supports IA64 processor
10527
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10532
# FIXME: we need at least 68020 code to build shared libraries, but
10533
# adding the `-m68020' flag to GCC prevents building anything better,
10535
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10538
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10539
# PIC is the default for these OSes.
10542
mingw* | pw32* | os2*)
10543
# This hack is so that the source file can tell whether it is being
10544
# built for inclusion in a dll (and should export symbols for example).
10545
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10548
darwin* | rhapsody*)
10549
# PIC is the default on this platform
10550
# Common symbols not allowed in MH_DYLIB files
10551
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10555
# Just because we use GCC doesn't mean we suddenly get shared libraries
10556
# on systems that don't support them.
10557
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10562
if test -d /usr/nec; then
10563
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10568
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10569
# not for PA HP-UX.
10570
case "$host_cpu" in
10575
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10581
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10585
# PORTME Check for flag to pass linker flags through the system compiler.
10588
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10589
if test "$host_cpu" = ia64; then
10590
# AIX 5 now supports IA64 processor
10591
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10593
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10597
mingw* | pw32* | os2*)
10598
# This hack is so that the source file can tell whether it is being
10599
# built for inclusion in a dll (and should export symbols for example).
10600
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10603
hpux9* | hpux10* | hpux11*)
10604
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10605
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10606
# not for PA HP-UX.
10607
case "$host_cpu" in
10612
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10615
# Is there a better lt_prog_compiler_static that works with the bundled CC?
10616
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10619
irix5* | irix6* | nonstopux*)
10620
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10621
# PIC (with -KPIC) is the default.
10622
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10626
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10627
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10633
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10634
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10635
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10638
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10639
# All Alpha code is PIC.
10640
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10645
osf3* | osf4* | osf5*)
10646
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10647
# All OSF/1 code is PIC.
10648
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10652
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10653
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10657
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10658
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10659
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10663
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10664
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10665
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10668
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10669
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10670
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10671
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10675
if test -d /usr/nec ;then
10676
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10677
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10682
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10683
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10687
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10692
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10695
# Check to make sure the PIC flag actually works.
10697
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10698
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10699
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10700
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10701
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10703
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10705
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10706
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10709
# For platforms which do not support PIC, -DPIC is meaningless:
10711
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10714
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10720
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10721
# ------------------------------------
10722
# See if the linker supports building shared libraries.
10723
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10724
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10725
ifelse([$1],[CXX],[
10726
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10729
# If we're using GNU nm, then we don't want the "-C" option.
10730
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10731
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10732
_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'
10734
_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'
10738
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10741
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10744
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10749
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10750
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10751
_LT_AC_TAGVAR(archive_cmds, $1)=
10752
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10753
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10754
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10755
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10756
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10757
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10758
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10759
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10760
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10761
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10762
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10763
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10764
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10765
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
10766
_LT_AC_TAGVAR(module_cmds, $1)=
10767
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
10768
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10769
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10770
# include_expsyms should be a list of space-separated symbols to be *always*
10771
# included in the symbol list
10772
_LT_AC_TAGVAR(include_expsyms, $1)=
10773
# exclude_expsyms can be an extended regexp of symbols to exclude
10774
# it will be wrapped by ` (' and `)$', so one must not match beginning or
10775
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10776
# as well as any symbol that contains `d'.
10777
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10778
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10779
# platforms (ab)use it in PIC code, but their linkers get confused if
10780
# the symbol is explicitly referenced. Since portable code cannot
10781
# rely on this symbol name, it's probably fine to never include it in
10782
# preloaded symbol tables.
10783
extract_expsyms_cmds=
10786
cygwin* | mingw* | pw32*)
10787
# FIXME: the MSVC++ port hasn't been tested in a loooong time
10788
# When not using gcc, we currently assume that we are using
10789
# Microsoft Visual C++.
10790
if test "$GCC" != yes; then
10799
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10800
if test "$with_gnu_ld" = yes; then
10801
# If archive_cmds runs LD, not CC, wlarc should be empty
10804
# See if GNU ld supports shared libraries.
10806
aix3* | aix4* | aix5*)
10807
# On AIX/PPC, the GNU linker is very broken
10808
if test "$host_cpu" != ia64; then
10809
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10812
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10813
*** to be unable to reliably create shared libraries on AIX.
10814
*** Therefore, libtool is disabling shared libraries support. If you
10815
*** really care for shared libraries, you may want to modify your PATH
10816
*** so that a non-GNU linker is found, and then restart.
10823
_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)'
10824
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10825
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10827
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10828
# that the semantics of dynamic libraries on AmigaOS, at least up
10829
# to version 4, is to share data among multiple programs linked
10830
# with the same dynamic library. Since this doesn't match the
10831
# behavior of shared libraries on other platforms, we can't use
10833
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10837
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10838
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10839
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10840
# support --undefined. This deserves some investigation. FIXME
10841
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10843
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10847
cygwin* | mingw* | pw32*)
10848
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10849
# as there is no search path for DLLs.
10850
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10851
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10852
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10853
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10854
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10856
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10857
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10858
# If the export-symbols file already is a .def file (1st line
10859
# is EXPORTS), use it as is; otherwise, prepend...
10860
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10861
cp $export_symbols $output_objdir/$soname.def;
10863
echo EXPORTS > $output_objdir/$soname.def;
10864
cat $export_symbols >> $output_objdir/$soname.def;
10866
$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10873
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10874
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10877
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10878
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10883
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10884
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10887
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10888
*** create shared libraries on Solaris systems. Therefore, libtool
10889
*** is disabling shared libraries support. We urge you to upgrade GNU
10890
*** binutils to release 2.9.1 or newer. Another option is to modify
10891
*** your PATH or compiler configuration so that the native linker is
10892
*** used, and then restart.
10895
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10896
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10897
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10899
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10904
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10906
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10907
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10911
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10912
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10913
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10915
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10920
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10921
runpath_var=LD_RUN_PATH
10922
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10923
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10924
# ancient GNU ld didn't support --whole-archive et. al.
10925
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10926
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10928
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10932
# PORTME fill in a description of your system's linker (not GNU ld)
10935
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10936
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10937
_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'
10938
# Note: this linker hardcodes the directories in LIBPATH if there
10939
# are no directories specified by -L.
10940
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10941
if test "$GCC" = yes && test -z "$link_static_flag"; then
10942
# Neither direct hardcoding nor static linking is supported with a
10944
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10949
if test "$host_cpu" = ia64; then
10950
# On IA64, the linker does run time linking by default, so we don't
10951
# have to do anything special.
10952
aix_use_runtimelinking=no
10953
exp_sym_flag='-Bexport'
10956
# If we're using GNU nm, then we don't want the "-C" option.
10957
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10958
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10959
_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'
10961
_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'
10964
# KDE requires run time linking. Make it the default.
10965
aix_use_runtimelinking=yes
10966
exp_sym_flag='-bexport'
10967
no_entry_flag='-bnoentry'
10970
# When large executables or shared objects are built, AIX ld can
10971
# have problems creating the table of contents. If linking a library
10972
# or program results in "error TOC overflow" add -mminimal-toc to
10973
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10974
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10976
_LT_AC_TAGVAR(archive_cmds, $1)=''
10977
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10978
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10979
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10981
if test "$GCC" = yes; then
10982
case $host_os in aix4.[012]|aix4.[012].*)
10983
# We only want to do this on AIX 4.2 and lower, the check
10984
# below for broken collect2 doesn't work under 4.3+
10985
collect2name=`${CC} -print-prog-name=collect2`
10986
if test -f "$collect2name" && \
10987
strings "$collect2name" | grep resolve_lib_name >/dev/null
10989
# We have reworked collect2
10990
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10992
# We have old collect2
10993
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10994
# It fails to find uninstalled libraries when the uninstalled
10995
# path is not listed in the libpath. Setting hardcode_minus_L
10996
# to unsupported forces relinking
10997
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10998
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10999
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
11002
shared_flag='-shared'
11005
if test "$host_cpu" = ia64; then
11006
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11007
# chokes on -Wl,-G. The following line is correct:
11010
if test "$aix_use_runtimelinking" = yes; then
11011
shared_flag='-qmkshrobj ${wl}-G'
11013
shared_flag='-qmkshrobj'
11018
# Let the compiler handle the export list.
11019
_LT_AC_TAGVAR(always_export_symbols, $1)=no
11020
if test "$aix_use_runtimelinking" = yes; then
11021
# Warning - without using the other runtime loading flags (-brtl),
11022
# -berok will link without error, but may produce a broken library.
11023
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11024
# Determine the default libpath from the value encoded in an empty executable.
11025
_LT_AC_SYS_LIBPATH_AIX
11026
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11027
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
11028
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11030
if test "$host_cpu" = ia64; then
11031
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11032
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11033
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
11035
# Determine the default libpath from the value encoded in an empty executable.
11036
_LT_AC_SYS_LIBPATH_AIX
11037
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11038
# Warning - without using the other run time loading flags,
11039
# -berok will link without error, but may produce a broken library.
11040
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11041
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11042
# -bexpall does not export symbols beginning with underscore (_)
11043
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
11044
# Exported symbols can be pulled into shared objects from archives
11045
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
11046
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11047
# This is similar to how AIX traditionally builds it's shared libraries.
11048
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11054
_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)'
11055
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11056
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11057
# see comment about different semantics on the GNU ld section
11058
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11062
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11065
cygwin* | mingw* | pw32*)
11066
# When not using gcc, we currently assume that we are using
11067
# Microsoft Visual C++.
11068
# hardcode_libdir_flag_spec is actually meaningless, as there is
11069
# no search path for DLLs.
11070
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11071
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
11072
# Tell ltmain to make .lib files, not .a files.
11074
# Tell ltmain to make .dll files, not .so files.
11076
# FIXME: Setting linknames here is a bad hack.
11077
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11078
# The linker will automatically build a .lib file if we build a DLL.
11079
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11080
# FIXME: Should let the user specify the lib program.
11081
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11082
fix_srcfile_path='`cygpath -w "$srcfile"`'
11083
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11086
darwin* | rhapsody*)
11087
if test "$GXX" = yes ; then
11088
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11090
rhapsody* | darwin1.[[012]])
11091
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
11094
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11095
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11097
case ${MACOSX_DEPLOYMENT_TARGET} in
11099
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11102
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
11108
lt_int_apple_cc_single_mod=no
11109
output_verbose_link_cmd='echo'
11110
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
11111
lt_int_apple_cc_single_mod=yes
11113
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11114
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
11116
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
11118
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
11119
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
11120
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11121
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11123
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11125
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11126
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11127
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11128
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11129
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
11130
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11132
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11137
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11138
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11139
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11143
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11146
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11147
# support. Future versions do this automatically, but an explicit c++rt0.o
11148
# does not break anything, and helps significantly (at the cost of a little
11151
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11152
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11153
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11154
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11157
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
11159
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11160
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11161
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11162
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11165
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11167
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11168
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11169
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11170
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11174
if test "$GCC" = yes; then
11175
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11177
_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'
11179
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11180
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11181
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11183
# hardcode_minus_L: Not really in the search PATH,
11184
# but as the default location of the library.
11185
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11186
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11190
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11191
case "$host_cpu" in
11193
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11196
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11200
case "$host_cpu" in
11202
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11205
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11209
if test "$with_gnu_ld" = no; then
11210
case "$host_cpu" in
11212
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11213
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11214
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11215
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11216
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11219
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11220
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11221
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11223
# hardcode_minus_L: Not really in the search PATH,
11224
# but as the default location of the library.
11225
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11228
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11229
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11230
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11231
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11233
# hardcode_minus_L: Not really in the search PATH,
11234
# but as the default location of the library.
11235
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11241
irix5* | irix6* | nonstopux*)
11242
if test "$GCC" = yes; then
11243
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11245
_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'
11246
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11248
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11249
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11250
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11254
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11255
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11257
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11259
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11260
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11261
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11265
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11266
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11267
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11268
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11269
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11273
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11274
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11275
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11276
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11277
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11278
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11281
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11282
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11283
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11286
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11287
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11294
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11295
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11296
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11297
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11298
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11302
if test "$GCC" = yes; then
11303
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11304
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11306
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11307
_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'
11309
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11310
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11313
osf4* | osf5*) # as osf3* with the addition of -msym flag
11314
if test "$GCC" = yes; then
11315
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11316
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11317
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11319
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11320
_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'
11321
_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~
11322
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
11324
# Both c and cxx compiler support -rpath directly
11325
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11327
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11331
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11332
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11333
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11334
runpath_var=LD_RUN_PATH
11335
hardcode_runpath_var=yes
11339
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11340
if test "$GCC" = yes; then
11341
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11342
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11343
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11345
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11346
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11347
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11349
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11350
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11352
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11353
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
11354
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11356
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11360
if test "x$host_vendor" = xsequent; then
11361
# Use $CC to link under sequent, because it throws in some extra .o
11362
# files that make .init and .fini sections work.
11363
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11365
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11367
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11368
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11369
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11370
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11374
case $host_vendor in
11376
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11377
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11380
## LD is ld it makes a PLAMLIB
11381
## CC just makes a GrossModule.
11382
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11383
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11384
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11387
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11388
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11391
runpath_var='LD_RUN_PATH'
11392
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11396
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11397
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11398
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11402
if test -d /usr/nec; then
11403
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11404
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11405
runpath_var=LD_RUN_PATH
11406
hardcode_runpath_var=yes
11407
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
11412
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11413
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11414
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11415
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11416
hardcode_runpath_var=yes
11417
runpath_var=LD_RUN_PATH
11420
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
11421
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11422
if test "$GCC" = yes; then
11423
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11425
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11427
runpath_var='LD_RUN_PATH'
11428
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11432
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11433
# $CC -shared without GNU ld will not create a library from C++
11434
# object files and a static libstdc++, better avoid it by now
11435
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11436
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11437
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11438
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11439
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11440
runpath_var='LD_RUN_PATH'
11444
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11445
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11446
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11450
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11455
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11456
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11458
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11459
if test "$GCC" = yes; then
11460
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11464
# Do we need to explicitly link libc?
11466
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11468
# Assume -lc should be added
11469
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11471
if test "$enable_shared" = yes && test "$GCC" = yes; then
11472
case $_LT_AC_TAGVAR(archive_cmds, $1) in
11474
# FIXME: we may have to deal with multi-command sequences.
11477
# Test whether the compiler implicitly links with -lc since on some
11478
# systems, -lgcc has to come before -lc. If gcc already passes -lc
11479
# to ld, don't add -lc before -lgcc.
11480
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11482
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11484
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11487
libobjs=conftest.$ac_objext
11489
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11495
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11496
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11497
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11499
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11501
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11503
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11505
cat conftest.err 1>&5
11508
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11514
])# AC_LIBTOOL_PROG_LD_SHLIBS
11517
# _LT_AC_FILE_LTDLL_C
11518
# -------------------
11519
# Be careful that the start marker always follows a newline.
11520
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11521
# /* ltdll.c starts here */
11522
# #define WIN32_LEAN_AND_MEAN
11523
# #include <windows.h>
11524
# #undef WIN32_LEAN_AND_MEAN
11525
# #include <stdio.h>
11527
# #ifndef __CYGWIN__
11528
# # ifdef __CYGWIN32__
11529
# # define __CYGWIN__ __CYGWIN32__
11533
# #ifdef __cplusplus
11536
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11537
# #ifdef __cplusplus
11541
# #ifdef __CYGWIN__
11542
# #include <cygwin/cygwin_dll.h>
11543
# DECLARE_CYGWIN_DLL( DllMain );
11545
# HINSTANCE __hDllInstance_base;
11548
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11550
# __hDllInstance_base = hInst;
11553
# /* ltdll.c ends here */
11554
])# _LT_AC_FILE_LTDLL_C
11557
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11558
# ---------------------------------
11559
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11563
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11564
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11565
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11566
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11567
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11568
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11569
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11571
# This is just to silence aclocal about the macro not being used
11572
ifelse([AC_DISABLE_FAST_INSTALL])
11574
AC_DEFUN([LT_AC_PROG_GCJ],
11575
[AC_CHECK_TOOL(GCJ, gcj, no)
11576
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11580
AC_DEFUN([LT_AC_PROG_RC],
11581
[AC_CHECK_TOOL(RC, windres, no)
11584
############################################################
11585
# NOTE: This macro has been submitted for inclusion into #
11586
# GNU Autoconf as AC_PROG_SED. When it is available in #
11587
# a released version of Autoconf we should remove this #
11588
# macro and use it instead. #
11589
############################################################
11592
# Check for a fully-functional sed program, that truncates
11593
# as few characters as possible. Prefer GNU sed if found.
11594
AC_DEFUN([LT_AC_PROG_SED],
11595
[AC_MSG_CHECKING([for a sed that does not truncate output])
11596
AC_CACHE_VAL(lt_cv_path_SED,
11597
[# Loop through the user's path and test for sed and gsed.
11598
# Then use that list of sed's as ones to test for truncation.
11599
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11600
for as_dir in $PATH
11603
test -z "$as_dir" && as_dir=.
11604
for lt_ac_prog in sed gsed; do
11605
for ac_exec_ext in '' $ac_executable_extensions; do
11606
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11607
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11614
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11615
# along with /bin/sed that truncates output.
11616
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11617
test ! -f $lt_ac_sed && break
11618
cat /dev/null > conftest.in
11620
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11621
# Check for GNU sed and select it if it is found.
11622
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11623
lt_cv_path_SED=$lt_ac_sed
11627
cat conftest.in conftest.in >conftest.tmp
11628
mv conftest.tmp conftest.in
11629
cp conftest.in conftest.nl
11631
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11632
cmp -s conftest.out conftest.nl || break
11633
# 10000 chars as input seems more than enough
11634
test $lt_ac_count -gt 10 && break
11635
lt_ac_count=`expr $lt_ac_count + 1`
11636
if test $lt_ac_count -gt $lt_ac_max; then
11637
lt_ac_max=$lt_ac_count
11638
lt_cv_path_SED=$lt_ac_sed
11643
SED=$lt_cv_path_SED
11644
AC_MSG_RESULT([$SED])
11647
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
11648
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
11649
dnl also defines GSTUFF_PKG_ERRORS on error
11650
AC_DEFUN([PKG_CHECK_MODULES], [
11653
if test -z "$PKG_CONFIG"; then
11654
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
11657
if test "$PKG_CONFIG" = "no" ; then
11658
echo "*** The pkg-config script could not be found. Make sure it is"
11659
echo "*** in your path, or set the PKG_CONFIG environment variable"
11660
echo "*** to the full path to pkg-config."
11661
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
11663
PKG_CONFIG_MIN_VERSION=0.9.0
11664
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11665
AC_MSG_CHECKING(for $2)
11667
if $PKG_CONFIG --exists "$2" ; then
11671
AC_MSG_CHECKING($1_CFLAGS)
11672
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
11673
AC_MSG_RESULT($$1_CFLAGS)
11675
AC_MSG_CHECKING($1_LIBS)
11676
$1_LIBS=`$PKG_CONFIG --libs "$2"`
11677
AC_MSG_RESULT($$1_LIBS)
11681
## If we have a custom action on failure, don't print errors, but
11682
## do set a variable so people can do so.
11683
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
11684
ifelse([$4], ,echo $$1_PKG_ERRORS,)
11687
AC_SUBST($1_CFLAGS)
11690
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11691
echo "*** See http://www.freedesktop.org/software/pkgconfig"
11695
if test $succeeded = yes; then
11696
ifelse([$3], , :, [$3])
11698
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])