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(, [${x_direct_test_function}()],
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(programm-name, variable-name, list of directories,
177
dnl if-not-found, test-parameter)
178
AC_DEFUN([KDE_FIND_PATH],
180
AC_MSG_CHECKING([for $1])
181
if test -n "$$2"; then
184
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
186
AC_CACHE_VAL(kde_cv_path_$kde_cache,
198
if test -x "$dir/$1"; then
201
evalstr="$dir/$1 $5 2>&1 "
202
if eval $evalstr; then
203
kde_cv_path="$dir/$1"
207
kde_cv_path="$dir/$1"
213
eval "kde_cv_path_$kde_cache=$kde_cv_path"
217
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
221
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
222
AC_MSG_RESULT(not found)
225
AC_MSG_RESULT($kde_cv_path)
231
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
233
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
234
Please check whether you installed Qt correctly.
235
You need to have a running moc binary.
236
configure tried to run $ac_cv_path_moc and the test didn't
237
succeed. If configure shouldn't have tried this one, set
238
the environment variable MOC to the right one before running
243
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
245
AC_MSG_WARN([No Qt ui compiler (uic) found!
246
Please check whether you installed Qt correctly.
247
You need to have a running uic binary.
248
configure tried to run $ac_cv_path_uic and the test didn't
249
succeed. If configure shouldn't have tried this one, set
250
the environment variable UIC to the right one before running
256
AC_DEFUN([KDE_CHECK_UIC_FLAG],
258
AC_MSG_CHECKING([whether uic supports -$1 ])
259
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
260
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
262
cat >conftest.ui <<EOT
263
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
265
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
266
if AC_TRY_EVAL(ac_uic_testrun); then
267
eval "kde_cv_prog_uic_$kde_cache=yes"
269
eval "kde_cv_prog_uic_$kde_cache=no"
274
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
286
dnl ------------------------------------------------------------------------
287
dnl Find the meta object compiler and the ui compiler in the PATH,
288
dnl in $QTDIR/bin, and some more usual places
289
dnl ------------------------------------------------------------------------
291
AC_DEFUN([AC_PATH_QT_MOC_UIC],
293
AC_REQUIRE([KDE_CHECK_PERL])
295
for dir in $kde_qt_dirs; do
296
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
298
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
299
if test ! "$ac_qt_bindir" = "NO"; then
300
qt_bindirs="$ac_qt_bindir $qt_bindirs"
303
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
304
if test -z "$UIC_NOT_NEEDED"; then
305
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
306
if test -z "$UIC_PATH" ; then
307
KDE_UIC_ERROR_MESSAGE
312
if test $kde_qtver = 3; then
313
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
314
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
316
if test x$ac_uic_supports_libpath = xyes; then
317
UIC="$UIC -L \$(kde_widgetdir)"
319
if test x$ac_uic_supports_nounload = xyes; then
325
UIC="echo uic not available: "
332
if test $kde_qtver = 3; then
339
AC_DEFUN([KDE_1_CHECK_PATHS],
341
KDE_1_CHECK_PATH_HEADERS
345
if test -n "$USE_RPATH"; then
347
if test -n "$kde_libraries"; then
348
KDE_TEST_RPATH="-R $kde_libraries"
351
if test -n "$qt_libraries"; then
352
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
355
if test -n "$x_libraries"; then
356
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
359
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
362
AC_MSG_CHECKING([for KDE libraries installed])
363
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'
365
if AC_TRY_EVAL(ac_link) && test -s conftest; then
368
AC_MSG_ERROR([your system fails at linking a small KDE application!
369
Check, if your compiler is installed correctly and if you have used the
370
same compiler to compile Qt and kdelibs as you did use now.
371
For more details about this problem, look at the end of config.log.])
374
if eval `KDEDIR= ./conftest 2>&5`; then
380
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
381
kde_have_all_paths=yes
383
KDE_SET_PATHS($kde_result)
387
AC_DEFUN([KDE_SET_PATHS],
389
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
390
kde_htmldir=\"$kde_htmldir\" \
391
kde_appsdir=\"$kde_appsdir\" \
392
kde_icondir=\"$kde_icondir\" \
393
kde_sounddir=\"$kde_sounddir\" \
394
kde_datadir=\"$kde_datadir\" \
395
kde_locale=\"$kde_locale\" \
396
kde_cgidir=\"$kde_cgidir\" \
397
kde_confdir=\"$kde_confdir\" \
398
kde_kcfgdir=\"$kde_kcfgdir\" \
399
kde_mimedir=\"$kde_mimedir\" \
400
kde_toolbardir=\"$kde_toolbardir\" \
401
kde_wallpaperdir=\"$kde_wallpaperdir\" \
402
kde_templatesdir=\"$kde_templatesdir\" \
403
kde_bindir=\"$kde_bindir\" \
404
kde_servicesdir=\"$kde_servicesdir\" \
405
kde_servicetypesdir=\"$kde_servicetypesdir\" \
406
kde_moduledir=\"$kde_moduledir\" \
407
kde_styledir=\"$kde_styledir\" \
408
kde_widgetdir=\"$kde_widgetdir\" \
409
xdg_appsdir=\"$xdg_appsdir\" \
410
xdg_menudir=\"$xdg_menudir\" \
411
xdg_directorydir=\"$xdg_directorydir\" \
415
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
417
if test "$1" = "default"; then
419
if test -z "$kde_htmldir"; then
420
kde_htmldir='\${datadir}/doc/HTML'
422
if test -z "$kde_appsdir"; then
423
kde_appsdir='\${datadir}/applnk'
425
if test -z "$kde_icondir"; then
426
kde_icondir='\${datadir}/icons'
428
if test -z "$kde_sounddir"; then
429
kde_sounddir='\${datadir}/sounds'
431
if test -z "$kde_datadir"; then
432
kde_datadir='\${datadir}/apps'
434
if test -z "$kde_locale"; then
435
kde_locale='\${datadir}/locale'
437
if test -z "$kde_cgidir"; then
438
kde_cgidir='\${exec_prefix}/cgi-bin'
440
if test -z "$kde_confdir"; then
441
kde_confdir='\${datadir}/config'
443
if test -z "$kde_kcfgdir"; then
444
kde_kcfgdir='\${datadir}/config.kcfg'
446
if test -z "$kde_mimedir"; then
447
kde_mimedir='\${datadir}/mimelnk'
449
if test -z "$kde_toolbardir"; then
450
kde_toolbardir='\${datadir}/toolbar'
452
if test -z "$kde_wallpaperdir"; then
453
kde_wallpaperdir='\${datadir}/wallpapers'
455
if test -z "$kde_templatesdir"; then
456
kde_templatesdir='\${datadir}/templates'
458
if test -z "$kde_bindir"; then
459
kde_bindir='\${exec_prefix}/bin'
461
if test -z "$kde_servicesdir"; then
462
kde_servicesdir='\${datadir}/services'
464
if test -z "$kde_servicetypesdir"; then
465
kde_servicetypesdir='\${datadir}/servicetypes'
467
if test -z "$kde_moduledir"; then
468
if test "$kde_qtver" = "2"; then
469
kde_moduledir='\${libdir}/kde2'
471
kde_moduledir='\${libdir}/kde3'
474
if test -z "$kde_styledir"; then
475
kde_styledir='\${libdir}/kde3/plugins/styles'
477
if test -z "$kde_widgetdir"; then
478
kde_widgetdir='\${libdir}/kde3/plugins/designer'
480
if test -z "$xdg_appsdir"; then
481
xdg_appsdir='\${datadir}/applications/kde'
483
if test -z "$xdg_menudir"; then
484
xdg_menudir='\${sysconfdir}/xdg/menus'
486
if test -z "$xdg_directorydir"; then
487
xdg_directorydir='\${datadir}/desktop-directories'
490
KDE_SET_PATHS(defaults)
494
if test $kde_qtver = 1; then
495
AC_MSG_RESULT([compiling])
498
AC_MSG_ERROR([path checking not yet supported for KDE 2])
504
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
505
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
506
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
507
test -z "$kde_datadir" || test -z "$kde_locale" ||
508
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
509
test -z "$kde_kcfgdir" ||
510
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
511
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
512
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
513
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
514
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
515
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
516
test "x$kde_have_all_paths" != "xyes"; then
517
kde_have_all_paths=no
521
AC_DEFUN([KDE_MISSING_PROG_ERROR],
523
AC_MSG_ERROR([The important program $1 was not found!
524
Please check whether you installed KDE correctly.
528
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
530
AC_MSG_ERROR([The important program $1 was not found!
531
Please check whether you installed aRts correctly or use
532
--without-arts to compile without aRts support (this will remove functionality).
536
AC_DEFUN([KDE_SUBST_PROGRAMS],
539
AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
540
[build_arts=$withval],
543
AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
545
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"
546
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
547
if test -n "$KDEDIRS"; then
550
for dir in $KDEDIRS; do
551
kde_default_bindirs="$dir/bin $kde_default_bindirs "
555
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
556
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
557
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
558
if test "$build_arts" != "no"; then
559
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
560
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
562
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
563
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
566
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
569
if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
574
if test -n "$kde32ornewer"; then
575
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
576
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
578
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
580
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
581
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
582
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
583
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
584
if test "$KDE_XSL_STYLESHEET" = "NO"; then
585
KDE_XSL_STYLESHEET=""
587
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
591
DCOP_DEPENDENCIES='$(DCOPIDL)'
592
if test -n "$kde32ornewer"; then
593
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
594
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
595
AC_SUBST(KCONFIG_COMPILER)
596
AC_SUBST(KCFG_DEPENDENCIES)
600
AC_SUBST(DCOPIDL2CPP)
601
AC_SUBST(DCOP_DEPENDENCIES)
603
AC_SUBST(ARTSCCONFIG)
606
AC_SUBST(KDE_XSL_STYLESHEET)
609
if test -x "$KDECONFIG"; then # it can be "compiled"
610
kde_libs_prefix=`$KDECONFIG --prefix`
611
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
612
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
613
This means it has been moved since you installed it.
614
This won't work. Please recompile kdelibs for the new prefix.
617
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
619
kde_libs_prefix='$(prefix)'
620
kde_libs_htmldir='$(kde_htmldir)'
622
AC_SUBST(kde_libs_prefix)
623
AC_SUBST(kde_libs_htmldir)
626
AC_DEFUN([AC_CREATE_KFSSTND],
628
AC_REQUIRE([AC_CHECK_RPATH])
630
AC_MSG_CHECKING([for KDE paths])
633
AC_CACHE_VAL(kde_cv_all_paths,
635
KDE_SET_DEFAULT_PATHS($1)
638
eval "$kde_cv_all_paths"
639
KDE_CHECK_PATHS_FOR_COMPLETENESS
640
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
641
# wrong values were cached, may be, we can set better ones
643
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
644
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
645
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
646
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
650
xdg_appsdir = xdg_menudir= xdg_directorydir=
651
KDE_SET_DEFAULT_PATHS($1)
652
eval "$kde_cv_all_paths"
653
KDE_CHECK_PATHS_FOR_COMPLETENESS
654
kde_result="$kde_result (cache overridden)"
656
if test "$kde_have_all_paths" = "no"; then
657
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
658
Since it had compiled and linked before, it must be a strange problem on your system.
659
Look at config.log for details. If you are not able to fix this, look at
660
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
661
(If you're using an egcs version on Linux, you may update binutils!)
665
AC_MSG_RESULT($kde_result)
674
AC_DEFUN([AC_SUBST_KFSSTND],
676
AC_SUBST(kde_htmldir)
677
AC_SUBST(kde_appsdir)
678
AC_SUBST(kde_icondir)
679
AC_SUBST(kde_sounddir)
680
AC_SUBST(kde_datadir)
682
AC_SUBST(kde_confdir)
683
AC_SUBST(kde_kcfgdir)
684
AC_SUBST(kde_mimedir)
685
AC_SUBST(kde_wallpaperdir)
687
dnl X Desktop Group standards
688
AC_SUBST(xdg_appsdir)
689
AC_SUBST(xdg_menudir)
690
AC_SUBST(xdg_directorydir)
692
AC_SUBST(kde_templatesdir)
693
AC_SUBST(kde_servicesdir)
694
AC_SUBST(kde_servicetypesdir)
695
AC_SUBST(kde_moduledir)
696
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
697
AC_SUBST(kde_styledir)
698
AC_SUBST(kde_widgetdir)
699
if test "$kde_qtver" = 1; then
700
kde_minidir="$kde_icondir/mini"
702
# for KDE 1 - this breaks KDE2 apps using minidir, but
703
# that's the plan ;-/
704
kde_minidir="/dev/null"
706
dnl AC_SUBST(kde_minidir)
707
dnl AC_SUBST(kde_cgidir)
708
dnl AC_SUBST(kde_toolbardir)
711
AC_DEFUN([KDE_MISC_TESTS],
713
dnl Checks for libraries.
714
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
716
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
719
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
720
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
721
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
722
You should install libcrypt from another source or configure with PAM
727
if test $kde_have_crypt = yes; then
728
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
731
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
732
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
733
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
734
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
736
AC_CHECK_FUNC(inet_ntoa)
737
if test $ac_cv_func_inet_ntoa = no; then
738
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
740
AC_CHECK_FUNC(connect)
741
if test $ac_cv_func_connect = no; then
742
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
746
AC_CHECK_FUNC(remove)
747
if test $ac_cv_func_remove = no; then
748
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
751
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
752
AC_CHECK_FUNC(shmat, ,
753
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
755
# more headers that need to be explicitly included on darwin
756
AC_CHECK_HEADERS(sys/types.h stdint.h)
758
# darwin requires a poll emulation library
759
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
761
# CoreAudio framework
762
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
763
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
764
FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
769
AC_SUBST(FRAMEWORK_COREAUDIO)
770
LIBSOCKET="$X_EXTRA_LIBS"
772
AC_SUBST(X_EXTRA_LIBS)
773
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
776
case $host in dnl this *is* LynxOS specific
778
AC_MSG_CHECKING([LynxOS header file wrappers])
779
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
780
AC_MSG_RESULT(disabled)
781
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
789
# darwin needs this to initialize the environment
790
AC_CHECK_HEADERS(crt_externs.h)
791
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
793
AH_VERBATIM(_DARWIN_ENVIRON,
795
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
796
# include <sys/time.h>
797
# include <crt_externs.h>
798
# define environ (*_NSGetEnviron())
802
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
805
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
806
* that defines bzero.
814
AC_CHECK_FUNCS([vsnprintf snprintf])
818
* On HP-UX, the declaration of vsnprintf() is needed every time !
821
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
831
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
835
int snprintf(char *str, size_t n, char const *fmt, ...);
841
dnl ------------------------------------------------------------------------
842
dnl Find the header files and libraries for X-Windows. Extended the
844
dnl ------------------------------------------------------------------------
848
AC_REQUIRE([KDE_MISC_TESTS])dnl
849
AC_REQUIRE([KDE_CHECK_LIB64])
853
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
854
kde_use_qt_emb=$enableval,
860
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
861
kde_use_qt_emb_palm=$enableval,
862
kde_use_qt_emb_palm=no
867
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
868
kde_use_qt_mac=$enableval,
872
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
874
AC_MSG_CHECKING(for X)
876
AC_CACHE_VAL(kde_cv_have_x,
877
[# One or both of the vars are not set, and there is no cached value.
878
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
881
kde_x_includes=$x_includes
883
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
886
kde_x_libraries=$x_libraries
889
# below we use the standard autoconf calls
890
ac_x_libraries=$kde_x_libraries
891
ac_x_includes=$kde_x_includes
894
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
895
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
896
dnl location. The correct location is /usr/lib32 or an undefined value
897
dnl (the linker is smart enough to pick the correct default library).
898
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
899
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
900
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
901
dnl x_includes should be left alone.
909
if test -z "$ac_x_includes"; then
912
if test -z "$ac_x_libraries"; then
913
ac_x_libraries="/usr/lib${kdelibsuff}"
916
#from now on we use our own again
918
# when the user already gave --x-includes, we ignore
919
# what the standard autoconf macros told us.
920
if test "$kde_x_includes" = NO; then
921
kde_x_includes=$ac_x_includes
924
# for --x-libraries too
925
if test "$kde_x_libraries" = NO; then
926
kde_x_libraries=$ac_x_libraries
929
if test "$kde_x_includes" = NO; then
930
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
933
if test "$kde_x_libraries" = NO; then
934
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
937
# Record where we found X for the cache.
938
kde_cv_have_x="have_x=yes \
939
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
942
eval "$kde_cv_have_x"
944
if test "$have_x" != yes; then
945
AC_MSG_RESULT($have_x)
948
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
951
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
953
x_includes="."; dnl better than nothing :-
955
x_includes=$kde_x_includes
956
X_INCLUDES="-I$x_includes"
959
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
961
x_libraries="/usr/lib"; dnl better than nothing :-
963
x_libraries=$kde_x_libraries
964
X_LDFLAGS="-L$x_libraries"
966
all_includes="$X_INCLUDES"
967
all_libraries="$X_LDFLAGS"
969
# Check for libraries that X11R6 Xt/Xaw programs need.
970
ac_save_LDFLAGS="$LDFLAGS"
971
LDFLAGS="$LDFLAGS $X_LDFLAGS"
972
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
973
# check for ICE first), but we must link in the order -lSM -lICE or
974
# we get undefined symbols. So assume we have SM if we have ICE.
975
# These have to be linked with before -lX11, unlike the other
976
# libraries we check for below, so use a different variable.
977
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
978
AC_CHECK_LIB(ICE, IceConnectionNumber,
979
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
980
LDFLAGS="$ac_save_LDFLAGS"
982
LIB_X11='-lX11 $(LIBSOCKET)'
984
AC_MSG_CHECKING(for libXext)
985
AC_CACHE_VAL(kde_cv_have_libXext,
987
kde_ldflags_safe="$LDFLAGS"
988
kde_libs_safe="$LIBS"
990
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
991
LIBS="-lXext -lX11 $LIBSOCKET"
1000
printf("hello Xext\n");
1002
kde_cv_have_libXext=yes,
1003
kde_cv_have_libXext=no
1006
LDFLAGS=$kde_ldflags_safe
1010
AC_MSG_RESULT($kde_cv_have_libXext)
1012
if test "$kde_cv_have_libXext" = "no"; then
1013
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1014
can't find it itself, we stop here assuming that make wouldn't find
1021
elif test "$kde_use_qt_emb" = "yes"; then
1022
dnl We're using QT Embedded
1024
CXXFLAGS="$CXXFLAGS -fno-rtti"
1025
QTE_NORTTI="-fno-rtti -DQWS"
1035
elif test "$kde_use_qt_mac" = "yes"; then
1036
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1037
dnl be included to get the information) --Sam
1038
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1039
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1050
AC_SUBST(X_PRE_LIBS)
1052
AC_SUBST(LIB_XRENDER)
1054
AC_SUBST(X_INCLUDES)
1056
AC_SUBST(x_includes)
1057
AC_SUBST(x_libraries)
1058
AC_SUBST(QTE_NORTTI)
1063
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1065
AC_REQUIRE([KDE_USE_QT])
1066
cat > conftest.$ac_ext <<EOF
1067
#include "confdefs.h"
1068
#include <qglobal.h>
1069
#include <qapplication.h>
1071
if test "$kde_qtver" = "2"; then
1072
cat >> conftest.$ac_ext <<EOF
1074
#include <qstring.h>
1078
if test $kde_qtsubver -gt 0; then
1079
cat >> conftest.$ac_ext <<EOF
1080
#if QT_VERSION < 210
1087
if test "$kde_qtver" = "3"; then
1088
cat >> conftest.$ac_ext <<EOF
1089
#include <qcursor.h>
1090
#include <qstylefactory.h>
1091
#include <private/qucomextra_p.h>
1095
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1096
cat >> conftest.$ac_ext <<EOF
1102
if test "$kde_qtver" = "2"; then
1103
cat >> conftest.$ac_ext <<EOF
1104
QStringList *t = new QStringList();
1107
if test $kde_qtsubver -gt 0; then
1108
cat >> conftest.$ac_ext <<EOF
1110
s.setLatin1("Elvis is alive", 14);
1114
if test "$kde_qtver" = "3"; then
1115
cat >> conftest.$ac_ext <<EOF
1116
(void)QStyleFactory::create(QString::null);
1117
QCursor c(Qt::WhatsThisCursor);
1120
cat >> conftest.$ac_ext <<EOF
1126
AC_DEFUN([KDE_USE_QT],
1128
if test -z "$1"; then
1129
# Current default Qt version: 3.2
1133
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1134
# following is the check if subversion isnt found in passed argument
1135
if test "$kde_qtsubver" = "$1"; then
1138
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1139
if test "$kde_qtver" = "1"; then
1144
if test -z "$2"; then
1145
if test "$kde_qtver" = "2"; then
1146
if test $kde_qtsubver -gt 0; then
1147
kde_qt_minversion=">= Qt 2.2.2"
1149
kde_qt_minversion=">= Qt 2.0.2"
1152
if test "$kde_qtver" = "3"; then
1153
if test $kde_qtsubver -gt 0; then
1154
if test $kde_qtsubver -gt 1; then
1155
kde_qt_minversion=">= Qt 3.2"
1157
kde_qt_minversion=">= Qt 3.1 (20021021)"
1160
kde_qt_minversion=">= Qt 3.0"
1163
if test "$kde_qtver" = "1"; then
1164
kde_qt_minversion=">= 1.42 and < 2.0"
1167
kde_qt_minversion="$2"
1170
if test -z "$3"; then
1171
if test $kde_qtver = 3; then
1172
if test $kde_qtsubver -gt 0; then
1173
kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
1174
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1175
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1177
kde_qt_verstring="QT_VERSION >= 300"
1180
if test $kde_qtver = 2; then
1181
if test $kde_qtsubver -gt 0; then
1182
kde_qt_verstring="QT_VERSION >= 222"
1184
kde_qt_verstring="QT_VERSION >= 200"
1187
if test $kde_qtver = 1; then
1188
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1191
kde_qt_verstring="$3"
1194
if test $kde_qtver = 3; then
1195
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1197
if test $kde_qtver = 2; then
1198
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1200
if test $kde_qtver = 1; then
1201
kde_qt_dirs="$QTDIR /usr/lib/qt"
1205
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1207
AC_REQUIRE([KDE_USE_QT])
1208
AC_MSG_CHECKING([if Qt compiles without flags])
1209
AC_CACHE_VAL(kde_cv_qt_direct,
1213
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1214
ac_LIBRARY_PATH="$LIBRARY_PATH"
1215
ac_cxxflags_safe="$CXXFLAGS"
1216
ac_ldflags_safe="$LDFLAGS"
1217
ac_libs_safe="$LIBS"
1219
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1220
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1221
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1222
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1224
LIBS="$LIBQT $LIBSOCKET"
1227
export LD_LIBRARY_PATH
1231
KDE_PRINT_QT_PROGRAM
1233
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1234
kde_cv_qt_direct="yes"
1236
kde_cv_qt_direct="no"
1237
echo "configure: failed program was:" >&AC_FD_CC
1238
cat conftest.$ac_ext >&AC_FD_CC
1242
CXXFLAGS="$ac_cxxflags_safe"
1243
LDFLAGS="$ac_ldflags_safe"
1244
LIBS="$ac_libs_safe"
1246
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1247
export LD_LIBRARY_PATH
1248
LIBRARY_PATH="$ac_LIBRARY_PATH"
1253
if test "$kde_cv_qt_direct" = "yes"; then
1262
dnl ------------------------------------------------------------------------
1263
dnl Try to find the Qt headers and libraries.
1264
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1265
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1266
dnl ------------------------------------------------------------------------
1268
AC_DEFUN([AC_PATH_QT_1_3],
1270
AC_REQUIRE([K_PATH_X])
1271
AC_REQUIRE([KDE_USE_QT])
1272
AC_REQUIRE([KDE_CHECK_LIB64])
1274
dnl ------------------------------------------------------------------------
1275
dnl Add configure flag to enable linking to MT version of Qt library.
1276
dnl ------------------------------------------------------------------------
1280
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1281
kde_use_qt_mt=$enableval,
1283
if test $kde_qtver = 3; then
1293
dnl ------------------------------------------------------------------------
1294
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1295
dnl ------------------------------------------------------------------------
1299
if test "x$kde_use_qt_mt" = "xyes"; then
1301
if test "x$kde_use_threading" = "xyes"; then
1302
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1303
KDE_MT_LDFLAGS="$USE_THREADS"
1304
KDE_MT_LIBS="$LIBPTHREAD"
1309
AC_SUBST(KDE_MT_LDFLAGS)
1310
AC_SUBST(KDE_MT_LIBS)
1312
kde_qt_was_given=yes
1314
dnl ------------------------------------------------------------------------
1315
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1316
dnl ------------------------------------------------------------------------
1317
if test -z "$LIBQT_GLOB"; then
1318
if test "x$kde_use_qt_emb" = "xyes"; then
1319
LIBQT_GLOB="libqte.*"
1321
LIBQT_GLOB="libqt.*"
1325
if test -z "$LIBQT"; then
1326
dnl ------------------------------------------------------------
1327
dnl If we got --enable-embedded then adjust the Qt library name.
1328
dnl ------------------------------------------------------------
1329
if test "x$kde_use_qt_emb" = "xyes"; then
1335
kde_int_qt="-l$qtlib"
1341
if test -z "$LIBQPE"; then
1342
dnl ------------------------------------------------------------
1343
dnl If we got --enable-palmtop then add -lqpe to the link line
1344
dnl ------------------------------------------------------------
1345
if test "x$kde_use_qt_emb" = "xyes"; then
1346
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1356
dnl ------------------------------------------------------------------------
1357
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1358
dnl ------------------------------------------------------------------------
1360
if test "x$kde_use_qt_mt" = "xyes"; then
1361
if test -z "$LIBQT"; then
1363
kde_int_qt="-l$qtlib-mt"
1366
kde_int_qt="$qtlib-mt"
1368
LIBQT_GLOB="lib$qtlib-mt.*"
1369
USING_QT_MT="using -mt"
1374
if test $kde_qtver != 1; then
1376
AC_REQUIRE([AC_FIND_PNG])
1377
AC_REQUIRE([AC_FIND_JPEG])
1378
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1381
if test $kde_qtver = 3; then
1382
AC_REQUIRE([KDE_CHECK_LIBDL])
1383
LIBQT="$LIBQT $LIBDL"
1386
AC_MSG_CHECKING([for Qt])
1388
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1389
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1391
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1395
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1396
[ ac_qt_includes="$withval"/include
1397
ac_qt_libraries="$withval"/lib${kdelibsuff}
1398
ac_qt_bindir="$withval"/bin
1401
AC_ARG_WITH(qt-includes,
1402
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1404
ac_qt_includes="$withval"
1407
kde_qt_libs_given=no
1409
AC_ARG_WITH(qt-libraries,
1410
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1411
[ ac_qt_libraries="$withval"
1412
kde_qt_libs_given=yes
1415
AC_CACHE_VAL(ac_cv_have_qt,
1416
[#try to guess Qt locations
1419
for dir in $kde_qt_dirs; do
1420
qt_incdirs="$qt_incdirs $dir/include $dir"
1422
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"
1423
if test ! "$ac_qt_includes" = "NO"; then
1424
qt_incdirs="$ac_qt_includes $qt_incdirs"
1427
if test "$kde_qtver" != "1"; then
1428
kde_qt_header=qstyle.h
1430
kde_qt_header=qglobal.h
1433
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1434
ac_qt_includes="$qt_incdir"
1437
for dir in $kde_qt_dirs; do
1438
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1440
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1441
if test ! "$ac_qt_libraries" = "NO"; then
1442
qt_libdir=$ac_qt_libraries
1444
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1445
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1447
for dir in $qt_libdirs; do
1448
try="ls -1 $dir/${LIBQT_GLOB}"
1449
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1452
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1453
if test -e "$a"; then
1454
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1459
ac_qt_libraries="$qt_libdir"
1464
ac_cxxflags_safe="$CXXFLAGS"
1465
ac_ldflags_safe="$LDFLAGS"
1466
ac_libs_safe="$LIBS"
1468
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1469
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1470
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1472
KDE_PRINT_QT_PROGRAM
1474
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1477
echo "configure: failed program was:" >&AC_FD_CC
1478
cat conftest.$ac_ext >&AC_FD_CC
1479
ac_qt_libraries="NO"
1482
CXXFLAGS="$ac_cxxflags_safe"
1483
LDFLAGS="$ac_ldflags_safe"
1484
LIBS="$ac_libs_safe"
1487
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1488
ac_cv_have_qt="have_qt=no"
1491
if test "$ac_qt_includes" = NO; then
1492
if test "$ac_qt_libraries" = NO; then
1493
ac_qt_notfound="(headers and libraries)";
1495
ac_qt_notfound="(headers)";
1498
if test "x$kde_use_qt_mt" = "xyes"; then
1500
Make sure that you have compiled Qt with thread support!"
1501
ac_qt_notfound="(library $qtlib-mt)";
1503
ac_qt_notfound="(library $qtlib)";
1507
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1508
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1514
eval "$ac_cv_have_qt"
1516
if test "$have_qt" != yes; then
1517
AC_MSG_RESULT([$have_qt]);
1519
ac_cv_have_qt="have_qt=yes \
1520
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1521
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1523
qt_libraries="$ac_qt_libraries"
1524
qt_includes="$ac_qt_includes"
1527
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1528
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1531
AC_SUBST(qt_libraries)
1532
AC_SUBST(qt_includes)
1534
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1537
QT_INCLUDES="-I$qt_includes"
1538
all_includes="$QT_INCLUDES $all_includes"
1541
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1544
QT_LDFLAGS="-L$qt_libraries"
1545
all_libraries="$all_libraries $QT_LDFLAGS"
1547
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1549
AC_SUBST(QT_INCLUDES)
1550
AC_SUBST(QT_LDFLAGS)
1555
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1556
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1558
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1560
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1561
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1562
if test -e "$a"; then
1563
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1574
AC_DEFUN([AC_PATH_QT],
1579
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1581
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1583
if test x$ac_uic_supports_libpath = xyes; then
1585
AC_MSG_CHECKING([if UIC has KDE plugins available])
1586
AC_CACHE_VAL(kde_cv_uic_plugins,
1588
cat > actest.ui << EOF
1589
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1590
<class>NewConnectionDialog</class>
1591
<widget class="QDialog">
1592
<widget class="KLineEdit">
1593
<property name="name">
1594
<cstring>testInput</cstring>
1603
kde_cv_uic_plugins=no
1604
kde_line="$UIC_PATH -L $kde_widgetdir"
1605
if test x$ac_uic_supports_nounload = xyes; then
1606
kde_line="$kde_line -nounload"
1608
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1609
if AC_TRY_EVAL(kde_line); then
1610
# if you're trying to debug this check and think it's incorrect,
1611
# better check your installation. The check _is_ correct - your
1612
# installation is not.
1613
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1614
kde_cv_uic_plugins=yes
1617
rm -f actest.ui actest.cpp
1620
AC_MSG_RESULT([$kde_cv_uic_plugins])
1621
if test "$kde_cv_uic_plugins" != yes; then
1622
AC_MSG_ERROR([you need to install kdelibs first.])
1627
AC_DEFUN([KDE_CHECK_FINAL],
1629
AC_ARG_ENABLE(final,
1630
AC_HELP_STRING([--enable-final],
1631
[build size optimized apps (experimental - needs lots of memory)]),
1632
kde_use_final=$enableval, kde_use_final=no)
1634
if test "x$kde_use_final" = "xyes"; then
1635
KDE_USE_FINAL_TRUE=""
1636
KDE_USE_FINAL_FALSE="#"
1638
KDE_USE_FINAL_TRUE="#"
1639
KDE_USE_FINAL_FALSE=""
1641
AC_SUBST(KDE_USE_FINAL_TRUE)
1642
AC_SUBST(KDE_USE_FINAL_FALSE)
1645
AC_DEFUN([KDE_CHECK_CLOSURE],
1647
AC_ARG_ENABLE(closure,
1648
AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1649
kde_use_closure=$enableval, kde_use_closure=no)
1652
if test "x$kde_use_closure" = "xyes"; then
1653
KDE_USE_CLOSURE_TRUE=""
1654
KDE_USE_CLOSURE_FALSE="#"
1655
# CXXFLAGS="$CXXFLAGS $REPO"
1657
KDE_USE_CLOSURE_TRUE="#"
1658
KDE_USE_CLOSURE_FALSE=""
1662
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1663
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1664
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1665
[KDE_NO_UNDEFINED=""])],
1666
[KDE_NO_UNDEFINED=""])
1670
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1671
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1672
AC_SUBST(KDE_NO_UNDEFINED)
1675
AC_DEFUN([KDE_CHECK_NMCHECK],
1677
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1678
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1680
if test "$kde_use_nmcheck" = "yes"; then
1681
KDE_USE_NMCHECK_TRUE=""
1682
KDE_USE_NMCHECK_FALSE="#"
1684
KDE_USE_NMCHECK_TRUE="#"
1685
KDE_USE_NMCHECK_FALSE=""
1687
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1688
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1691
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1693
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1695
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1699
dnl ------------------------------------------------------------------------
1700
dnl Now, the same with KDE
1701
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1702
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1703
dnl ------------------------------------------------------------------------
1705
AC_DEFUN([AC_BASE_PATH_KDE],
1707
AC_REQUIRE([KDE_CHECK_STL])
1708
AC_REQUIRE([AC_PATH_QT])dnl
1709
AC_REQUIRE([KDE_CHECK_LIB64])
1712
AC_MSG_CHECKING([for KDE])
1714
if test "${prefix}" != NONE; then
1715
kde_includes=${includedir}
1716
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1718
kde_libraries=${libdir}
1719
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1728
AC_CACHE_VAL(ac_cv_have_kde,
1729
[#try to guess kde locations
1731
if test "$kde_qtver" = 1; then
1732
kde_check_header="ksock.h"
1733
kde_check_lib="libkdecore.la"
1735
kde_check_header="ksharedptr.h"
1736
kde_check_lib="libkio.la"
1739
if test -z "$1"; then
1741
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1742
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1743
kde_incdirs="$ac_kde_includes $kde_incdirs"
1744
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1745
ac_kde_includes="$kde_incdir"
1747
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1749
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1750
So, check this please and use another prefix!])
1753
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1754
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1755
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1756
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1757
ac_kde_libraries="$kde_libdir"
1760
dnl this might be somewhere else
1761
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1763
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1765
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1766
So, check this please and use another prefix!])
1769
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1771
I can't find the designer plugins. These are required and should have been installed
1775
if test -n "$kde_widgetdir"; then
1776
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1780
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1781
ac_cv_have_kde="have_kde=no"
1783
ac_cv_have_kde="have_kde=yes \
1784
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1789
ac_cv_have_kde="have_kde=no"
1794
eval "$ac_cv_have_kde"
1796
if test "$have_kde" != "yes"; then
1797
if test "${prefix}" = NONE; then
1798
ac_kde_prefix="$ac_default_prefix"
1800
ac_kde_prefix="$prefix"
1802
if test "$exec_prefix" = NONE; then
1803
ac_kde_exec_prefix="$ac_kde_prefix"
1804
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1806
ac_kde_exec_prefix="$exec_prefix"
1807
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1810
kde_libraries="${libdir}"
1811
kde_includes="${includedir}"
1814
ac_cv_have_kde="have_kde=yes \
1815
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1816
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1818
kde_libraries="$ac_kde_libraries"
1819
kde_includes="$ac_kde_includes"
1821
AC_SUBST(kde_libraries)
1822
AC_SUBST(kde_includes)
1824
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1827
KDE_INCLUDES="-I$kde_includes"
1828
all_includes="$KDE_INCLUDES $all_includes"
1831
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1833
KDE_LDFLAGS="-L$kde_libraries"
1834
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1835
all_libraries="$all_libraries $KDE_LDFLAGS"
1838
AC_SUBST(KDE_LDFLAGS)
1839
AC_SUBST(KDE_INCLUDES)
1841
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1843
all_libraries="$all_libraries $USER_LDFLAGS"
1844
all_includes="$all_includes $USER_INCLUDES"
1845
AC_SUBST(all_includes)
1846
AC_SUBST(all_libraries)
1848
if test -z "$1"; then
1849
KDE_CHECK_UIC_PLUGINS
1852
ac_kde_libraries="$kde_libdir"
1859
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1861
AC_MSG_CHECKING(for extra includes)
1862
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1863
kde_use_extra_includes="$withval",
1864
kde_use_extra_includes=NONE
1867
if test -n "$kde_use_extra_includes" && \
1868
test "$kde_use_extra_includes" != "NONE"; then
1872
for dir in $kde_use_extra_includes; do
1873
kde_extra_includes="$kde_extra_includes $dir"
1874
USER_INCLUDES="$USER_INCLUDES -I$dir"
1877
kde_use_extra_includes="added"
1879
kde_use_extra_includes="no"
1881
AC_SUBST(USER_INCLUDES)
1883
AC_MSG_RESULT($kde_use_extra_includes)
1886
AC_MSG_CHECKING(for extra libs)
1887
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1888
kde_use_extra_libs=$withval,
1889
kde_use_extra_libs=NONE
1891
if test -n "$kde_use_extra_libs" && \
1892
test "$kde_use_extra_libs" != "NONE"; then
1896
for dir in $kde_use_extra_libs; do
1897
kde_extra_libs="$kde_extra_libs $dir"
1898
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1899
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1902
kde_use_extra_libs="added"
1904
kde_use_extra_libs="no"
1907
AC_SUBST(USER_LDFLAGS)
1909
AC_MSG_RESULT($kde_use_extra_libs)
1913
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1915
AC_MSG_CHECKING([for KDE headers installed])
1918
cat > conftest.$ac_ext <<EOF
1920
# include <stdlib.h>
1923
#include "confdefs.h"
1927
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1928
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1929
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1930
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1931
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1932
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1933
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1934
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1935
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1936
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1937
printf("kde_wallpaperdir=\\"%s\\"\n",
1938
KApplication::kde_wallpaperdir().data());
1939
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1940
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1941
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1942
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1943
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1944
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1945
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1946
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1947
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1948
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1949
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1954
ac_save_CPPFLAGS=$CPPFLAGS
1955
CPPFLAGS="$all_includes $CPPFLAGS"
1956
if AC_TRY_EVAL(ac_compile); then
1959
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1960
Check, if you installed the KDE header files correctly.
1961
For more details about this problem, look at the end of config.log.])
1963
CPPFLAGS=$ac_save_CPPFLAGS
1968
AC_DEFUN([KDE_CHECK_KDEQTADDON],
1970
AC_MSG_CHECKING(for kde-qt-addon)
1971
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1973
kde_ldflags_safe="$LDFLAGS"
1974
kde_libs_safe="$LIBS"
1975
kde_cxxflags_safe="$CXXFLAGS"
1977
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1978
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1979
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1987
kde_cv_have_kdeqtaddon=yes,
1988
kde_cv_have_kdeqtaddon=no
1991
LDFLAGS=$kde_ldflags_safe
1993
CXXFLAGS=$kde_cxxflags_safe
1996
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1998
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1999
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2000
It is a separate package (and CVS module) named kde-qt-addon.])
2004
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2006
AC_REQUIRE([KDE_MISC_TESTS])
2007
AC_REQUIRE([KDE_CHECK_LIBDL])
2008
AC_REQUIRE([K_PATH_X])
2010
if test $kde_qtver = 3; then
2011
AC_SUBST(LIB_KDECORE, "-lkdecore")
2012
AC_SUBST(LIB_KDEUI, "-lkdeui")
2013
AC_SUBST(LIB_KIO, "-lkio")
2014
AC_SUBST(LIB_SMB, "-lsmb")
2015
AC_SUBST(LIB_KAB, "-lkab")
2016
AC_SUBST(LIB_KABC, "-lkabc")
2017
AC_SUBST(LIB_KHTML, "-lkhtml")
2018
AC_SUBST(LIB_KSPELL, "-lkspell")
2019
AC_SUBST(LIB_KPARTS, "-lkparts")
2020
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2021
AC_SUBST(LIB_KUTILS, "-lkutils")
2022
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2023
# these are for backward compatibility
2024
AC_SUBST(LIB_KSYCOCA, "-lkio")
2025
AC_SUBST(LIB_KFILE, "-lkio")
2026
elif test $kde_qtver = 2; then
2027
AC_SUBST(LIB_KDECORE, "-lkdecore")
2028
AC_SUBST(LIB_KDEUI, "-lkdeui")
2029
AC_SUBST(LIB_KIO, "-lkio")
2030
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2031
AC_SUBST(LIB_SMB, "-lsmb")
2032
AC_SUBST(LIB_KFILE, "-lkfile")
2033
AC_SUBST(LIB_KAB, "-lkab")
2034
AC_SUBST(LIB_KHTML, "-lkhtml")
2035
AC_SUBST(LIB_KSPELL, "-lkspell")
2036
AC_SUBST(LIB_KPARTS, "-lkparts")
2037
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2039
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2040
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2041
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2042
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2043
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2047
AC_DEFUN([AC_PATH_KDE],
2050
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2052
if test "$enableval" = "no";
2053
then ac_use_path_checking="default"
2054
else ac_use_path_checking=""
2058
if test "$kde_qtver" = 1;
2059
then ac_use_path_checking=""
2060
else ac_use_path_checking="default"
2065
AC_CREATE_KFSSTND($ac_use_path_checking)
2068
KDE_CREATE_LIBS_ALIASES
2071
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2072
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2074
AC_MSG_CHECKING(for $1)
2075
AC_CACHE_VAL(kde_cv_func_$1,
2079
save_CXXFLAGS="$CXXFLAGS"
2080
kde_safe_LIBS="$LIBS"
2081
LIBS="$LIBS $X_EXTRA_LIBS"
2082
if test "$GXX" = "yes"; then
2083
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2093
CXXFLAGS="$save_CXXFLAGS"
2094
LIBS="$kde_safe_LIBS"
2098
AC_MSG_RESULT($kde_cv_func_$1)
2100
AC_MSG_CHECKING([if $1 needs custom prototype])
2101
AC_CACHE_VAL(kde_cv_proto_$1,
2103
if test "x$kde_cv_func_$1" = xyes; then
2107
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2108
kde_cv_proto_$1="yes - in libkdefakes"
2111
kde_cv_proto_$1=unknown
2116
if test "x$kde_cv_proto_$1" = xunknown; then
2121
LIBS="$LIBS $X_EXTRA_LIBS"
2130
[ kde_cv_func_$1=yes
2131
kde_cv_proto_$1=yes ],
2132
[kde_cv_proto_$1="$1 unavailable"]
2138
AC_MSG_RESULT($kde_cv_proto_$1)
2140
if test "x$kde_cv_func_$1" = xyes; then
2141
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2144
if test "x$kde_cv_proto_$1" = xno; then
2145
AC_DEFINE(HAVE_$5_PROTO, 1,
2146
[Define if you have the $1 prototype])
2149
AH_VERBATIM([_HAVE_$5_PROTO],
2151
#if !defined(HAVE_$5_PROTO)
2163
AC_DEFUN([AC_CHECK_SETENV],
2165
KDE_CHECK_FUNC_EXT(setenv, [
2168
[setenv("VAR", "VALUE", 1);],
2169
[int setenv (const char *, const char *, int)],
2173
AC_DEFUN([AC_CHECK_UNSETENV],
2175
KDE_CHECK_FUNC_EXT(unsetenv, [
2179
[void unsetenv (const char *)],
2183
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2185
KDE_CHECK_FUNC_EXT(getdomainname, [
2192
getdomainname(buffer, 200);
2194
[#include <sys/types.h>
2195
int getdomainname (char *, size_t)],
2199
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2201
KDE_CHECK_FUNC_EXT(gethostname, [
2207
gethostname(buffer, 200);
2209
[int gethostname (char *, unsigned int)],
2213
AC_DEFUN([AC_CHECK_USLEEP],
2215
KDE_CHECK_FUNC_EXT(usleep, [
2221
[int usleep (unsigned int)],
2226
AC_DEFUN([AC_CHECK_RANDOM],
2228
KDE_CHECK_FUNC_EXT(random, [
2234
[long int random(void)],
2237
KDE_CHECK_FUNC_EXT(srandom, [
2243
[void srandom(unsigned int)],
2248
AC_DEFUN([AC_CHECK_INITGROUPS],
2250
KDE_CHECK_FUNC_EXT(initgroups, [
2251
#include <sys/types.h>
2257
initgroups(buffer, 27);
2259
[int initgroups(const char *, gid_t)],
2263
AC_DEFUN([AC_CHECK_MKSTEMPS],
2265
KDE_CHECK_FUNC_EXT(mkstemps, [
2270
mkstemps("/tmp/aaaXXXXXX", 6);
2272
[int mkstemps(char *, int)],
2276
AC_DEFUN([AC_CHECK_MKDTEMP],
2278
KDE_CHECK_FUNC_EXT(mkdtemp, [
2283
mkdtemp("/tmp/aaaXXXXXX");
2285
[char *mkdtemp(char *)],
2290
AC_DEFUN([AC_CHECK_RES_INIT],
2292
AC_MSG_CHECKING([if res_init needs -lresolv])
2293
kde_libs_safe="$LIBS"
2294
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2297
#include <sys/types.h>
2298
#include <netinet/in.h>
2299
#include <arpa/nameser.h>
2306
LIBRESOLV="-lresolv"
2308
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2310
[ AC_MSG_RESULT(no) ]
2315
AC_MSG_CHECKING([if res_init is available])
2318
#include <sys/types.h>
2319
#include <netinet/in.h>
2320
#include <arpa/nameser.h>
2328
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2330
[ AC_MSG_RESULT(no) ]
2334
AC_DEFUN([AC_CHECK_STRLCPY],
2336
KDE_CHECK_FUNC_EXT(strlcpy, [
2340
strlcpy(buf, "KDE function test", sizeof(buf));
2342
[unsigned long strlcpy(char*, const char*, unsigned long)],
2346
AC_DEFUN([AC_CHECK_STRLCAT],
2348
KDE_CHECK_FUNC_EXT(strlcat, [
2353
strlcat(buf, "KDE function test", sizeof(buf));
2355
[unsigned long strlcat(char*, const char*, unsigned long)],
2359
AC_DEFUN([AC_FIND_GIF],
2360
[AC_MSG_CHECKING([for giflib])
2361
AC_CACHE_VAL(ac_cv_lib_gif,
2362
[ac_save_LIBS="$LIBS"
2363
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2364
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2366
LIBS="$all_libraries -lgif"
2373
int GifLastError(void);
2377
/* We use char because int might match the return type of a gcc2
2378
builtin and then its argument prototype would still apply. */
2380
[return GifLastError();],
2381
eval "ac_cv_lib_gif=yes",
2382
eval "ac_cv_lib_gif=no")
2383
LIBS="$ac_save_LIBS"
2385
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2387
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2389
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2393
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2395
AC_MSG_CHECKING([for libjpeg$2])
2396
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2398
ac_save_LIBS="$LIBS"
2399
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2400
ac_save_CFLAGS="$CFLAGS"
2401
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2403
[/* Override any gcc2 internal prototype to avoid an error. */
2404
struct jpeg_decompress_struct;
2405
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2410
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2411
int version, size_t structsize);
2415
/* We use char because int might match the return type of a gcc2
2416
builtin and then its argument prototype would still apply. */
2418
[jpeg_CreateDecompress(0L, 0, 0);],
2419
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2420
eval "ac_cv_lib_jpeg_$1=no")
2421
LIBS="$ac_save_LIBS"
2422
CFLAGS="$ac_save_CFLAGS"
2425
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2426
LIBJPEG="$ac_cv_lib_jpeg_$1"
2427
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2435
AC_DEFUN([AC_FIND_JPEG],
2437
dnl first look for libraries
2438
KDE_FIND_JPEG_HELPER(6b, 6b,
2439
KDE_FIND_JPEG_HELPER(normal, [],
2446
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2447
dnl requires system dependent includes loaded before it)
2448
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2449
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2450
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2452
dnl if headers _and_ libraries are missing, this is no error, and we
2453
dnl continue with a warning (the user will get no jpeg support in khtml)
2454
dnl if only one is missing, it means a configuration error, but we still
2456
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2457
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2459
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2461
There is an installation error in jpeg support. You seem to have only one
2462
of either the headers _or_ the libraries installed. You may need to either
2463
provide correct --with-extra-... options, or the development package of
2464
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2465
Disabling JPEG support.
2468
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2475
AH_VERBATIM(_AC_CHECK_JPEG,
2477
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2478
* headers and I'm too lazy to write a configure test as long as only
2479
* unixware is related
2482
#define HAVE_BOOLEAN
2487
AC_DEFUN([KDE_CHECK_QT_JPEG],
2489
if test -n "$LIBJPEG"; then
2490
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2491
AC_CACHE_VAL(kde_cv_qt_jpeg,
2495
ac_save_LIBS="$LIBS"
2496
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2497
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2498
ac_save_CXXFLAGS="$CXXFLAGS"
2499
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2501
[#include <qapplication.h>],
2505
QApplication app(argc, argv);],
2506
eval "kde_cv_qt_jpeg=no",
2507
eval "kde_cv_qt_jpeg=yes")
2508
LIBS="$ac_save_LIBS"
2509
CXXFLAGS="$ac_save_CXXFLAGS"
2514
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2516
LIBJPEG_QT='$(LIBJPEG)'
2524
AC_DEFUN([AC_FIND_ZLIB],
2526
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2527
AC_MSG_CHECKING([for libz])
2528
AC_CACHE_VAL(ac_cv_lib_z,
2530
kde_save_LIBS="$LIBS"
2531
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2532
kde_save_CFLAGS="$CFLAGS"
2533
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2540
gzFile f = (gzFile) 0;
2541
/* this would segfault.. but we only link, don't run */
2542
(void) gzgets(f, buf, sizeof(buf));
2544
return (zlibVersion() == ZLIB_VERSION);
2546
eval "ac_cv_lib_z='-lz'",
2547
eval "ac_cv_lib_z=no")
2548
LIBS="$kde_save_LIBS"
2549
CFLAGS="$kde_save_CFLAGS"
2551
if test ! "$ac_cv_lib_z" = no; then
2552
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2554
AC_MSG_RESULT($ac_cv_lib_z)
2556
AC_MSG_ERROR(not found.
2557
Possibly configure picks up an outdated version
2558
installed by XFree86. Remove it from your system.
2560
Check your installation and look into config.log)
2566
AC_DEFUN([KDE_TRY_TIFFLIB],
2568
AC_MSG_CHECKING([for libtiff $1])
2570
AC_CACHE_VAL(kde_cv_libtiff_$1,
2574
kde_save_LIBS="$LIBS"
2575
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2576
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2578
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2580
kde_save_CXXFLAGS="$CXXFLAGS"
2581
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2587
[return (TIFFOpen( "", "r") == 0); ],
2589
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2591
kde_cv_libtiff_$1=no
2594
LIBS="$kde_save_LIBS"
2595
CXXFLAGS="$kde_save_CXXFLAGS"
2599
if test "$kde_cv_libtiff_$1" = "no"; then
2604
LIBTIFF="$kde_cv_libtiff_$1"
2606
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2612
AC_DEFUN([AC_FIND_TIFF],
2614
AC_REQUIRE([K_PATH_X])
2615
AC_REQUIRE([AC_FIND_ZLIB])
2616
AC_REQUIRE([AC_FIND_JPEG])
2617
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2619
KDE_TRY_TIFFLIB(tiff, [],
2620
KDE_TRY_TIFFLIB(tiff34))
2626
AC_DEFUN([AC_FIND_PNG],
2628
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2629
AC_REQUIRE([AC_FIND_ZLIB])
2630
AC_MSG_CHECKING([for libpng])
2631
AC_CACHE_VAL(ac_cv_lib_png,
2633
kde_save_LIBS="$LIBS"
2634
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2635
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2637
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2639
kde_save_CFLAGS="$CFLAGS"
2640
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2647
png_structp png_ptr = png_create_read_struct( /* image ptr */
2648
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2649
return( png_ptr != 0 );
2651
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2652
eval "ac_cv_lib_png=no"
2654
LIBS="$kde_save_LIBS"
2655
CFLAGS="$kde_save_CFLAGS"
2657
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2658
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2659
LIBPNG="$ac_cv_lib_png"
2661
AC_MSG_RESULT($ac_cv_lib_png)
2670
AC_DEFUN([AC_FIND_JASPER],
2672
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2673
AC_REQUIRE([AC_FIND_JPEG])
2674
AC_MSG_CHECKING([for jasper])
2675
AC_CACHE_VAL(ac_cv_jasper,
2677
kde_save_LIBS="$LIBS"
2678
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2679
kde_save_CFLAGS="$CFLAGS"
2680
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2684
#include<jasper/jasper.h>
2687
return( jas_init() );
2689
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2690
eval "ac_cv_jasper=no"
2692
LIBS="$kde_save_LIBS"
2693
CFLAGS="$kde_save_CFLAGS"
2695
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2696
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2697
LIB_JASPER="$ac_cv_jasper"
2698
AC_MSG_RESULT($ac_cv_jasper)
2703
AC_SUBST(LIB_JASPER)
2706
AC_DEFUN([AC_CHECK_BOOL],
2708
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2711
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2713
AC_MSG_CHECKING(if you need GNU extensions)
2714
AC_CACHE_VAL(ac_cv_gnu_extensions,
2716
cat > conftest.c << EOF
2717
#include <features.h>
2719
#ifdef __GNU_LIBRARY__
2724
if (eval "$ac_cpp conftest.c") 2>&5 |
2725
egrep "yes" >/dev/null 2>&1; then
2727
ac_cv_gnu_extensions=yes
2729
ac_cv_gnu_extensions=no
2733
AC_MSG_RESULT($ac_cv_gnu_extensions)
2734
if test "$ac_cv_gnu_extensions" = "yes"; then
2735
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2739
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2741
AC_MSG_CHECKING([whether $CXX supports -$1])
2742
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2743
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2747
save_CXXFLAGS="$CXXFLAGS"
2748
CXXFLAGS="$CXXFLAGS -$1"
2749
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2750
CXXFLAGS="$save_CXXFLAGS"
2753
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2764
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2765
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2766
dnl it's all white-space separated
2767
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2770
if test -n "$__val"; then
2776
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2777
*) # Careful to not add spaces, where there were none, because otherwise
2778
# libtool gets confused, if we change e.g. CXX
2779
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2787
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2788
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2790
if test "x$kde_use_qt_emb" != "xyes"; then
2791
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2792
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2794
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2795
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2799
AC_DEFUN([AC_CHECK_COMPILERS],
2801
AC_ARG_ENABLE(debug,
2802
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2806
kde_use_debug_code="yes"
2807
kde_use_debug_define=no
2810
kde_use_debug_code="full"
2811
kde_use_debug_define=no
2814
kde_use_debug_code="no"
2815
kde_use_debug_define=yes
2819
[kde_use_debug_code="no"
2820
kde_use_debug_define=no
2823
dnl Just for configure --help
2824
AC_ARG_ENABLE(dummyoption,
2825
AC_HELP_STRING([--disable-debug],
2826
[disables debug output and debug symbols [default=no]]),
2829
AC_ARG_ENABLE(strict,
2830
AC_HELP_STRING([--enable-strict],
2831
[compiles with strict compiler options (may not work!)]),
2833
if test $enableval = "no"; then
2834
kde_use_strict_options="no"
2836
kde_use_strict_options="yes"
2838
], [kde_use_strict_options="no"])
2840
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
2842
if test $enableval = "no"; then
2843
kde_use_warnings="no"
2845
kde_use_warnings="yes"
2847
], [kde_use_warnings="yes"])
2849
dnl enable warnings for debug build
2850
if test "$kde_use_debug_code" != "no"; then
2851
kde_use_warnings=yes
2854
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
2855
[kde_use_profiling=$enableval],
2856
[kde_use_profiling="no"]
2859
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2866
if test "$GCC" = "yes"; then
2867
if test "$kde_use_debug_code" != "no"; then
2868
if test $kde_use_debug_code = "full"; then
2869
CFLAGS="-g3 -fno-inline $CFLAGS"
2871
CFLAGS="-g -O2 $CFLAGS"
2874
CFLAGS="-O2 $CFLAGS"
2878
if test "$kde_use_debug_define" = "yes"; then
2879
CFLAGS="-DNDEBUG $CFLAGS"
2884
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2885
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2888
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2892
CXXFLAGS=" $CXXFLAGS"
2896
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2897
if test "$kde_use_debug_code" != "no"; then
2898
if test "$CXX" = "KCC"; then
2899
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2901
if test "$kde_use_debug_code" = "full"; then
2902
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
2904
CXXFLAGS="-g -O2 $CXXFLAGS"
2907
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2909
dnl convenience compiler flags
2910
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2911
AC_SUBST(WOVERLOADED_VIRTUAL)
2913
if test "$CXX" = "KCC"; then
2914
CXXFLAGS="+K3 $CXXFLAGS"
2916
CXXFLAGS="-O2 $CXXFLAGS"
2921
if test "$kde_use_debug_define" = "yes"; then
2922
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2925
if test "$kde_use_profiling" = "yes"; then
2926
KDE_CHECK_COMPILER_FLAG(pg,
2928
CFLAGS="-pg $CFLAGS"
2929
CXXFLAGS="-pg $CXXFLAGS"
2933
if test "$kde_use_warnings" = "yes"; then
2934
if test "$GCC" = "yes"; then
2937
CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2938
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2939
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2942
CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2943
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2944
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2945
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2949
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2950
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2953
if test "$GXX" = "yes"; then
2954
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2955
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2956
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2957
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2959
if test "$CXX" = "KCC"; then
2960
dnl unfortunately we currently cannot disable exception support in KCC
2961
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2962
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2963
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2966
AC_HELP_STRING([--enable-pch],
2967
[enables precompiled header support (currently only KCC) [default=no]]),
2969
kde_use_pch=$enableval
2972
if test "$kde_use_pch" = "yes"; then
2973
dnl TODO: support --pch-dir!
2974
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2975
dnl the below works (but the dir must exist), but it's
2976
dnl useless for a whole package.
2977
dnl The are precompiled headers for each source file, so when compiling
2978
dnl from scratch, it doesn't make a difference, and they take up
2979
dnl around ~5Mb _per_ sourcefile.
2980
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2981
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2983
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2984
dnl all implementations that are defined inside the class {} declaration.
2985
dnl because of templates-compatibility with broken gcc compilers, this
2986
dnl can cause excessive inlining. This flag limits it to a sane level
2987
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2988
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2989
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2990
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2991
dnl Some source files are shared between multiple executables
2992
dnl (or libraries) and some of those need template instantiations.
2993
dnl In that case KCC needs to compile those sources with
2994
dnl --one_instantiation_per_object. To make it easy for us we compile
2995
dnl _all_ objects with that flag (--one_per is a shorthand).
2996
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2998
AC_SUBST(USE_EXCEPTIONS)
2999
dnl obsolete macro - provided to keep things going
3004
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3005
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3006
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3008
if test "$GXX" = yes; then
3009
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3010
if test ! -f $libstdcpp; then
3011
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])
3017
AC_VALIDIFY_CXXFLAGS
3021
if test "$GCC" = yes; then
3024
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3026
AC_SUBST(NOOPT_CXXFLAGS)
3027
AC_SUBST(NOOPT_CFLAGS)
3033
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3036
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3038
[A]M_DEPENDENCIES(CC)
3039
[A]M_DEPENDENCIES(CXX)
3042
dnl just a wrapper to clean up configure.in
3043
AC_DEFUN([KDE_PROG_LIBTOOL],
3045
AC_REQUIRE([AC_CHECK_COMPILERS])
3046
AC_REQUIRE([AC_ENABLE_SHARED])
3047
AC_REQUIRE([AC_ENABLE_STATIC])
3049
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3050
AC_REQUIRE([KDE_CHECK_LIB64])
3058
LIBTOOL_SHELL="/bin/sh ./libtool"
3059
# LIBTOOL="$LIBTOOL --silent"
3060
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3061
AC_SUBST(KDE_PLUGIN)
3063
# we patch configure quite some so we better keep that consistent for incremental runs
3064
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3067
AC_DEFUN([KDE_CHECK_LIB64],
3070
AC_ARG_ENABLE(libsuffix,
3071
AC_HELP_STRING([--enable-libsuffix],
3072
[/lib directory suffix (64,32,none[=default])]),
3073
kdelibsuff=$enableval)
3074
# TODO: add an auto case that compiles a little C app to check
3075
# where the glibc is
3076
if test "$kdelibsuff" = "no"; then
3079
if test -z "$kdelibsuff"; then
3080
AC_MSG_RESULT([not using lib directory suffix])
3081
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3083
if test "$libdir" = '${exec_prefix}/lib'; then
3084
libdir="$libdir${kdelibsuff}"
3085
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3087
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3088
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3092
AC_DEFUN([KDE_CHECK_TYPES],
3093
[ AC_CHECK_SIZEOF(int, 4)dnl
3094
AC_CHECK_SIZEOF(short)dnl
3095
AC_CHECK_SIZEOF(long, 4)dnl
3096
AC_CHECK_SIZEOF(char *, 4)dnl
3099
AC_DEFUN([KDE_DO_IT_ALL],
3103
AM_INIT_AUTOMAKE($1, $2)
3104
AM_DISABLE_LIBRARIES
3105
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3112
AC_DEFUN([AC_CHECK_RPATH],
3114
AC_MSG_CHECKING(for rpath)
3115
AC_ARG_ENABLE(rpath,
3116
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3117
USE_RPATH=$enableval, USE_RPATH=yes)
3119
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3121
KDE_RPATH="-R \$(kde_libraries)"
3123
if test -n "$qt_libraries"; then
3124
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3126
dnl $x_libraries is set to /usr/lib in case
3127
if test -n "$X_LDFLAGS"; then
3128
X_RPATH="-R \$(x_libraries)"
3129
KDE_RPATH="$KDE_RPATH $X_RPATH"
3131
if test -n "$KDE_EXTRA_RPATH"; then
3132
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3135
AC_SUBST(KDE_EXTRA_RPATH)
3138
AC_MSG_RESULT($USE_RPATH)
3141
dnl Check for the type of the third argument of getsockname
3142
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3143
AC_MSG_CHECKING(for socklen_t)
3144
AC_CACHE_VAL(ac_cv_socklen_t, [
3148
#include <sys/types.h>
3149
#include <sys/socket.h>
3152
getsockname(0,(struct sockaddr*)0, &a);
3154
ac_cv_socklen_t=socklen_t,
3156
#include <sys/types.h>
3157
#include <sys/socket.h>
3160
getsockname(0,(struct sockaddr*)0, &a);
3162
ac_cv_socklen_t=int,
3163
ac_cv_socklen_t=size_t
3169
AC_MSG_RESULT($ac_cv_socklen_t)
3170
if test "$ac_cv_socklen_t" != "socklen_t"; then
3171
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3172
[Define the real type of socklen_t])
3174
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3178
dnl This is a merge of some macros out of the gettext aclocal.m4
3179
dnl since we don't need anything, I took the things we need
3180
dnl the copyright for them is:
3182
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3183
dnl This Makefile.in is free software; the Free Software Foundation
3184
dnl gives unlimited permission to copy and/or distribute it,
3185
dnl with or without modifications, as long as this notice is preserved.
3187
dnl This program is distributed in the hope that it will be useful,
3188
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3189
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3190
dnl PARTICULAR PURPOSE.
3192
dnl for this file it is relicensed under LGPL
3194
AC_DEFUN([AM_KDE_WITH_NLS],
3196
dnl If we use NLS figure out what method
3198
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3199
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3200
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3202
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3203
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3210
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3211
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3213
dnl Test whether we really found GNU xgettext.
3214
if test "$XGETTEXT" != ":"; then
3215
dnl If it is no GNU xgettext we define it as : so that the
3216
dnl Makefiles still can work.
3217
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3221
[found xgettext programs is not GNU xgettext; ignore it])
3229
# Search path for a program which passes the given test.
3230
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3233
# Stephan Kulow: I appended a _KDE against name conflicts
3235
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3236
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3237
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3238
[# Extract the first word of "$2", so it can be a program name with args.
3239
set dummy $2; ac_word=[$]2
3240
AC_MSG_CHECKING([for $ac_word])
3241
AC_CACHE_VAL(ac_cv_path_$1,
3244
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3247
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3248
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3249
test -z "$ac_dir" && ac_dir=.
3250
if test -f $ac_dir/$ac_word; then
3252
ac_cv_path_$1="$ac_dir/$ac_word"
3258
dnl If no 4th arg is given, leave the cache variable unset,
3259
dnl so AC_PATH_PROGS will keep looking.
3260
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3265
if test -n "[$]$1"; then
3266
AC_MSG_RESULT([$]$1)
3274
# Check whether LC_MESSAGES is available in <locale.h>.
3275
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3279
AC_DEFUN([AM_LC_MESSAGES],
3280
[if test $ac_cv_header_locale_h = yes; then
3281
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3282
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3283
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3284
if test $am_cv_val_LC_MESSAGES = yes; then
3285
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3289
dnl From Jim Meyering.
3290
dnl FIXME: migrate into libit.
3292
AC_DEFUN([AM_FUNC_OBSTACK],
3293
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3294
[AC_TRY_LINK([#include "obstack.h"],
3295
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3296
am_cv_func_obstack=yes,
3297
am_cv_func_obstack=no)])
3298
if test $am_cv_func_obstack = yes; then
3299
AC_DEFINE(HAVE_OBSTACK)
3301
LIBOBJS="$LIBOBJS obstack.o"
3305
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3306
dnl FIXME: Migrate into libit
3308
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3309
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3310
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3311
am_cv_lib_error_at_line=yes,
3312
am_cv_lib_error_at_line=no)])
3313
if test $am_cv_lib_error_at_line = no; then
3314
LIBOBJS="$LIBOBJS error.o"
3316
AC_SUBST(LIBOBJS)dnl
3319
# Macro to add for using GNU gettext.
3320
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3323
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3325
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3326
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3327
AC_REQUIRE([AC_PROG_RANLIB])dnl
3328
AC_REQUIRE([AC_HEADER_STDC])dnl
3329
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3330
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3331
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3332
AC_REQUIRE([AC_FUNC_MMAP])dnl
3333
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3334
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3335
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3336
__argz_count __argz_stringify __argz_next])
3338
AC_MSG_CHECKING(for stpcpy)
3339
AC_CACHE_VAL(kde_cv_func_stpcpy,
3341
kde_safe_cxxflags=$CXXFLAGS
3350
stpcpy(buffer, buffer);
3352
kde_cv_func_stpcpy=yes,
3353
kde_cv_func_stpcpy=no)
3355
CXXFLAGS=$kde_safe_cxxflags
3357
AC_MSG_RESULT($kde_cv_func_stpcpy)
3358
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3359
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3364
if test "x$CATOBJEXT" != "x"; then
3365
if test "x$ALL_LINGUAS" = "x"; then
3368
AC_MSG_CHECKING(for catalogs to be installed)
3370
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3371
case "$ALL_LINGUAS" in
3372
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3375
LINGUAS=$NEW_LINGUAS
3376
AC_MSG_RESULT($LINGUAS)
3379
dnl Construct list of names of catalog files to be constructed.
3380
if test -n "$LINGUAS"; then
3381
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3387
AC_DEFUN([AC_HAVE_XPM],
3388
[AC_REQUIRE_CPP()dnl
3389
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3391
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3392
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3394
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3395
xpm_test=$withval, xpm_test="yes")
3396
if test "x$xpm_test" = xno; then
3399
AC_MSG_CHECKING(for XPM)
3400
AC_CACHE_VAL(ac_cv_have_xpm,
3402
ac_save_ldflags="$LDFLAGS"
3403
ac_save_cflags="$CFLAGS"
3404
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3405
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3407
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3409
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3410
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3411
AC_TRY_LINK([#include <X11/xpm.h>],[],
3412
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3413
LDFLAGS="$ac_save_ldflags"
3414
CFLAGS="$ac_save_cflags"
3417
if test "$ac_cv_have_xpm" = no; then
3423
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3424
if test "$XPM_LDFLAGS" = ""; then
3425
XPMLIB='-lXpm $(LIB_X11)'
3427
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3429
if test "$XPM_INCLUDE" = ""; then
3432
XPMINC="-I$XPM_INCLUDE"
3442
AC_DEFUN([AC_HAVE_DPMS],
3443
[AC_REQUIRE_CPP()dnl
3444
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3446
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3447
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3450
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3451
dpms_test=$withval, dpms_test="yes")
3452
if test "x$dpms_test" = xno; then
3455
AC_MSG_CHECKING(for DPMS)
3456
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3457
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3458
AC_CACHE_VAL(ac_cv_have_dpms,
3460
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3462
ac_cv_have_dpms="no"
3464
ac_save_ldflags="$LDFLAGS"
3465
ac_save_cflags="$CFLAGS"
3466
ac_save_libs="$LIBS"
3467
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3468
CFLAGS="$CFLAGS $X_INCLUDES"
3469
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3471
#include <X11/Xproto.h>
3473
#include <X11/Xlib.h>
3474
#include <X11/extensions/dpms.h>
3476
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3477
ac_cv_have_dpms="yes", [
3478
LDFLAGS="$ac_save_ldflags"
3479
CFLAGS="$ac_save_cflags"
3480
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3481
LIBS="$LIBS -lXdpms"
3482
CFLAGS="$CFLAGS $X_INCLUDES"
3483
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3485
#include <X11/Xproto.h>
3487
#include <X11/Xlib.h>
3488
#include <X11/extensions/dpms.h>
3490
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3492
ac_cv_have_dpms="-lXdpms"
3493
],ac_cv_have_dpms="no")
3495
LDFLAGS="$ac_save_ldflags"
3496
CFLAGS="$ac_save_cflags"
3497
LIBS="$ac_save_libs"
3501
if test "$ac_cv_have_dpms" = no; then
3507
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3508
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3511
if test "$DPMS_LDFLAGS" = ""; then
3512
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3514
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3516
if test "$DPMS_INCLUDE" = ""; then
3519
DPMSINC="-I$DPMS_INCLUDE"
3525
ac_save_cflags="$CFLAGS"
3526
CFLAGS="$CFLAGS $X_INCLUDES"
3527
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3528
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3529
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3530
AC_CHECK_DECL(DPMSCapable,
3531
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3532
[#include <X11/extensions/dpms.h>])
3533
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3534
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3535
AC_CHECK_DECL(DPMSInfo,
3536
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3537
[#include <X11/extensions/dpms.h>])
3538
CFLAGS="$ac_save_cflags"
3543
AC_DEFUN([AC_HAVE_GL],
3544
[AC_REQUIRE_CPP()dnl
3545
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3547
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3548
test -z "$GL_INCLUDE" && GL_INCLUDE=
3550
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3551
gl_test=$withval, gl_test="yes")
3552
if test "x$kde_use_qt_emb" = "xyes"; then
3553
# GL and Qt Embedded is a no-go for now.
3555
elif test "x$gl_test" = xno; then
3558
AC_MSG_CHECKING(for GL)
3559
AC_CACHE_VAL(ac_cv_have_gl,
3563
ac_save_ldflags="$LDFLAGS"
3564
ac_save_cxxflags="$CXXFLAGS"
3565
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3566
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3567
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3568
CXXFLAGS="$CFLAGS $X_INCLUDES"
3569
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3570
AC_TRY_LINK([#include <GL/gl.h>
3573
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3574
if test "x$ac_cv_have_gl" = "xno"; then
3575
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3576
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3577
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3578
CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3579
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3580
AC_TRY_LINK([#include <GL/gl.h>
3583
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3586
LDFLAGS="$ac_save_ldflags"
3587
CXXFLAGS="$ac_save_cxxflags"
3590
if test "$ac_cv_have_gl" = "no"; then
3596
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3597
if test "$GL_LDFLAGS" = ""; then
3598
if test "$ac_cv_have_gl" = "mesa"; then
3599
GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3601
GLLIB='-lGLU -lGL $(LIB_X11)'
3604
if test "$ac_cv_have_gl" = "mesa"; then
3605
GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3607
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3610
if test "$GL_INCLUDE" = ""; then
3613
GLINC="-I$GL_INCLUDE"
3615
AC_MSG_RESULT($ac_cv_have_gl)
3624
dnl shadow password and PAM magic - maintained by ossi@kde.org
3626
AC_DEFUN([KDE_PAM], [
3627
AC_REQUIRE([KDE_CHECK_LIBDL])
3631
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3632
[ if test "x$withval" = "xyes"; then
3635
elif test "x$withval" = "xno"; then
3639
pam_service=$withval
3641
], [ pam_service=kde ])
3645
if test "x$want_pam" != xno; then
3646
AC_CHECK_LIB(pam, pam_start, [
3647
AC_CHECK_HEADER(security/pam_appl.h,
3648
[ pam_header=security/pam_appl.h ],
3649
[ AC_CHECK_HEADER(pam/pam_appl.h,
3650
[ pam_header=pam/pam_appl.h ],
3652
AC_MSG_WARN([PAM detected, but no headers found!
3653
Make sure you have the necessary development packages installed.])
3659
if test -z "$pam_header"; then
3660
if test "x$want_pam" = xyes; then
3661
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3664
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3665
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3668
dnl darwin claims to be something special
3669
if test "$pam_header" = "pam/pam_appl.h"; then
3670
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3673
dnl test whether struct pam_message is const (Linux) or not (Sun)
3674
AC_MSG_CHECKING(for const pam_message)
3675
AC_EGREP_HEADER([struct pam_message], $pam_header,
3676
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3677
[AC_MSG_RESULT([const: Linux-type PAM])],
3678
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3679
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3681
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3688
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3689
AC_DEFUN([DEF_PAM_SERVICE], [
3691
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3692
[ if test "x$use_pam" = xyes; then
3693
$3_PAM_SERVICE=$withval
3695
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3696
You may want to enforce it by using --with-pam.])
3699
[ if test "x$use_pam" = xyes; then
3700
$3_PAM_SERVICE="$pam_service"
3703
if test -n "$$3_PAM_SERVICE"; then
3704
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3705
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3707
AC_SUBST($3_PAM_SERVICE)
3710
AC_DEFUN([KDE_SHADOWPASSWD], [
3711
AC_REQUIRE([KDE_PAM])
3713
AC_CHECK_LIB(shadow, getspent,
3714
[ LIBSHADOW="-lshadow"
3718
AC_CHECK_LIB(gen, getspent,
3722
[ AC_CHECK_FUNC(getspent,
3723
[ ac_use_shadow=yes ],
3724
[ ac_use_shadow=no ])
3730
AC_MSG_CHECKING([for shadow passwords])
3733
AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
3734
[ if test "x$withval" != "xno"; then
3740
use_shadow="$ac_use_shadow"
3743
if test "x$use_shadow" = xyes; then
3745
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3752
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3753
dnl this still applies, if we could use it indirectly through pam.
3754
if test "x$use_shadow" = xyes ||
3755
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3757
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3758
SETUIDFLAGS="-m 4755 -o root";;
3760
SETUIDFLAGS="-m 4755";;
3763
AC_SUBST(SETUIDFLAGS)
3767
AC_DEFUN([KDE_PASSWDLIBS], [
3768
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3769
AC_REQUIRE([KDE_PAM])
3770
AC_REQUIRE([KDE_SHADOWPASSWD])
3772
if test "x$use_pam" = "xyes"; then
3773
PASSWDLIBS="$PAMLIBS"
3775
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3778
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3779
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3780
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3781
dnl may need to read /etc/master.passwd).
3784
SETUIDFLAGS="-m 4755 -o root"
3790
AC_SUBST(PASSWDLIBS)
3793
AC_DEFUN([KDE_CHECK_LIBDL],
3795
AC_CHECK_LIB(dl, dlopen, [
3797
ac_cv_have_dlfcn=yes
3800
AC_CHECK_LIB(dld, shl_unload, [
3802
ac_cv_have_shload=yes
3808
AC_DEFUN([KDE_CHECK_DLOPEN],
3811
AC_CHECK_HEADERS(dlfcn.h dl.h)
3812
if test "$ac_cv_header_dlfcn_h" = "no"; then
3816
if test "$ac_cv_header_dl_h" = "no"; then
3817
ac_cv_have_shload=no
3820
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3822
AC_ARG_ENABLE(dlopen,
3823
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
3824
enable_dlopen=$enableval,
3827
# override the user's opinion, if we know it better ;)
3828
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3832
if test "$ac_cv_have_dlfcn" = "yes"; then
3833
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3836
if test "$ac_cv_have_shload" = "yes"; then
3837
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3840
if test "$enable_dlopen" = no ; then
3841
test -n "$1" && eval $1
3843
test -n "$2" && eval $2
3848
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
3850
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3852
AC_MSG_CHECKING([dynamic loading])
3853
eval "`egrep '^build_libtool_libs=' libtool`"
3854
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3856
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3860
AC_MSG_RESULT($dynamic_loading)
3861
if test "$dynamic_loading" = "yes"; then
3868
AC_DEFUN([KDE_ADD_INCLUDES],
3870
if test -z "$1"; then
3871
test_include="Pix.h"
3876
AC_MSG_CHECKING([for libg++ ($test_include)])
3878
AC_CACHE_VAL(kde_cv_libgpp_includes,
3880
kde_cv_libgpp_includes=no
3886
/usr/unsupported/include \
3891
if test -r "$ac_dir/$test_include"; then
3892
kde_cv_libgpp_includes=$ac_dir
3898
AC_MSG_RESULT($kde_cv_libgpp_includes)
3899
if test "$kde_cv_libgpp_includes" != "no"; then
3900
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3905
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
3909
if test -n "$PTHREAD_LIBS"; then
3910
PTHREAD_LIBS_save="$PTHREAD_LIBS"
3911
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
3912
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
3913
PTHREAD_LIBS="$PTHREAD_LIBS_save"
3916
if test -z "$LIBPTHREAD"; then
3917
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3920
AC_SUBST(LIBPTHREAD)
3923
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
3926
if test -z "$LIBPTHREAD"; then
3927
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
3930
AH_VERBATIM(__svr_define, [
3931
#if defined(__SVR4) && !defined(__svr4__)
3937
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3938
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3941
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
3944
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3945
LIBPTHREAD="$LIBPTHREAD -lc_r"
3947
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3948
if test "$CXX" = "KCC"; then
3949
CXXFLAGS="$CXXFLAGS --thread_safe"
3950
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3956
AC_SUBST(USE_THREADS)
3957
AC_SUBST(LIBPTHREAD)
3960
AC_DEFUN([KDE_CHECK_THREADING],
3962
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3963
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3964
dnl default is yes if libpthread is found and no if no libpthread is available
3965
if test -z "$LIBPTHREAD"; then
3966
if test -z "$USE_THREADS"; then
3967
kde_check_threading_default=no
3969
kde_check_threading_default=yes
3972
kde_check_threading_default=yes
3974
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
3975
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3976
if test "x$kde_use_threading" = "xyes"; then
3977
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3981
AC_DEFUN([KDE_TRY_LINK_PYTHON],
3983
if test "$kde_python_link_found" = no; then
3985
if test "$1" = normal; then
3986
AC_MSG_CHECKING(if a Python application links)
3988
AC_MSG_CHECKING(if Python depends on $2)
3991
AC_CACHE_VAL(kde_cv_try_link_python_$1,
3993
kde_save_cflags="$CFLAGS"
3994
CFLAGS="$CFLAGS $PYTHONINC"
3995
kde_save_libs="$LIBS"
3996
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
3997
kde_save_ldflags="$LDFLAGS"
3998
LDFLAGS="$LDFLAGS $PYTHONLIB"
4004
PySys_SetArgv(1, 0);
4006
[kde_cv_try_link_python_$1=yes],
4007
[kde_cv_try_link_python_$1=no]
4009
CFLAGS="$kde_save_cflags"
4010
LIBS="$kde_save_libs"
4011
LDFLAGS="$kde_save_ldflags"
4014
if test "$kde_cv_try_link_python_$1" = "yes"; then
4016
kde_python_link_found=yes
4017
if test ! "$1" = normal; then
4018
LIBPYTHON="$LIBPYTHON $2"
4030
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4032
AC_MSG_CHECKING([for Python directory])
4034
AC_CACHE_VAL(kde_cv_pythondir,
4036
if test -z "$PYTHONDIR"; then
4037
kde_cv_pythondir=/usr/local
4039
kde_cv_pythondir="$PYTHONDIR"
4043
AC_ARG_WITH(pythondir,
4044
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4046
ac_python_dir=$withval
4047
], ac_python_dir=$kde_cv_pythondir
4050
AC_MSG_RESULT($ac_python_dir)
4053
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4055
AC_REQUIRE([KDE_CHECK_LIBDL])
4056
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4057
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4059
if test -z "$1"; then
4065
AC_MSG_CHECKING([for Python$version])
4067
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4068
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4069
if test ! -r $python_incdir/Python.h; then
4070
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4071
python_incdir=$python_incdir/python$version
4072
if test ! -r $python_incdir/Python.h; then
4077
PYTHONINC=-I$python_incdir
4079
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4080
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4081
if test ! -r $python_libdir/libpython$version.so; then
4082
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4083
if test ! -r $python_libdir/libpython$version.a; then
4084
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4085
python_libdir=$python_libdir/python$version/config
4086
if test ! -r $python_libdir/libpython$version.a; then
4092
PYTHONLIB=-L$python_libdir
4093
kde_orig_LIBPYTHON=$LIBPYTHON
4094
if test -z "$LIBPYTHON"; then
4095
LIBPYTHON=-lpython$version
4098
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4099
python_moddir=$python_moddir/python$version
4100
if test ! -r $python_moddir/copy.py; then
4104
PYTHONMODDIR=$python_moddir
4106
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4108
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4109
LIBPYTHON=$kde_orig_LIBPYTHON
4110
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4111
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4114
dnl Note: this test is very weak
4115
kde_python_link_found=no
4116
KDE_TRY_LINK_PYTHON(normal)
4117
KDE_TRY_LINK_PYTHON(m, -lm)
4118
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4119
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4120
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4121
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4122
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4123
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4124
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4125
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4126
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4127
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4128
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4129
[AC_MSG_WARN([it seems, Python depends on another library.
4130
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4131
and contact the authors to let them know about this problem])
4134
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4138
AC_SUBST(PYTHONMODDIR)
4139
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4145
AC_DEFUN([KDE_CHECK_PYTHON],
4147
KDE_CHECK_PYTHON_INTERN("2.3",
4148
[KDE_CHECK_PYTHON_INTERN("2.2",
4149
[KDE_CHECK_PYTHON_INTERN("2.1",
4150
[KDE_CHECK_PYTHON_INTERN("2.0",
4151
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4157
AC_DEFUN([KDE_CHECK_STL],
4161
ac_save_CXXFLAGS="$CXXFLAGS"
4162
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4164
AC_MSG_CHECKING([if C++ programs can be compiled])
4165
AC_CACHE_VAL(kde_cv_stl_works,
4169
using namespace std;
4171
string astring="Hallo Welt.";
4172
astring.erase(0, 6); // now astring is "Welt"
4174
], kde_cv_stl_works=yes,
4175
kde_cv_stl_works=no)
4178
AC_MSG_RESULT($kde_cv_stl_works)
4180
if test "$kde_cv_stl_works" = "yes"; then
4182
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4184
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4185
Check config.log for details - if you're using a Linux distribution you might miss
4186
a package named similiar to libstd++-dev.])
4189
CXXFLAGS="$ac_save_CXXFLAGS"
4193
AC_DEFUN([AC_FIND_QIMGIO],
4194
[AC_REQUIRE([AC_FIND_JPEG])
4195
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4196
AC_MSG_CHECKING([for qimgio])
4197
AC_CACHE_VAL(ac_cv_lib_qimgio,
4201
ac_save_LIBS="$LIBS"
4202
ac_save_CXXFLAGS="$CXXFLAGS"
4203
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4204
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4207
#include <qimageio.h>
4208
#include <qstring.h>
4210
QString t = "hallo";
4215
ac_cv_lib_qimgio=yes,
4216
ac_cv_lib_qimgio=no,
4217
ac_cv_lib_qimgio=no)
4218
LIBS="$ac_save_LIBS"
4219
CXXFLAGS="$ac_save_CXXFLAGS"
4222
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4223
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4225
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4228
AC_MSG_RESULT(not found)
4232
AC_DEFUN([AM_DISABLE_LIBRARIES],
4234
AC_PROVIDE([AM_ENABLE_STATIC])
4235
AC_PROVIDE([AM_ENABLE_SHARED])
4241
AC_DEFUN([AC_CHECK_UTMP_FILE],
4243
AC_MSG_CHECKING([for utmp file])
4245
AC_CACHE_VAL(kde_cv_utmp_file,
4256
if test -r "$ac_file"; then
4257
kde_cv_utmp_file=$ac_file
4263
if test "$kde_cv_utmp_file" != "no"; then
4264
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4266
AC_MSG_RESULT($kde_cv_utmp_file)
4269
AC_MSG_RESULT([non found])
4274
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4277
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4279
if test ! -s $srcdir/subdirs; then
4280
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4282
files=`cd $srcdir && ls -1`
4283
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4285
echo $i >> $srcdir/subdirs
4290
if test -s $srcdir/inst-apps; then
4291
ac_topsubdirs="`cat $srcdir/inst-apps`"
4292
elif test -s $srcdir/subdirs; then
4293
ac_topsubdirs="`cat $srcdir/subdirs`"
4296
for i in $ac_topsubdirs; do
4297
AC_MSG_CHECKING([if $i should be compiled])
4298
if test -d $srcdir/$i; then
4300
for j in $DO_NOT_COMPILE; do
4301
if test $i = $j; then
4308
AC_MSG_RESULT($install_it)
4309
vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4310
if test $install_it = "yes"; then
4311
TOPSUBDIRS="$TOPSUBDIRS $i"
4312
eval "$vari""_SUBDIR_included=yes"
4314
eval "$vari""_SUBDIR_included=no"
4318
AC_SUBST(TOPSUBDIRS)
4321
AC_DEFUN([KDE_CHECK_NAMESPACES],
4323
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4337
int Foo::Bar::i = 1;
4340
AC_DEFINE(HAVE_NAMESPACES)
4347
dnl ------------------------------------------------------------------------
4348
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4349
dnl ------------------------------------------------------------------------
4351
AC_DEFUN([AC_CHECK_S_ISSOCK],
4353
AC_MSG_CHECKING(for S_ISSOCK)
4354
AC_CACHE_VAL(ac_cv_have_s_issock,
4358
#include <sys/stat.h>
4362
int b = S_ISSOCK( buff.st_mode );
4364
ac_cv_have_s_issock=yes,
4365
ac_cv_have_s_issock=no)
4367
AC_MSG_RESULT($ac_cv_have_s_issock)
4368
if test "$ac_cv_have_s_issock" = "yes"; then
4369
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4372
AH_VERBATIM(_ISSOCK,
4374
#ifndef HAVE_S_ISSOCK
4375
#define HAVE_S_ISSOCK
4376
#define S_ISSOCK(mode) (1==0)
4382
dnl ------------------------------------------------------------------------
4383
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4384
dnl ------------------------------------------------------------------------
4386
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4388
AC_MSG_CHECKING(for MAXPATHLEN)
4389
AC_CACHE_VAL(ac_cv_maxpathlen,
4391
cat > conftest.$ac_ext <<EOF
4393
# include <stdlib.h>
4396
#include <sys/param.h>
4398
#define MAXPATHLEN 1024
4401
KDE_HELLO MAXPATHLEN
4405
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4407
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4408
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4410
ac_cv_maxpathlen=1024
4416
AC_MSG_RESULT($ac_cv_maxpathlen)
4417
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4420
AC_DEFUN([KDE_CHECK_HEADER],
4423
kde_safe_cppflags=$CPPFLAGS
4424
CPPFLAGS="$CPPFLAGS $all_includes"
4426
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4427
CPPFLAGS=$kde_safe_cppflags
4431
AC_DEFUN([KDE_CHECK_HEADERS],
4433
AH_CHECK_HEADERS([$1])
4435
kde_safe_cppflags=$CPPFLAGS
4436
CPPFLAGS="$CPPFLAGS $all_includes"
4438
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4439
CPPFLAGS=$kde_safe_cppflags
4443
AC_DEFUN([KDE_FAST_CONFIGURE],
4445
dnl makes configure fast (needs perl)
4446
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4447
with_fast_perl=$enableval, with_fast_perl=yes)
4450
AC_DEFUN([KDE_CONF_FILES],
4453
if test -f $srcdir/configure.files ; then
4454
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4457
if test -n "$val" ; then
4459
CONF_FILES="$CONF_FILES $i"
4462
AC_SUBST(CONF_FILES)
4465
AC_DEFUN([KDE_SET_PREFIX],
4468
dnl make $KDEDIR the default for the installation
4469
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4471
if test "x$prefix" = "xNONE"; then
4472
prefix=$ac_default_prefix
4473
ac_configure_args="$ac_configure_args --prefix=$prefix"
4475
# And delete superfluous '/' to make compares easier
4476
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4477
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4482
pushdef([AC_PROG_INSTALL],
4484
dnl our own version, testing for a -p flag
4485
popdef([AC_PROG_INSTALL])
4486
dnl as AC_PROG_INSTALL works as it works we first have
4487
dnl to save if the user didn't specify INSTALL, as the
4488
dnl autoconf one overwrites INSTALL and we have no chance to find
4490
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4491
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4492
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4495
if test -z "$kde_save_INSTALL_given" ; then
4496
# OK, user hasn't given any INSTALL, autoconf found one for us
4497
# now we test, if it supports the -p flag
4498
AC_MSG_CHECKING(for -p flag to install)
4499
rm -f confinst.$$.* > /dev/null 2>&1
4500
echo "Testtest" > confinst.$$.orig
4502
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4503
if test -f confinst.$$.new ; then
4504
# OK, -p seems to do no harm to install
4505
INSTALL="${INSTALL} -p"
4510
AC_MSG_RESULT($ac_res)
4512
dnl the following tries to resolve some signs and wonders coming up
4513
dnl with different autoconf/automake versions
4515
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4516
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4517
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4518
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4519
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4520
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4521
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4522
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4523
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4524
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4525
dnl automake (due to broken Makefile.am or whatever) to install programs,
4526
dnl and so does not see the -s flag in automake > 1.4
4527
dnl to clean up that mess we:
4528
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4529
dnl which cleans KDE's program with automake > 1.4;
4530
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4531
dnl with automake<=1.4
4532
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4533
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4535
dnl And to all this comes, that I even can't write in comments variable
4536
dnl names used by automake, because it is so stupid to think I wanted to
4537
dnl _use_ them, therefor I have written A_M_... instead of AM_
4538
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4540
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4541
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4543
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4544
INSTALL_SCRIPT='${INSTALL}'
4548
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4550
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4551
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4554
pushdef([AC_LANG_CPLUSPLUS],
4555
[popdef([AC_LANG_CPLUSPLUS])
4559
AC_DEFUN([KDE_CHECK_LONG_LONG],
4561
AC_MSG_CHECKING(for long long)
4562
AC_CACHE_VAL(kde_cv_c_long_long,
4570
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4573
AC_MSG_RESULT($kde_cv_c_long_long)
4574
if test "$kde_cv_c_long_long" = yes; then
4575
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4579
AC_DEFUN([KDE_CHECK_LIB],
4581
kde_save_LDFLAGS="$LDFLAGS"
4582
dnl AC_CHECK_LIB modifies LIBS, so save it here
4583
kde_save_LIBS="$LIBS"
4584
LDFLAGS="$LDFLAGS $all_libraries"
4586
aix*) LDFLAGS="-brtl $LDFLAGS"
4587
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4590
AC_CHECK_LIB($1, $2, $3, $4, $5)
4591
LDFLAGS="$kde_save_LDFLAGS"
4592
LIBS="$kde_save_LIBS"
4595
AC_DEFUN([KDE_JAVA_PREFIX],
4598
base=`basename "$1"`
4599
list=`ls -1 $dir 2> /dev/null`
4600
for entry in $list; do
4601
if test -d $dir/$entry/bin; then
4604
javadirs="$javadirs $dir/$entry/bin"
4607
elif test -d $dir/$entry/jre/bin; then
4610
javadirs="$javadirs $dir/$entry/jre/bin"
4617
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4618
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4622
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
4623
[ ac_java_dir=$withval
4627
AC_MSG_CHECKING([for Java])
4629
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4630
if test "x$ac_java_dir" = "xno"; then
4632
kde_java_includedir=no
4633
kde_java_libjvmdir=no
4634
kde_java_libgcjdir=no
4635
kde_java_libhpidir=no
4637
if test "x$ac_java_dir" = "x"; then
4640
dnl No option set -> collect list of candidate paths
4641
if test -n "$JAVA_HOME"; then
4642
KDE_JAVA_PREFIX($JAVA_HOME)
4644
KDE_JAVA_PREFIX(/usr/j2se)
4645
KDE_JAVA_PREFIX(/usr/lib/j2se)
4646
KDE_JAVA_PREFIX(/usr/j*dk*)
4647
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4648
KDE_JAVA_PREFIX(/opt/j*sdk*)
4649
KDE_JAVA_PREFIX(/usr/lib/java*)
4650
KDE_JAVA_PREFIX(/usr/java*)
4651
KDE_JAVA_PREFIX(/usr/java/j*dk*)
4652
KDE_JAVA_PREFIX(/usr/java/j*re*)
4653
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4654
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4655
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4656
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4657
KDE_JAVA_PREFIX(/opt/java*)
4662
for dir in $PATH; do
4663
if test -d "$dir"; then
4664
javadirs="$javadirs $dir"
4670
dnl Now javadirs contains a list of paths that exist, all ending with bin/
4671
for dir in $javadirs; do
4672
dnl Check for the java executable
4673
if test -x "$dir/java"; then
4674
dnl And also check for a libjvm.so somewhere under there
4675
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
4676
if test "$dir" != "/usr/bin"; then
4677
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4678
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4679
jredirs="$jredirs $dir"
4684
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
4688
for dir in $jredirs; do
4690
kde_java_bindir=$dir
4691
if test -x "$dir/javac"; then
4697
if test -n "$JAVAC"; then
4698
dnl this substitution might not work - well, we test for jni.h below
4699
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4701
kde_java_includedir=no
4704
dnl config option set
4705
kde_java_bindir=$ac_java_dir/bin
4706
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4707
kde_java_includedir=no
4709
kde_java_includedir=$ac_java_dir/include
4714
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4715
if test "x$kde_java_bindir" != "xno"; then
4717
dnl Look for libjvm.so
4718
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4719
dnl Look for libgcj.so
4720
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
4721
dnl Look for libhpi.so and avoid green threads
4722
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4724
dnl Now check everything's fine under there
4725
dnl the include dir is our flag for having the JDK
4726
if test -d "$kde_java_includedir"; then
4727
if test ! -x "$kde_java_bindir/javac"; then
4728
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4730
if test ! -x "$kde_java_bindir/javah"; then
4731
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4733
if test ! -x "$kde_java_bindir/jar"; then
4734
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4736
if test ! -r "$kde_java_includedir/jni.h"; then
4737
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4740
jni_includes="-I$kde_java_includedir"
4741
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4742
dnl and under linux here..
4744
dnl not needed for gcj
4746
if test "x$kde_java_libgcjdir" = "x"; then
4747
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4748
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4749
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4757
if test "x$kde_java_libgcjdir" = "x"; then
4758
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4759
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4762
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
4763
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
4767
if test ! -x "$kde_java_bindir/java"; then
4768
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4771
dnl not needed for gcj compile
4773
if test "x$kde_java_libgcjdir" = "x"; then
4774
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4775
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4779
if test -n "$jni_includes"; then
4780
dnl Check for JNI version
4783
ac_cxxflags_safe="$CXXFLAGS"
4784
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4790
#ifndef JNI_VERSION_1_2
4793
],[ kde_jni_works=yes ],
4794
[ kde_jni_works=no ])
4796
if test $kde_jni_works = no; then
4797
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4798
You need to have Java Development Kit (JDK) version 1.2.
4800
Use --with-java to specify another location.
4801
Use --without-java to configure without java support.
4802
Or download a newer JDK and try again.
4803
See e.g. http://java.sun.com/products/jdk/1.2 ])
4806
CXXFLAGS="$ac_cxxflags_safe"
4809
dnl All tests ok, inform and subst the variables
4811
JAVAC=$kde_java_bindir/javac
4812
JAVAH=$kde_java_bindir/javah
4813
JAR=$kde_java_bindir/jar
4814
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4815
if test "x$kde_java_libgcjdir" = "x"; then
4816
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4818
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
4820
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4823
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4824
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4826
elif test -d "/Library/Java/Home"; then
4827
kde_java_bindir="/Library/Java/Home/bin"
4828
jni_includes="-I/Library/Java/Home/include"
4830
JAVAC=$kde_java_bindir/javac
4831
JAVAH=$kde_java_bindir/javah
4832
JAR=$kde_java_bindir/jar
4833
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
4835
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4836
AC_MSG_RESULT([Apple Java Framework])
4838
AC_MSG_RESULT([none found])
4845
AC_SUBST(jni_includes)
4847
# for backward compat
4848
kde_cv_java_includedir=$kde_java_includedir
4849
kde_cv_java_bindir=$kde_java_bindir
4852
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4853
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4854
dnl big packages, m4_foreach is dog-slow. So use our own version of
4855
dnl it. (matz@kde.org)
4856
m4_define([mm_foreach],
4857
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4858
m4_define([mm_car], [[$1]])
4859
m4_define([mm_car2], [[$@]])
4860
m4_define([_mm_foreach],
4861
[m4_if(m4_quote($2), [], [],
4862
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
4863
mm_car2(m4_shift($2)),
4865
m4_define([AC_FOREACH],
4866
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4868
AC_DEFUN([KDE_NEED_FLEX],
4871
LIBS="$LIBS $USER_LDFLAGS"
4874
if test -z "$LEXLIB"; then
4875
AC_MSG_ERROR([You need to have flex installed.])
4880
AC_DEFUN([AC_PATH_QTOPIA],
4882
dnl TODO: use AC_CACHE_VAL
4884
if test -z "$1"; then
4889
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4890
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4891
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4894
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4895
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4897
AC_REQUIRE([AC_PATH_QT])
4899
AC_MSG_CHECKING([for Qtopia])
4902
AC_SUBST(LIB_QTOPIA)
4904
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4908
AC_ARG_WITH(qtopia-dir,
4909
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
4910
[ ac_qtopia_incdir="$withval"/include] )
4913
for dir in $kde_qtopia_dirs; do
4914
qtopia_incdirs="$qtopia_incdirs $dir/include"
4917
if test ! "$ac_qtopia_incdir" = "NO"; then
4918
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4922
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4923
ac_qtopia_incdir="$qtopia_incdir"
4925
if test -z "$qtopia_incdir"; then
4926
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4929
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4930
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4931
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4933
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4934
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4935
if test "$qtopia_ver" -lt "$qtopia_minver"; then
4936
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4943
ac_cxxflags_safe="$CXXFLAGS"
4944
ac_ldflags_safe="$LDFLAGS"
4945
ac_libs_safe="$LIBS"
4947
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4948
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4949
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4951
cat > conftest.$ac_ext <<EOF
4952
#include "confdefs.h"
4953
#include <qpe/qpeapplication.h>
4954
#include <qpe/version.h>
4956
int main( int argc, char **argv )
4958
QPEApplication app( argc, argv );
4963
if AC_TRY_EVAL(ac_link) && test -s conftest; then
4967
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4968
the end of config.log])
4971
CXXFLAGS="$ac_cxxflags_safe"
4972
LDFLAGS="$ac_ldflags_safe"
4973
LIBS="$ac_libs_safe"
4977
QTOPIA_INCLUDES="-I$qtopia_incdir"
4978
AC_SUBST(QTOPIA_INCLUDES)
4980
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
4984
AC_DEFUN([KDE_INIT_DOXYGEN],
4986
AC_MSG_CHECKING([for Qt docs])
4988
if test "${with_qt_dir+set}" = set; then
4989
kde_qtdir="$with_qt_dir"
4992
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)
4993
AC_MSG_RESULT($QTDOCDIR)
4997
KDE_FIND_PATH(dot, DOT, [], [])
4998
if test -n "$DOT"; then
5003
AC_SUBST(KDE_HAVE_DOT)
5004
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5007
DOXYGEN_PROJECT_NAME="$1"
5008
DOXYGEN_PROJECT_NUMBER="$2"
5009
AC_SUBST(DOXYGEN_PROJECT_NAME)
5010
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5013
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5016
AC_SUBST(KDE_HAS_DOXYGEN)
5021
AC_DEFUN([AC_FIND_BZIP2],
5023
AC_MSG_CHECKING([for bzDecompress in libbz2])
5024
AC_CACHE_VAL(ac_cv_lib_bzip2,
5028
kde_save_LIBS="$LIBS"
5029
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5030
kde_save_CXXFLAGS="$CXXFLAGS"
5031
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5037
[ bz_stream s; (void) bzDecompress(&s); ],
5038
eval "ac_cv_lib_bzip2='-lbz2'",
5039
eval "ac_cv_lib_bzip2=no")
5040
LIBS="$kde_save_LIBS"
5041
CXXFLAGS="$kde_save_CXXFLAGS"
5044
AC_MSG_RESULT($ac_cv_lib_bzip2)
5046
if test ! "$ac_cv_lib_bzip2" = no; then
5049
LIBBZ2="$ac_cv_lib_bzip2"
5056
KDE_CHECK_COMPILER_FLAG(shared, [
5057
ld_shared_flag="-shared"
5059
KDE_CHECK_COMPILER_FLAG(fPIC, [
5060
cxx_shared_flag="-fPIC"
5063
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5064
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5068
kde_save_LIBS="$LIBS"
5069
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5070
kde_save_CXXFLAGS="$CXXFLAGS"
5071
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5078
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5079
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5080
eval "ac_cv_lib_bzip2_prefix=no")
5081
LIBS="$kde_save_LIBS"
5082
CXXFLAGS="$kde_save_CXXFLAGS"
5086
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5088
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5091
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5094
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5095
dnl else, we just ignore this
5099
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5102
dnl ------------------------------------------------------------------------
5103
dnl Try to find the SSL headers and libraries.
5104
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5105
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5106
dnl ------------------------------------------------------------------------
5108
AC_DEFUN([KDE_CHECK_SSL],
5110
LIBSSL="-lssl -lcrypto"
5111
AC_REQUIRE([KDE_CHECK_LIB64])
5113
ac_ssl_includes=NO ac_ssl_libraries=NO
5116
AC_ARG_WITH(ssl-dir,
5117
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5118
[ ac_ssl_includes="$withval"/include
5119
ac_ssl_libraries="$withval"/lib$kdelibsuff
5124
AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5125
[want_ssl=$withval])
5127
if test $want_ssl = yes; then
5129
AC_MSG_CHECKING(for OpenSSL)
5131
AC_CACHE_VAL(ac_cv_have_ssl,
5132
[#try to guess OpenSSL locations
5134
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5135
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5136
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5137
ac_ssl_includes="$ssl_incdir"
5139
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"
5140
if test ! "$ac_ssl_libraries" = "NO"; then
5141
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5146
for dir in $ssl_libdirs; do
5147
try="ls -1 $dir/libssl*"
5148
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5151
ac_ssl_libraries="$ssl_libdir"
5153
ac_ldflags_safe="$LDFLAGS"
5154
ac_libs_safe="$LIBS"
5156
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5157
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5159
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5165
LDFLAGS="$ac_ldflags_safe"
5166
LIBS="$ac_libs_safe"
5168
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5176
eval "$ac_cv_have_ssl"
5178
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5180
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5181
AC_MSG_RESULT($ac_ssl_rsaref)
5183
AC_MSG_CHECKING([for easter eggs])
5184
AC_MSG_RESULT([none found])
5190
if test "$have_ssl" = yes; then
5191
AC_MSG_CHECKING(for OpenSSL version)
5192
dnl Check for SSL version
5193
AC_CACHE_VAL(ac_cv_ssl_version,
5196
cat >conftest.$ac_ext <<EOF
5197
#include <openssl/opensslv.h>
5201
#ifndef OPENSSL_VERSION_NUMBER
5202
printf("ssl_version=\\"error\\"\n");
5204
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5205
printf("ssl_version=\\"old\\"\n");
5207
printf("ssl_version=\\"ok\\"\n");
5213
ac_save_CPPFLAGS=$CPPFLAGS
5214
if test "$ac_ssl_includes" != "/usr/include"; then
5215
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5218
if AC_TRY_EVAL(ac_link); then
5220
if eval `./conftest 2>&5`; then
5221
if test $ssl_version = error; then
5222
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5224
if test $ssl_version = old; then
5225
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5229
ac_cv_ssl_version="ssl_version=$ssl_version"
5231
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5232
Check config.log, and if you can't figure it out, send a mail to
5233
David Faure <faure@kde.org>, attaching your config.log])
5237
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5238
Check config.log, and if you can't figure it out, send a mail to
5239
David Faure <faure@kde.org>, attaching your config.log])
5241
CPPFLAGS=$ac_save_CPPFLAGS
5245
eval "$ac_cv_ssl_version"
5246
AC_MSG_RESULT($ssl_version)
5249
if test "$have_ssl" != yes; then
5252
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5253
ac_cv_have_ssl="have_ssl=yes \
5254
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5257
ssl_libraries="$ac_ssl_libraries"
5258
ssl_includes="$ac_ssl_includes"
5260
if test "$ac_ssl_rsaref" = yes; then
5261
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5264
if test $ssl_version = "old"; then
5265
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5271
if test "$ssl_includes" = "/usr/include"; then
5272
if test -f /usr/kerberos/include/krb5.h; then
5273
SSL_INCLUDES="-I/usr/kerberos/include"
5275
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5276
SSL_INCLUDES="-I$ssl_includes"
5279
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5282
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5285
AC_SUBST(SSL_INCLUDES)
5286
AC_SUBST(SSL_LDFLAGS)
5290
AC_DEFUN([KDE_CHECK_STRLCPY],
5292
AC_REQUIRE([AC_CHECK_STRLCAT])
5293
AC_REQUIRE([AC_CHECK_STRLCPY])
5294
AC_CHECK_SIZEOF(size_t)
5295
AC_CHECK_SIZEOF(unsigned long)
5297
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5299
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5302
],AC_MSG_RESULT([yes]),[
5305
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5306
does not apply. Please mail kde-devel@kde.org with a description of your system!
5311
AC_DEFUN([KDE_CHECK_BINUTILS],
5313
AC_MSG_CHECKING([if ld supports unversioned version maps])
5315
kde_save_LDFLAGS="$LDFLAGS"
5316
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5317
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5318
AC_TRY_LINK([int foo;],
5320
#ifdef __INTEL_COMPILER
5321
icc apparently does not support libtools version-info and version-script
5322
at the same time. Dunno where the bug is, but until somebody figured out,
5323
better disable the optional version scripts.
5327
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5328
LDFLAGS="$kde_save_LDFLAGS"
5330
AM_CONDITIONAL(include_VERSION_SCRIPT,
5331
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5333
AC_MSG_RESULT($kde_supports_versionmaps)
5336
AC_DEFUN([AM_PROG_OBJC],[
5337
AC_CHECK_PROGS(OBJC, gcc, gcc)
5338
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5339
if test "x${OBJCFLAGS-unset}" = xunset; then
5343
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5346
AC_DEFUN([KDE_CHECK_PERL],
5348
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5349
AC_MSG_ERROR([No Perl found in your $PATH.
5350
We need perl to generate some code.])
5354
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5355
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5356
## Free Software Foundation, Inc.
5357
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5359
## This program is free software; you can redistribute it and/or modify
5360
## it under the terms of the GNU General Public License as published by
5361
## the Free Software Foundation; either version 2 of the License, or
5362
## (at your option) any later version.
5364
## This program is distributed in the hope that it will be useful, but
5365
## WITHOUT ANY WARRANTY; without even the implied warranty of
5366
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5367
## General Public License for more details.
5369
## You should have received a copy of the GNU General Public License
5370
## along with this program; if not, write to the Free Software
5371
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5373
## As a special exception to the GNU General Public License, if you
5374
## distribute this file as part of a program that contains a
5375
## configuration script generated by Autoconf, you may include it under
5376
## the same distribution terms that you use for the rest of that program.
5378
# serial 47 AC_PROG_LIBTOOL
5381
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5382
# -----------------------------------------------------------
5383
# If this macro is not defined by Autoconf, define it here.
5384
m4_ifdef([AC_PROVIDE_IFELSE],
5386
[m4_define([AC_PROVIDE_IFELSE],
5387
[m4_ifdef([AC_PROVIDE_$1],
5393
AC_DEFUN([AC_PROG_LIBTOOL],
5394
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5395
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5396
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5397
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5399
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5401
dnl And a similar setup for Fortran 77 support
5402
AC_PROVIDE_IFELSE([AC_PROG_F77],
5404
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5407
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5408
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5409
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5410
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5412
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5414
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5416
[ifdef([AC_PROG_GCJ],
5417
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5418
ifdef([A][M_PROG_GCJ],
5419
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5420
ifdef([LT_AC_PROG_GCJ],
5421
[define([LT_AC_PROG_GCJ],
5422
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5423
])])# AC_PROG_LIBTOOL
5428
AC_DEFUN([_AC_PROG_LIBTOOL],
5429
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5430
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5431
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5432
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5434
# This can be used to rebuild libtool when needed
5435
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5437
# Always use our own libtool.
5438
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5439
AC_SUBST(LIBTOOL)dnl
5441
# Prevent multiple expansion
5442
define([AC_PROG_LIBTOOL], [])
5443
])# _AC_PROG_LIBTOOL
5448
AC_DEFUN([AC_LIBTOOL_SETUP],
5450
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5451
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5452
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5453
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5454
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5455
AC_REQUIRE([AC_PROG_CC])dnl
5456
AC_REQUIRE([AC_PROG_LD])dnl
5457
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5458
AC_REQUIRE([AC_PROG_NM])dnl
5460
AC_REQUIRE([AC_PROG_LN_S])dnl
5461
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5462
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5463
AC_REQUIRE([AC_OBJEXT])dnl
5464
AC_REQUIRE([AC_EXEEXT])dnl
5467
AC_LIBTOOL_SYS_MAX_CMD_LEN
5468
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5471
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5472
_LT_AC_PROG_ECHO_BACKSLASH
5476
# AIX sometimes has problems with the GCC collect2 program. For some
5477
# reason, if we set the COLLECT_NAMES environment variable, the problems
5478
# vanish in a puff of smoke.
5479
if test "X${COLLECT_NAMES+set}" != Xset; then
5481
export COLLECT_NAMES
5486
# Sed substitution that helps us do robust quoting. It backslashifies
5487
# metacharacters that are still active within double-quoted strings.
5488
Xsed='sed -e s/^X//'
5489
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5491
# Same as above, but do not quote variable references.
5492
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5494
# Sed substitution to delay expansion of an escaped shell variable in a
5495
# double_quote_subst'ed string.
5496
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5498
# Sed substitution to avoid accidental globbing in evaled expressions
5499
no_glob_subst='s/\*/\\\*/g'
5505
default_ofile=libtool
5506
can_build_shared=yes
5508
# All known linkers require a `.a' archive for static linking (except M$VC,
5509
# which needs '.lib').
5511
ltmain="$ac_aux_dir/ltmain.sh"
5512
ofile="$default_ofile"
5513
with_gnu_ld="$lt_cv_prog_gnu_ld"
5515
AC_CHECK_TOOL(AR, ar, false)
5516
AC_CHECK_TOOL(RANLIB, ranlib, :)
5517
AC_CHECK_TOOL(STRIP, strip, :)
5520
old_CFLAGS="$CFLAGS"
5522
# Set sane defaults for various variables
5523
test -z "$AR" && AR=ar
5524
test -z "$AR_FLAGS" && AR_FLAGS=cru
5525
test -z "$AS" && AS=as
5526
test -z "$CC" && CC=cc
5527
test -z "$LTCC" && LTCC=$CC
5528
test -z "$DLLTOOL" && DLLTOOL=dlltool
5529
test -z "$LD" && LD=ld
5530
test -z "$LN_S" && LN_S="ln -s"
5531
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5532
test -z "$NM" && NM=nm
5533
test -z "$SED" && SED=sed
5534
test -z "$OBJDUMP" && OBJDUMP=objdump
5535
test -z "$RANLIB" && RANLIB=:
5536
test -z "$STRIP" && STRIP=:
5537
test -z "$ac_objext" && ac_objext=o
5539
# Determine commands to create old-style static archives.
5540
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5541
old_postinstall_cmds='chmod 644 $oldlib'
5542
old_postuninstall_cmds=
5544
if test -n "$RANLIB"; then
5547
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5550
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5553
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5556
# Only perform the check for file, if the check method requires it
5557
case $deplibs_check_method in
5559
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5565
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5566
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5567
enable_win32_dll=yes, enable_win32_dll=no)
5569
AC_ARG_ENABLE([libtool-lock],
5570
[AC_HELP_STRING([--disable-libtool-lock],
5571
[avoid locking (might break parallel builds)])])
5572
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5575
[AC_HELP_STRING([--with-pic],
5576
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5577
[pic_mode="$withval"],
5579
test -z "$pic_mode" && pic_mode=default
5581
# Use C for the default configuration in the libtool script
5583
AC_LIBTOOL_LANG_C_CONFIG
5585
])# AC_LIBTOOL_SETUP
5588
# _LT_AC_SYS_COMPILER
5589
# -------------------
5590
AC_DEFUN([_LT_AC_SYS_COMPILER],
5591
[AC_REQUIRE([AC_PROG_CC])dnl
5593
# If no C compiler was specified, use CC.
5596
# Allow CC to be a program name with arguments.
5598
])# _LT_AC_SYS_COMPILER
5601
# _LT_AC_SYS_LIBPATH_AIX
5602
# ----------------------
5603
# Links a minimal program and checks the executable
5604
# for the system default hardcoded library path. In most cases,
5605
# this is /usr/lib:/lib, but when the MPI compilers are used
5606
# the location of the communication and MPI libs are included too.
5607
# If we don't find anything, use the default library path according
5608
# to the aix ld manual.
5609
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5610
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5611
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5613
# Check for a 64-bit object if we didn't find anything.
5614
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; }
5616
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5617
])# _LT_AC_SYS_LIBPATH_AIX
5620
# _LT_AC_SHELL_INIT(ARG)
5621
# ----------------------
5622
AC_DEFUN([_LT_AC_SHELL_INIT],
5623
[ifdef([AC_DIVERSION_NOTICE],
5624
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5625
[AC_DIVERT_PUSH(NOTICE)])
5628
])# _LT_AC_SHELL_INIT
5631
# _LT_AC_PROG_ECHO_BACKSLASH
5632
# --------------------------
5633
# Add some code to the start of the generated configure script which
5634
# will find an echo command which doesn't interpret backslashes.
5635
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5636
[_LT_AC_SHELL_INIT([
5637
# Check that we are running under the correct shell.
5638
SHELL=${CONFIG_SHELL-/bin/sh}
5642
# Remove one level of quotation (which was required for Make).
5643
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5648
if test "X[$]1" = X--no-reexec; then
5649
# Discard the --no-reexec flag, and continue.
5651
elif test "X[$]1" = X--fallback-echo; then
5652
# Avoid inline document here, it may be left over
5654
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
5655
# Yippee, $echo works!
5658
# Restart under the correct shell.
5659
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5662
if test "X[$]1" = X--fallback-echo; then
5663
# used as fallback echo
5671
# The HP-UX ksh and POSIX shell print the target directory to stdout
5673
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5675
if test -z "$ECHO"; then
5676
if test "X${echo_test_string+set}" != Xset; then
5677
# find a string as large as possible, as long as the shell can cope with it
5678
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5679
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5680
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5681
echo_test_string="`eval $cmd`" &&
5682
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5689
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5690
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5691
test "X$echo_testing_string" = "X$echo_test_string"; then
5694
# The Solaris, AIX, and Digital Unix default echo programs unquote
5695
# backslashes. This makes it impossible to quote backslashes using
5696
# echo "$something" | sed 's/\\/\\\\/g'
5698
# So, first we look for a working echo in the user's PATH.
5700
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5701
for dir in $PATH /usr/ucb; do
5703
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5704
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5705
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5706
test "X$echo_testing_string" = "X$echo_test_string"; then
5713
if test "X$echo" = Xecho; then
5714
# We didn't find a better echo, so look for alternatives.
5715
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5716
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5717
test "X$echo_testing_string" = "X$echo_test_string"; then
5718
# This shell has a builtin print -r that does the trick.
5720
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5721
test "X$CONFIG_SHELL" != X/bin/ksh; then
5722
# If we have ksh, try running configure again with it.
5723
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5724
export ORIGINAL_CONFIG_SHELL
5725
CONFIG_SHELL=/bin/ksh
5727
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5731
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5732
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5733
test "X$echo_testing_string" = "X$echo_test_string"; then
5734
# Cool, printf works
5736
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5737
test "X$echo_testing_string" = 'X\t' &&
5738
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5739
test "X$echo_testing_string" = "X$echo_test_string"; then
5740
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5742
SHELL="$CONFIG_SHELL"
5744
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5745
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5746
test "X$echo_testing_string" = 'X\t' &&
5747
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5748
test "X$echo_testing_string" = "X$echo_test_string"; then
5749
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5751
# maybe with a smaller string...
5754
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5755
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5762
if test "$prev" != 'sed 50q "[$]0"'; then
5763
echo_test_string=`eval $prev`
5764
export echo_test_string
5765
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5767
# Oops. We lost completely, so just stick with echo.
5776
# Copy echo and quote the copy suitably for passing to libtool from
5777
# the Makefile, instead of quoting the original, which is used later.
5779
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5780
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5784
])])# _LT_AC_PROG_ECHO_BACKSLASH
5789
AC_DEFUN([_LT_AC_LOCK],
5790
[AC_ARG_ENABLE([libtool-lock],
5791
[AC_HELP_STRING([--disable-libtool-lock],
5792
[avoid locking (might break parallel builds)])])
5793
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5795
# Some flags need to be propagated to the compiler or linker for good
5799
# Find out which ABI we are using.
5800
echo 'int i;' > conftest.$ac_ext
5801
if AC_TRY_EVAL(ac_compile); then
5802
case `/usr/bin/file conftest.$ac_objext` in
5814
# Find out which ABI we are using.
5815
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5816
if AC_TRY_EVAL(ac_compile); then
5817
if test "$lt_cv_prog_gnu_ld" = yes; then
5818
case `/usr/bin/file conftest.$ac_objext` in
5820
LD="${LD-ld} -melf32bsmip"
5823
LD="${LD-ld} -melf32bmipn32"
5826
LD="${LD-ld} -melf64bmip"
5830
case `/usr/bin/file conftest.$ac_objext` in
5846
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5847
# Find out which ABI we are using.
5848
echo 'int i;' > conftest.$ac_ext
5849
if AC_TRY_EVAL(ac_compile); then
5850
case "`/usr/bin/file conftest.o`" in
5855
LD="${LD-ld} -m elf_i386"
5858
LD="${LD-ld} -m elf32ppclinux"
5861
LD="${LD-ld} -m elf_s390"
5864
LD="${LD-ld} -m elf32_sparc"
5872
LD="${LD-ld} -m elf_x86_64"
5874
ppc*-*linux*|powerpc*-*linux*)
5875
LD="${LD-ld} -m elf64ppc"
5878
LD="${LD-ld} -m elf64_s390"
5881
LD="${LD-ld} -m elf64_sparc"
5891
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5892
SAVE_CFLAGS="$CFLAGS"
5893
CFLAGS="$CFLAGS -belf"
5894
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5896
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5898
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5899
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5900
CFLAGS="$SAVE_CFLAGS"
5903
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5904
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5905
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5906
AC_CHECK_TOOL(AS, as, false)
5907
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5912
need_locks="$enable_libtool_lock"
5917
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5918
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5919
# ----------------------------------------------------------------
5920
# Check whether the given compiler option works
5921
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5922
[AC_REQUIRE([LT_AC_PROG_SED])
5923
AC_CACHE_CHECK([$1], [$2],
5925
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5926
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5927
lt_compiler_flag="$3"
5928
# Insert the option either (1) after the last *FLAGS variable, or
5929
# (2) before a word containing "conftest.", or (3) at the end.
5930
# Note that $ac_compile itself does not contain backslashes and begins
5931
# with a dollar sign (not a hyphen), so the echo should work correctly.
5932
# The option is referenced via a variable to avoid confusing sed.
5933
lt_compile=`echo "$ac_compile" | $SED \
5934
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
5935
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5936
-e 's:$: $lt_compiler_flag:'`
5937
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5938
(eval "$lt_compile" 2>conftest.err)
5940
cat conftest.err >&AS_MESSAGE_LOG_FD
5941
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5942
if (exit $ac_status) && test -s "$ac_outfile"; then
5943
# The compiler can only warn and ignore the option if not recognized
5944
# So say no if there are warnings
5945
if test ! -s conftest.err; then
5952
if test x"[$]$2" = xyes; then
5953
ifelse([$5], , :, [$5])
5955
ifelse([$6], , :, [$6])
5957
])# AC_LIBTOOL_COMPILER_OPTION
5960
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5961
# [ACTION-SUCCESS], [ACTION-FAILURE])
5962
# ------------------------------------------------------------
5963
# Check whether the given compiler option works
5964
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5965
[AC_CACHE_CHECK([$1], [$2],
5967
save_LDFLAGS="$LDFLAGS"
5968
LDFLAGS="$LDFLAGS $3"
5969
printf "$lt_simple_link_test_code" > conftest.$ac_ext
5970
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5971
# The compiler can only warn and ignore the option if not recognized
5972
# So say no if there are warnings
5973
if test -s conftest.err; then
5974
# Append any errors to the config.log.
5975
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5981
LDFLAGS="$save_LDFLAGS"
5984
if test x"[$]$2" = xyes; then
5985
ifelse([$4], , :, [$4])
5987
ifelse([$5], , :, [$5])
5989
])# AC_LIBTOOL_LINKER_OPTION
5992
# AC_LIBTOOL_SYS_MAX_CMD_LEN
5993
# --------------------------
5994
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
5995
[# find the maximum length of command line arguments
5996
AC_MSG_CHECKING([the maximum length of command line arguments])
5997
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6003
# On DJGPP, this test can blow up pretty badly due to problems in libc
6004
# (any single argument exceeding 2000 bytes causes a buffer overrun
6005
# during glob expansion). Even if it were fixed, the result of this
6006
# check would be larger than it should be.
6007
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6011
# Under GNU Hurd, this test is not required because there is
6012
# no limit to the length of command line arguments.
6013
# Libtool will interpret -1 as no limit whatsoever
6014
lt_cv_sys_max_cmd_len=-1;
6018
# On Win9x/ME, this test blows up -- it succeeds, but takes
6019
# about 5 minutes as the teststring grows exponentially.
6020
# Worse, since 9x/ME are not pre-emptively multitasking,
6021
# you end up with a "frozen" computer, even though with patience
6022
# the test eventually succeeds (with a max line length of 256k).
6023
# Instead, let's just punt: use the minimum linelength reported by
6024
# all of the supported platforms: 8192 (on NT/2K/XP).
6025
lt_cv_sys_max_cmd_len=8192;
6029
# If test is not a shell built-in, we'll probably end up computing a
6030
# maximum length that is only half of the actual maximum length, but
6032
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6033
= "XX$testring") >/dev/null 2>&1 &&
6034
new_result=`expr "X$testring" : ".*" 2>&1` &&
6035
lt_cv_sys_max_cmd_len=$new_result &&
6036
test $i != 17 # 1/2 MB should be enough
6039
testring=$testring$testring
6042
# Add a significant safety factor because C++ compilers can tack on massive
6043
# amounts of additional arguments before passing them to the linker.
6044
# It appears as though 1/2 is a usable value.
6045
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6049
if test -n $lt_cv_sys_max_cmd_len ; then
6050
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6054
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6057
# _LT_AC_CHECK_DLFCN
6058
# --------------------
6059
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6060
[AC_CHECK_HEADERS(dlfcn.h)dnl
6061
])# _LT_AC_CHECK_DLFCN
6064
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6065
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6066
# ------------------------------------------------------------------
6067
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6068
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6069
if test "$cross_compiling" = yes; then :
6072
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6073
lt_status=$lt_dlunknown
6074
cat > conftest.$ac_ext <<EOF
6075
[#line __oline__ "configure"
6076
#include "confdefs.h"
6085
# define LT_DLGLOBAL RTLD_GLOBAL
6088
# define LT_DLGLOBAL DL_GLOBAL
6090
# define LT_DLGLOBAL 0
6094
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6095
find out it does not work in some platform. */
6096
#ifndef LT_DLLAZY_OR_NOW
6098
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6101
# define LT_DLLAZY_OR_NOW DL_LAZY
6104
# define LT_DLLAZY_OR_NOW RTLD_NOW
6107
# define LT_DLLAZY_OR_NOW DL_NOW
6109
# define LT_DLLAZY_OR_NOW 0
6117
extern "C" void exit (int);
6120
void fnord() { int i=42;}
6123
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6124
int status = $lt_dlunknown;
6128
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6129
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6130
/* dlclose (self); */
6136
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6137
(./conftest; exit; ) 2>/dev/null
6140
x$lt_dlno_uscore) $1 ;;
6141
x$lt_dlneed_uscore) $2 ;;
6142
x$lt_unknown|x*) $3 ;;
6145
# compilation failed
6150
])# _LT_AC_TRY_DLOPEN_SELF
6153
# AC_LIBTOOL_DLOPEN_SELF
6154
# -------------------
6155
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6156
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6157
if test "x$enable_dlopen" != xyes; then
6158
enable_dlopen=unknown
6159
enable_dlopen_self=unknown
6160
enable_dlopen_self_static=unknown
6167
lt_cv_dlopen="load_add_on"
6169
lt_cv_dlopen_self=yes
6173
lt_cv_dlopen="LoadLibrary"
6178
lt_cv_dlopen="dlopen"
6183
# if libdl is installed we need to link against it
6184
AC_CHECK_LIB([dl], [dlopen],
6185
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6188
lt_cv_dlopen_self=yes
6193
AC_CHECK_FUNC([shl_load],
6194
[lt_cv_dlopen="shl_load"],
6195
[AC_CHECK_LIB([dld], [shl_load],
6196
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6197
[AC_CHECK_FUNC([dlopen],
6198
[lt_cv_dlopen="dlopen"],
6199
[AC_CHECK_LIB([dl], [dlopen],
6200
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6201
[AC_CHECK_LIB([svld], [dlopen],
6202
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6203
[AC_CHECK_LIB([dld], [dld_link],
6204
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6213
if test "x$lt_cv_dlopen" != xno; then
6219
case $lt_cv_dlopen in
6221
save_CPPFLAGS="$CPPFLAGS"
6222
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6224
save_LDFLAGS="$LDFLAGS"
6225
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6228
LIBS="$lt_cv_dlopen_libs $LIBS"
6230
AC_CACHE_CHECK([whether a program can dlopen itself],
6231
lt_cv_dlopen_self, [dnl
6232
_LT_AC_TRY_DLOPEN_SELF(
6233
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6234
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6237
if test "x$lt_cv_dlopen_self" = xyes; then
6238
LDFLAGS="$LDFLAGS $link_static_flag"
6239
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6240
lt_cv_dlopen_self_static, [dnl
6241
_LT_AC_TRY_DLOPEN_SELF(
6242
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6243
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6247
CPPFLAGS="$save_CPPFLAGS"
6248
LDFLAGS="$save_LDFLAGS"
6253
case $lt_cv_dlopen_self in
6254
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6255
*) enable_dlopen_self=unknown ;;
6258
case $lt_cv_dlopen_self_static in
6259
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6260
*) enable_dlopen_self_static=unknown ;;
6263
])# AC_LIBTOOL_DLOPEN_SELF
6266
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6267
# ---------------------------------
6268
# Check to see if options -c and -o are simultaneously supported by compiler
6269
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6270
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6271
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6272
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6273
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6274
$rm -r conftest 2>/dev/null
6278
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6280
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6281
# that will create temporary files in the current directory regardless of
6282
# the output directory. Thus, making CWD read-only will cause this test
6283
# to fail, enabling locking or at least warning the user not to do parallel
6287
lt_compiler_flag="-o out/conftest2.$ac_objext"
6288
# Insert the option either (1) after the last *FLAGS variable, or
6289
# (2) before a word containing "conftest.", or (3) at the end.
6290
# Note that $ac_compile itself does not contain backslashes and begins
6291
# with a dollar sign (not a hyphen), so the echo should work correctly.
6292
lt_compile=`echo "$ac_compile" | $SED \
6293
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6294
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6295
-e 's:$: $lt_compiler_flag:'`
6296
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6297
(eval "$lt_compile" 2>out/conftest.err)
6299
cat out/conftest.err >&AS_MESSAGE_LOG_FD
6300
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6301
if (exit $ac_status) && test -s out/conftest2.$ac_objext
6303
# The compiler can only warn and ignore the option if not recognized
6304
# So say no if there are warnings
6305
if test ! -s out/conftest.err; then
6306
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6316
])# AC_LIBTOOL_PROG_CC_C_O
6319
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6320
# -----------------------------------------
6321
# Check to see if we can do hard links to lock some files if needed
6322
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6323
[AC_REQUIRE([_LT_AC_LOCK])dnl
6325
hard_links="nottested"
6326
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6327
# do not overwrite the value of need_locks provided by the user
6328
AC_MSG_CHECKING([if we can lock with hard links])
6331
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6333
ln conftest.a conftest.b 2>&5 || hard_links=no
6334
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6335
AC_MSG_RESULT([$hard_links])
6336
if test "$hard_links" = no; then
6337
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6343
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6348
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6349
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6350
[rm -f .libs 2>/dev/null
6351
mkdir .libs 2>/dev/null
6352
if test -d .libs; then
6355
# MS-DOS does not allow filenames that begin with a dot.
6358
rmdir .libs 2>/dev/null])
6359
objdir=$lt_cv_objdir
6360
])# AC_LIBTOOL_OBJDIR
6363
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6364
# ----------------------------------------------
6365
# Check hardcoding attributes.
6366
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6367
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6368
_LT_AC_TAGVAR(hardcode_action, $1)=
6369
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6370
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6371
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6373
# We can hardcode non-existant directories.
6374
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6375
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6376
# have to relink, otherwise we might link with an installed library
6377
# when we should be linking with a yet-to-be-installed one
6378
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6379
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6380
# Linking always hardcodes the temporary library directory.
6381
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6383
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6384
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6387
# We cannot hardcode anything, or else we can only hardcode existing
6389
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6391
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6393
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6394
# Fast installation is not supported
6395
enable_fast_install=no
6396
elif test "$shlibpath_overrides_runpath" = yes ||
6397
test "$enable_shared" = no; then
6398
# Fast installation is not necessary
6399
enable_fast_install=needless
6401
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6404
# AC_LIBTOOL_SYS_LIB_STRIP
6405
# ------------------------
6406
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6409
AC_MSG_CHECKING([whether stripping libraries is possible])
6410
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6411
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6412
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6413
AC_MSG_RESULT([yes])
6415
# FIXME - insert some real tests, host_os isn't really good enough
6418
if test -n "$STRIP" ; then
6419
striplib="$STRIP -x"
6420
AC_MSG_RESULT([yes])
6430
])# AC_LIBTOOL_SYS_LIB_STRIP
6433
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6434
# -----------------------------
6435
# PORTME Fill in your ld.so characteristics
6436
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6437
[AC_MSG_CHECKING([dynamic linker characteristics])
6439
libname_spec='lib$name'
6447
shlibpath_overrides_runpath=unknown
6449
dynamic_linker="$host_os ld.so"
6450
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6451
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6452
need_lib_prefix=unknown
6453
hardcode_into_libs=no
6455
# when you set need_version to no, make sure it does not cause -set_version
6456
# flags to be left without arguments
6457
need_version=unknown
6462
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6463
shlibpath_var=LIBPATH
6465
# AIX 3 has no versioning support, so we append a major version to the name.
6466
soname_spec='${libname}${release}${shared_ext}$major'
6473
hardcode_into_libs=yes
6474
if test "$host_cpu" = ia64; then
6475
# AIX 5 supports IA64
6476
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6477
shlibpath_var=LD_LIBRARY_PATH
6479
# With GCC up to 2.95.x, collect2 would create an import file
6480
# for dependence libraries. The import file would start with
6481
# the line `#! .'. This would cause the generated library to
6482
# depend on `.', always an invalid library. This was fixed in
6483
# development snapshots of GCC prior to 3.0.
6485
aix4 | aix4.[[01]] | aix4.[[01]].*)
6486
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6488
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6495
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6496
# soname into executable. Probably we can add versioning support to
6497
# collect2, so additional links can be useful in future.
6498
if test "$aix_use_runtimelinking" = yes; then
6499
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6500
# instead of lib<name>.a to let people know that these are not
6501
# typical AIX shared libraries.
6502
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6504
# We preserve .a as extension for shared libraries through AIX4.2
6505
# and later when we are not doing run time linking.
6506
library_names_spec='${libname}${release}.a $libname.a'
6507
soname_spec='${libname}${release}${shared_ext}$major'
6509
shlibpath_var=LIBPATH
6514
library_names_spec='$libname.ixlibrary $libname.a'
6515
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6516
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'
6520
library_names_spec='${libname}${shared_ext}'
6521
dynamic_linker="$host_os ld.so"
6522
shlibpath_var=LIBRARY_PATH
6528
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6529
soname_spec='${libname}${release}${shared_ext}$major'
6530
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6531
shlibpath_var=LD_LIBRARY_PATH
6532
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6533
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6534
# the default ld.so.conf also contains /usr/contrib/lib and
6535
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6536
# libtool to hard-code these into programs
6539
cygwin* | mingw* | pw32*)
6540
version_type=windows
6545
case $GCC,$host_os in
6546
yes,cygwin* | yes,mingw* | yes,pw32*)
6547
library_names_spec='$libname.dll.a'
6548
# DLL is installed to $(libdir)/../bin by postinstall_cmds
6549
postinstall_cmds='base_file=`basename \${file}`~
6550
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6551
dldir=$destdir/`dirname \$dlpath`~
6552
test -d \$dldir || mkdir -p \$dldir~
6553
$install_prog $dir/$dlname \$dldir/$dlname'
6554
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6555
dlpath=$dir/\$dldll~
6557
shlibpath_overrides_runpath=yes
6561
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
6562
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6563
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6566
# MinGW DLLs use traditional 'lib' prefix
6567
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6568
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6569
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6570
# It is most probably a Windows format PATH printed by
6571
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6572
# path with ; separators, and with drive letters. We can handle the
6573
# drive letters (cygwin fileutils understands them), so leave them,
6574
# especially as we might pass files found there to a mingw objdump,
6575
# which wouldn't understand a cygwinified path. Ahh.
6576
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6578
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6582
# pw32 DLLs use 'pw' prefix rather than 'lib'
6583
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6589
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6592
dynamic_linker='Win32 ld.exe'
6593
# FIXME: first we should search . and the directory the executable is in
6597
darwin* | rhapsody*)
6598
dynamic_linker="$host_os dyld"
6602
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6603
soname_spec='${libname}${release}${major}$shared_ext'
6604
shlibpath_overrides_runpath=yes
6605
shlibpath_var=DYLD_LIBRARY_PATH
6606
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
6607
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6608
if test "$GCC" = yes; then
6609
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"`
6611
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6613
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6620
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6621
soname_spec='${libname}${release}${shared_ext}$major'
6622
shlibpath_var=LD_LIBRARY_PATH
6633
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6634
soname_spec='${libname}${release}${shared_ext}$major'
6635
shlibpath_var=LD_LIBRARY_PATH
6636
shlibpath_overrides_runpath=no
6637
hardcode_into_libs=yes
6638
dynamic_linker='GNU ld.so'
6642
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6643
version_type=freebsd-$objformat
6644
case $version_type in
6646
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6651
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6655
shlibpath_var=LD_LIBRARY_PATH
6658
shlibpath_overrides_runpath=yes
6660
freebsd3.[01]* | freebsdelf3.[01]*)
6661
shlibpath_overrides_runpath=yes
6662
hardcode_into_libs=yes
6665
shlibpath_overrides_runpath=no
6666
hardcode_into_libs=yes
6675
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6676
soname_spec='${libname}${release}${shared_ext}$major'
6677
shlibpath_var=LD_LIBRARY_PATH
6678
hardcode_into_libs=yes
6681
hpux9* | hpux10* | hpux11*)
6682
# Give a soname corresponding to the major version so that dld.sl refuses to
6683
# link against other versions.
6690
hardcode_into_libs=yes
6691
dynamic_linker="$host_os dld.so"
6692
shlibpath_var=LD_LIBRARY_PATH
6693
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6694
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6695
soname_spec='${libname}${release}${shared_ext}$major'
6696
if test "X$HPUX_IA64_MODE" = X32; then
6697
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6699
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6701
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6705
hardcode_into_libs=yes
6706
dynamic_linker="$host_os dld.sl"
6707
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6708
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6709
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6710
soname_spec='${libname}${release}${shared_ext}$major'
6711
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6712
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6716
dynamic_linker="$host_os dld.sl"
6717
shlibpath_var=SHLIB_PATH
6718
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6719
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6720
soname_spec='${libname}${release}${shared_ext}$major'
6723
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6724
postinstall_cmds='chmod 555 $lib'
6727
irix5* | irix6* | nonstopux*)
6729
nonstopux*) version_type=nonstopux ;;
6731
if test "$lt_cv_prog_gnu_ld" = yes; then
6739
soname_spec='${libname}${release}${shared_ext}$major'
6740
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
6742
irix5* | nonstopux*)
6746
case $LD in # libtool.m4 will add one of these switches to LD
6747
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6748
libsuff= shlibsuff= libmagic=32-bit;;
6749
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6750
libsuff=32 shlibsuff=N32 libmagic=N32;;
6751
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6752
libsuff=64 shlibsuff=64 libmagic=64-bit;;
6753
*) libsuff= shlibsuff= libmagic=never-match;;
6757
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6758
shlibpath_overrides_runpath=no
6759
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6760
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6761
hardcode_into_libs=yes
6764
# No shared lib support for Linux oldld, aout, or coff.
6765
linux*oldld* | linux*aout* | linux*coff*)
6769
# This must be Linux ELF.
6774
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6775
soname_spec='${libname}${release}${shared_ext}$major'
6776
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6778
if test "x$LINUX_64_MODE" = x64; then
6779
# Some platforms are per default 64-bit, so there's no /lib64
6780
if test -d /lib64; then
6784
shlibpath_var=LD_LIBRARY_PATH
6785
shlibpath_overrides_runpath=no
6786
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6787
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6788
# This implies no fast_install, which is unacceptable.
6789
# Some rework will be needed to allow for fast_install
6790
# before this can be enabled.
6791
hardcode_into_libs=yes
6793
# We used to test for /lib/ld.so.1 and disable shared libraries on
6794
# powerpc, because MkLinux only supported shared libraries with the
6795
# GNU dynamic linker. Since this was broken with cross compilers,
6796
# most powerpc-linux boxes support dynamic linking these days and
6797
# people can always --disable-shared, the test was removed, and we
6798
# assume the GNU/Linux dynamic linker is in use.
6799
dynamic_linker='GNU/Linux ld.so'
6806
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6807
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6808
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6809
dynamic_linker='NetBSD (a.out) ld.so'
6811
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
6812
soname_spec='${libname}${release}${shared_ext}$major'
6813
dynamic_linker='NetBSD ld.elf_so'
6815
shlibpath_var=LD_LIBRARY_PATH
6816
shlibpath_overrides_runpath=yes
6817
hardcode_into_libs=yes
6822
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6823
shlibpath_var=LD_LIBRARY_PATH
6824
shlibpath_overrides_runpath=yes
6831
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6832
soname_spec='${libname}${release}${shared_ext}$major'
6833
shlibpath_var=LD_LIBRARY_PATH
6834
shlibpath_overrides_runpath=yes
6841
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6842
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6843
shlibpath_var=LD_LIBRARY_PATH
6844
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6846
openbsd2.[[89]] | openbsd2.[[89]].*)
6847
shlibpath_overrides_runpath=no
6850
shlibpath_overrides_runpath=yes
6854
shlibpath_overrides_runpath=yes
6859
libname_spec='$name'
6862
library_names_spec='$libname${shared_ext} $libname.a'
6863
dynamic_linker='OS/2 ld.exe'
6864
shlibpath_var=LIBPATH
6867
osf3* | osf4* | osf5*)
6871
soname_spec='${libname}${release}${shared_ext}$major'
6872
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6873
shlibpath_var=LD_LIBRARY_PATH
6874
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6875
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6880
soname_spec='${libname}${release}${shared_ext}$major'
6881
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6882
shlibpath_var=LD_LIBRARY_PATH
6889
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6890
soname_spec='${libname}${release}${shared_ext}$major'
6891
shlibpath_var=LD_LIBRARY_PATH
6892
shlibpath_overrides_runpath=yes
6893
hardcode_into_libs=yes
6894
# ldd complains unless libraries are executable
6895
postinstall_cmds='chmod +x $lib'
6900
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6901
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6902
shlibpath_var=LD_LIBRARY_PATH
6903
shlibpath_overrides_runpath=yes
6904
if test "$with_gnu_ld" = yes; then
6910
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6912
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6913
soname_spec='${libname}${release}${shared_ext}$major'
6914
shlibpath_var=LD_LIBRARY_PATH
6915
case $host_vendor in
6917
shlibpath_overrides_runpath=no
6919
export_dynamic_flag_spec='${wl}-Blargedynsym'
6920
runpath_var=LD_RUN_PATH
6928
shlibpath_overrides_runpath=no
6929
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6935
if test -d /usr/nec ;then
6937
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
6938
soname_spec='$libname${shared_ext}.$major'
6939
shlibpath_var=LD_LIBRARY_PATH
6945
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6946
soname_spec='${libname}${release}${shared_ext}$major'
6947
shlibpath_var=LD_LIBRARY_PATH
6954
AC_MSG_RESULT([$dynamic_linker])
6955
test "$dynamic_linker" = no && can_build_shared=no
6956
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6961
AC_DEFUN([_LT_AC_TAGCONFIG],
6962
[AC_ARG_WITH([tags],
6963
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
6964
[include additional configurations @<:@automatic@:>@])],
6965
[tagnames="$withval"])
6967
if test -f "$ltmain" && test -n "$tagnames"; then
6968
if test ! -f "${ofile}"; then
6969
AC_MSG_WARN([output file `$ofile' does not exist])
6972
if test -z "$LTCC"; then
6973
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6974
if test -z "$LTCC"; then
6975
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6977
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6981
# Extract list of available tagged configurations in $ofile.
6982
# Note that this assumes the entire list is on one line.
6983
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6985
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6986
for tagname in $tagnames; do
6988
# Check whether tagname contains only valid characters
6989
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6991
*) AC_MSG_ERROR([invalid tag name: $tagname])
6995
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6997
AC_MSG_ERROR([tag name \"$tagname\" already exists])
7000
# Update the list of available tags.
7001
if test -n "$tagname"; then
7002
echo appending configuration tag \"$tagname\" to $ofile
7006
if test -n "$CXX" && test "X$CXX" != "Xno"; then
7007
AC_LIBTOOL_LANG_CXX_CONFIG
7014
if test -n "$F77" && test "X$F77" != "Xno"; then
7015
AC_LIBTOOL_LANG_F77_CONFIG
7022
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7023
AC_LIBTOOL_LANG_GCJ_CONFIG
7030
AC_LIBTOOL_LANG_RC_CONFIG
7034
AC_MSG_ERROR([Unsupported tag name: $tagname])
7038
# Append the new tag name to the list of available tags.
7039
if test -n "$tagname" ; then
7040
available_tags="$available_tags $tagname"
7046
# Now substitute the updated list of available tags.
7047
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7048
mv "${ofile}T" "$ofile"
7052
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7055
])# _LT_AC_TAGCONFIG
7060
# enable checks for dlopen support
7061
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7062
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7063
])# AC_LIBTOOL_DLOPEN
7066
# AC_LIBTOOL_WIN32_DLL
7067
# --------------------
7068
# declare package support for building win32 dll's
7069
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7070
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7071
])# AC_LIBTOOL_WIN32_DLL
7074
# AC_ENABLE_SHARED([DEFAULT])
7075
# ---------------------------
7076
# implement the --enable-shared flag
7077
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7078
AC_DEFUN([AC_ENABLE_SHARED],
7079
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7080
AC_ARG_ENABLE([shared],
7081
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7082
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7083
[p=${PACKAGE-default}
7085
yes) enable_shared=yes ;;
7086
no) enable_shared=no ;;
7089
# Look at the argument we got. We use all the common list separators.
7090
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7091
for pkg in $enableval; do
7093
if test "X$pkg" = "X$p"; then
7100
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7101
])# AC_ENABLE_SHARED
7106
#- set the default shared flag to --disable-shared
7107
AC_DEFUN([AC_DISABLE_SHARED],
7108
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7109
AC_ENABLE_SHARED(no)
7110
])# AC_DISABLE_SHARED
7113
# AC_ENABLE_STATIC([DEFAULT])
7114
# ---------------------------
7115
# implement the --enable-static flag
7116
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7117
AC_DEFUN([AC_ENABLE_STATIC],
7118
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7119
AC_ARG_ENABLE([static],
7120
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7121
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7122
[p=${PACKAGE-default}
7124
yes) enable_static=yes ;;
7125
no) enable_static=no ;;
7128
# Look at the argument we got. We use all the common list separators.
7129
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7130
for pkg in $enableval; do
7132
if test "X$pkg" = "X$p"; then
7139
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7140
])# AC_ENABLE_STATIC
7145
# set the default static flag to --disable-static
7146
AC_DEFUN([AC_DISABLE_STATIC],
7147
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7148
AC_ENABLE_STATIC(no)
7149
])# AC_DISABLE_STATIC
7152
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7153
# ---------------------------------
7154
# implement the --enable-fast-install flag
7155
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7156
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7157
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7158
AC_ARG_ENABLE([fast-install],
7159
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7160
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7161
[p=${PACKAGE-default}
7163
yes) enable_fast_install=yes ;;
7164
no) enable_fast_install=no ;;
7166
enable_fast_install=no
7167
# Look at the argument we got. We use all the common list separators.
7168
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7169
for pkg in $enableval; do
7171
if test "X$pkg" = "X$p"; then
7172
enable_fast_install=yes
7178
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7179
])# AC_ENABLE_FAST_INSTALL
7182
# AC_DISABLE_FAST_INSTALL
7183
# -----------------------
7184
# set the default to --disable-fast-install
7185
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7186
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7187
AC_ENABLE_FAST_INSTALL(no)
7188
])# AC_DISABLE_FAST_INSTALL
7191
# AC_LIBTOOL_PICMODE([MODE])
7192
# --------------------------
7193
# implement the --with-pic flag
7194
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7195
AC_DEFUN([AC_LIBTOOL_PICMODE],
7196
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7197
pic_mode=ifelse($#,1,$1,default)
7198
])# AC_LIBTOOL_PICMODE
7203
# This is predefined starting with Autoconf 2.54, so this conditional
7204
# definition can be removed once we require Autoconf 2.54 or later.
7205
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7206
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7207
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7208
then ac_cv_prog_egrep='grep -E'
7209
else ac_cv_prog_egrep='egrep'
7211
EGREP=$ac_cv_prog_egrep
7216
# AC_PATH_TOOL_PREFIX
7217
# -------------------
7218
# find a file program which can recognise shared library
7219
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7220
[AC_REQUIRE([AC_PROG_EGREP])dnl
7221
AC_MSG_CHECKING([for $1])
7222
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7224
[[\\/*] | ?:[\\/]*])
7225
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7228
lt_save_MAGIC_CMD="$MAGIC_CMD"
7229
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7230
dnl $ac_dummy forces splitting on constant user-supplied paths.
7231
dnl POSIX.2 word splitting is done only on the output of word expansions,
7232
dnl not every word. This closes a longstanding sh security hole.
7233
ac_dummy="ifelse([$2], , $PATH, [$2])"
7234
for ac_dir in $ac_dummy; do
7236
test -z "$ac_dir" && ac_dir=.
7237
if test -f $ac_dir/$1; then
7238
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7239
if test -n "$file_magic_test_file"; then
7240
case $deplibs_check_method in
7242
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7243
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7244
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7245
$EGREP "$file_magic_regex" > /dev/null; then
7250
*** Warning: the command libtool uses to detect shared libraries,
7251
*** $file_magic_cmd, produces output that libtool cannot recognize.
7252
*** The result is that libtool may fail to recognize shared libraries
7253
*** as such. This will affect the creation of libtool libraries that
7254
*** depend on shared libraries, but programs linked with such libtool
7255
*** libraries will work regardless of this problem. Nevertheless, you
7256
*** may want to report the problem to your system manager and/or to
7257
*** bug-libtool@gnu.org
7267
MAGIC_CMD="$lt_save_MAGIC_CMD"
7270
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7271
if test -n "$MAGIC_CMD"; then
7272
AC_MSG_RESULT($MAGIC_CMD)
7276
])# AC_PATH_TOOL_PREFIX
7281
# find a file program which can recognise a shared library
7282
AC_DEFUN([AC_PATH_MAGIC],
7283
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7284
if test -z "$lt_cv_path_MAGIC_CMD"; then
7285
if test -n "$ac_tool_prefix"; then
7286
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7296
# find the pathname to the GNU or non-GNU linker
7297
AC_DEFUN([AC_PROG_LD],
7298
[AC_ARG_WITH([gnu-ld],
7299
[AC_HELP_STRING([--with-gnu-ld],
7300
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7301
[test "$withval" = no || with_gnu_ld=yes],
7303
AC_REQUIRE([LT_AC_PROG_SED])dnl
7304
AC_REQUIRE([AC_PROG_CC])dnl
7305
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7306
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7308
if test "$GCC" = yes; then
7309
# Check if gcc -print-prog-name=ld gives a path.
7310
AC_MSG_CHECKING([for ld used by $CC])
7313
# gcc leaves a trailing carriage return which upsets mingw
7314
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7316
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7319
# Accept absolute paths.
7320
[[\\/]]* | ?:[[\\/]]*)
7321
re_direlt='/[[^/]][[^/]]*/\.\./'
7322
# Canonicalize the pathname of ld
7323
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7324
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7325
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7327
test -z "$LD" && LD="$ac_prog"
7330
# If it fails, then pretend we aren't using GCC.
7334
# If it is relative, then search for the first ld in PATH.
7338
elif test "$with_gnu_ld" = yes; then
7339
AC_MSG_CHECKING([for GNU ld])
7341
AC_MSG_CHECKING([for non-GNU ld])
7343
AC_CACHE_VAL(lt_cv_path_LD,
7344
[if test -z "$LD"; then
7345
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7346
for ac_dir in $PATH; do
7348
test -z "$ac_dir" && ac_dir=.
7349
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7350
lt_cv_path_LD="$ac_dir/$ac_prog"
7351
# Check to see if the program is GNU ld. I'd rather use --version,
7352
# but apparently some GNU ld's only accept -v.
7353
# Break only if it was the GNU/non-GNU ld that we prefer.
7354
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7355
*GNU* | *'with BFD'*)
7356
test "$with_gnu_ld" != no && break
7359
test "$with_gnu_ld" != yes && break
7366
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7369
if test -n "$LD"; then
7374
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7381
AC_DEFUN([AC_PROG_LD_GNU],
7382
[AC_REQUIRE([AC_PROG_EGREP])dnl
7383
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7384
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7385
case `$LD -v 2>&1 </dev/null` in
7386
*GNU* | *'with BFD'*)
7387
lt_cv_prog_gnu_ld=yes
7390
lt_cv_prog_gnu_ld=no
7393
with_gnu_ld=$lt_cv_prog_gnu_ld
7397
# AC_PROG_LD_RELOAD_FLAG
7398
# ----------------------
7399
# find reload flag for linker
7400
# -- PORTME Some linkers may need a different reload flag.
7401
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7402
[AC_CACHE_CHECK([for $LD option to reload object files],
7403
lt_cv_ld_reload_flag,
7404
[lt_cv_ld_reload_flag='-r'])
7405
reload_flag=$lt_cv_ld_reload_flag
7406
case $reload_flag in
7408
*) reload_flag=" $reload_flag" ;;
7410
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7411
])# AC_PROG_LD_RELOAD_FLAG
7414
# AC_DEPLIBS_CHECK_METHOD
7415
# -----------------------
7416
# how to check for library dependencies
7417
# -- PORTME fill in with the dynamic library characteristics
7418
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7419
[AC_CACHE_CHECK([how to recognise dependent libraries],
7420
lt_cv_deplibs_check_method,
7421
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7422
lt_cv_file_magic_test_file=
7423
lt_cv_deplibs_check_method='unknown'
7424
# Need to set the preceding variable on all platforms that support
7425
# interlibrary dependencies.
7426
# 'none' -- dependencies not supported.
7427
# `unknown' -- same as none, but documents that we really don't know.
7428
# 'pass_all' -- all dependencies passed with no checks.
7429
# 'test_compile' -- check by making test program.
7430
# 'file_magic [[regex]]' -- check by looking for files in library path
7431
# which responds to the $file_magic_cmd with a given extended regex.
7432
# If you have `file' or equivalent on your system and you're not sure
7433
# whether `pass_all' will *always* work, you probably want this one.
7437
lt_cv_deplibs_check_method=pass_all
7441
lt_cv_deplibs_check_method=pass_all
7445
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7446
lt_cv_file_magic_cmd='/usr/bin/file -L'
7447
lt_cv_file_magic_test_file=/shlib/libc.so
7450
cygwin* | mingw* | pw32*)
7451
# win32_libid is a shell function defined in ltmain.sh
7452
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7453
lt_cv_file_magic_cmd='win32_libid'
7456
darwin* | rhapsody*)
7457
# this will be overwritten by pass_all, but leave it in just in case
7458
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7459
lt_cv_file_magic_cmd='/usr/bin/file -L'
7461
rhapsody* | darwin1.[[012]])
7462
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7465
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7468
lt_cv_deplibs_check_method=pass_all
7472
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7475
# Not sure whether the presence of OpenBSD here was a mistake.
7476
# Let's accept both of them until this is cleared up.
7477
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7478
lt_cv_file_magic_cmd=/usr/bin/file
7479
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7483
lt_cv_deplibs_check_method=pass_all
7488
lt_cv_deplibs_check_method=pass_all
7491
hpux10.20* | hpux11*)
7492
lt_cv_file_magic_cmd=/usr/bin/file
7495
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7496
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7499
[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]']
7500
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7503
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7504
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7509
irix5* | irix6* | nonstopux*)
7511
irix5* | nonstopux*)
7512
# this will be overridden with pass_all, but let us keep it just in case
7513
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7517
*-32|*"-32 ") libmagic=32-bit;;
7518
*-n32|*"-n32 ") libmagic=N32;;
7519
*-64|*"-64 ") libmagic=64-bit;;
7520
*) libmagic=never-match;;
7522
# this will be overridden with pass_all, but let us keep it just in case
7523
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7526
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7527
lt_cv_deplibs_check_method=pass_all
7530
# This must be Linux ELF.
7533
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7534
lt_cv_deplibs_check_method=pass_all ;;
7535
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7537
lt_cv_deplibs_check_method=pass_all ;;
7539
# glibc up to 2.1.1 does not perform some relocations on ARM
7540
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7542
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7546
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7547
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7549
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7554
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7555
lt_cv_file_magic_cmd=/usr/bin/file
7556
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7560
lt_cv_deplibs_check_method=unknown
7564
lt_cv_file_magic_cmd=/usr/bin/file
7565
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7566
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7567
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7569
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7573
osf3* | osf4* | osf5*)
7574
# this will be overridden with pass_all, but let us keep it just in case
7575
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7576
lt_cv_file_magic_test_file=/shlib/libc.so
7577
lt_cv_deplibs_check_method=pass_all
7581
lt_cv_deplibs_check_method=pass_all
7585
lt_cv_deplibs_check_method=pass_all
7586
lt_cv_file_magic_test_file=/lib/libc.so
7589
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7590
case $host_vendor in
7592
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]]'
7593
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7596
lt_cv_deplibs_check_method=pass_all
7599
lt_cv_file_magic_cmd='/bin/file'
7600
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7603
lt_cv_file_magic_cmd='/bin/file'
7604
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7605
lt_cv_file_magic_test_file=/lib/libc.so
7608
lt_cv_deplibs_check_method=pass_all
7613
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7614
lt_cv_deplibs_check_method=pass_all
7618
file_magic_cmd=$lt_cv_file_magic_cmd
7619
deplibs_check_method=$lt_cv_deplibs_check_method
7620
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7621
])# AC_DEPLIBS_CHECK_METHOD
7626
# find the pathname to a BSD-compatible name lister
7627
AC_DEFUN([AC_PROG_NM],
7628
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7629
[if test -n "$NM"; then
7630
# Let the user override the test.
7633
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7634
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7636
test -z "$ac_dir" && ac_dir=.
7637
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7638
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7639
# Check to see if the nm accepts a BSD-compat flag.
7640
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7641
# nm: unknown option "B" ignored
7642
# Tru64's nm complains that /dev/null is an invalid object file
7643
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7644
*/dev/null* | *'Invalid file or object type'*)
7645
lt_cv_path_NM="$tmp_nm -B"
7649
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7651
lt_cv_path_NM="$tmp_nm -p"
7655
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7656
continue # so that we can try to find one that supports BSD flags
7663
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7671
# check for math library
7672
AC_DEFUN([AC_CHECK_LIBM],
7673
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7676
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
7677
# These system don't have libm, or don't need it
7680
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7681
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7684
AC_CHECK_LIB(m, cos, LIBM="-lm")
7690
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7691
# -----------------------------------
7692
# sets LIBLTDL to the link flags for the libltdl convenience library and
7693
# LTDLINCL to the include flags for the libltdl header and adds
7694
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7695
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7696
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7697
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7698
# '${top_srcdir}/' (note the single quotes!). If your package is not
7699
# flat and you're not using automake, define top_builddir and
7700
# top_srcdir appropriately in the Makefiles.
7701
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7702
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7703
case $enable_ltdl_convenience in
7704
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7705
"") enable_ltdl_convenience=yes
7706
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7708
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7709
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7710
# For backwards non-gettext consistent compatibility...
7712
])# AC_LIBLTDL_CONVENIENCE
7715
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7716
# -----------------------------------
7717
# sets LIBLTDL to the link flags for the libltdl installable library and
7718
# LTDLINCL to the include flags for the libltdl header and adds
7719
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7720
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7721
# DIRECTORY is not provided and an installed libltdl is not found, it is
7722
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7723
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7724
# quotes!). If your package is not flat and you're not using automake,
7725
# define top_builddir and top_srcdir appropriately in the Makefiles.
7726
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7727
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7728
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7729
AC_CHECK_LIB(ltdl, lt_dlinit,
7730
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7731
[if test x"$enable_ltdl_install" = xno; then
7732
AC_MSG_WARN([libltdl not installed, but installation disabled])
7734
enable_ltdl_install=yes
7737
if test x"$enable_ltdl_install" = x"yes"; then
7738
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7739
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7740
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7742
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7746
# For backwards non-gettext consistent compatibility...
7748
])# AC_LIBLTDL_INSTALLABLE
7753
# enable support for C++ libraries
7754
AC_DEFUN([AC_LIBTOOL_CXX],
7755
[AC_REQUIRE([_LT_AC_LANG_CXX])
7761
AC_DEFUN([_LT_AC_LANG_CXX],
7762
[AC_REQUIRE([AC_PROG_CXX])
7763
AC_REQUIRE([AC_PROG_CXXCPP])
7764
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
7770
# enable support for Fortran 77 libraries
7771
AC_DEFUN([AC_LIBTOOL_F77],
7772
[AC_REQUIRE([_LT_AC_LANG_F77])
7778
AC_DEFUN([_LT_AC_LANG_F77],
7779
[AC_REQUIRE([AC_PROG_F77])
7780
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
7786
# enable support for GCJ libraries
7787
AC_DEFUN([AC_LIBTOOL_GCJ],
7788
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7794
AC_DEFUN([_LT_AC_LANG_GCJ],
7795
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7796
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7797
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7798
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7799
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7800
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7801
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
7807
# enable support for Windows resource files
7808
AC_DEFUN([AC_LIBTOOL_RC],
7809
[AC_REQUIRE([LT_AC_PROG_RC])
7810
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
7814
# AC_LIBTOOL_LANG_C_CONFIG
7815
# ------------------------
7816
# Ensure that the configuration vars for the C compiler are
7817
# suitably defined. Those variables are subsequently used by
7818
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7819
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7820
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7824
# Source file extension for C test sources.
7827
# Object file extension for compiled C test sources.
7829
_LT_AC_TAGVAR(objext, $1)=$objext
7831
# Code to be used in simple compile tests
7832
lt_simple_compile_test_code="int some_variable = 0;\n"
7834
# Code to be used in simple link tests
7835
lt_simple_link_test_code='int main(){return(0);}\n'
7840
# Check for any special shared library compilation flags.
7842
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7843
if test "$GCC" = no; then
7846
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7850
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7851
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7852
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7854
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7855
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7861
# Check to make sure the static flag actually works.
7863
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7864
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7865
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7867
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7871
## There is no encapsulation within the following macros, do not change
7872
## the running order or otherwise move them around unless you know exactly
7873
## what you are doing...
7874
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7875
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7876
AC_LIBTOOL_PROG_CC_C_O($1)
7877
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7878
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7879
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7880
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7881
AC_LIBTOOL_SYS_LIB_STRIP
7882
AC_LIBTOOL_DLOPEN_SELF($1)
7884
# Report which librarie types wil actually be built
7885
AC_MSG_CHECKING([if libtool supports shared libraries])
7886
AC_MSG_RESULT([$can_build_shared])
7888
AC_MSG_CHECKING([whether to build shared libraries])
7889
test "$can_build_shared" = "no" && enable_shared=no
7891
# On AIX, shared libraries and static libraries use the same namespace, and
7892
# are all built from PIC.
7895
test "$enable_shared" = yes && enable_static=no
7896
if test -n "$RANLIB"; then
7897
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7898
postinstall_cmds='$RANLIB $lib'
7903
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7904
test "$enable_shared" = yes && enable_static=no
7907
darwin* | rhapsody*)
7908
if test "$GCC" = yes; then
7909
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7911
rhapsody* | darwin1.[[012]])
7912
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
7915
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
7918
output_verbose_link_cmd='echo'
7919
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
7920
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7921
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7922
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7923
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7924
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7925
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7926
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7927
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
7928
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7930
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7934
AC_MSG_RESULT([$enable_shared])
7936
AC_MSG_CHECKING([whether to build static libraries])
7937
# Make sure either enable_shared or enable_static is yes.
7938
test "$enable_shared" = yes || enable_static=yes
7939
AC_MSG_RESULT([$enable_static])
7941
AC_LIBTOOL_CONFIG($1)
7945
])# AC_LIBTOOL_LANG_C_CONFIG
7948
# AC_LIBTOOL_LANG_CXX_CONFIG
7949
# --------------------------
7950
# Ensure that the configuration vars for the C compiler are
7951
# suitably defined. Those variables are subsequently used by
7952
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7953
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7954
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7956
AC_REQUIRE([AC_PROG_CXX])
7957
AC_REQUIRE([AC_PROG_CXXCPP])
7959
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7960
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7961
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7962
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7963
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7964
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7965
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7966
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7967
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7968
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7969
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
7970
_LT_AC_TAGVAR(module_cmds, $1)=
7971
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
7972
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7973
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7974
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7975
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7976
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7978
# Dependencies to place before and after the object being linked:
7979
_LT_AC_TAGVAR(predep_objects, $1)=
7980
_LT_AC_TAGVAR(postdep_objects, $1)=
7981
_LT_AC_TAGVAR(predeps, $1)=
7982
_LT_AC_TAGVAR(postdeps, $1)=
7983
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7985
# Source file extension for C++ test sources.
7988
# Object file extension for compiled C++ test sources.
7990
_LT_AC_TAGVAR(objext, $1)=$objext
7992
# Code to be used in simple compile tests
7993
lt_simple_compile_test_code="int some_variable = 0;\n"
7995
# Code to be used in simple link tests
7996
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
7998
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8001
# Allow CC to be a program name with arguments.
8006
lt_save_with_gnu_ld=$with_gnu_ld
8007
lt_save_path_LD=$lt_cv_path_LD
8008
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8009
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8011
unset lt_cv_prog_gnu_ld
8013
if test -n "${lt_cv_path_LDCXX+set}"; then
8014
lt_cv_path_LD=$lt_cv_path_LDCXX
8018
test -z "${LDCXX+set}" || LD=$LDCXX
8021
_LT_AC_TAGVAR(compiler, $1)=$CC
8022
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8024
# We don't want -fno-exception wen compiling C++ code, so set the
8025
# no_builtin_flag separately
8026
if test "$GXX" = yes; then
8027
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8029
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8032
if test "$GXX" = yes; then
8033
# Set up default GNU C++ configuration
8037
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8038
# archiving commands below assume that GNU ld is being used.
8039
if test "$with_gnu_ld" = yes; then
8040
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8041
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8043
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8044
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8046
# If archive_cmds runs LD, not CC, wlarc should be empty
8047
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8048
# investigate it a little bit more. (MM)
8051
# ancient GNU ld didn't support --whole-archive et. al.
8052
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8053
grep 'no-whole-archive' > /dev/null; then
8054
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8056
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8062
# A generic and very simple default shared library creation
8063
# command for GNU C++ for the case where it uses the native
8064
# linker, instead of GNU ld. If possible, this setting should
8065
# overridden to take advantage of the native linker features on
8066
# the platform it is being used on.
8067
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8070
# Commands to make compiler produce verbose output that lists
8071
# what "hidden" libraries, object files and flags are used when
8072
# linking a shared library.
8073
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8081
# PORTME: fill in a description of your system's C++ link characteristics
8082
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8083
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8086
# FIXME: insert proper C++ library support
8087
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8090
if test "$host_cpu" = ia64; then
8091
# On IA64, the linker does run time linking by default, so we don't
8092
# have to do anything special.
8093
aix_use_runtimelinking=no
8094
exp_sym_flag='-Bexport'
8097
# KDE requires run time linking. Make it the default.
8098
aix_use_runtimelinking=yes
8099
exp_sym_flag='-bexport'
8100
no_entry_flag='-bnoentry'
8103
# When large executables or shared objects are built, AIX ld can
8104
# have problems creating the table of contents. If linking a library
8105
# or program results in "error TOC overflow" add -mminimal-toc to
8106
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8107
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8109
_LT_AC_TAGVAR(archive_cmds, $1)=''
8110
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8111
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8112
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8114
if test "$GXX" = yes; then
8115
case $host_os in aix4.[012]|aix4.[012].*)
8116
# We only want to do this on AIX 4.2 and lower, the check
8117
# below for broken collect2 doesn't work under 4.3+
8118
collect2name=`${CC} -print-prog-name=collect2`
8119
if test -f "$collect2name" && \
8120
strings "$collect2name" | grep resolve_lib_name >/dev/null
8122
# We have reworked collect2
8123
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8125
# We have old collect2
8126
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8127
# It fails to find uninstalled libraries when the uninstalled
8128
# path is not listed in the libpath. Setting hardcode_minus_L
8129
# to unsupported forces relinking
8130
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8131
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8132
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8135
shared_flag='-shared'
8138
if test "$host_cpu" = ia64; then
8139
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8140
# chokes on -Wl,-G. The following line is correct:
8143
if test "$aix_use_runtimelinking" = yes; then
8144
shared_flag='-qmkshrobj ${wl}-G'
8146
shared_flag='-qmkshrobj'
8151
# Let the compiler handle the export list.
8152
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8153
if test "$aix_use_runtimelinking" = yes; then
8154
# Warning - without using the other runtime loading flags (-brtl),
8155
# -berok will link without error, but may produce a broken library.
8156
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8157
# Determine the default libpath from the value encoded in an empty executable.
8158
_LT_AC_SYS_LIBPATH_AIX
8159
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8161
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8162
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8164
if test "$host_cpu" = ia64; then
8165
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8166
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8167
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8169
# Determine the default libpath from the value encoded in an empty executable.
8170
_LT_AC_SYS_LIBPATH_AIX
8171
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8172
# Warning - without using the other run time loading flags,
8173
# -berok will link without error, but may produce a broken library.
8174
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8175
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8176
# -bexpall does not export symbols beginning with underscore (_)
8177
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8178
# Exported symbols can be pulled into shared objects from archives
8179
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8180
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8181
# This is similar to how AIX traditionally builds it's shared libraries.
8182
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8187
case $cc_basename in
8189
# FIXME: insert proper C++ library support
8190
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8195
cygwin* | mingw* | pw32*)
8196
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8197
# as there is no search path for DLLs.
8198
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8199
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8200
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8201
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8203
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8204
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8205
# If the export-symbols file already is a .def file (1st line
8206
# is EXPORTS), use it as is; otherwise, prepend...
8207
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8208
cp $export_symbols $output_objdir/$soname.def;
8210
echo EXPORTS > $output_objdir/$soname.def;
8211
cat $export_symbols >> $output_objdir/$soname.def;
8213
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8215
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8219
darwin* | rhapsody*)
8220
if test "$GXX" = yes; then
8221
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8223
rhapsody* | darwin1.[[012]])
8224
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8227
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8230
lt_int_apple_cc_single_mod=no
8231
output_verbose_link_cmd='echo'
8232
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8233
lt_int_apple_cc_single_mod=yes
8235
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8236
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8238
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8240
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8242
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8243
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8244
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8246
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8248
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8249
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8250
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8251
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8252
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8253
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8255
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8260
case $cc_basename in
8262
# FIXME: insert proper C++ library support
8263
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8266
# Green Hills C++ Compiler
8267
# FIXME: insert proper C++ library support
8268
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8271
# FIXME: insert proper C++ library support
8272
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8277
# C++ shared libraries reported to be fairly broken before switch to ELF
8278
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8281
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8284
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8286
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8291
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8292
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8293
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8294
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8295
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8296
# but as the default
8297
# location of the library.
8299
case $cc_basename in
8301
# FIXME: insert proper C++ library support
8302
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8305
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8306
# Commands to make compiler produce verbose output that lists
8307
# what "hidden" libraries, object files and flags are used when
8308
# linking a shared library.
8310
# There doesn't appear to be a way to prevent this compiler from
8311
# explicitly linking system object files so we need to strip them
8312
# from the output so that they don't get included in the library
8314
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'
8317
if test "$GXX" = yes; then
8318
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8320
# FIXME: insert proper C++ library support
8321
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8327
if test $with_gnu_ld = no; then
8330
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8331
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8332
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8335
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8338
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8339
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8340
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8346
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8347
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8350
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8351
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8352
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8353
# but as the default
8354
# location of the library.
8357
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8358
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8359
# but as the default
8360
# location of the library.
8364
case $cc_basename in
8366
# FIXME: insert proper C++ library support
8367
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8372
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8375
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8378
# Commands to make compiler produce verbose output that lists
8379
# what "hidden" libraries, object files and flags are used when
8380
# linking a shared library.
8382
# There doesn't appear to be a way to prevent this compiler from
8383
# explicitly linking system object files so we need to strip them
8384
# from the output so that they don't get included in the library
8386
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'
8389
if test "$GXX" = yes; then
8390
if test $with_gnu_ld = no; then
8393
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8396
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8401
# FIXME: insert proper C++ library support
8402
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8408
case $cc_basename in
8411
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8413
# Archives containing C++ object files must be created using
8414
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8415
# necessary to make sure instantiated templates are included
8417
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8420
if test "$GXX" = yes; then
8421
if test "$with_gnu_ld" = no; then
8422
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8424
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8427
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8430
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8431
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8434
case $cc_basename in
8436
# Kuck and Associates, Inc. (KAI) C++ Compiler
8438
# KCC will only create a shared library if the output file
8439
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8440
# to its proper name (with version) after linking.
8441
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8442
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8443
# Commands to make compiler produce verbose output that lists
8444
# what "hidden" libraries, object files and flags are used when
8445
# linking a shared library.
8447
# There doesn't appear to be a way to prevent this compiler from
8448
# explicitly linking system object files so we need to strip them
8449
# from the output so that they don't get included in the library
8451
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'
8453
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8454
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8456
# Archives containing C++ object files must be created using
8457
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8458
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8463
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8464
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8465
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8466
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8467
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8468
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8472
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8473
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8475
runpath_var=LD_RUN_PATH
8476
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8477
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8479
# Commands to make compiler produce verbose output that lists
8480
# what "hidden" libraries, object files and flags are used when
8481
# linking a shared library.
8483
# There doesn't appear to be a way to prevent this compiler from
8484
# explicitly linking system object files so we need to strip them
8485
# from the output so that they don't get included in the library
8487
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'
8492
# FIXME: insert proper C++ library support
8493
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8496
# FIXME: insert proper C++ library support
8497
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8500
case $cc_basename in
8502
# FIXME: insert proper C++ library support
8503
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8506
# FIXME: insert proper C++ library support
8507
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8512
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8513
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8515
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8516
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8517
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8519
# Workaround some broken pre-1.5 toolchains
8520
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8523
case $cc_basename in
8525
# Kuck and Associates, Inc. (KAI) C++ Compiler
8527
# KCC will only create a shared library if the output file
8528
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8529
# to its proper name (with version) after linking.
8530
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8532
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8533
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8535
# Archives containing C++ object files must be created using
8536
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8537
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8541
# Rational C++ 2.4.1
8542
# FIXME: insert proper C++ library support
8543
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8546
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8547
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8549
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8550
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8552
# Commands to make compiler produce verbose output that lists
8553
# what "hidden" libraries, object files and flags are used when
8554
# linking a shared library.
8556
# There doesn't appear to be a way to prevent this compiler from
8557
# explicitly linking system object files so we need to strip them
8558
# from the output so that they don't get included in the library
8560
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'
8563
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8564
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8565
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8567
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8568
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8570
# Commands to make compiler produce verbose output that lists
8571
# what "hidden" libraries, object files and flags are used when
8572
# linking a shared library.
8573
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8576
# FIXME: insert proper C++ library support
8577
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8583
case $cc_basename in
8585
# Kuck and Associates, Inc. (KAI) C++ Compiler
8587
# KCC will only create a shared library if the output file
8588
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8589
# to its proper name (with version) after linking.
8590
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8592
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8593
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8595
# Archives containing C++ object files must be created using
8596
# the KAI C++ compiler.
8597
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8600
# Rational C++ 2.4.1
8601
# FIXME: insert proper C++ library support
8602
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8605
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8606
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8607
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8608
echo "-hidden">> $lib.exp~
8609
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8612
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8613
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8615
# Commands to make compiler produce verbose output that lists
8616
# what "hidden" libraries, object files and flags are used when
8617
# linking a shared library.
8619
# There doesn't appear to be a way to prevent this compiler from
8620
# explicitly linking system object files so we need to strip them
8621
# from the output so that they don't get included in the library
8623
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'
8626
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8627
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8628
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8630
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8631
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8633
# Commands to make compiler produce verbose output that lists
8634
# what "hidden" libraries, object files and flags are used when
8635
# linking a shared library.
8636
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8639
# FIXME: insert proper C++ library support
8640
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8646
# FIXME: insert proper C++ library support
8647
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8650
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8651
case $cc_basename in
8653
# FIXME: insert proper C++ library support
8654
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8657
# FIXME: insert proper C++ library support
8658
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8663
case $cc_basename in
8666
# FIXME: insert proper C++ library support
8667
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8671
# FIXME: insert proper C++ library support
8672
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8675
# FIXME: insert proper C++ library support
8676
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8681
case $cc_basename in
8683
# Sun C++ 4.2, 5.x and Centerline C++
8684
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8685
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8686
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8687
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8689
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8690
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8692
solaris2.[0-5] | solaris2.[0-5].*) ;;
8694
# The C++ compiler is used as linker so we must use $wl
8695
# flag to pass the commands to the underlying system
8697
# Supported since Solaris 2.6 (maybe 2.5.1?)
8698
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8701
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8703
# Commands to make compiler produce verbose output that lists
8704
# what "hidden" libraries, object files and flags are used when
8705
# linking a shared library.
8707
# There doesn't appear to be a way to prevent this compiler from
8708
# explicitly linking system object files so we need to strip them
8709
# from the output so that they don't get included in the library
8711
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'
8713
# Archives containing C++ object files must be created using
8714
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8715
# necessary to make sure instantiated templates are included
8717
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8720
# Green Hills C++ Compiler
8721
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8723
# The C++ compiler must be used to create the archive.
8724
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8727
# GNU C++ compiler with Solaris linker
8728
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8729
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8730
if $CC --version | grep -v '^2\.7' > /dev/null; then
8731
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8732
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8733
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8735
# Commands to make compiler produce verbose output that lists
8736
# what "hidden" libraries, object files and flags are used when
8737
# linking a shared library.
8738
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8740
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8742
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8743
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8744
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8746
# Commands to make compiler produce verbose output that lists
8747
# what "hidden" libraries, object files and flags are used when
8748
# linking a shared library.
8749
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8752
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8757
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8758
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8761
case $cc_basename in
8763
# NonStop-UX NCC 3.20
8764
# FIXME: insert proper C++ library support
8765
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8768
# FIXME: insert proper C++ library support
8769
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8774
# FIXME: insert proper C++ library support
8775
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8778
# FIXME: insert proper C++ library support
8779
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8782
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8783
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8785
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8786
_LT_AC_TAGVAR(LD, $1)="$LD"
8789
## There is no encapsulation within the following macros, do not change
8790
## the running order or otherwise move them around unless you know exactly
8791
## what you are doing...
8792
AC_LIBTOOL_POSTDEP_PREDEP($1)
8793
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8794
AC_LIBTOOL_PROG_CC_C_O($1)
8795
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8796
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8797
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8798
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8799
AC_LIBTOOL_SYS_LIB_STRIP
8800
AC_LIBTOOL_DLOPEN_SELF($1)
8802
AC_LIBTOOL_CONFIG($1)
8809
with_gnu_ldcxx=$with_gnu_ld
8810
with_gnu_ld=$lt_save_with_gnu_ld
8811
lt_cv_path_LDCXX=$lt_cv_path_LD
8812
lt_cv_path_LD=$lt_save_path_LD
8813
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8814
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8815
])# AC_LIBTOOL_LANG_CXX_CONFIG
8817
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
8818
# ------------------------
8819
# Figure out "hidden" library dependencies from verbose
8820
# compiler output when linking a shared library.
8821
# Parse the compiler output and extract the necessary
8822
# objects, libraries and library flags.
8823
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
8824
dnl we can't use the lt_simple_compile_test_code here,
8825
dnl because it contains code intended for an executable,
8826
dnl not a library. It's possible we should let each
8827
dnl tag define a new lt_????_link_test_code variable,
8828
dnl but it's only used here...
8829
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
8831
void foo (void) { a = 0; }
8833
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
8837
Foo (void) { a = 0; }
8842
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
8850
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
8853
public void bar (void) {
8859
dnl Parse the compiler output and extract the necessary
8860
dnl objects, libraries and library flags.
8861
if AC_TRY_EVAL(ac_compile); then
8862
# Parse the compiler output and extract the necessary
8863
# objects, libraries and library flags.
8865
# Sentinel used to keep track of whether or not we are before
8866
# the conftest object file.
8867
pre_test_object_deps_done=no
8869
# The `*' in the case matches for architectures that use `case' in
8870
# $output_verbose_cmd can trigger glob expansion during the loop
8871
# eval without this substitution.
8872
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8874
for p in `eval $output_verbose_link_cmd`; do
8878
# Some compilers place space between "-{L,R}" and the path.
8881
|| test $p = "-R"; then
8888
if test "$pre_test_object_deps_done" = no; then
8891
# Internal compiler library paths should come after those
8892
# provided the user. The postdeps already come after the
8893
# user supplied libs so there is no need to process them.
8894
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8895
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8897
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8900
# The "-l" case would never come before the object being
8901
# linked, so don't bother handling this case.
8904
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8905
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8907
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8912
*.$objext|*.$libext)
8913
# This assumes that the test object file only shows up
8914
# once in the compiler output.
8915
if test "$p" = "conftest.$objext"; then
8916
pre_test_object_deps_done=yes
8920
if test "$pre_test_object_deps_done" = no; then
8921
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8922
_LT_AC_TAGVAR(predep_objects, $1)="$p"
8924
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8927
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8928
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
8930
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8935
*) ;; # Ignore the rest.
8943
echo "libtool.m4: error: problem compiling $1 test program"
8946
$rm -f confest.$objext
8948
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8949
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8951
])# AC_LIBTOOL_POSTDEP_PREDEP
8953
# AC_LIBTOOL_LANG_F77_CONFIG
8954
# ------------------------
8955
# Ensure that the configuration vars for the C compiler are
8956
# suitably defined. Those variables are subsequently used by
8957
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8958
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
8959
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
8960
[AC_REQUIRE([AC_PROG_F77])
8961
AC_LANG_PUSH(Fortran 77)
8963
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8964
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8965
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8966
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8967
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8968
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8969
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8970
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8971
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8972
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8973
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8974
_LT_AC_TAGVAR(module_cmds, $1)=
8975
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8976
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8977
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8978
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8979
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8980
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8982
# Source file extension for f77 test sources.
8985
# Object file extension for compiled f77 test sources.
8987
_LT_AC_TAGVAR(objext, $1)=$objext
8989
# Code to be used in simple compile tests
8990
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
8992
# Code to be used in simple link tests
8993
lt_simple_link_test_code=" program t\n end\n"
8995
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8998
# Allow CC to be a program name with arguments.
9002
_LT_AC_TAGVAR(compiler, $1)=$CC
9003
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9005
AC_MSG_CHECKING([if libtool supports shared libraries])
9006
AC_MSG_RESULT([$can_build_shared])
9008
AC_MSG_CHECKING([whether to build shared libraries])
9009
test "$can_build_shared" = "no" && enable_shared=no
9011
# On AIX, shared libraries and static libraries use the same namespace, and
9012
# are all built from PIC.
9015
test "$enable_shared" = yes && enable_static=no
9016
if test -n "$RANLIB"; then
9017
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9018
postinstall_cmds='$RANLIB $lib'
9022
test "$enable_shared" = yes && enable_static=no
9025
AC_MSG_RESULT([$enable_shared])
9027
AC_MSG_CHECKING([whether to build static libraries])
9028
# Make sure either enable_shared or enable_static is yes.
9029
test "$enable_shared" = yes || enable_static=yes
9030
AC_MSG_RESULT([$enable_static])
9032
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9034
_LT_AC_TAGVAR(GCC, $1)="$G77"
9035
_LT_AC_TAGVAR(LD, $1)="$LD"
9037
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9038
AC_LIBTOOL_PROG_CC_C_O($1)
9039
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9040
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9041
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9042
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9043
AC_LIBTOOL_SYS_LIB_STRIP
9046
AC_LIBTOOL_CONFIG($1)
9050
])# AC_LIBTOOL_LANG_F77_CONFIG
9053
# AC_LIBTOOL_LANG_GCJ_CONFIG
9054
# --------------------------
9055
# Ensure that the configuration vars for the C compiler are
9056
# suitably defined. Those variables are subsequently used by
9057
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9058
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9059
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9062
# Source file extension for Java test sources.
9065
# Object file extension for compiled Java test sources.
9067
_LT_AC_TAGVAR(objext, $1)=$objext
9069
# Code to be used in simple compile tests
9070
lt_simple_compile_test_code="class foo {}\n"
9072
# Code to be used in simple link tests
9073
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9075
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9078
# Allow CC to be a program name with arguments.
9082
_LT_AC_TAGVAR(compiler, $1)=$CC
9084
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9085
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9088
## There is no encapsulation within the following macros, do not change
9089
## the running order or otherwise move them around unless you know exactly
9090
## what you are doing...
9091
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9092
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9093
AC_LIBTOOL_PROG_CC_C_O($1)
9094
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9095
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9096
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9097
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9098
AC_LIBTOOL_SYS_LIB_STRIP
9099
AC_LIBTOOL_DLOPEN_SELF($1)
9101
AC_LIBTOOL_CONFIG($1)
9105
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9108
# AC_LIBTOOL_LANG_RC_CONFIG
9109
# --------------------------
9110
# Ensure that the configuration vars for the Windows resource compiler are
9111
# suitably defined. Those variables are subsequently used by
9112
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9113
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9114
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9117
# Source file extension for RC test sources.
9120
# Object file extension for compiled RC test sources.
9122
_LT_AC_TAGVAR(objext, $1)=$objext
9124
# Code to be used in simple compile tests
9125
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9127
# Code to be used in simple link tests
9128
lt_simple_link_test_code="$lt_simple_compile_test_code"
9130
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9133
# Allow CC to be a program name with arguments.
9137
_LT_AC_TAGVAR(compiler, $1)=$CC
9138
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9140
AC_LIBTOOL_CONFIG($1)
9144
])# AC_LIBTOOL_LANG_RC_CONFIG
9147
# AC_LIBTOOL_CONFIG([TAGNAME])
9148
# ----------------------------
9149
# If TAGNAME is not passed, then create an initial libtool script
9150
# with a default configuration from the untagged config vars. Otherwise
9151
# add code to config.status for appending the configuration named by
9152
# TAGNAME from the matching tagged config vars.
9153
AC_DEFUN([AC_LIBTOOL_CONFIG],
9154
[# The else clause should only fire when bootstrapping the
9155
# libtool distribution, otherwise you forgot to ship ltmain.sh
9156
# with your package, and you will get complaints that there are
9157
# no rules to generate ltmain.sh.
9158
if test -f "$ltmain"; then
9159
# See if we are running on zsh, and set the options which allow our commands through
9160
# without removal of \ escapes.
9161
if test -n "${ZSH_VERSION+set}" ; then
9162
setopt NO_GLOB_SUBST
9164
# Now quote all the things that may contain metacharacters while being
9165
# careful not to overquote the AC_SUBSTed values. We take copies of the
9166
# variables and quote the copies for generation of the libtool script.
9167
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9168
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9169
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9170
deplibs_check_method reload_flag reload_cmds need_locks \
9171
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9172
lt_cv_sys_global_symbol_to_c_name_address \
9173
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9174
old_postinstall_cmds old_postuninstall_cmds \
9175
_LT_AC_TAGVAR(compiler, $1) \
9176
_LT_AC_TAGVAR(CC, $1) \
9177
_LT_AC_TAGVAR(LD, $1) \
9178
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9179
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9180
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9181
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9182
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9183
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9184
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9185
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9186
_LT_AC_TAGVAR(old_archive_cmds, $1) \
9187
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9188
_LT_AC_TAGVAR(predep_objects, $1) \
9189
_LT_AC_TAGVAR(postdep_objects, $1) \
9190
_LT_AC_TAGVAR(predeps, $1) \
9191
_LT_AC_TAGVAR(postdeps, $1) \
9192
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9193
_LT_AC_TAGVAR(archive_cmds, $1) \
9194
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9195
_LT_AC_TAGVAR(postinstall_cmds, $1) \
9196
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
9197
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9198
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
9199
_LT_AC_TAGVAR(no_undefined_flag, $1) \
9200
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
9201
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9202
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9203
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9204
_LT_AC_TAGVAR(hardcode_automatic, $1) \
9205
_LT_AC_TAGVAR(module_cmds, $1) \
9206
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
9207
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9208
_LT_AC_TAGVAR(exclude_expsyms, $1) \
9209
_LT_AC_TAGVAR(include_expsyms, $1); do
9212
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
9213
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9214
_LT_AC_TAGVAR(archive_cmds, $1) | \
9215
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9216
_LT_AC_TAGVAR(module_cmds, $1) | \
9217
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9218
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9219
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9220
extract_expsyms_cmds | reload_cmds | finish_cmds | \
9221
postinstall_cmds | postuninstall_cmds | \
9222
old_postinstall_cmds | old_postuninstall_cmds | \
9223
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9224
# Double-quote double-evaled strings.
9225
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9228
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9234
*'\[$]0 --fallback-echo"')
9235
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9240
[cfgfile="${ofile}T"
9241
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9243
AC_MSG_NOTICE([creating $ofile])],
9246
cat <<__EOF__ >> "$cfgfile"
9250
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9251
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9252
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9254
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9255
# Free Software Foundation, Inc.
9257
# This file is part of GNU Libtool:
9258
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9260
# This program is free software; you can redistribute it and/or modify
9261
# it under the terms of the GNU General Public License as published by
9262
# the Free Software Foundation; either version 2 of the License, or
9263
# (at your option) any later version.
9265
# This program is distributed in the hope that it will be useful, but
9266
# WITHOUT ANY WARRANTY; without even the implied warranty of
9267
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9268
# General Public License for more details.
9270
# You should have received a copy of the GNU General Public License
9271
# along with this program; if not, write to the Free Software
9272
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9274
# As a special exception to the GNU General Public License, if you
9275
# distribute this file as part of a program that contains a
9276
# configuration script generated by Autoconf, you may include it under
9277
# the same distribution terms that you use for the rest of that program.
9279
# A sed program that does not truncate output.
9282
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9283
Xsed="$SED -e s/^X//"
9285
# The HP-UX ksh and POSIX shell print the target directory to stdout
9287
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9289
# The names of the tagged configurations supported by this script.
9292
# ### BEGIN LIBTOOL CONFIG],
9293
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9295
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9297
# Shell to use when invoking shell scripts.
9300
# Whether or not to build shared libraries.
9301
build_libtool_libs=$enable_shared
9303
# Whether or not to build static libraries.
9304
build_old_libs=$enable_static
9306
# Whether or not to add -lc for building shared libraries.
9307
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9309
# Whether or not to disallow shared libs when runtime libs are static
9310
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9312
# Whether or not to optimize for fast installation.
9313
fast_install=$enable_fast_install
9316
host_alias=$host_alias
9319
# An echo program that does not interpret backslashes.
9324
AR_FLAGS=$lt_AR_FLAGS
9329
# A language-specific compiler.
9330
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9332
# Is the compiler the GNU C compiler?
9333
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9338
# The linker used to build libraries.
9339
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9341
# Whether we need hard or soft links.
9344
# A BSD-compatible nm program.
9347
# A symbol stripping program
9350
# Used to examine libraries when file_magic_cmd begins "file"
9351
MAGIC_CMD=$MAGIC_CMD
9353
# Used on cygwin: DLL creation program.
9356
# Used on cygwin: object dumper.
9359
# Used on cygwin: assembler.
9362
# The name of the directory that contains temporary libtool files.
9365
# How to create reloadable object files.
9366
reload_flag=$lt_reload_flag
9367
reload_cmds=$lt_reload_cmds
9369
# How to pass a linker flag through the compiler.
9370
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9372
# Object file suffix (normally "o").
9375
# Old archive suffix (normally "a").
9378
# Shared library suffix (normally ".so").
9381
# Executable file suffix (normally "").
9384
# Additional compiler flags for building library objects.
9385
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9388
# What is the maximum length of a command?
9389
max_cmd_len=$lt_cv_sys_max_cmd_len
9391
# Does compiler simultaneously support -c and -o options?
9392
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9394
# Must we lock files when doing compilation ?
9395
need_locks=$lt_need_locks
9397
# Do we need the lib prefix for modules?
9398
need_lib_prefix=$need_lib_prefix
9400
# Do we need a version for libraries?
9401
need_version=$need_version
9403
# Whether dlopen is supported.
9404
dlopen_support=$enable_dlopen
9406
# Whether dlopen of programs is supported.
9407
dlopen_self=$enable_dlopen_self
9409
# Whether dlopen of statically linked programs is supported.
9410
dlopen_self_static=$enable_dlopen_self_static
9412
# Compiler flag to prevent dynamic linking.
9413
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9415
# Compiler flag to turn off builtin functions.
9416
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9418
# Compiler flag to allow reflexive dlopens.
9419
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9421
# Compiler flag to generate shared objects directly from archives.
9422
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9424
# Compiler flag to generate thread-safe objects.
9425
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9427
# Library versioning type.
9428
version_type=$version_type
9430
# Format of library name prefix.
9431
libname_spec=$lt_libname_spec
9433
# List of archive names. First name is the real one, the rest are links.
9434
# The last name is the one that the linker finds with -lNAME.
9435
library_names_spec=$lt_library_names_spec
9437
# The coded name of the library, if different from the real name.
9438
soname_spec=$lt_soname_spec
9440
# Commands used to build and install an old-style archive.
9442
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9443
old_postinstall_cmds=$lt_old_postinstall_cmds
9444
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9446
# Create an old-style archive from a shared archive.
9447
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9449
# Create a temporary old-style archive to link instead of a shared archive.
9450
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9452
# Commands used to build and install a shared archive.
9453
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9454
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9455
postinstall_cmds=$lt_postinstall_cmds
9456
postuninstall_cmds=$lt_postuninstall_cmds
9458
# Commands used to build a loadable module (assumed same as above if empty)
9459
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9460
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9462
# Commands to strip libraries.
9463
old_striplib=$lt_old_striplib
9464
striplib=$lt_striplib
9466
# Dependencies to place before the objects being linked to create a
9468
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9470
# Dependencies to place after the objects being linked to create a
9472
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9474
# Dependencies to place before the objects being linked to create a
9476
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9478
# Dependencies to place after the objects being linked to create a
9480
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9482
# The library search path used internally by the compiler when linking
9484
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9486
# Method to check whether dependent libraries are shared objects.
9487
deplibs_check_method=$lt_deplibs_check_method
9489
# Command to use when deplibs_check_method == file_magic.
9490
file_magic_cmd=$lt_file_magic_cmd
9492
# Flag that allows shared libraries with undefined symbols to be built.
9493
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9495
# Flag that forces no undefined symbols.
9496
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9498
# Commands used to finish a libtool library installation in a directory.
9499
finish_cmds=$lt_finish_cmds
9501
# Same as above, but a single script fragment to be evaled but not shown.
9502
finish_eval=$lt_finish_eval
9504
# Take the output of nm and produce a listing of raw symbols and C names.
9505
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9507
# Transform the output of nm in a proper C declaration
9508
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9510
# Transform the output of nm in a C name address pair
9511
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9513
# This is the shared library runtime path variable.
9514
runpath_var=$runpath_var
9516
# This is the shared library path variable.
9517
shlibpath_var=$shlibpath_var
9519
# Is shlibpath searched before the hard-coded library search path?
9520
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9522
# How to hardcode a shared library path into an executable.
9523
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9525
# Whether we should hardcode library paths into libraries.
9526
hardcode_into_libs=$hardcode_into_libs
9528
# Flag to hardcode \$libdir into a binary during linking.
9529
# This must work even if \$libdir does not exist.
9530
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9532
# If ld is used when linking, flag to hardcode \$libdir into
9533
# a binary during linking. This must work even if \$libdir does
9535
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9537
# Whether we need a single -rpath flag with a separated argument.
9538
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9540
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9542
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9544
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9546
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9548
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9549
# the resulting binary.
9550
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9552
# Set to yes if building a shared library automatically hardcodes DIR into the library
9553
# and all subsequent libraries and executables linked against it.
9554
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9556
# Variables whose values should be saved in libtool wrapper scripts and
9557
# restored at relink time.
9558
variables_saved_for_relink="$variables_saved_for_relink"
9560
# Whether libtool must link a program against all its dependency libraries.
9561
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9563
# Compile-time system search path for libraries
9564
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9566
# Run-time system search path for libraries
9567
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9569
# Fix the shell variable \$srcfile for the compiler.
9570
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9572
# Set to yes if exported symbols are required.
9573
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9575
# The commands to list exported symbols.
9576
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9578
# The commands to extract the exported symbol list from a shared archive.
9579
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9581
# Symbols that should not be listed in the preloaded symbols.
9582
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9584
# Symbols that must always be exported.
9585
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9588
[# ### END LIBTOOL CONFIG],
9589
[# ### END LIBTOOL TAG CONFIG: $tagname])
9596
cat <<\EOF >> "$cfgfile"
9598
# AIX sometimes has problems with the GCC collect2 program. For some
9599
# reason, if we set the COLLECT_NAMES environment variable, the problems
9600
# vanish in a puff of smoke.
9601
if test "X${COLLECT_NAMES+set}" != Xset; then
9603
export COLLECT_NAMES
9609
# We use sed instead of cat because bash on DJGPP gets confused if
9610
# if finds mixed CR/LF and LF-only lines. Since sed operates in
9611
# text mode, it properly converts lines to CR/LF. This bash problem
9612
# is reportedly fixed, but why not run on old versions too?
9613
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9615
mv -f "$cfgfile" "$ofile" || \
9616
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9620
# If there is no Makefile yet, we rely on a make rule to execute
9621
# `config.status --recheck' to rerun these tests and create the
9622
# libtool script then.
9623
test -f Makefile && make "$ltmain"
9625
])# AC_LIBTOOL_CONFIG
9628
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9629
# -------------------------------------------
9630
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9631
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9633
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9635
if test "$GCC" = yes; then
9636
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9638
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9639
lt_cv_prog_compiler_rtti_exceptions,
9640
[-fno-rtti -fno-exceptions], [],
9641
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9643
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9646
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9647
# ---------------------------------
9648
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9649
[AC_REQUIRE([AC_CANONICAL_HOST])
9650
AC_REQUIRE([AC_PROG_NM])
9651
AC_REQUIRE([AC_OBJEXT])
9652
# Check for command to grab the raw symbol name followed by C symbol from nm.
9653
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9654
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9656
# These are sane defaults that work on at least a few old systems.
9657
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9659
# Character class describing NM global symbol codes.
9660
symcode='[[BCDEGRST]]'
9662
# Regexp to match symbols that can be accessed directly from C.
9663
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9665
# Transform the above into a raw symbol and a C symbol.
9666
symxfrm='\1 \2\3 \3'
9668
# Transform an extracted symbol line into a proper C declaration
9669
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9671
# Transform an extracted symbol line into symbol name and symbol address
9672
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'"
9674
# Define system-specific variables.
9679
cygwin* | mingw* | pw32*)
9680
symcode='[[ABCDGISTW]]'
9682
hpux*) # Its linker distinguishes data from code symbols
9683
if test "$host_cpu" = ia64; then
9684
symcode='[[ABCDEGRST]]'
9686
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9687
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'"
9690
symcode='[[BCDEGRST]]'
9693
symcode='[[BCDEGQRST]]'
9699
symcode='[[DFNSTU]]'
9703
# Handle CRLF in mingw tool chain
9707
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9711
# If we're using GNU nm, then use its standard symbol codes.
9712
case `$NM -V 2>&1` in
9713
*GNU* | *'with BFD'*)
9714
symcode='[[ABCDGISTW]]' ;;
9717
# Try without a prefix undercore, then with it.
9718
for ac_symprfx in "" "_"; do
9720
# Write the raw and C identifiers.
9721
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9723
# Check to see that the pipe works correctly.
9727
cat > conftest.$ac_ext <<EOF
9732
void nm_test_func(){}
9736
int main(){nm_test_var='a';nm_test_func();return(0);}
9739
if AC_TRY_EVAL(ac_compile); then
9740
# Now try to grab the symbols.
9742
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9743
# Try sorting and uniquifying the output.
9744
if sort "$nlist" | uniq > "$nlist"T; then
9745
mv -f "$nlist"T "$nlist"
9750
# Make sure that we snagged all the symbols we need.
9751
if grep ' nm_test_var$' "$nlist" >/dev/null; then
9752
if grep ' nm_test_func$' "$nlist" >/dev/null; then
9753
cat <<EOF > conftest.$ac_ext
9759
# Now generate the symbol file.
9760
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9762
cat <<EOF >> conftest.$ac_ext
9763
#if defined (__STDC__) && __STDC__
9764
# define lt_ptr_t void *
9766
# define lt_ptr_t char *
9770
/* The mapping between symbol names and symbols. */
9775
lt_preloaded_symbols[[]] =
9778
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9779
cat <<\EOF >> conftest.$ac_ext
9787
# Now try linking the two files.
9788
mv conftest.$ac_objext conftstm.$ac_objext
9789
lt_save_LIBS="$LIBS"
9790
lt_save_CFLAGS="$CFLAGS"
9791
LIBS="conftstm.$ac_objext"
9792
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9793
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9796
LIBS="$lt_save_LIBS"
9797
CFLAGS="$lt_save_CFLAGS"
9799
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9802
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9805
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9808
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9809
cat conftest.$ac_ext >&5
9811
rm -f conftest* conftst*
9813
# Do not use the global_symbol_pipe unless it works.
9814
if test "$pipe_works" = yes; then
9817
lt_cv_sys_global_symbol_pipe=
9821
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9822
lt_cv_sys_global_symbol_to_cdecl=
9824
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9825
AC_MSG_RESULT(failed)
9829
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9832
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9833
# ---------------------------------------
9834
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9835
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9836
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9837
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9839
AC_MSG_CHECKING([for $compiler option to produce PIC])
9841
# C++ specific cases for pic, static, wl, etc.
9842
if test "$GXX" = yes; then
9843
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9844
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9848
# All AIX code is PIC.
9849
if test "$host_cpu" = ia64; then
9850
# AIX 5 now supports IA64 processor
9851
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9855
# FIXME: we need at least 68020 code to build shared libraries, but
9856
# adding the `-m68020' flag to GCC prevents building anything better,
9858
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9860
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9861
# PIC is the default for these OSes.
9863
mingw* | os2* | pw32*)
9864
# This hack is so that the source file can tell whether it is being
9865
# built for inclusion in a dll (and should export symbols for example).
9866
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9868
darwin* | rhapsody*)
9869
# PIC is the default on this platform
9870
# Common symbols not allowed in MH_DYLIB files
9871
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9874
# DJGPP does not support shared libraries at all
9875
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9878
if test -d /usr/nec; then
9879
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9883
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9889
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9894
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9900
# All AIX code is PIC.
9901
if test "$host_cpu" = ia64; then
9902
# AIX 5 now supports IA64 processor
9903
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9905
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9909
case $cc_basename in
9911
# Green Hills C++ Compiler
9912
# _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"
9917
case $cc_basename in
9919
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9922
# Green Hills C++ Compiler
9923
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9930
# FreeBSD uses GNU C++
9932
hpux9* | hpux10* | hpux11*)
9933
case $cc_basename in
9935
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9936
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9937
if test "$host_cpu" != ia64; then
9938
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9942
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9943
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9949
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9957
irix5* | irix6* | nonstopux*)
9958
case $cc_basename in
9960
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9961
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9962
# CC pic flag -KPIC is the default.
9969
case $cc_basename in
9972
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9973
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9977
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9978
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9979
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9983
# Make sure the PIC flag is empty. It appears that all Alpha
9984
# Linux and Compaq Tru64 Unix objects are PIC.
9985
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9986
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9997
case $cc_basename in
9999
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10007
osf3* | osf4* | osf5*)
10008
case $cc_basename in
10010
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10013
# Rational C++ 2.4.1
10014
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10017
# Digital/Compaq C++
10018
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10019
# Make sure the PIC flag is empty. It appears that all Alpha
10020
# Linux and Compaq Tru64 Unix objects are PIC.
10021
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10022
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10031
case $cc_basename in
10033
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10040
case $cc_basename in
10042
# Sun C++ 4.2, 5.x and Centerline C++
10043
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10044
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10045
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10048
# Green Hills C++ Compiler
10049
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10056
case $cc_basename in
10059
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10060
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10064
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10071
case $cc_basename in
10073
# NonStop-UX NCC 3.20
10074
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10085
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10091
if test "$GCC" = yes; then
10092
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10093
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10097
# All AIX code is PIC.
10098
if test "$host_cpu" = ia64; then
10099
# AIX 5 now supports IA64 processor
10100
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10105
# FIXME: we need at least 68020 code to build shared libraries, but
10106
# adding the `-m68020' flag to GCC prevents building anything better,
10108
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10111
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10112
# PIC is the default for these OSes.
10115
mingw* | pw32* | os2*)
10116
# This hack is so that the source file can tell whether it is being
10117
# built for inclusion in a dll (and should export symbols for example).
10118
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10121
darwin* | rhapsody*)
10122
# PIC is the default on this platform
10123
# Common symbols not allowed in MH_DYLIB files
10124
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10128
# Just because we use GCC doesn't mean we suddenly get shared libraries
10129
# on systems that don't support them.
10130
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10135
if test -d /usr/nec; then
10136
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10141
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10142
# not for PA HP-UX.
10143
case "$host_cpu" in
10148
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10154
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10158
# PORTME Check for flag to pass linker flags through the system compiler.
10161
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10162
if test "$host_cpu" = ia64; then
10163
# AIX 5 now supports IA64 processor
10164
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10166
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10170
mingw* | pw32* | os2*)
10171
# This hack is so that the source file can tell whether it is being
10172
# built for inclusion in a dll (and should export symbols for example).
10173
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10176
hpux9* | hpux10* | hpux11*)
10177
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10178
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10179
# not for PA HP-UX.
10180
case "$host_cpu" in
10185
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10188
# Is there a better lt_prog_compiler_static that works with the bundled CC?
10189
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10192
irix5* | irix6* | nonstopux*)
10193
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10194
# PIC (with -KPIC) is the default.
10195
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10199
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10200
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10206
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10207
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10208
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10211
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10212
# All Alpha code is PIC.
10213
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10218
osf3* | osf4* | osf5*)
10219
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10220
# All OSF/1 code is PIC.
10221
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10225
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10226
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10230
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10231
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10232
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10236
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10237
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10238
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10241
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10242
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10243
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10244
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10248
if test -d /usr/nec ;then
10249
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10250
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10255
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10256
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10260
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10265
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10268
# Check to make sure the PIC flag actually works.
10270
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10271
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10272
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10273
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10274
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10276
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10278
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10279
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10282
# For platforms which do not support PIC, -DPIC is meaningless:
10284
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10287
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10293
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10294
# ------------------------------------
10295
# See if the linker supports building shared libraries.
10296
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10297
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10298
ifelse([$1],[CXX],[
10299
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10302
# If we're using GNU nm, then we don't want the "-C" option.
10303
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10304
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10305
_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'
10307
_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'
10311
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10314
_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'
10317
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10322
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10323
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10324
_LT_AC_TAGVAR(archive_cmds, $1)=
10325
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10326
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10327
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10328
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10329
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10330
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10331
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10332
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10333
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10334
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10335
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10336
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10337
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10338
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
10339
_LT_AC_TAGVAR(module_cmds, $1)=
10340
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
10341
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10342
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10343
# include_expsyms should be a list of space-separated symbols to be *always*
10344
# included in the symbol list
10345
_LT_AC_TAGVAR(include_expsyms, $1)=
10346
# exclude_expsyms can be an extended regexp of symbols to exclude
10347
# it will be wrapped by ` (' and `)$', so one must not match beginning or
10348
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10349
# as well as any symbol that contains `d'.
10350
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10351
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10352
# platforms (ab)use it in PIC code, but their linkers get confused if
10353
# the symbol is explicitly referenced. Since portable code cannot
10354
# rely on this symbol name, it's probably fine to never include it in
10355
# preloaded symbol tables.
10356
extract_expsyms_cmds=
10359
cygwin* | mingw* | pw32*)
10360
# FIXME: the MSVC++ port hasn't been tested in a loooong time
10361
# When not using gcc, we currently assume that we are using
10362
# Microsoft Visual C++.
10363
if test "$GCC" != yes; then
10372
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10373
if test "$with_gnu_ld" = yes; then
10374
# If archive_cmds runs LD, not CC, wlarc should be empty
10377
# See if GNU ld supports shared libraries.
10379
aix3* | aix4* | aix5*)
10380
# On AIX/PPC, the GNU linker is very broken
10381
if test "$host_cpu" != ia64; then
10382
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10385
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10386
*** to be unable to reliably create shared libraries on AIX.
10387
*** Therefore, libtool is disabling shared libraries support. If you
10388
*** really care for shared libraries, you may want to modify your PATH
10389
*** so that a non-GNU linker is found, and then restart.
10396
_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)'
10397
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10398
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10400
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10401
# that the semantics of dynamic libraries on AmigaOS, at least up
10402
# to version 4, is to share data among multiple programs linked
10403
# with the same dynamic library. Since this doesn't match the
10404
# behavior of shared libraries on other platforms, we can't use
10406
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10410
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10411
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10412
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10413
# support --undefined. This deserves some investigation. FIXME
10414
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10416
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10420
cygwin* | mingw* | pw32*)
10421
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10422
# as there is no search path for DLLs.
10423
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10424
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10425
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10426
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10427
_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'
10429
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10430
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10431
# If the export-symbols file already is a .def file (1st line
10432
# is EXPORTS), use it as is; otherwise, prepend...
10433
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10434
cp $export_symbols $output_objdir/$soname.def;
10436
echo EXPORTS > $output_objdir/$soname.def;
10437
cat $export_symbols >> $output_objdir/$soname.def;
10439
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10446
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10447
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10450
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10451
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10456
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10457
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10460
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10461
*** create shared libraries on Solaris systems. Therefore, libtool
10462
*** is disabling shared libraries support. We urge you to upgrade GNU
10463
*** binutils to release 2.9.1 or newer. Another option is to modify
10464
*** your PATH or compiler configuration so that the native linker is
10465
*** used, and then restart.
10468
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10469
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10470
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10472
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10477
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10479
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10480
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10484
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10485
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10486
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10488
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10493
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10494
runpath_var=LD_RUN_PATH
10495
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10496
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10497
# ancient GNU ld didn't support --whole-archive et. al.
10498
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10499
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10501
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10505
# PORTME fill in a description of your system's linker (not GNU ld)
10508
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10509
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10510
_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'
10511
# Note: this linker hardcodes the directories in LIBPATH if there
10512
# are no directories specified by -L.
10513
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10514
if test "$GCC" = yes && test -z "$link_static_flag"; then
10515
# Neither direct hardcoding nor static linking is supported with a
10517
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10522
if test "$host_cpu" = ia64; then
10523
# On IA64, the linker does run time linking by default, so we don't
10524
# have to do anything special.
10525
aix_use_runtimelinking=no
10526
exp_sym_flag='-Bexport'
10529
# If we're using GNU nm, then we don't want the "-C" option.
10530
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10531
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10532
_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'
10534
_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'
10537
# KDE requires run time linking. Make it the default.
10538
aix_use_runtimelinking=yes
10539
exp_sym_flag='-bexport'
10540
no_entry_flag='-bnoentry'
10543
# When large executables or shared objects are built, AIX ld can
10544
# have problems creating the table of contents. If linking a library
10545
# or program results in "error TOC overflow" add -mminimal-toc to
10546
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10547
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10549
_LT_AC_TAGVAR(archive_cmds, $1)=''
10550
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10551
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10552
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10554
if test "$GCC" = yes; then
10555
case $host_os in aix4.[012]|aix4.[012].*)
10556
# We only want to do this on AIX 4.2 and lower, the check
10557
# below for broken collect2 doesn't work under 4.3+
10558
collect2name=`${CC} -print-prog-name=collect2`
10559
if test -f "$collect2name" && \
10560
strings "$collect2name" | grep resolve_lib_name >/dev/null
10562
# We have reworked collect2
10563
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10565
# We have old collect2
10566
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10567
# It fails to find uninstalled libraries when the uninstalled
10568
# path is not listed in the libpath. Setting hardcode_minus_L
10569
# to unsupported forces relinking
10570
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10571
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10572
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10575
shared_flag='-shared'
10578
if test "$host_cpu" = ia64; then
10579
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10580
# chokes on -Wl,-G. The following line is correct:
10583
if test "$aix_use_runtimelinking" = yes; then
10584
shared_flag='-qmkshrobj ${wl}-G'
10586
shared_flag='-qmkshrobj'
10591
# Let the compiler handle the export list.
10592
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10593
if test "$aix_use_runtimelinking" = yes; then
10594
# Warning - without using the other runtime loading flags (-brtl),
10595
# -berok will link without error, but may produce a broken library.
10596
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10597
# Determine the default libpath from the value encoded in an empty executable.
10598
_LT_AC_SYS_LIBPATH_AIX
10599
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10600
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10601
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10603
if test "$host_cpu" = ia64; then
10604
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10605
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10606
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10608
# Determine the default libpath from the value encoded in an empty executable.
10609
_LT_AC_SYS_LIBPATH_AIX
10610
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10611
# Warning - without using the other run time loading flags,
10612
# -berok will link without error, but may produce a broken library.
10613
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10614
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10615
# -bexpall does not export symbols beginning with underscore (_)
10616
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10617
# Exported symbols can be pulled into shared objects from archives
10618
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10619
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10620
# This is similar to how AIX traditionally builds it's shared libraries.
10621
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10627
_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)'
10628
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10629
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10630
# see comment about different semantics on the GNU ld section
10631
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10635
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10638
cygwin* | mingw* | pw32*)
10639
# When not using gcc, we currently assume that we are using
10640
# Microsoft Visual C++.
10641
# hardcode_libdir_flag_spec is actually meaningless, as there is
10642
# no search path for DLLs.
10643
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10644
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10645
# Tell ltmain to make .lib files, not .a files.
10647
# Tell ltmain to make .dll files, not .so files.
10649
# FIXME: Setting linknames here is a bad hack.
10650
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10651
# The linker will automatically build a .lib file if we build a DLL.
10652
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10653
# FIXME: Should let the user specify the lib program.
10654
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10655
fix_srcfile_path='`cygpath -w "$srcfile"`'
10656
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10659
darwin* | rhapsody*)
10660
if test "$GXX" = yes ; then
10661
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10663
rhapsody* | darwin1.[[012]])
10664
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10667
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10670
lt_int_apple_cc_single_mod=no
10671
output_verbose_link_cmd='echo'
10672
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
10673
lt_int_apple_cc_single_mod=yes
10675
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10676
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10678
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10680
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10681
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10682
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10683
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10685
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10687
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10688
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10689
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10690
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10691
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10692
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10694
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10699
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10700
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10701
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10705
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10708
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10709
# support. Future versions do this automatically, but an explicit c++rt0.o
10710
# does not break anything, and helps significantly (at the cost of a little
10713
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10714
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10715
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10716
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10719
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
10721
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10722
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10723
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10724
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10727
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10729
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10730
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10731
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10732
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10736
if test "$GCC" = yes; then
10737
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10739
_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'
10741
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10742
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10743
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10745
# hardcode_minus_L: Not really in the search PATH,
10746
# but as the default location of the library.
10747
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10748
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10752
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
10753
case "$host_cpu" in
10755
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10758
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10762
case "$host_cpu" in
10764
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10767
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10771
if test "$with_gnu_ld" = no; then
10772
case "$host_cpu" in
10774
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10775
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
10776
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10777
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10778
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10781
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10782
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10783
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10785
# hardcode_minus_L: Not really in the search PATH,
10786
# but as the default location of the library.
10787
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10790
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10791
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10792
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10793
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10795
# hardcode_minus_L: Not really in the search PATH,
10796
# but as the default location of the library.
10797
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10803
irix5* | irix6* | nonstopux*)
10804
if test "$GCC" = yes; then
10805
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10807
_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'
10808
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
10810
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10811
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10812
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10816
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10817
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10819
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10821
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10822
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10823
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10827
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10828
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10829
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10830
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10831
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10835
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10836
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10837
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10838
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10839
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10840
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10843
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10844
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10845
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10848
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10849
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10856
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10857
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10858
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10859
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
10860
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10864
if test "$GCC" = yes; then
10865
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10866
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10868
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10869
_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'
10871
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10872
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10875
osf4* | osf5*) # as osf3* with the addition of -msym flag
10876
if test "$GCC" = yes; then
10877
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10878
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10879
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10881
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10882
_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'
10883
_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~
10884
$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'
10886
# Both c and cxx compiler support -rpath directly
10887
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10889
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10893
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10894
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10895
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10896
runpath_var=LD_RUN_PATH
10897
hardcode_runpath_var=yes
10901
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10902
if test "$GCC" = yes; then
10903
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10904
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10905
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10907
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10908
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10909
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10911
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10912
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10914
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10915
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
10916
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10918
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10922
if test "x$host_vendor" = xsequent; then
10923
# Use $CC to link under sequent, because it throws in some extra .o
10924
# files that make .init and .fini sections work.
10925
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10927
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10929
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10930
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10931
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10932
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10936
case $host_vendor in
10938
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10939
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10942
## LD is ld it makes a PLAMLIB
10943
## CC just makes a GrossModule.
10944
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10945
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
10946
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10949
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10950
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10953
runpath_var='LD_RUN_PATH'
10954
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10958
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10959
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10960
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10964
if test -d /usr/nec; then
10965
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10966
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10967
runpath_var=LD_RUN_PATH
10968
hardcode_runpath_var=yes
10969
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10974
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10975
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10976
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10977
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10978
hardcode_runpath_var=yes
10979
runpath_var=LD_RUN_PATH
10982
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10983
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10984
if test "$GCC" = yes; then
10985
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10987
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10989
runpath_var='LD_RUN_PATH'
10990
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10994
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10995
# $CC -shared without GNU ld will not create a library from C++
10996
# object files and a static libstdc++, better avoid it by now
10997
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10998
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10999
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11000
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11001
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11002
runpath_var='LD_RUN_PATH'
11006
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11007
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11008
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11012
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11017
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11018
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11020
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11021
if test "$GCC" = yes; then
11022
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11026
# Do we need to explicitly link libc?
11028
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11030
# Assume -lc should be added
11031
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11033
if test "$enable_shared" = yes && test "$GCC" = yes; then
11034
case $_LT_AC_TAGVAR(archive_cmds, $1) in
11036
# FIXME: we may have to deal with multi-command sequences.
11039
# Test whether the compiler implicitly links with -lc since on some
11040
# systems, -lgcc has to come before -lc. If gcc already passes -lc
11041
# to ld, don't add -lc before -lgcc.
11042
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11044
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11046
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11049
libobjs=conftest.$ac_objext
11051
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11057
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11058
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11059
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11061
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11063
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11065
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11067
cat conftest.err 1>&5
11070
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11076
])# AC_LIBTOOL_PROG_LD_SHLIBS
11079
# _LT_AC_FILE_LTDLL_C
11080
# -------------------
11081
# Be careful that the start marker always follows a newline.
11082
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11083
# /* ltdll.c starts here */
11084
# #define WIN32_LEAN_AND_MEAN
11085
# #include <windows.h>
11086
# #undef WIN32_LEAN_AND_MEAN
11087
# #include <stdio.h>
11089
# #ifndef __CYGWIN__
11090
# # ifdef __CYGWIN32__
11091
# # define __CYGWIN__ __CYGWIN32__
11095
# #ifdef __cplusplus
11098
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11099
# #ifdef __cplusplus
11103
# #ifdef __CYGWIN__
11104
# #include <cygwin/cygwin_dll.h>
11105
# DECLARE_CYGWIN_DLL( DllMain );
11107
# HINSTANCE __hDllInstance_base;
11110
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11112
# __hDllInstance_base = hInst;
11115
# /* ltdll.c ends here */
11116
])# _LT_AC_FILE_LTDLL_C
11119
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11120
# ---------------------------------
11121
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11125
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11126
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11127
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11128
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11129
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11130
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11131
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11133
# This is just to silence aclocal about the macro not being used
11134
ifelse([AC_DISABLE_FAST_INSTALL])
11136
AC_DEFUN([LT_AC_PROG_GCJ],
11137
[AC_CHECK_TOOL(GCJ, gcj, no)
11138
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11142
AC_DEFUN([LT_AC_PROG_RC],
11143
[AC_CHECK_TOOL(RC, windres, no)
11146
############################################################
11147
# NOTE: This macro has been submitted for inclusion into #
11148
# GNU Autoconf as AC_PROG_SED. When it is available in #
11149
# a released version of Autoconf we should remove this #
11150
# macro and use it instead. #
11151
############################################################
11154
# Check for a fully-functional sed program, that truncates
11155
# as few characters as possible. Prefer GNU sed if found.
11156
AC_DEFUN([LT_AC_PROG_SED],
11157
[AC_MSG_CHECKING([for a sed that does not truncate output])
11158
AC_CACHE_VAL(lt_cv_path_SED,
11159
[# Loop through the user's path and test for sed and gsed.
11160
# Then use that list of sed's as ones to test for truncation.
11161
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11162
for as_dir in $PATH
11165
test -z "$as_dir" && as_dir=.
11166
for lt_ac_prog in sed gsed; do
11167
for ac_exec_ext in '' $ac_executable_extensions; do
11168
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11169
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11176
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11177
# along with /bin/sed that truncates output.
11178
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11179
test ! -f $lt_ac_sed && break
11180
cat /dev/null > conftest.in
11182
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11183
# Check for GNU sed and select it if it is found.
11184
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11185
lt_cv_path_SED=$lt_ac_sed
11189
cat conftest.in conftest.in >conftest.tmp
11190
mv conftest.tmp conftest.in
11191
cp conftest.in conftest.nl
11193
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11194
cmp -s conftest.out conftest.nl || break
11195
# 10000 chars as input seems more than enough
11196
test $lt_ac_count -gt 10 && break
11197
lt_ac_count=`expr $lt_ac_count + 1`
11198
if test $lt_ac_count -gt $lt_ac_max; then
11199
lt_ac_max=$lt_ac_count
11200
lt_cv_path_SED=$lt_ac_sed
11205
SED=$lt_cv_path_SED
11206
AC_MSG_RESULT([$SED])