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
[ --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 "$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
[ --enable-embedded link to Qt-embedded, don't use X],
854
kde_use_qt_emb=$enableval,
860
[ --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
[ --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"
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
[ --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
[ --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
[ --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
[ --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, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1630
kde_use_final=$enableval, kde_use_final=no)
1632
if test "x$kde_use_final" = "xyes"; then
1633
KDE_USE_FINAL_TRUE=""
1634
KDE_USE_FINAL_FALSE="#"
1636
KDE_USE_FINAL_TRUE="#"
1637
KDE_USE_FINAL_FALSE=""
1639
AC_SUBST(KDE_USE_FINAL_TRUE)
1640
AC_SUBST(KDE_USE_FINAL_FALSE)
1643
AC_DEFUN([KDE_CHECK_CLOSURE],
1645
AC_ARG_ENABLE(closure, [ --enable-closure delay template instantiation],
1646
kde_use_closure=$enableval, kde_use_closure=no)
1649
if test "x$kde_use_closure" = "xyes"; then
1650
KDE_USE_CLOSURE_TRUE=""
1651
KDE_USE_CLOSURE_FALSE="#"
1652
# CXXFLAGS="$CXXFLAGS $REPO"
1654
KDE_USE_CLOSURE_TRUE="#"
1655
KDE_USE_CLOSURE_FALSE=""
1659
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1660
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1661
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1662
[KDE_NO_UNDEFINED=""])],
1663
[KDE_NO_UNDEFINED=""])
1667
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1668
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1669
AC_SUBST(KDE_NO_UNDEFINED)
1672
AC_DEFUN([KDE_CHECK_NMCHECK],
1674
AC_ARG_ENABLE(nmcheck, [ --enable-nmcheck enable automatic namespace cleanness check],
1675
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1677
if test "$kde_use_nmcheck" = "yes"; then
1678
KDE_USE_NMCHECK_TRUE=""
1679
KDE_USE_NMCHECK_FALSE="#"
1681
KDE_USE_NMCHECK_TRUE="#"
1682
KDE_USE_NMCHECK_FALSE=""
1684
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1685
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1688
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1690
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1692
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1696
dnl ------------------------------------------------------------------------
1697
dnl Now, the same with KDE
1698
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1699
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1700
dnl ------------------------------------------------------------------------
1702
AC_DEFUN([AC_BASE_PATH_KDE],
1704
AC_REQUIRE([KDE_CHECK_STL])
1705
AC_REQUIRE([AC_PATH_QT])dnl
1706
AC_REQUIRE([KDE_CHECK_LIB64])
1709
AC_MSG_CHECKING([for KDE])
1711
if test "${prefix}" != NONE; then
1712
kde_includes=${includedir}
1713
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1715
kde_libraries=${libdir}
1716
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1725
AC_CACHE_VAL(ac_cv_have_kde,
1726
[#try to guess kde locations
1728
if test "$kde_qtver" = 1; then
1729
kde_check_header="ksock.h"
1730
kde_check_lib="libkdecore.la"
1732
kde_check_header="ksharedptr.h"
1733
kde_check_lib="libkio.la"
1736
if test -z "$1"; then
1738
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"
1739
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1740
kde_incdirs="$ac_kde_includes $kde_incdirs"
1741
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1742
ac_kde_includes="$kde_incdir"
1744
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1746
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1747
So, check this please and use another prefix!])
1750
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}"
1751
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1752
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1753
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1754
ac_kde_libraries="$kde_libdir"
1757
dnl this might be somewhere else
1758
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1760
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1762
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1763
So, check this please and use another prefix!])
1766
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1768
I can't find the designer plugins. These are required and should have been installed
1772
if test -n "$kde_widgetdir"; then
1773
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1777
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1778
ac_cv_have_kde="have_kde=no"
1780
ac_cv_have_kde="have_kde=yes \
1781
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1786
ac_cv_have_kde="have_kde=no"
1791
eval "$ac_cv_have_kde"
1793
if test "$have_kde" != "yes"; then
1794
if test "${prefix}" = NONE; then
1795
ac_kde_prefix="$ac_default_prefix"
1797
ac_kde_prefix="$prefix"
1799
if test "$exec_prefix" = NONE; then
1800
ac_kde_exec_prefix="$ac_kde_prefix"
1801
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1803
ac_kde_exec_prefix="$exec_prefix"
1804
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1807
kde_libraries="${libdir}"
1808
kde_includes="${includedir}"
1811
ac_cv_have_kde="have_kde=yes \
1812
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1813
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1815
kde_libraries="$ac_kde_libraries"
1816
kde_includes="$ac_kde_includes"
1818
AC_SUBST(kde_libraries)
1819
AC_SUBST(kde_includes)
1821
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1824
KDE_INCLUDES="-I$kde_includes"
1825
all_includes="$KDE_INCLUDES $all_includes"
1828
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1830
KDE_LDFLAGS="-L$kde_libraries"
1831
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1832
all_libraries="$all_libraries $KDE_LDFLAGS"
1835
AC_SUBST(KDE_LDFLAGS)
1836
AC_SUBST(KDE_INCLUDES)
1838
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1840
all_libraries="$all_libraries $USER_LDFLAGS"
1841
all_includes="$all_includes $USER_INCLUDES"
1842
AC_SUBST(all_includes)
1843
AC_SUBST(all_libraries)
1845
if test -z "$1"; then
1846
KDE_CHECK_UIC_PLUGINS
1849
ac_kde_libraries="$kde_libdir"
1856
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1858
AC_MSG_CHECKING(for extra includes)
1859
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1860
adds non standard include paths],
1861
kde_use_extra_includes="$withval",
1862
kde_use_extra_includes=NONE
1865
if test -n "$kde_use_extra_includes" && \
1866
test "$kde_use_extra_includes" != "NONE"; then
1870
for dir in $kde_use_extra_includes; do
1871
kde_extra_includes="$kde_extra_includes $dir"
1872
USER_INCLUDES="$USER_INCLUDES -I$dir"
1875
kde_use_extra_includes="added"
1877
kde_use_extra_includes="no"
1879
AC_SUBST(USER_INCLUDES)
1881
AC_MSG_RESULT($kde_use_extra_includes)
1884
AC_MSG_CHECKING(for extra libs)
1885
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1886
kde_use_extra_libs=$withval,
1887
kde_use_extra_libs=NONE
1889
if test -n "$kde_use_extra_libs" && \
1890
test "$kde_use_extra_libs" != "NONE"; then
1894
for dir in $kde_use_extra_libs; do
1895
kde_extra_libs="$kde_extra_libs $dir"
1896
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1897
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1900
kde_use_extra_libs="added"
1902
kde_use_extra_libs="no"
1905
AC_SUBST(USER_LDFLAGS)
1907
AC_MSG_RESULT($kde_use_extra_libs)
1911
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1913
AC_MSG_CHECKING([for KDE headers installed])
1916
cat > conftest.$ac_ext <<EOF
1918
# include <stdlib.h>
1921
#include "confdefs.h"
1925
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1926
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1927
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1928
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1929
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1930
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1931
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1932
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1933
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1934
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1935
printf("kde_wallpaperdir=\\"%s\\"\n",
1936
KApplication::kde_wallpaperdir().data());
1937
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1938
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1939
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1940
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1941
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1942
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1943
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1944
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1945
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
1946
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1947
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
1952
ac_save_CPPFLAGS=$CPPFLAGS
1953
CPPFLAGS="$all_includes $CPPFLAGS"
1954
if AC_TRY_EVAL(ac_compile); then
1957
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1958
Check, if you installed the KDE header files correctly.
1959
For more details about this problem, look at the end of config.log.])
1961
CPPFLAGS=$ac_save_CPPFLAGS
1966
AC_DEFUN([KDE_CHECK_KDEQTADDON],
1968
AC_MSG_CHECKING(for kde-qt-addon)
1969
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1971
kde_ldflags_safe="$LDFLAGS"
1972
kde_libs_safe="$LIBS"
1973
kde_cxxflags_safe="$CXXFLAGS"
1975
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1976
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1977
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1985
kde_cv_have_kdeqtaddon=yes,
1986
kde_cv_have_kdeqtaddon=no
1989
LDFLAGS=$kde_ldflags_safe
1991
CXXFLAGS=$kde_cxxflags_safe
1994
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1996
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1997
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1998
It is a separate package (and CVS module) named kde-qt-addon.])
2002
AC_DEFUN([KDE_CHECK_KIMGIO],
2004
AC_REQUIRE([AC_BASE_PATH_KDE])
2005
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2006
AC_REQUIRE([AC_FIND_TIFF])
2007
AC_REQUIRE([AC_FIND_JPEG])
2008
AC_REQUIRE([AC_FIND_PNG])
2009
AC_REQUIRE([AC_FIND_JASPER])
2010
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
2012
if test "$1" = "existence"; then
2015
kde_save_LIBS="$LIBS"
2016
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
2017
AC_CHECK_LIB(kimgio, kimgioRegister, [
2018
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
2019
LIBS="$kde_save_LIBS"
2022
LIBKIMGIO_EXISTS=yes
2025
if test "$LIBKIMGIO_EXISTS" = "yes"; then
2026
LIB_KIMGIO='-lkimgio'
2030
AC_SUBST(LIB_KIMGIO)
2033
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2035
AC_REQUIRE([KDE_MISC_TESTS])
2036
AC_REQUIRE([KDE_CHECK_LIBDL])
2037
AC_REQUIRE([K_PATH_X])
2039
if test $kde_qtver = 3; then
2040
AC_SUBST(LIB_KDECORE, "-lkdecore")
2041
AC_SUBST(LIB_KDEUI, "-lkdeui")
2042
AC_SUBST(LIB_KIO, "-lkio")
2043
AC_SUBST(LIB_SMB, "-lsmb")
2044
AC_SUBST(LIB_KAB, "-lkab")
2045
AC_SUBST(LIB_KABC, "-lkabc")
2046
AC_SUBST(LIB_KHTML, "-lkhtml")
2047
AC_SUBST(LIB_KSPELL, "-lkspell")
2048
AC_SUBST(LIB_KPARTS, "-lkparts")
2049
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2050
AC_SUBST(LIB_KUTILS, "-lkutils")
2051
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2052
# these are for backward compatibility
2053
AC_SUBST(LIB_KSYCOCA, "-lkio")
2054
AC_SUBST(LIB_KFILE, "-lkio")
2055
elif test $kde_qtver = 2; then
2056
AC_SUBST(LIB_KDECORE, "-lkdecore")
2057
AC_SUBST(LIB_KDEUI, "-lkdeui")
2058
AC_SUBST(LIB_KIO, "-lkio")
2059
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2060
AC_SUBST(LIB_SMB, "-lsmb")
2061
AC_SUBST(LIB_KFILE, "-lkfile")
2062
AC_SUBST(LIB_KAB, "-lkab")
2063
AC_SUBST(LIB_KHTML, "-lkhtml")
2064
AC_SUBST(LIB_KSPELL, "-lkspell")
2065
AC_SUBST(LIB_KPARTS, "-lkparts")
2066
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2068
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2069
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2070
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2071
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2072
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2076
AC_DEFUN([AC_PATH_KDE],
2079
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
2081
if test "$enableval" = "no";
2082
then ac_use_path_checking="default"
2083
else ac_use_path_checking=""
2087
if test "$kde_qtver" = 1;
2088
then ac_use_path_checking=""
2089
else ac_use_path_checking="default"
2094
AC_CREATE_KFSSTND($ac_use_path_checking)
2097
KDE_CREATE_LIBS_ALIASES
2100
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2101
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2103
AC_MSG_CHECKING(for $1)
2104
AC_CACHE_VAL(kde_cv_func_$1,
2108
save_CXXFLAGS="$CXXFLAGS"
2109
kde_safe_LIBS="$LIBS"
2110
LIBS="$LIBS $X_EXTRA_LIBS"
2111
if test "$GXX" = "yes"; then
2112
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2122
CXXFLAGS="$save_CXXFLAGS"
2123
LIBS="$kde_safe_LIBS"
2127
AC_MSG_RESULT($kde_cv_func_$1)
2129
AC_MSG_CHECKING([if $1 needs custom prototype])
2130
AC_CACHE_VAL(kde_cv_proto_$1,
2132
if test "x$kde_cv_func_$1" = xyes; then
2136
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2137
kde_cv_proto_$1="yes - in libkdefakes"
2140
kde_cv_proto_$1=unknown
2145
if test "x$kde_cv_proto_$1" = xunknown; then
2150
LIBS="$LIBS $X_EXTRA_LIBS"
2159
[ kde_cv_func_$1=yes
2160
kde_cv_proto_$1=yes ],
2161
[kde_cv_proto_$1="$1 unavailable"]
2167
AC_MSG_RESULT($kde_cv_proto_$1)
2169
if test "x$kde_cv_func_$1" = xyes; then
2170
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2173
if test "x$kde_cv_proto_$1" = xno; then
2174
AC_DEFINE(HAVE_$5_PROTO, 1,
2175
[Define if you have the $1 prototype])
2178
AH_VERBATIM([_HAVE_$5_PROTO],
2180
#if !defined(HAVE_$5_PROTO)
2192
AC_DEFUN([AC_CHECK_SETENV],
2194
KDE_CHECK_FUNC_EXT(setenv, [
2197
[setenv("VAR", "VALUE", 1);],
2198
[int setenv (const char *, const char *, int)],
2202
AC_DEFUN([AC_CHECK_UNSETENV],
2204
KDE_CHECK_FUNC_EXT(unsetenv, [
2208
[void unsetenv (const char *)],
2212
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2214
KDE_CHECK_FUNC_EXT(getdomainname, [
2221
getdomainname(buffer, 200);
2223
[#include <sys/types.h>
2224
int getdomainname (char *, size_t)],
2228
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2230
KDE_CHECK_FUNC_EXT(gethostname, [
2236
gethostname(buffer, 200);
2238
[int gethostname (char *, unsigned int)],
2242
AC_DEFUN([AC_CHECK_USLEEP],
2244
KDE_CHECK_FUNC_EXT(usleep, [
2250
[int usleep (unsigned int)],
2255
AC_DEFUN([AC_CHECK_RANDOM],
2257
KDE_CHECK_FUNC_EXT(random, [
2263
[long int random(void)],
2266
KDE_CHECK_FUNC_EXT(srandom, [
2272
[void srandom(unsigned int)],
2277
AC_DEFUN([AC_CHECK_INITGROUPS],
2279
KDE_CHECK_FUNC_EXT(initgroups, [
2280
#include <sys/types.h>
2286
initgroups(buffer, 27);
2288
[int initgroups(const char *, gid_t)],
2292
AC_DEFUN([AC_CHECK_MKSTEMPS],
2294
KDE_CHECK_FUNC_EXT(mkstemps, [
2299
mkstemps("/tmp/aaaXXXXXX", 6);
2301
[int mkstemps(char *, int)],
2305
AC_DEFUN([AC_CHECK_MKDTEMP],
2307
KDE_CHECK_FUNC_EXT(mkdtemp, [
2312
mkdtemp("/tmp/aaaXXXXXX");
2314
[char *mkdtemp(char *)],
2319
AC_DEFUN([AC_CHECK_RES_INIT],
2321
AC_MSG_CHECKING([if res_init needs -lresolv])
2322
kde_libs_safe="$LIBS"
2323
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2326
#include <sys/types.h>
2327
#include <netinet/in.h>
2328
#include <arpa/nameser.h>
2335
LIBRESOLV="-lresolv"
2337
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2339
[ AC_MSG_RESULT(no) ]
2344
AC_MSG_CHECKING([if res_init is available])
2347
#include <sys/types.h>
2348
#include <netinet/in.h>
2349
#include <arpa/nameser.h>
2357
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2359
[ AC_MSG_RESULT(no) ]
2363
AC_DEFUN([AC_CHECK_STRLCPY],
2365
KDE_CHECK_FUNC_EXT(strlcpy, [
2369
strlcpy(buf, "KDE function test", sizeof(buf));
2371
[unsigned long strlcpy(char*, const char*, unsigned long)],
2375
AC_DEFUN([AC_CHECK_STRLCAT],
2377
KDE_CHECK_FUNC_EXT(strlcat, [
2382
strlcat(buf, "KDE function test", sizeof(buf));
2384
[unsigned long strlcat(char*, const char*, unsigned long)],
2388
AC_DEFUN([AC_FIND_GIF],
2389
[AC_MSG_CHECKING([for giflib])
2390
AC_CACHE_VAL(ac_cv_lib_gif,
2391
[ac_save_LIBS="$LIBS"
2392
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2393
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2395
LIBS="$all_libraries -lgif"
2402
int GifLastError(void);
2406
/* We use char because int might match the return type of a gcc2
2407
builtin and then its argument prototype would still apply. */
2409
[return GifLastError();],
2410
eval "ac_cv_lib_gif=yes",
2411
eval "ac_cv_lib_gif=no")
2412
LIBS="$ac_save_LIBS"
2414
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2416
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2418
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2422
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2424
AC_MSG_CHECKING([for libjpeg$2])
2425
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2427
ac_save_LIBS="$LIBS"
2428
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2429
ac_save_CFLAGS="$CFLAGS"
2430
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2432
[/* Override any gcc2 internal prototype to avoid an error. */
2433
struct jpeg_decompress_struct;
2434
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2439
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2440
int version, size_t structsize);
2444
/* We use char because int might match the return type of a gcc2
2445
builtin and then its argument prototype would still apply. */
2447
[jpeg_CreateDecompress(0L, 0, 0);],
2448
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2449
eval "ac_cv_lib_jpeg_$1=no")
2450
LIBS="$ac_save_LIBS"
2451
CFLAGS="$ac_save_CFLAGS"
2454
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2455
LIBJPEG="$ac_cv_lib_jpeg_$1"
2456
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2464
AC_DEFUN([AC_FIND_JPEG],
2466
dnl first look for libraries
2467
KDE_FIND_JPEG_HELPER(6b, 6b,
2468
KDE_FIND_JPEG_HELPER(normal, [],
2475
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2476
dnl requires system dependent includes loaded before it)
2477
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2478
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2479
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2481
dnl if headers _and_ libraries are missing, this is no error, and we
2482
dnl continue with a warning (the user will get no jpeg support in khtml)
2483
dnl if only one is missing, it means a configuration error, but we still
2485
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2486
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2488
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2490
There is an installation error in jpeg support. You seem to have only one
2491
of either the headers _or_ the libraries installed. You may need to either
2492
provide correct --with-extra-... options, or the development package of
2493
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2494
Disabling JPEG support.
2497
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2504
AH_VERBATIM(_AC_CHECK_JPEG,
2506
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2507
* headers and I'm too lazy to write a configure test as long as only
2508
* unixware is related
2511
#define HAVE_BOOLEAN
2516
AC_DEFUN([KDE_CHECK_QT_JPEG],
2518
if test -n "$LIBJPEG"; then
2519
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2520
AC_CACHE_VAL(kde_cv_qt_jpeg,
2524
ac_save_LIBS="$LIBS"
2525
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2526
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2527
ac_save_CXXFLAGS="$CXXFLAGS"
2528
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2530
[#include <qapplication.h>],
2534
QApplication app(argc, argv);],
2535
eval "kde_cv_qt_jpeg=no",
2536
eval "kde_cv_qt_jpeg=yes")
2537
LIBS="$ac_save_LIBS"
2538
CXXFLAGS="$ac_save_CXXFLAGS"
2543
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2545
LIBJPEG_QT='$(LIBJPEG)'
2553
AC_DEFUN([AC_FIND_ZLIB],
2555
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2556
AC_MSG_CHECKING([for libz])
2557
AC_CACHE_VAL(ac_cv_lib_z,
2559
kde_save_LIBS="$LIBS"
2560
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2561
kde_save_CFLAGS="$CFLAGS"
2562
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2569
gzFile f = (gzFile) 0;
2570
/* this would segfault.. but we only link, don't run */
2571
(void) gzgets(f, buf, sizeof(buf));
2573
return (zlibVersion() == ZLIB_VERSION);
2575
eval "ac_cv_lib_z='-lz'",
2576
eval "ac_cv_lib_z=no")
2577
LIBS="$kde_save_LIBS"
2578
CFLAGS="$kde_save_CFLAGS"
2580
if test ! "$ac_cv_lib_z" = no; then
2581
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2583
AC_MSG_RESULT($ac_cv_lib_z)
2585
AC_MSG_ERROR(not found.
2586
Possibly configure picks up an outdated version
2587
installed by XFree86. Remove it from your system.
2589
Check your installation and look into config.log)
2595
AC_DEFUN([KDE_TRY_TIFFLIB],
2597
AC_MSG_CHECKING([for libtiff $1])
2599
AC_CACHE_VAL(kde_cv_libtiff_$1,
2603
kde_save_LIBS="$LIBS"
2604
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2605
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2607
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2609
kde_save_CXXFLAGS="$CXXFLAGS"
2610
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2616
[return (TIFFOpen( "", "r") == 0); ],
2618
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2620
kde_cv_libtiff_$1=no
2623
LIBS="$kde_save_LIBS"
2624
CXXFLAGS="$kde_save_CXXFLAGS"
2628
if test "$kde_cv_libtiff_$1" = "no"; then
2633
LIBTIFF="$kde_cv_libtiff_$1"
2635
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2641
AC_DEFUN([AC_FIND_TIFF],
2643
AC_REQUIRE([K_PATH_X])
2644
AC_REQUIRE([AC_FIND_ZLIB])
2645
AC_REQUIRE([AC_FIND_JPEG])
2646
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2648
KDE_TRY_TIFFLIB(tiff, [],
2649
KDE_TRY_TIFFLIB(tiff34))
2655
AC_DEFUN([AC_FIND_PNG],
2657
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2658
AC_REQUIRE([AC_FIND_ZLIB])
2659
AC_MSG_CHECKING([for libpng])
2660
AC_CACHE_VAL(ac_cv_lib_png,
2662
kde_save_LIBS="$LIBS"
2663
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2664
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2666
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2668
kde_save_CFLAGS="$CFLAGS"
2669
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2676
png_structp png_ptr = png_create_read_struct( /* image ptr */
2677
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2678
return( png_ptr != 0 );
2680
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2681
eval "ac_cv_lib_png=no"
2683
LIBS="$kde_save_LIBS"
2684
CFLAGS="$kde_save_CFLAGS"
2686
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2687
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2688
LIBPNG="$ac_cv_lib_png"
2690
AC_MSG_RESULT($ac_cv_lib_png)
2699
AC_DEFUN([AC_FIND_JASPER],
2701
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2702
AC_REQUIRE([AC_FIND_JPEG])
2703
AC_MSG_CHECKING([for jasper])
2704
AC_CACHE_VAL(ac_cv_jasper,
2706
kde_save_LIBS="$LIBS"
2707
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2708
kde_save_CFLAGS="$CFLAGS"
2709
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2713
#include<jasper/jasper.h>
2716
return( jas_init() );
2718
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2719
eval "ac_cv_jasper=no"
2721
LIBS="$kde_save_LIBS"
2722
CFLAGS="$kde_save_CFLAGS"
2724
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2725
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2726
LIB_JASPER="$ac_cv_jasper"
2727
AC_MSG_RESULT($ac_cv_jasper)
2732
AC_SUBST(LIB_JASPER)
2735
AC_DEFUN([AC_CHECK_BOOL],
2737
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2740
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2742
AC_MSG_CHECKING(if you need GNU extensions)
2743
AC_CACHE_VAL(ac_cv_gnu_extensions,
2745
cat > conftest.c << EOF
2746
#include <features.h>
2748
#ifdef __GNU_LIBRARY__
2753
if (eval "$ac_cpp conftest.c") 2>&5 |
2754
egrep "yes" >/dev/null 2>&1; then
2756
ac_cv_gnu_extensions=yes
2758
ac_cv_gnu_extensions=no
2762
AC_MSG_RESULT($ac_cv_gnu_extensions)
2763
if test "$ac_cv_gnu_extensions" = "yes"; then
2764
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2768
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2770
AC_MSG_CHECKING([whether $CXX supports -$1])
2771
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2772
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2776
save_CXXFLAGS="$CXXFLAGS"
2777
CXXFLAGS="$CXXFLAGS -$1"
2778
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2779
CXXFLAGS="$save_CXXFLAGS"
2782
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2793
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2794
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2795
dnl it's all white-space separated
2796
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2799
if test -n "$__val"; then
2805
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2806
*) # Careful to not add spaces, where there were none, because otherwise
2807
# libtool gets confused, if we change e.g. CXX
2808
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2816
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2817
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2819
if test "x$kde_use_qt_emb" != "xyes"; then
2820
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2821
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2823
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2824
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2828
AC_DEFUN([AC_CHECK_COMPILERS],
2830
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2834
kde_use_debug_code="yes"
2835
kde_use_debug_define=no
2838
kde_use_debug_code="full"
2839
kde_use_debug_define=no
2842
kde_use_debug_code="no"
2843
kde_use_debug_define=yes
2847
[kde_use_debug_code="no"
2848
kde_use_debug_define=no
2851
dnl Just for configure --help
2852
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2854
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2856
if test $enableval = "no"; then
2857
kde_use_strict_options="no"
2859
kde_use_strict_options="yes"
2861
], [kde_use_strict_options="no"])
2863
AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2865
if test $enableval = "no"; then
2866
kde_use_warnings="no"
2868
kde_use_warnings="yes"
2870
], [kde_use_warnings="yes"])
2872
dnl enable warnings for debug build
2873
if test "$kde_use_debug_code" != "no"; then
2874
kde_use_warnings=yes
2877
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2878
[kde_use_profiling=$enableval],
2879
[kde_use_profiling="no"]
2882
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2889
if test "$GCC" = "yes"; then
2890
if test "$kde_use_debug_code" != "no"; then
2891
if test $kde_use_debug_code = "full"; then
2892
CFLAGS="-g3 -fno-inline $CFLAGS"
2894
CFLAGS="-g -O2 $CFLAGS"
2897
CFLAGS="-O2 $CFLAGS"
2901
if test "$kde_use_debug_define" = "yes"; then
2902
CFLAGS="-DNDEBUG $CFLAGS"
2907
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2908
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2911
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2915
CXXFLAGS=" $CXXFLAGS"
2919
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2920
if test "$kde_use_debug_code" != "no"; then
2921
if test "$CXX" = "KCC"; then
2922
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2924
if test "$kde_use_debug_code" = "full"; then
2925
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
2927
CXXFLAGS="-g -O2 $CXXFLAGS"
2930
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2932
dnl convenience compiler flags
2933
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2934
AC_SUBST(WOVERLOADED_VIRTUAL)
2936
if test "$CXX" = "KCC"; then
2937
CXXFLAGS="+K3 $CXXFLAGS"
2939
CXXFLAGS="-O2 $CXXFLAGS"
2944
if test "$kde_use_debug_define" = "yes"; then
2945
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2948
if test "$kde_use_profiling" = "yes"; then
2949
KDE_CHECK_COMPILER_FLAG(pg,
2951
CFLAGS="-pg $CFLAGS"
2952
CXXFLAGS="-pg $CXXFLAGS"
2956
if test "$kde_use_warnings" = "yes"; then
2957
if test "$GCC" = "yes"; then
2960
CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2961
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2962
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2965
CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2966
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2967
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2968
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2972
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2973
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2976
if test "$GXX" = "yes"; then
2977
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2978
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2979
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2980
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2982
if test "$CXX" = "KCC"; then
2983
dnl unfortunately we currently cannot disable exception support in KCC
2984
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2985
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2986
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2988
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2990
kde_use_pch=$enableval
2993
if test "$kde_use_pch" = "yes"; then
2994
dnl TODO: support --pch-dir!
2995
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2996
dnl the below works (but the dir must exist), but it's
2997
dnl useless for a whole package.
2998
dnl The are precompiled headers for each source file, so when compiling
2999
dnl from scratch, it doesn't make a difference, and they take up
3000
dnl around ~5Mb _per_ sourcefile.
3001
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3002
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3004
dnl this flag controls inlining. by default KCC inlines in optimisation mode
3005
dnl all implementations that are defined inside the class {} declaration.
3006
dnl because of templates-compatibility with broken gcc compilers, this
3007
dnl can cause excessive inlining. This flag limits it to a sane level
3008
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3009
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3010
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3011
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3012
dnl Some source files are shared between multiple executables
3013
dnl (or libraries) and some of those need template instantiations.
3014
dnl In that case KCC needs to compile those sources with
3015
dnl --one_instantiation_per_object. To make it easy for us we compile
3016
dnl _all_ objects with that flag (--one_per is a shorthand).
3017
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3019
AC_SUBST(USE_EXCEPTIONS)
3020
dnl obsolete macro - provided to keep things going
3025
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3026
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3027
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3029
if test "$GXX" = yes; then
3030
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3031
if test ! -f $libstdcpp; then
3032
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])
3038
AC_VALIDIFY_CXXFLAGS
3042
if test "$GCC" = yes; then
3045
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3047
AC_SUBST(NOOPT_CXXFLAGS)
3048
AC_SUBST(NOOPT_CFLAGS)
3054
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3057
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3059
[A]M_DEPENDENCIES(CC)
3060
[A]M_DEPENDENCIES(CXX)
3063
dnl just a wrapper to clean up configure.in
3064
AC_DEFUN([KDE_PROG_LIBTOOL],
3066
AC_REQUIRE([AC_CHECK_COMPILERS])
3067
AC_REQUIRE([AC_ENABLE_SHARED])
3068
AC_REQUIRE([AC_ENABLE_STATIC])
3070
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3071
AC_REQUIRE([KDE_CHECK_LIB64])
3079
LIBTOOL_SHELL="/bin/sh ./libtool"
3080
# LIBTOOL="$LIBTOOL --silent"
3081
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3082
AC_SUBST(KDE_PLUGIN)
3084
# we patch configure quite some so we better keep that consistent for incremental runs
3085
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3088
AC_DEFUN([KDE_CHECK_LIB64],
3091
AC_ARG_ENABLE(libsuffix,
3092
AC_HELP_STRING([--enable-libsuffix],
3093
[/lib directory suffix (64,32,none[=default])]),
3094
kdelibsuff=$enableval)
3095
# TODO: add an auto case that compiles a little C app to check
3096
# where the glibc is
3097
if test "$kdelibsuff" = "no"; then
3100
if test -z "$kdelibsuff"; then
3101
AC_MSG_RESULT([not using lib directory suffix])
3102
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3104
if test "$libdir" = '${exec_prefix}/lib'; then
3105
libdir="$libdir${kdelibsuff}"
3106
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3108
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3109
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3113
AC_DEFUN([KDE_CHECK_TYPES],
3114
[ AC_CHECK_SIZEOF(int, 4)dnl
3115
AC_CHECK_SIZEOF(short)dnl
3116
AC_CHECK_SIZEOF(long, 4)dnl
3117
AC_CHECK_SIZEOF(char *, 4)dnl
3120
AC_DEFUN([KDE_DO_IT_ALL],
3124
AM_INIT_AUTOMAKE($1, $2)
3125
AM_DISABLE_LIBRARIES
3126
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3133
AC_DEFUN([AC_CHECK_RPATH],
3135
AC_MSG_CHECKING(for rpath)
3136
AC_ARG_ENABLE(rpath,
3137
[ --disable-rpath do not use the rpath feature of ld],
3138
USE_RPATH=$enableval, USE_RPATH=yes)
3140
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3142
KDE_RPATH="-R \$(kde_libraries)"
3144
if test -n "$qt_libraries"; then
3145
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3147
dnl $x_libraries is set to /usr/lib in case
3148
if test -n "$X_LDFLAGS"; then
3149
X_RPATH="-R \$(x_libraries)"
3150
KDE_RPATH="$KDE_RPATH $X_RPATH"
3152
if test -n "$KDE_EXTRA_RPATH"; then
3153
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3156
AC_SUBST(KDE_EXTRA_RPATH)
3159
AC_MSG_RESULT($USE_RPATH)
3162
dnl Check for the type of the third argument of getsockname
3163
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3164
AC_MSG_CHECKING(for socklen_t)
3165
AC_CACHE_VAL(ac_cv_socklen_t, [
3169
#include <sys/types.h>
3170
#include <sys/socket.h>
3173
getsockname(0,(struct sockaddr*)0, &a);
3175
ac_cv_socklen_t=socklen_t,
3177
#include <sys/types.h>
3178
#include <sys/socket.h>
3181
getsockname(0,(struct sockaddr*)0, &a);
3183
ac_cv_socklen_t=int,
3184
ac_cv_socklen_t=size_t
3190
AC_MSG_RESULT($ac_cv_socklen_t)
3191
if test "$ac_cv_socklen_t" != "socklen_t"; then
3192
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3193
[Define the real type of socklen_t])
3195
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3199
dnl This is a merge of some macros out of the gettext aclocal.m4
3200
dnl since we don't need anything, I took the things we need
3201
dnl the copyright for them is:
3203
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3204
dnl This Makefile.in is free software; the Free Software Foundation
3205
dnl gives unlimited permission to copy and/or distribute it,
3206
dnl with or without modifications, as long as this notice is preserved.
3208
dnl This program is distributed in the hope that it will be useful,
3209
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3210
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3211
dnl PARTICULAR PURPOSE.
3213
dnl for this file it is relicensed under LGPL
3215
AC_DEFUN([AM_KDE_WITH_NLS],
3217
dnl If we use NLS figure out what method
3219
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3220
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3221
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3223
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3224
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3231
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3232
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3234
dnl Test whether we really found GNU xgettext.
3235
if test "$XGETTEXT" != ":"; then
3236
dnl If it is no GNU xgettext we define it as : so that the
3237
dnl Makefiles still can work.
3238
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3242
[found xgettext programs is not GNU xgettext; ignore it])
3250
# Search path for a program which passes the given test.
3251
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3254
# Stephan Kulow: I appended a _KDE against name conflicts
3256
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3257
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3258
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3259
[# Extract the first word of "$2", so it can be a program name with args.
3260
set dummy $2; ac_word=[$]2
3261
AC_MSG_CHECKING([for $ac_word])
3262
AC_CACHE_VAL(ac_cv_path_$1,
3265
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3268
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3269
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3270
test -z "$ac_dir" && ac_dir=.
3271
if test -f $ac_dir/$ac_word; then
3273
ac_cv_path_$1="$ac_dir/$ac_word"
3279
dnl If no 4th arg is given, leave the cache variable unset,
3280
dnl so AC_PATH_PROGS will keep looking.
3281
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3286
if test -n "[$]$1"; then
3287
AC_MSG_RESULT([$]$1)
3295
# Check whether LC_MESSAGES is available in <locale.h>.
3296
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3300
AC_DEFUN([AM_LC_MESSAGES],
3301
[if test $ac_cv_header_locale_h = yes; then
3302
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3303
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3304
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3305
if test $am_cv_val_LC_MESSAGES = yes; then
3306
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3310
dnl From Jim Meyering.
3311
dnl FIXME: migrate into libit.
3313
AC_DEFUN([AM_FUNC_OBSTACK],
3314
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3315
[AC_TRY_LINK([#include "obstack.h"],
3316
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3317
am_cv_func_obstack=yes,
3318
am_cv_func_obstack=no)])
3319
if test $am_cv_func_obstack = yes; then
3320
AC_DEFINE(HAVE_OBSTACK)
3322
LIBOBJS="$LIBOBJS obstack.o"
3326
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3327
dnl FIXME: Migrate into libit
3329
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3330
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3331
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3332
am_cv_lib_error_at_line=yes,
3333
am_cv_lib_error_at_line=no)])
3334
if test $am_cv_lib_error_at_line = no; then
3335
LIBOBJS="$LIBOBJS error.o"
3337
AC_SUBST(LIBOBJS)dnl
3340
# Macro to add for using GNU gettext.
3341
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3344
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3346
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3347
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3348
AC_REQUIRE([AC_PROG_RANLIB])dnl
3349
AC_REQUIRE([AC_HEADER_STDC])dnl
3350
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3351
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3352
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3353
AC_REQUIRE([AC_FUNC_MMAP])dnl
3354
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3355
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3356
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3357
__argz_count __argz_stringify __argz_next])
3359
AC_MSG_CHECKING(for stpcpy)
3360
AC_CACHE_VAL(kde_cv_func_stpcpy,
3362
kde_safe_cxxflags=$CXXFLAGS
3371
stpcpy(buffer, buffer);
3373
kde_cv_func_stpcpy=yes,
3374
kde_cv_func_stpcpy=no)
3376
CXXFLAGS=$kde_safe_cxxflags
3378
AC_MSG_RESULT($kde_cv_func_stpcpy)
3379
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3380
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3385
if test "x$CATOBJEXT" != "x"; then
3386
if test "x$ALL_LINGUAS" = "x"; then
3389
AC_MSG_CHECKING(for catalogs to be installed)
3391
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3392
case "$ALL_LINGUAS" in
3393
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3396
LINGUAS=$NEW_LINGUAS
3397
AC_MSG_RESULT($LINGUAS)
3400
dnl Construct list of names of catalog files to be constructed.
3401
if test -n "$LINGUAS"; then
3402
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3408
AC_DEFUN([AC_HAVE_XPM],
3409
[AC_REQUIRE_CPP()dnl
3410
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3412
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3413
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3415
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3416
xpm_test=$withval, xpm_test="yes")
3417
if test "x$xpm_test" = xno; then
3420
AC_MSG_CHECKING(for XPM)
3421
AC_CACHE_VAL(ac_cv_have_xpm,
3423
ac_save_ldflags="$LDFLAGS"
3424
ac_save_cflags="$CFLAGS"
3425
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3426
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3428
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3430
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3431
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3432
AC_TRY_LINK([#include <X11/xpm.h>],[],
3433
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3434
LDFLAGS="$ac_save_ldflags"
3435
CFLAGS="$ac_save_cflags"
3438
if test "$ac_cv_have_xpm" = no; then
3444
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3445
if test "$XPM_LDFLAGS" = ""; then
3446
XPMLIB='-lXpm $(LIB_X11)'
3448
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3450
if test "$XPM_INCLUDE" = ""; then
3453
XPMINC="-I$XPM_INCLUDE"
3463
AC_DEFUN([AC_HAVE_DPMS],
3464
[AC_REQUIRE_CPP()dnl
3465
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3467
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3468
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3471
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3472
dpms_test=$withval, dpms_test="yes")
3473
if test "x$dpms_test" = xno; then
3476
AC_MSG_CHECKING(for DPMS)
3477
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3478
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3479
AC_CACHE_VAL(ac_cv_have_dpms,
3481
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3483
ac_cv_have_dpms="no"
3485
ac_save_ldflags="$LDFLAGS"
3486
ac_save_cflags="$CFLAGS"
3487
ac_save_libs="$LIBS"
3488
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3489
CFLAGS="$CFLAGS $X_INCLUDES"
3490
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3492
#include <X11/Xproto.h>
3494
#include <X11/Xlib.h>
3495
#include <X11/extensions/dpms.h>
3497
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3498
ac_cv_have_dpms="yes", [
3499
LDFLAGS="$ac_save_ldflags"
3500
CFLAGS="$ac_save_cflags"
3501
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3502
LIBS="$LIBS -lXdpms"
3503
CFLAGS="$CFLAGS $X_INCLUDES"
3504
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3506
#include <X11/Xproto.h>
3508
#include <X11/Xlib.h>
3509
#include <X11/extensions/dpms.h>
3511
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3513
ac_cv_have_dpms="-lXdpms"
3514
],ac_cv_have_dpms="no")
3516
LDFLAGS="$ac_save_ldflags"
3517
CFLAGS="$ac_save_cflags"
3518
LIBS="$ac_save_libs"
3522
if test "$ac_cv_have_dpms" = no; then
3528
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3529
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3532
if test "$DPMS_LDFLAGS" = ""; then
3533
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3535
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3537
if test "$DPMS_INCLUDE" = ""; then
3540
DPMSINC="-I$DPMS_INCLUDE"
3546
ac_save_cflags="$CFLAGS"
3547
CFLAGS="$CFLAGS $X_INCLUDES"
3548
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3549
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3550
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3551
AC_CHECK_DECL(DPMSCapable,
3552
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3553
[#include <X11/extensions/dpms.h>])
3554
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3555
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3556
AC_CHECK_DECL(DPMSInfo,
3557
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3558
[#include <X11/extensions/dpms.h>])
3559
CFLAGS="$ac_save_cflags"
3564
AC_DEFUN([AC_HAVE_GL],
3565
[AC_REQUIRE_CPP()dnl
3566
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3568
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3569
test -z "$GL_INCLUDE" && GL_INCLUDE=
3571
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3572
gl_test=$withval, gl_test="yes")
3573
if test "x$kde_use_qt_emb" = "xyes"; then
3574
# GL and Qt Embedded is a no-go for now.
3576
elif test "x$gl_test" = xno; then
3579
AC_MSG_CHECKING(for GL)
3580
AC_CACHE_VAL(ac_cv_have_gl,
3584
ac_save_ldflags="$LDFLAGS"
3585
ac_save_cxxflags="$CXXFLAGS"
3586
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3587
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3588
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3589
CXXFLAGS="$CFLAGS $X_INCLUDES"
3590
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3591
AC_TRY_LINK([#include <GL/gl.h>
3594
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3595
if test "x$ac_cv_have_gl" = "xno"; then
3596
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3597
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3598
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3599
CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3600
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3601
AC_TRY_LINK([#include <GL/gl.h>
3604
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3607
LDFLAGS="$ac_save_ldflags"
3608
CXXFLAGS="$ac_save_cxxflags"
3611
if test "$ac_cv_have_gl" = "no"; then
3617
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3618
if test "$GL_LDFLAGS" = ""; then
3619
if test "$ac_cv_have_gl" = "mesa"; then
3620
GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3622
GLLIB='-lGLU -lGL $(LIB_X11)'
3625
if test "$ac_cv_have_gl" = "mesa"; then
3626
GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3628
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3631
if test "$GL_INCLUDE" = ""; then
3634
GLINC="-I$GL_INCLUDE"
3636
AC_MSG_RESULT($ac_cv_have_gl)
3645
dnl shadow password and PAM magic - maintained by ossi@kde.org
3647
AC_DEFUN([KDE_PAM], [
3648
AC_REQUIRE([KDE_CHECK_LIBDL])
3652
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3653
[ if test "x$withval" = "xyes"; then
3656
elif test "x$withval" = "xno"; then
3660
pam_service=$withval
3662
], [ pam_service=kde ])
3666
if test "x$want_pam" != xno; then
3667
AC_CHECK_LIB(pam, pam_start, [
3668
AC_CHECK_HEADER(security/pam_appl.h,
3669
[ pam_header=security/pam_appl.h ],
3670
[ AC_CHECK_HEADER(pam/pam_appl.h,
3671
[ pam_header=pam/pam_appl.h ],
3673
AC_MSG_WARN([PAM detected, but no headers found!
3674
Make sure you have the necessary development packages installed.])
3680
if test -z "$pam_header"; then
3681
if test "x$want_pam" = xyes; then
3682
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3685
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3686
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3689
dnl darwin claims to be something special
3690
if test "$pam_header" = "pam/pam_appl.h"; then
3691
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3694
dnl test whether struct pam_message is const (Linux) or not (Sun)
3695
AC_MSG_CHECKING(for const pam_message)
3696
AC_EGREP_HEADER([struct pam_message], $pam_header,
3697
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3698
[AC_MSG_RESULT([const: Linux-type PAM])],
3699
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3700
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3702
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3709
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3710
AC_DEFUN([DEF_PAM_SERVICE], [
3712
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3713
[ if test "x$use_pam" = xyes; then
3714
$3_PAM_SERVICE=$withval
3716
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3717
You may want to enforce it by using --with-pam.])
3720
[ if test "x$use_pam" = xyes; then
3721
$3_PAM_SERVICE="$pam_service"
3724
if test -n "$$3_PAM_SERVICE"; then
3725
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3726
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3728
AC_SUBST($3_PAM_SERVICE)
3731
AC_DEFUN([KDE_SHADOWPASSWD], [
3732
AC_REQUIRE([KDE_PAM])
3734
AC_CHECK_LIB(shadow, getspent,
3735
[ LIBSHADOW="-lshadow"
3739
AC_CHECK_LIB(gen, getspent,
3743
[ AC_CHECK_FUNC(getspent,
3744
[ ac_use_shadow=yes ],
3745
[ ac_use_shadow=no ])
3751
AC_MSG_CHECKING([for shadow passwords])
3754
[ --with-shadow If you want shadow password support ],
3755
[ if test "x$withval" != "xno"; then
3761
use_shadow="$ac_use_shadow"
3764
if test "x$use_shadow" = xyes; then
3766
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3773
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3774
dnl this still applies, if we could use it indirectly through pam.
3775
if test "x$use_shadow" = xyes ||
3776
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3778
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3779
SETUIDFLAGS="-m 4755 -o root";;
3781
SETUIDFLAGS="-m 4755";;
3784
AC_SUBST(SETUIDFLAGS)
3788
AC_DEFUN([KDE_PASSWDLIBS], [
3789
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3790
AC_REQUIRE([KDE_PAM])
3791
AC_REQUIRE([KDE_SHADOWPASSWD])
3793
if test "x$use_pam" = "xyes"; then
3794
PASSWDLIBS="$PAMLIBS"
3796
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3799
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3800
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3801
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3802
dnl may need to read /etc/master.passwd).
3805
SETUIDFLAGS="-m 4755 -o root"
3811
AC_SUBST(PASSWDLIBS)
3814
AC_DEFUN([KDE_CHECK_LIBDL],
3816
AC_CHECK_LIB(dl, dlopen, [
3818
ac_cv_have_dlfcn=yes
3821
AC_CHECK_LIB(dld, shl_unload, [
3823
ac_cv_have_shload=yes
3829
AC_DEFUN([KDE_CHECK_DLOPEN],
3832
AC_CHECK_HEADERS(dlfcn.h dl.h)
3833
if test "$ac_cv_header_dlfcn_h" = "no"; then
3837
if test "$ac_cv_header_dl_h" = "no"; then
3838
ac_cv_have_shload=no
3841
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3843
AC_ARG_ENABLE(dlopen,
3844
[ --disable-dlopen link statically [default=no]] ,
3845
enable_dlopen=$enableval,
3848
# override the user's opinion, if we know it better ;)
3849
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3853
if test "$ac_cv_have_dlfcn" = "yes"; then
3854
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3857
if test "$ac_cv_have_shload" = "yes"; then
3858
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3861
if test "$enable_dlopen" = no ; then
3862
test -n "$1" && eval $1
3864
test -n "$2" && eval $2
3869
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
3871
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3873
AC_MSG_CHECKING([dynamic loading])
3874
eval "`egrep '^build_libtool_libs=' libtool`"
3875
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3877
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3881
AC_MSG_RESULT($dynamic_loading)
3882
if test "$dynamic_loading" = "yes"; then
3889
AC_DEFUN([KDE_ADD_INCLUDES],
3891
if test -z "$1"; then
3892
test_include="Pix.h"
3897
AC_MSG_CHECKING([for libg++ ($test_include)])
3899
AC_CACHE_VAL(kde_cv_libgpp_includes,
3901
kde_cv_libgpp_includes=no
3907
/usr/unsupported/include \
3912
if test -r "$ac_dir/$test_include"; then
3913
kde_cv_libgpp_includes=$ac_dir
3919
AC_MSG_RESULT($kde_cv_libgpp_includes)
3920
if test "$kde_cv_libgpp_includes" != "no"; then
3921
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3926
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
3930
if test -n "$PTHREAD_LIBS"; then
3931
PTHREAD_LIBS_save="$PTHREAD_LIBS"
3932
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
3933
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
3934
PTHREAD_LIBS="$PTHREAD_LIBS_save"
3937
if test -z "$LIBPTHREAD"; then
3938
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3941
AC_SUBST(LIBPTHREAD)
3944
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
3947
if test -z "$LIBPTHREAD"; then
3948
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
3951
AH_VERBATIM(__svr_define, [
3952
#if defined(__SVR4) && !defined(__svr4__)
3958
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3959
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3962
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
3965
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3966
LIBPTHREAD="$LIBPTHREAD -lc_r"
3968
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3969
if test "$CXX" = "KCC"; then
3970
CXXFLAGS="$CXXFLAGS --thread_safe"
3971
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3977
AC_SUBST(USE_THREADS)
3978
AC_SUBST(LIBPTHREAD)
3981
AC_DEFUN([KDE_CHECK_THREADING],
3983
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3984
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3985
dnl default is yes if libpthread is found and no if no libpthread is available
3986
if test -z "$LIBPTHREAD"; then
3987
if test -z "$USE_THREADS"; then
3988
kde_check_threading_default=no
3990
kde_check_threading_default=yes
3993
kde_check_threading_default=yes
3995
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
3996
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3997
if test "x$kde_use_threading" = "xyes"; then
3998
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4002
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4004
if test "$kde_python_link_found" = no; then
4006
if test "$1" = normal; then
4007
AC_MSG_CHECKING(if a Python application links)
4009
AC_MSG_CHECKING(if Python depends on $2)
4012
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4014
kde_save_cflags="$CFLAGS"
4015
CFLAGS="$CFLAGS $PYTHONINC"
4016
kde_save_libs="$LIBS"
4017
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4018
kde_save_ldflags="$LDFLAGS"
4019
LDFLAGS="$LDFLAGS $PYTHONLIB"
4025
PySys_SetArgv(1, 0);
4027
[kde_cv_try_link_python_$1=yes],
4028
[kde_cv_try_link_python_$1=no]
4030
CFLAGS="$kde_save_cflags"
4031
LIBS="$kde_save_libs"
4032
LDFLAGS="$kde_save_ldflags"
4035
if test "$kde_cv_try_link_python_$1" = "yes"; then
4037
kde_python_link_found=yes
4038
if test ! "$1" = normal; then
4039
LIBPYTHON="$LIBPYTHON $2"
4051
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4053
AC_MSG_CHECKING([for Python directory])
4055
AC_CACHE_VAL(kde_cv_pythondir,
4057
if test -z "$PYTHONDIR"; then
4058
kde_cv_pythondir=/usr/local
4060
kde_cv_pythondir="$PYTHONDIR"
4064
AC_ARG_WITH(pythondir,
4065
[ --with-pythondir=pythondir use python installed in pythondir ],
4067
ac_python_dir=$withval
4068
], ac_python_dir=$kde_cv_pythondir
4071
AC_MSG_RESULT($ac_python_dir)
4074
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4076
AC_REQUIRE([KDE_CHECK_LIBDL])
4077
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4078
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4080
if test -z "$1"; then
4086
AC_MSG_CHECKING([for Python$version])
4088
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4089
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4090
if test ! -r $python_incdir/Python.h; then
4091
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4092
python_incdir=$python_incdir/python$version
4093
if test ! -r $python_incdir/Python.h; then
4098
PYTHONINC=-I$python_incdir
4100
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4101
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4102
if test ! -r $python_libdir/libpython$version.so; then
4103
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4104
if test ! -r $python_libdir/libpython$version.a; then
4105
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4106
python_libdir=$python_libdir/python$version/config
4107
if test ! -r $python_libdir/libpython$version.a; then
4113
PYTHONLIB=-L$python_libdir
4114
kde_orig_LIBPYTHON=$LIBPYTHON
4115
if test -z "$LIBPYTHON"; then
4116
LIBPYTHON=-lpython$version
4119
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4120
python_moddir=$python_moddir/python$version
4121
if test ! -r $python_moddir/copy.py; then
4125
PYTHONMODDIR=$python_moddir
4127
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4129
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4130
LIBPYTHON=$kde_orig_LIBPYTHON
4131
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4132
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4135
dnl Note: this test is very weak
4136
kde_python_link_found=no
4137
KDE_TRY_LINK_PYTHON(normal)
4138
KDE_TRY_LINK_PYTHON(m, -lm)
4139
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4140
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4141
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4142
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4143
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4144
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4145
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4146
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4147
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4148
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4149
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4150
[AC_MSG_WARN([it seems, Python depends on another library.
4151
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4152
and contact the authors to let them know about this problem])
4155
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4159
AC_SUBST(PYTHONMODDIR)
4160
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4166
AC_DEFUN([KDE_CHECK_PYTHON],
4168
KDE_CHECK_PYTHON_INTERN("2.3",
4169
[KDE_CHECK_PYTHON_INTERN("2.2",
4170
[KDE_CHECK_PYTHON_INTERN("2.1",
4171
[KDE_CHECK_PYTHON_INTERN("2.0",
4172
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4178
AC_DEFUN([KDE_CHECK_STL],
4182
ac_save_CXXFLAGS="$CXXFLAGS"
4183
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4185
AC_MSG_CHECKING([if C++ programs can be compiled])
4186
AC_CACHE_VAL(kde_cv_stl_works,
4190
using namespace std;
4192
string astring="Hallo Welt.";
4193
astring.erase(0, 6); // now astring is "Welt"
4195
], kde_cv_stl_works=yes,
4196
kde_cv_stl_works=no)
4199
AC_MSG_RESULT($kde_cv_stl_works)
4201
if test "$kde_cv_stl_works" = "yes"; then
4203
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4205
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4206
Check config.log for details - if you're using a Linux distribution you might miss
4207
a package named similiar to libstd++-dev.])
4210
CXXFLAGS="$ac_save_CXXFLAGS"
4214
AC_DEFUN([AC_FIND_QIMGIO],
4215
[AC_REQUIRE([AC_FIND_JPEG])
4216
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4217
AC_MSG_CHECKING([for qimgio])
4218
AC_CACHE_VAL(ac_cv_lib_qimgio,
4222
ac_save_LIBS="$LIBS"
4223
ac_save_CXXFLAGS="$CXXFLAGS"
4224
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4225
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4228
#include <qimageio.h>
4229
#include <qstring.h>
4231
QString t = "hallo";
4236
ac_cv_lib_qimgio=yes,
4237
ac_cv_lib_qimgio=no,
4238
ac_cv_lib_qimgio=no)
4239
LIBS="$ac_save_LIBS"
4240
CXXFLAGS="$ac_save_CXXFLAGS"
4243
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4244
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4246
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4249
AC_MSG_RESULT(not found)
4253
AC_DEFUN([AM_DISABLE_LIBRARIES],
4255
AC_PROVIDE([AM_ENABLE_STATIC])
4256
AC_PROVIDE([AM_ENABLE_SHARED])
4262
AC_DEFUN([AC_CHECK_UTMP_FILE],
4264
AC_MSG_CHECKING([for utmp file])
4266
AC_CACHE_VAL(kde_cv_utmp_file,
4277
if test -r "$ac_file"; then
4278
kde_cv_utmp_file=$ac_file
4284
if test "$kde_cv_utmp_file" != "no"; then
4285
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4287
AC_MSG_RESULT($kde_cv_utmp_file)
4290
AC_MSG_RESULT([non found])
4295
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4298
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4300
if test ! -s $srcdir/subdirs; then
4301
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4303
files=`cd $srcdir && ls -1`
4304
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4306
echo $i >> $srcdir/subdirs
4311
if test -s $srcdir/inst-apps; then
4312
ac_topsubdirs="`cat $srcdir/inst-apps`"
4313
elif test -s $srcdir/subdirs; then
4314
ac_topsubdirs="`cat $srcdir/subdirs`"
4317
for i in $ac_topsubdirs; do
4318
AC_MSG_CHECKING([if $i should be compiled])
4319
if test -d $srcdir/$i; then
4321
for j in $DO_NOT_COMPILE; do
4322
if test $i = $j; then
4329
AC_MSG_RESULT($install_it)
4330
vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4331
if test $install_it = "yes"; then
4332
TOPSUBDIRS="$TOPSUBDIRS $i"
4333
eval "$vari""_SUBDIR_included=yes"
4335
eval "$vari""_SUBDIR_included=no"
4339
AC_SUBST(TOPSUBDIRS)
4342
AC_DEFUN([KDE_CHECK_NAMESPACES],
4344
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4358
int Foo::Bar::i = 1;
4361
AC_DEFINE(HAVE_NAMESPACES)
4368
dnl ------------------------------------------------------------------------
4369
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4370
dnl ------------------------------------------------------------------------
4372
AC_DEFUN([AC_CHECK_S_ISSOCK],
4374
AC_MSG_CHECKING(for S_ISSOCK)
4375
AC_CACHE_VAL(ac_cv_have_s_issock,
4379
#include <sys/stat.h>
4383
int b = S_ISSOCK( buff.st_mode );
4385
ac_cv_have_s_issock=yes,
4386
ac_cv_have_s_issock=no)
4388
AC_MSG_RESULT($ac_cv_have_s_issock)
4389
if test "$ac_cv_have_s_issock" = "yes"; then
4390
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4393
AH_VERBATIM(_ISSOCK,
4395
#ifndef HAVE_S_ISSOCK
4396
#define HAVE_S_ISSOCK
4397
#define S_ISSOCK(mode) (1==0)
4403
dnl ------------------------------------------------------------------------
4404
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4405
dnl ------------------------------------------------------------------------
4407
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4409
AC_MSG_CHECKING(for MAXPATHLEN)
4410
AC_CACHE_VAL(ac_cv_maxpathlen,
4412
cat > conftest.$ac_ext <<EOF
4414
# include <stdlib.h>
4417
#include <sys/param.h>
4419
#define MAXPATHLEN 1024
4422
KDE_HELLO MAXPATHLEN
4426
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4428
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4429
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4431
ac_cv_maxpathlen=1024
4437
AC_MSG_RESULT($ac_cv_maxpathlen)
4438
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4441
AC_DEFUN([KDE_CHECK_HEADER],
4444
kde_safe_cppflags=$CPPFLAGS
4445
CPPFLAGS="$CPPFLAGS $all_includes"
4447
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4448
CPPFLAGS=$kde_safe_cppflags
4452
AC_DEFUN([KDE_CHECK_HEADERS],
4454
AH_CHECK_HEADERS([$1])
4456
kde_safe_cppflags=$CPPFLAGS
4457
CPPFLAGS="$CPPFLAGS $all_includes"
4459
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4460
CPPFLAGS=$kde_safe_cppflags
4464
AC_DEFUN([KDE_FAST_CONFIGURE],
4466
dnl makes configure fast (needs perl)
4467
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4468
with_fast_perl=$enableval, with_fast_perl=yes)
4471
AC_DEFUN([KDE_CONF_FILES],
4474
if test -f $srcdir/configure.files ; then
4475
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4478
if test -n "$val" ; then
4480
CONF_FILES="$CONF_FILES $i"
4483
AC_SUBST(CONF_FILES)
4486
AC_DEFUN([KDE_SET_PREFIX],
4489
dnl make $KDEDIR the default for the installation
4490
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4492
if test "x$prefix" = "xNONE"; then
4493
prefix=$ac_default_prefix
4494
ac_configure_args="$ac_configure_args --prefix=$prefix"
4496
# And delete superfluous '/' to make compares easier
4497
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4498
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4503
pushdef([AC_PROG_INSTALL],
4505
dnl our own version, testing for a -p flag
4506
popdef([AC_PROG_INSTALL])
4507
dnl as AC_PROG_INSTALL works as it works we first have
4508
dnl to save if the user didn't specify INSTALL, as the
4509
dnl autoconf one overwrites INSTALL and we have no chance to find
4511
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4512
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4513
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4516
if test -z "$kde_save_INSTALL_given" ; then
4517
# OK, user hasn't given any INSTALL, autoconf found one for us
4518
# now we test, if it supports the -p flag
4519
AC_MSG_CHECKING(for -p flag to install)
4520
rm -f confinst.$$.* > /dev/null 2>&1
4521
echo "Testtest" > confinst.$$.orig
4523
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4524
if test -f confinst.$$.new ; then
4525
# OK, -p seems to do no harm to install
4526
INSTALL="${INSTALL} -p"
4531
AC_MSG_RESULT($ac_res)
4533
dnl the following tries to resolve some signs and wonders coming up
4534
dnl with different autoconf/automake versions
4536
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4537
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4538
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4539
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4540
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4541
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4542
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4543
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4544
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4545
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4546
dnl automake (due to broken Makefile.am or whatever) to install programs,
4547
dnl and so does not see the -s flag in automake > 1.4
4548
dnl to clean up that mess we:
4549
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4550
dnl which cleans KDE's program with automake > 1.4;
4551
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4552
dnl with automake<=1.4
4553
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4554
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4556
dnl And to all this comes, that I even can't write in comments variable
4557
dnl names used by automake, because it is so stupid to think I wanted to
4558
dnl _use_ them, therefor I have written A_M_... instead of AM_
4559
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4561
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4562
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4564
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4565
INSTALL_SCRIPT='${INSTALL}'
4569
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4571
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4572
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4575
pushdef([AC_LANG_CPLUSPLUS],
4576
[popdef([AC_LANG_CPLUSPLUS])
4580
AC_DEFUN([KDE_CHECK_LONG_LONG],
4582
AC_MSG_CHECKING(for long long)
4583
AC_CACHE_VAL(kde_cv_c_long_long,
4591
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4594
AC_MSG_RESULT($kde_cv_c_long_long)
4595
if test "$kde_cv_c_long_long" = yes; then
4596
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4600
AC_DEFUN([KDE_CHECK_LIB],
4602
kde_save_LDFLAGS="$LDFLAGS"
4603
dnl AC_CHECK_LIB modifies LIBS, so save it here
4604
kde_save_LIBS="$LIBS"
4605
LDFLAGS="$LDFLAGS $all_libraries"
4607
aix*) LDFLAGS="-brtl $LDFLAGS"
4608
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4611
AC_CHECK_LIB($1, $2, $3, $4, $5)
4612
LDFLAGS="$kde_save_LDFLAGS"
4613
LIBS="$kde_save_LIBS"
4616
AC_DEFUN([KDE_JAVA_PREFIX],
4619
base=`basename "$1"`
4620
list=`ls -1 $dir 2> /dev/null`
4621
for entry in $list; do
4622
if test -d $dir/$entry/bin; then
4625
javadirs="$javadirs $dir/$entry/bin"
4628
elif test -d $dir/$entry/jre/bin; then
4631
javadirs="$javadirs $dir/$entry/jre/bin"
4638
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4639
AC_DEFUN([KDE_CHECK_JAVA_DIR],
4643
[ --with-java=javadir use java installed in javadir, --without-java disables ],
4644
[ ac_java_dir=$withval
4648
AC_MSG_CHECKING([for Java])
4650
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4651
if test "x$ac_java_dir" = "xno"; then
4653
kde_java_includedir=no
4654
kde_java_libjvmdir=no
4655
kde_java_libgcjdir=no
4656
kde_java_libhpidir=no
4658
if test "x$ac_java_dir" = "x"; then
4661
dnl No option set -> collect list of candidate paths
4662
if test -n "$JAVA_HOME"; then
4663
KDE_JAVA_PREFIX($JAVA_HOME)
4665
KDE_JAVA_PREFIX(/usr/j2se)
4666
KDE_JAVA_PREFIX(/usr/lib/j2se)
4667
KDE_JAVA_PREFIX(/usr/j*dk*)
4668
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4669
KDE_JAVA_PREFIX(/opt/j*sdk*)
4670
KDE_JAVA_PREFIX(/usr/lib/java*)
4671
KDE_JAVA_PREFIX(/usr/java*)
4672
KDE_JAVA_PREFIX(/usr/java/j*dk*)
4673
KDE_JAVA_PREFIX(/usr/java/j*re*)
4674
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4675
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4676
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4677
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4678
KDE_JAVA_PREFIX(/opt/java*)
4683
for dir in $PATH; do
4684
if test -d "$dir"; then
4685
javadirs="$javadirs $dir"
4691
dnl Now javadirs contains a list of paths that exist, all ending with bin/
4692
for dir in $javadirs; do
4693
dnl Check for the java executable
4694
if test -x "$dir/java"; then
4695
dnl And also check for a libjvm.so somewhere under there
4696
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
4697
if test "$dir" != "/usr/bin"; then
4698
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4699
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4700
jredirs="$jredirs $dir"
4705
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
4709
for dir in $jredirs; do
4711
kde_java_bindir=$dir
4712
if test -x "$dir/javac"; then
4718
if test -n "$JAVAC"; then
4719
dnl this substitution might not work - well, we test for jni.h below
4720
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4722
kde_java_includedir=no
4725
dnl config option set
4726
kde_java_bindir=$ac_java_dir/bin
4727
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4728
kde_java_includedir=no
4730
kde_java_includedir=$ac_java_dir/include
4735
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4736
if test "x$kde_java_bindir" != "xno"; then
4738
dnl Look for libjvm.so
4739
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4740
dnl Look for libgcj.so
4741
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
4742
dnl Look for libhpi.so and avoid green threads
4743
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4745
dnl Now check everything's fine under there
4746
dnl the include dir is our flag for having the JDK
4747
if test -d "$kde_java_includedir"; then
4748
if test ! -x "$kde_java_bindir/javac"; then
4749
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4751
if test ! -x "$kde_java_bindir/javah"; then
4752
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4754
if test ! -x "$kde_java_bindir/jar"; then
4755
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4757
if test ! -r "$kde_java_includedir/jni.h"; then
4758
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4761
jni_includes="-I$kde_java_includedir"
4762
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4763
dnl and under linux here..
4765
dnl not needed for gcj
4767
if test "x$kde_java_libgcjdir" = "x"; then
4768
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4769
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4770
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4778
if test "x$kde_java_libgcjdir" = "x"; then
4779
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4780
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4783
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
4784
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
4788
if test ! -x "$kde_java_bindir/java"; then
4789
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4792
dnl not needed for gcj compile
4794
if test "x$kde_java_libgcjdir" = "x"; then
4795
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4796
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4800
if test -n "$jni_includes"; then
4801
dnl Check for JNI version
4804
ac_cxxflags_safe="$CXXFLAGS"
4805
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4811
#ifndef JNI_VERSION_1_2
4814
],[ kde_jni_works=yes ],
4815
[ kde_jni_works=no ])
4817
if test $kde_jni_works = no; then
4818
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4819
You need to have Java Development Kit (JDK) version 1.2.
4821
Use --with-java to specify another location.
4822
Use --without-java to configure without java support.
4823
Or download a newer JDK and try again.
4824
See e.g. http://java.sun.com/products/jdk/1.2 ])
4827
CXXFLAGS="$ac_cxxflags_safe"
4830
dnl All tests ok, inform and subst the variables
4832
JAVAC=$kde_java_bindir/javac
4833
JAVAH=$kde_java_bindir/javah
4834
JAR=$kde_java_bindir/jar
4835
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4836
if test "x$kde_java_libgcjdir" = "x"; then
4837
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4839
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
4841
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4844
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4845
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4847
elif test -d "/Library/Java/Home"; then
4848
kde_java_bindir="/Library/Java/Home/bin"
4849
jni_includes="-I/Library/Java/Home/include"
4851
JAVAC=$kde_java_bindir/javac
4852
JAVAH=$kde_java_bindir/javah
4853
JAR=$kde_java_bindir/jar
4854
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
4856
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4857
AC_MSG_RESULT([Apple Java Framework])
4859
AC_MSG_RESULT([none found])
4866
AC_SUBST(jni_includes)
4868
# for backward compat
4869
kde_cv_java_includedir=$kde_java_includedir
4870
kde_cv_java_bindir=$kde_java_bindir
4873
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4874
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4875
dnl big packages, m4_foreach is dog-slow. So use our own version of
4876
dnl it. (matz@kde.org)
4877
m4_define([mm_foreach],
4878
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4879
m4_define([mm_car], [[$1]])
4880
m4_define([mm_car2], [[$@]])
4881
m4_define([_mm_foreach],
4882
[m4_if(m4_quote($2), [], [],
4883
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
4884
mm_car2(m4_shift($2)),
4886
m4_define([AC_FOREACH],
4887
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4889
AC_DEFUN([KDE_NEED_FLEX],
4892
LIBS="$LIBS $USER_LDFLAGS"
4895
if test -z "$LEXLIB"; then
4896
AC_MSG_ERROR([You need to have flex installed.])
4901
AC_DEFUN([AC_PATH_QTOPIA],
4903
dnl TODO: use AC_CACHE_VAL
4905
if test -z "$1"; then
4910
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4911
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4912
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4915
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4916
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4918
AC_REQUIRE([AC_PATH_QT])
4920
AC_MSG_CHECKING([for Qtopia])
4923
AC_SUBST(LIB_QTOPIA)
4925
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4929
AC_ARG_WITH(qtopia-dir,
4930
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
4931
[ ac_qtopia_incdir="$withval"/include] )
4934
for dir in $kde_qtopia_dirs; do
4935
qtopia_incdirs="$qtopia_incdirs $dir/include"
4938
if test ! "$ac_qtopia_incdir" = "NO"; then
4939
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4943
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4944
ac_qtopia_incdir="$qtopia_incdir"
4946
if test -z "$qtopia_incdir"; then
4947
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4950
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4951
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4952
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4954
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4955
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4956
if test "$qtopia_ver" -lt "$qtopia_minver"; then
4957
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4964
ac_cxxflags_safe="$CXXFLAGS"
4965
ac_ldflags_safe="$LDFLAGS"
4966
ac_libs_safe="$LIBS"
4968
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4969
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4970
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4972
cat > conftest.$ac_ext <<EOF
4973
#include "confdefs.h"
4974
#include <qpe/qpeapplication.h>
4975
#include <qpe/version.h>
4977
int main( int argc, char **argv )
4979
QPEApplication app( argc, argv );
4984
if AC_TRY_EVAL(ac_link) && test -s conftest; then
4988
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4989
the end of config.log])
4992
CXXFLAGS="$ac_cxxflags_safe"
4993
LDFLAGS="$ac_ldflags_safe"
4994
LIBS="$ac_libs_safe"
4998
QTOPIA_INCLUDES="-I$qtopia_incdir"
4999
AC_SUBST(QTOPIA_INCLUDES)
5001
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5005
AC_DEFUN([KDE_INIT_DOXYGEN],
5007
AC_MSG_CHECKING([for Qt docs])
5009
if test "${with_qt_dir+set}" = set; then
5010
kde_qtdir="$with_qt_dir"
5013
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)
5014
AC_MSG_RESULT($QTDOCDIR)
5018
KDE_FIND_PATH(dot, DOT, [], [])
5019
if test -n "$DOT"; then
5024
AC_SUBST(KDE_HAVE_DOT)
5025
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5028
DOXYGEN_PROJECT_NAME="$1"
5029
DOXYGEN_PROJECT_NUMBER="$2"
5030
AC_SUBST(DOXYGEN_PROJECT_NAME)
5031
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5034
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5037
AC_SUBST(KDE_HAS_DOXYGEN)
5042
AC_DEFUN([AC_FIND_BZIP2],
5044
AC_MSG_CHECKING([for bzDecompress in libbz2])
5045
AC_CACHE_VAL(ac_cv_lib_bzip2,
5049
kde_save_LIBS="$LIBS"
5050
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5051
kde_save_CXXFLAGS="$CXXFLAGS"
5052
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5058
[ bz_stream s; (void) bzDecompress(&s); ],
5059
eval "ac_cv_lib_bzip2='-lbz2'",
5060
eval "ac_cv_lib_bzip2=no")
5061
LIBS="$kde_save_LIBS"
5062
CXXFLAGS="$kde_save_CXXFLAGS"
5065
AC_MSG_RESULT($ac_cv_lib_bzip2)
5067
if test ! "$ac_cv_lib_bzip2" = no; then
5070
LIBBZ2="$ac_cv_lib_bzip2"
5077
KDE_CHECK_COMPILER_FLAG(shared, [
5078
ld_shared_flag="-shared"
5080
KDE_CHECK_COMPILER_FLAG(fPIC, [
5081
cxx_shared_flag="-fPIC"
5084
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5085
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5089
kde_save_LIBS="$LIBS"
5090
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5091
kde_save_CXXFLAGS="$CXXFLAGS"
5092
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5099
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5100
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5101
eval "ac_cv_lib_bzip2_prefix=no")
5102
LIBS="$kde_save_LIBS"
5103
CXXFLAGS="$kde_save_CXXFLAGS"
5107
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5109
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5112
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5115
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5116
dnl else, we just ignore this
5120
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5123
dnl ------------------------------------------------------------------------
5124
dnl Try to find the SSL headers and libraries.
5125
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5126
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5127
dnl ------------------------------------------------------------------------
5129
AC_DEFUN([KDE_CHECK_SSL],
5131
LIBSSL="-lssl -lcrypto"
5132
AC_REQUIRE([KDE_CHECK_LIB64])
5134
ac_ssl_includes=NO ac_ssl_libraries=NO
5137
AC_ARG_WITH(ssl-dir,
5138
[ --with-ssl-dir=DIR where the root of OpenSSL is installed],
5139
[ ac_ssl_includes="$withval"/include
5140
ac_ssl_libraries="$withval"/lib$kdelibsuff
5145
[ --without-ssl disable SSL checks],
5146
[want_ssl=$withval])
5148
if test $want_ssl = yes; then
5150
AC_MSG_CHECKING(for OpenSSL)
5152
AC_CACHE_VAL(ac_cv_have_ssl,
5153
[#try to guess OpenSSL locations
5155
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5156
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5157
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5158
ac_ssl_includes="$ssl_incdir"
5160
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"
5161
if test ! "$ac_ssl_libraries" = "NO"; then
5162
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5167
for dir in $ssl_libdirs; do
5168
try="ls -1 $dir/libssl*"
5169
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5172
ac_ssl_libraries="$ssl_libdir"
5174
ac_ldflags_safe="$LDFLAGS"
5175
ac_libs_safe="$LIBS"
5177
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5178
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5180
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5186
LDFLAGS="$ac_ldflags_safe"
5187
LIBS="$ac_libs_safe"
5189
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5197
eval "$ac_cv_have_ssl"
5199
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5201
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5202
AC_MSG_RESULT($ac_ssl_rsaref)
5204
AC_MSG_CHECKING([for easter eggs])
5205
AC_MSG_RESULT([none found])
5211
if test "$have_ssl" = yes; then
5212
AC_MSG_CHECKING(for OpenSSL version)
5213
dnl Check for SSL version
5214
AC_CACHE_VAL(ac_cv_ssl_version,
5217
cat >conftest.$ac_ext <<EOF
5218
#include <openssl/opensslv.h>
5222
#ifndef OPENSSL_VERSION_NUMBER
5223
printf("ssl_version=\\"error\\"\n");
5225
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5226
printf("ssl_version=\\"old\\"\n");
5228
printf("ssl_version=\\"ok\\"\n");
5234
ac_save_CPPFLAGS=$CPPFLAGS
5235
if test "$ac_ssl_includes" != "/usr/include"; then
5236
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5239
if AC_TRY_EVAL(ac_link); then
5241
if eval `./conftest 2>&5`; then
5242
if test $ssl_version = error; then
5243
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5245
if test $ssl_version = old; then
5246
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5250
ac_cv_ssl_version="ssl_version=$ssl_version"
5252
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5253
Check config.log, and if you can't figure it out, send a mail to
5254
David Faure <faure@kde.org>, attaching your config.log])
5258
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5259
Check config.log, and if you can't figure it out, send a mail to
5260
David Faure <faure@kde.org>, attaching your config.log])
5262
CPPFLAGS=$ac_save_CPPFLAGS
5266
eval "$ac_cv_ssl_version"
5267
AC_MSG_RESULT($ssl_version)
5270
if test "$have_ssl" != yes; then
5273
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5274
ac_cv_have_ssl="have_ssl=yes \
5275
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5278
ssl_libraries="$ac_ssl_libraries"
5279
ssl_includes="$ac_ssl_includes"
5281
if test "$ac_ssl_rsaref" = yes; then
5282
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5285
if test $ssl_version = "old"; then
5286
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5292
if test "$ssl_includes" = "/usr/include"; then
5293
if test -f /usr/kerberos/include/krb5.h; then
5294
SSL_INCLUDES="-I/usr/kerberos/include"
5296
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5297
SSL_INCLUDES="-I$ssl_includes"
5300
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5303
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5306
AC_SUBST(SSL_INCLUDES)
5307
AC_SUBST(SSL_LDFLAGS)
5311
AC_DEFUN([KDE_CHECK_STRLCPY],
5313
AC_REQUIRE([AC_CHECK_STRLCAT])
5314
AC_REQUIRE([AC_CHECK_STRLCPY])
5315
AC_CHECK_SIZEOF(size_t)
5316
AC_CHECK_SIZEOF(unsigned long)
5318
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5320
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5323
],AC_MSG_RESULT([yes]),[
5326
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5327
does not apply. Please mail kde-devel@kde.org with a description of your system!
5332
AC_DEFUN([KDE_CHECK_BINUTILS],
5334
AC_MSG_CHECKING([if ld supports unversioned version maps])
5336
kde_save_LDFLAGS="$LDFLAGS"
5337
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5338
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5339
AC_TRY_LINK([int foo;],
5341
#ifdef __INTEL_COMPILER
5342
icc apparently does not support libtools version-info and version-script
5343
at the same time. Dunno where the bug is, but until somebody figured out,
5344
better disable the optional version scripts.
5348
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5349
LDFLAGS="$kde_save_LDFLAGS"
5351
AM_CONDITIONAL(include_VERSION_SCRIPT,
5352
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5354
AC_MSG_RESULT($kde_supports_versionmaps)
5357
AC_DEFUN([AM_PROG_OBJC],[
5358
AC_CHECK_PROGS(OBJC, gcc, gcc)
5359
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5360
if test "x${OBJCFLAGS-unset}" = xunset; then
5364
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5367
AC_DEFUN([KDE_CHECK_PERL],
5369
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5370
AC_MSG_ERROR([No Perl found in your $PATH.
5371
We need perl to generate some code.])
5375
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5376
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5377
## Free Software Foundation, Inc.
5378
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5380
## This program is free software; you can redistribute it and/or modify
5381
## it under the terms of the GNU General Public License as published by
5382
## the Free Software Foundation; either version 2 of the License, or
5383
## (at your option) any later version.
5385
## This program is distributed in the hope that it will be useful, but
5386
## WITHOUT ANY WARRANTY; without even the implied warranty of
5387
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5388
## General Public License for more details.
5390
## You should have received a copy of the GNU General Public License
5391
## along with this program; if not, write to the Free Software
5392
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5394
## As a special exception to the GNU General Public License, if you
5395
## distribute this file as part of a program that contains a
5396
## configuration script generated by Autoconf, you may include it under
5397
## the same distribution terms that you use for the rest of that program.
5399
# serial 47 AC_PROG_LIBTOOL
5402
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5403
# -----------------------------------------------------------
5404
# If this macro is not defined by Autoconf, define it here.
5405
m4_ifdef([AC_PROVIDE_IFELSE],
5407
[m4_define([AC_PROVIDE_IFELSE],
5408
[m4_ifdef([AC_PROVIDE_$1],
5414
AC_DEFUN([AC_PROG_LIBTOOL],
5415
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5416
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5417
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5418
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5420
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5422
dnl And a similar setup for Fortran 77 support
5423
AC_PROVIDE_IFELSE([AC_PROG_F77],
5425
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5428
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5429
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5430
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5431
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5433
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5435
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5437
[ifdef([AC_PROG_GCJ],
5438
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5439
ifdef([A][M_PROG_GCJ],
5440
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5441
ifdef([LT_AC_PROG_GCJ],
5442
[define([LT_AC_PROG_GCJ],
5443
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5444
])])# AC_PROG_LIBTOOL
5449
AC_DEFUN([_AC_PROG_LIBTOOL],
5450
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5451
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5452
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5453
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5455
# This can be used to rebuild libtool when needed
5456
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5458
# Always use our own libtool.
5459
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5460
AC_SUBST(LIBTOOL)dnl
5462
# Prevent multiple expansion
5463
define([AC_PROG_LIBTOOL], [])
5464
])# _AC_PROG_LIBTOOL
5469
AC_DEFUN([AC_LIBTOOL_SETUP],
5471
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5472
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5473
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5474
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5475
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5476
AC_REQUIRE([AC_PROG_CC])dnl
5477
AC_REQUIRE([AC_PROG_LD])dnl
5478
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5479
AC_REQUIRE([AC_PROG_NM])dnl
5481
AC_REQUIRE([AC_PROG_LN_S])dnl
5482
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5483
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5484
AC_REQUIRE([AC_OBJEXT])dnl
5485
AC_REQUIRE([AC_EXEEXT])dnl
5488
AC_LIBTOOL_SYS_MAX_CMD_LEN
5489
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5492
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5493
_LT_AC_PROG_ECHO_BACKSLASH
5497
# AIX sometimes has problems with the GCC collect2 program. For some
5498
# reason, if we set the COLLECT_NAMES environment variable, the problems
5499
# vanish in a puff of smoke.
5500
if test "X${COLLECT_NAMES+set}" != Xset; then
5502
export COLLECT_NAMES
5507
# Sed substitution that helps us do robust quoting. It backslashifies
5508
# metacharacters that are still active within double-quoted strings.
5509
Xsed='sed -e s/^X//'
5510
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5512
# Same as above, but do not quote variable references.
5513
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5515
# Sed substitution to delay expansion of an escaped shell variable in a
5516
# double_quote_subst'ed string.
5517
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5519
# Sed substitution to avoid accidental globbing in evaled expressions
5520
no_glob_subst='s/\*/\\\*/g'
5526
default_ofile=libtool
5527
can_build_shared=yes
5529
# All known linkers require a `.a' archive for static linking (except M$VC,
5530
# which needs '.lib').
5532
ltmain="$ac_aux_dir/ltmain.sh"
5533
ofile="$default_ofile"
5534
with_gnu_ld="$lt_cv_prog_gnu_ld"
5536
AC_CHECK_TOOL(AR, ar, false)
5537
AC_CHECK_TOOL(RANLIB, ranlib, :)
5538
AC_CHECK_TOOL(STRIP, strip, :)
5541
old_CFLAGS="$CFLAGS"
5543
# Set sane defaults for various variables
5544
test -z "$AR" && AR=ar
5545
test -z "$AR_FLAGS" && AR_FLAGS=cru
5546
test -z "$AS" && AS=as
5547
test -z "$CC" && CC=cc
5548
test -z "$LTCC" && LTCC=$CC
5549
test -z "$DLLTOOL" && DLLTOOL=dlltool
5550
test -z "$LD" && LD=ld
5551
test -z "$LN_S" && LN_S="ln -s"
5552
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5553
test -z "$NM" && NM=nm
5554
test -z "$SED" && SED=sed
5555
test -z "$OBJDUMP" && OBJDUMP=objdump
5556
test -z "$RANLIB" && RANLIB=:
5557
test -z "$STRIP" && STRIP=:
5558
test -z "$ac_objext" && ac_objext=o
5560
# Determine commands to create old-style static archives.
5561
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5562
old_postinstall_cmds='chmod 644 $oldlib'
5563
old_postuninstall_cmds=
5565
if test -n "$RANLIB"; then
5568
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5571
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5574
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5577
# Only perform the check for file, if the check method requires it
5578
case $deplibs_check_method in
5580
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5586
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5587
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5588
enable_win32_dll=yes, enable_win32_dll=no)
5590
AC_ARG_ENABLE([libtool-lock],
5591
[AC_HELP_STRING([--disable-libtool-lock],
5592
[avoid locking (might break parallel builds)])])
5593
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5596
[AC_HELP_STRING([--with-pic],
5597
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5598
[pic_mode="$withval"],
5600
test -z "$pic_mode" && pic_mode=default
5602
# Use C for the default configuration in the libtool script
5604
AC_LIBTOOL_LANG_C_CONFIG
5606
])# AC_LIBTOOL_SETUP
5609
# _LT_AC_SYS_COMPILER
5610
# -------------------
5611
AC_DEFUN([_LT_AC_SYS_COMPILER],
5612
[AC_REQUIRE([AC_PROG_CC])dnl
5614
# If no C compiler was specified, use CC.
5617
# Allow CC to be a program name with arguments.
5619
])# _LT_AC_SYS_COMPILER
5622
# _LT_AC_SYS_LIBPATH_AIX
5623
# ----------------------
5624
# Links a minimal program and checks the executable
5625
# for the system default hardcoded library path. In most cases,
5626
# this is /usr/lib:/lib, but when the MPI compilers are used
5627
# the location of the communication and MPI libs are included too.
5628
# If we don't find anything, use the default library path according
5629
# to the aix ld manual.
5630
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5631
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5632
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5634
# Check for a 64-bit object if we didn't find anything.
5635
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; }
5637
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5638
])# _LT_AC_SYS_LIBPATH_AIX
5641
# _LT_AC_SHELL_INIT(ARG)
5642
# ----------------------
5643
AC_DEFUN([_LT_AC_SHELL_INIT],
5644
[ifdef([AC_DIVERSION_NOTICE],
5645
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5646
[AC_DIVERT_PUSH(NOTICE)])
5649
])# _LT_AC_SHELL_INIT
5652
# _LT_AC_PROG_ECHO_BACKSLASH
5653
# --------------------------
5654
# Add some code to the start of the generated configure script which
5655
# will find an echo command which doesn't interpret backslashes.
5656
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5657
[_LT_AC_SHELL_INIT([
5658
# Check that we are running under the correct shell.
5659
SHELL=${CONFIG_SHELL-/bin/sh}
5663
# Remove one level of quotation (which was required for Make).
5664
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5669
if test "X[$]1" = X--no-reexec; then
5670
# Discard the --no-reexec flag, and continue.
5672
elif test "X[$]1" = X--fallback-echo; then
5673
# Avoid inline document here, it may be left over
5675
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
5676
# Yippee, $echo works!
5679
# Restart under the correct shell.
5680
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5683
if test "X[$]1" = X--fallback-echo; then
5684
# used as fallback echo
5692
# The HP-UX ksh and POSIX shell print the target directory to stdout
5694
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5696
if test -z "$ECHO"; then
5697
if test "X${echo_test_string+set}" != Xset; then
5698
# find a string as large as possible, as long as the shell can cope with it
5699
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5700
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5701
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5702
echo_test_string="`eval $cmd`" &&
5703
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5710
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5711
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5712
test "X$echo_testing_string" = "X$echo_test_string"; then
5715
# The Solaris, AIX, and Digital Unix default echo programs unquote
5716
# backslashes. This makes it impossible to quote backslashes using
5717
# echo "$something" | sed 's/\\/\\\\/g'
5719
# So, first we look for a working echo in the user's PATH.
5721
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5722
for dir in $PATH /usr/ucb; do
5724
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5725
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5726
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5727
test "X$echo_testing_string" = "X$echo_test_string"; then
5734
if test "X$echo" = Xecho; then
5735
# We didn't find a better echo, so look for alternatives.
5736
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5737
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5738
test "X$echo_testing_string" = "X$echo_test_string"; then
5739
# This shell has a builtin print -r that does the trick.
5741
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5742
test "X$CONFIG_SHELL" != X/bin/ksh; then
5743
# If we have ksh, try running configure again with it.
5744
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5745
export ORIGINAL_CONFIG_SHELL
5746
CONFIG_SHELL=/bin/ksh
5748
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5752
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5753
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5754
test "X$echo_testing_string" = "X$echo_test_string"; then
5755
# Cool, printf works
5757
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5758
test "X$echo_testing_string" = 'X\t' &&
5759
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5760
test "X$echo_testing_string" = "X$echo_test_string"; then
5761
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5763
SHELL="$CONFIG_SHELL"
5765
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5766
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5767
test "X$echo_testing_string" = 'X\t' &&
5768
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5769
test "X$echo_testing_string" = "X$echo_test_string"; then
5770
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5772
# maybe with a smaller string...
5775
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5776
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5783
if test "$prev" != 'sed 50q "[$]0"'; then
5784
echo_test_string=`eval $prev`
5785
export echo_test_string
5786
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5788
# Oops. We lost completely, so just stick with echo.
5797
# Copy echo and quote the copy suitably for passing to libtool from
5798
# the Makefile, instead of quoting the original, which is used later.
5800
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5801
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5805
])])# _LT_AC_PROG_ECHO_BACKSLASH
5810
AC_DEFUN([_LT_AC_LOCK],
5811
[AC_ARG_ENABLE([libtool-lock],
5812
[AC_HELP_STRING([--disable-libtool-lock],
5813
[avoid locking (might break parallel builds)])])
5814
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5816
# Some flags need to be propagated to the compiler or linker for good
5820
# Find out which ABI we are using.
5821
echo 'int i;' > conftest.$ac_ext
5822
if AC_TRY_EVAL(ac_compile); then
5823
case `/usr/bin/file conftest.$ac_objext` in
5835
# Find out which ABI we are using.
5836
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5837
if AC_TRY_EVAL(ac_compile); then
5838
if test "$lt_cv_prog_gnu_ld" = yes; then
5839
case `/usr/bin/file conftest.$ac_objext` in
5841
LD="${LD-ld} -melf32bsmip"
5844
LD="${LD-ld} -melf32bmipn32"
5847
LD="${LD-ld} -melf64bmip"
5851
case `/usr/bin/file conftest.$ac_objext` in
5867
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5868
# Find out which ABI we are using.
5869
echo 'int i;' > conftest.$ac_ext
5870
if AC_TRY_EVAL(ac_compile); then
5871
case "`/usr/bin/file conftest.o`" in
5876
LD="${LD-ld} -m elf_i386"
5879
LD="${LD-ld} -m elf32ppclinux"
5882
LD="${LD-ld} -m elf_s390"
5885
LD="${LD-ld} -m elf32_sparc"
5893
LD="${LD-ld} -m elf_x86_64"
5895
ppc*-*linux*|powerpc*-*linux*)
5896
LD="${LD-ld} -m elf64ppc"
5899
LD="${LD-ld} -m elf64_s390"
5902
LD="${LD-ld} -m elf64_sparc"
5912
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5913
SAVE_CFLAGS="$CFLAGS"
5914
CFLAGS="$CFLAGS -belf"
5915
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5917
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5919
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5920
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5921
CFLAGS="$SAVE_CFLAGS"
5924
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5925
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5926
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5927
AC_CHECK_TOOL(AS, as, false)
5928
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5933
need_locks="$enable_libtool_lock"
5938
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5939
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5940
# ----------------------------------------------------------------
5941
# Check whether the given compiler option works
5942
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5943
[AC_REQUIRE([LT_AC_PROG_SED])
5944
AC_CACHE_CHECK([$1], [$2],
5946
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5947
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5948
lt_compiler_flag="$3"
5949
# Insert the option either (1) after the last *FLAGS variable, or
5950
# (2) before a word containing "conftest.", or (3) at the end.
5951
# Note that $ac_compile itself does not contain backslashes and begins
5952
# with a dollar sign (not a hyphen), so the echo should work correctly.
5953
# The option is referenced via a variable to avoid confusing sed.
5954
lt_compile=`echo "$ac_compile" | $SED \
5955
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
5956
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5957
-e 's:$: $lt_compiler_flag:'`
5958
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5959
(eval "$lt_compile" 2>conftest.err)
5961
cat conftest.err >&AS_MESSAGE_LOG_FD
5962
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5963
if (exit $ac_status) && test -s "$ac_outfile"; then
5964
# The compiler can only warn and ignore the option if not recognized
5965
# So say no if there are warnings
5966
if test ! -s conftest.err; then
5973
if test x"[$]$2" = xyes; then
5974
ifelse([$5], , :, [$5])
5976
ifelse([$6], , :, [$6])
5978
])# AC_LIBTOOL_COMPILER_OPTION
5981
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5982
# [ACTION-SUCCESS], [ACTION-FAILURE])
5983
# ------------------------------------------------------------
5984
# Check whether the given compiler option works
5985
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5986
[AC_CACHE_CHECK([$1], [$2],
5988
save_LDFLAGS="$LDFLAGS"
5989
LDFLAGS="$LDFLAGS $3"
5990
printf "$lt_simple_link_test_code" > conftest.$ac_ext
5991
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5992
# The compiler can only warn and ignore the option if not recognized
5993
# So say no if there are warnings
5994
if test -s conftest.err; then
5995
# Append any errors to the config.log.
5996
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6002
LDFLAGS="$save_LDFLAGS"
6005
if test x"[$]$2" = xyes; then
6006
ifelse([$4], , :, [$4])
6008
ifelse([$5], , :, [$5])
6010
])# AC_LIBTOOL_LINKER_OPTION
6013
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6014
# --------------------------
6015
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6016
[# find the maximum length of command line arguments
6017
AC_MSG_CHECKING([the maximum length of command line arguments])
6018
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6024
# On DJGPP, this test can blow up pretty badly due to problems in libc
6025
# (any single argument exceeding 2000 bytes causes a buffer overrun
6026
# during glob expansion). Even if it were fixed, the result of this
6027
# check would be larger than it should be.
6028
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6032
# Under GNU Hurd, this test is not required because there is
6033
# no limit to the length of command line arguments.
6034
# Libtool will interpret -1 as no limit whatsoever
6035
lt_cv_sys_max_cmd_len=-1;
6039
# On Win9x/ME, this test blows up -- it succeeds, but takes
6040
# about 5 minutes as the teststring grows exponentially.
6041
# Worse, since 9x/ME are not pre-emptively multitasking,
6042
# you end up with a "frozen" computer, even though with patience
6043
# the test eventually succeeds (with a max line length of 256k).
6044
# Instead, let's just punt: use the minimum linelength reported by
6045
# all of the supported platforms: 8192 (on NT/2K/XP).
6046
lt_cv_sys_max_cmd_len=8192;
6050
# If test is not a shell built-in, we'll probably end up computing a
6051
# maximum length that is only half of the actual maximum length, but
6053
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6054
= "XX$testring") >/dev/null 2>&1 &&
6055
new_result=`expr "X$testring" : ".*" 2>&1` &&
6056
lt_cv_sys_max_cmd_len=$new_result &&
6057
test $i != 17 # 1/2 MB should be enough
6060
testring=$testring$testring
6063
# Add a significant safety factor because C++ compilers can tack on massive
6064
# amounts of additional arguments before passing them to the linker.
6065
# It appears as though 1/2 is a usable value.
6066
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6070
if test -n $lt_cv_sys_max_cmd_len ; then
6071
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6075
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6078
# _LT_AC_CHECK_DLFCN
6079
# --------------------
6080
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6081
[AC_CHECK_HEADERS(dlfcn.h)dnl
6082
])# _LT_AC_CHECK_DLFCN
6085
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6086
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6087
# ------------------------------------------------------------------
6088
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6089
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6090
if test "$cross_compiling" = yes; then :
6093
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6094
lt_status=$lt_dlunknown
6095
cat > conftest.$ac_ext <<EOF
6096
[#line __oline__ "configure"
6097
#include "confdefs.h"
6106
# define LT_DLGLOBAL RTLD_GLOBAL
6109
# define LT_DLGLOBAL DL_GLOBAL
6111
# define LT_DLGLOBAL 0
6115
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6116
find out it does not work in some platform. */
6117
#ifndef LT_DLLAZY_OR_NOW
6119
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6122
# define LT_DLLAZY_OR_NOW DL_LAZY
6125
# define LT_DLLAZY_OR_NOW RTLD_NOW
6128
# define LT_DLLAZY_OR_NOW DL_NOW
6130
# define LT_DLLAZY_OR_NOW 0
6138
extern "C" void exit (int);
6141
void fnord() { int i=42;}
6144
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6145
int status = $lt_dlunknown;
6149
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6150
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6151
/* dlclose (self); */
6157
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6158
(./conftest; exit; ) 2>/dev/null
6161
x$lt_dlno_uscore) $1 ;;
6162
x$lt_dlneed_uscore) $2 ;;
6163
x$lt_unknown|x*) $3 ;;
6166
# compilation failed
6171
])# _LT_AC_TRY_DLOPEN_SELF
6174
# AC_LIBTOOL_DLOPEN_SELF
6175
# -------------------
6176
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6177
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6178
if test "x$enable_dlopen" != xyes; then
6179
enable_dlopen=unknown
6180
enable_dlopen_self=unknown
6181
enable_dlopen_self_static=unknown
6188
lt_cv_dlopen="load_add_on"
6190
lt_cv_dlopen_self=yes
6194
lt_cv_dlopen="LoadLibrary"
6199
lt_cv_dlopen="dlopen"
6204
# if libdl is installed we need to link against it
6205
AC_CHECK_LIB([dl], [dlopen],
6206
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6209
lt_cv_dlopen_self=yes
6214
AC_CHECK_FUNC([shl_load],
6215
[lt_cv_dlopen="shl_load"],
6216
[AC_CHECK_LIB([dld], [shl_load],
6217
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6218
[AC_CHECK_FUNC([dlopen],
6219
[lt_cv_dlopen="dlopen"],
6220
[AC_CHECK_LIB([dl], [dlopen],
6221
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6222
[AC_CHECK_LIB([svld], [dlopen],
6223
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6224
[AC_CHECK_LIB([dld], [dld_link],
6225
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6234
if test "x$lt_cv_dlopen" != xno; then
6240
case $lt_cv_dlopen in
6242
save_CPPFLAGS="$CPPFLAGS"
6243
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6245
save_LDFLAGS="$LDFLAGS"
6246
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6249
LIBS="$lt_cv_dlopen_libs $LIBS"
6251
AC_CACHE_CHECK([whether a program can dlopen itself],
6252
lt_cv_dlopen_self, [dnl
6253
_LT_AC_TRY_DLOPEN_SELF(
6254
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6255
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6258
if test "x$lt_cv_dlopen_self" = xyes; then
6259
LDFLAGS="$LDFLAGS $link_static_flag"
6260
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6261
lt_cv_dlopen_self_static, [dnl
6262
_LT_AC_TRY_DLOPEN_SELF(
6263
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6264
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6268
CPPFLAGS="$save_CPPFLAGS"
6269
LDFLAGS="$save_LDFLAGS"
6274
case $lt_cv_dlopen_self in
6275
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6276
*) enable_dlopen_self=unknown ;;
6279
case $lt_cv_dlopen_self_static in
6280
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6281
*) enable_dlopen_self_static=unknown ;;
6284
])# AC_LIBTOOL_DLOPEN_SELF
6287
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6288
# ---------------------------------
6289
# Check to see if options -c and -o are simultaneously supported by compiler
6290
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6291
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6292
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6293
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6294
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6295
$rm -r conftest 2>/dev/null
6299
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6301
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6302
# that will create temporary files in the current directory regardless of
6303
# the output directory. Thus, making CWD read-only will cause this test
6304
# to fail, enabling locking or at least warning the user not to do parallel
6308
lt_compiler_flag="-o out/conftest2.$ac_objext"
6309
# Insert the option either (1) after the last *FLAGS variable, or
6310
# (2) before a word containing "conftest.", or (3) at the end.
6311
# Note that $ac_compile itself does not contain backslashes and begins
6312
# with a dollar sign (not a hyphen), so the echo should work correctly.
6313
lt_compile=`echo "$ac_compile" | $SED \
6314
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6315
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6316
-e 's:$: $lt_compiler_flag:'`
6317
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6318
(eval "$lt_compile" 2>out/conftest.err)
6320
cat out/conftest.err >&AS_MESSAGE_LOG_FD
6321
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6322
if (exit $ac_status) && test -s out/conftest2.$ac_objext
6324
# The compiler can only warn and ignore the option if not recognized
6325
# So say no if there are warnings
6326
if test ! -s out/conftest.err; then
6327
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6337
])# AC_LIBTOOL_PROG_CC_C_O
6340
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6341
# -----------------------------------------
6342
# Check to see if we can do hard links to lock some files if needed
6343
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6344
[AC_REQUIRE([_LT_AC_LOCK])dnl
6346
hard_links="nottested"
6347
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6348
# do not overwrite the value of need_locks provided by the user
6349
AC_MSG_CHECKING([if we can lock with hard links])
6352
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6354
ln conftest.a conftest.b 2>&5 || hard_links=no
6355
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6356
AC_MSG_RESULT([$hard_links])
6357
if test "$hard_links" = no; then
6358
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6364
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6369
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6370
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6371
[rm -f .libs 2>/dev/null
6372
mkdir .libs 2>/dev/null
6373
if test -d .libs; then
6376
# MS-DOS does not allow filenames that begin with a dot.
6379
rmdir .libs 2>/dev/null])
6380
objdir=$lt_cv_objdir
6381
])# AC_LIBTOOL_OBJDIR
6384
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6385
# ----------------------------------------------
6386
# Check hardcoding attributes.
6387
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6388
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6389
_LT_AC_TAGVAR(hardcode_action, $1)=
6390
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6391
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6392
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6394
# We can hardcode non-existant directories.
6395
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6396
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6397
# have to relink, otherwise we might link with an installed library
6398
# when we should be linking with a yet-to-be-installed one
6399
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6400
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6401
# Linking always hardcodes the temporary library directory.
6402
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6404
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6405
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6408
# We cannot hardcode anything, or else we can only hardcode existing
6410
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6412
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6414
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6415
# Fast installation is not supported
6416
enable_fast_install=no
6417
elif test "$shlibpath_overrides_runpath" = yes ||
6418
test "$enable_shared" = no; then
6419
# Fast installation is not necessary
6420
enable_fast_install=needless
6422
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6425
# AC_LIBTOOL_SYS_LIB_STRIP
6426
# ------------------------
6427
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6430
AC_MSG_CHECKING([whether stripping libraries is possible])
6431
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6432
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6433
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6434
AC_MSG_RESULT([yes])
6436
# FIXME - insert some real tests, host_os isn't really good enough
6439
if test -n "$STRIP" ; then
6440
striplib="$STRIP -x"
6441
AC_MSG_RESULT([yes])
6451
])# AC_LIBTOOL_SYS_LIB_STRIP
6454
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6455
# -----------------------------
6456
# PORTME Fill in your ld.so characteristics
6457
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6458
[AC_MSG_CHECKING([dynamic linker characteristics])
6460
libname_spec='lib$name'
6468
shlibpath_overrides_runpath=unknown
6470
dynamic_linker="$host_os ld.so"
6471
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6472
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6473
need_lib_prefix=unknown
6474
hardcode_into_libs=no
6476
# when you set need_version to no, make sure it does not cause -set_version
6477
# flags to be left without arguments
6478
need_version=unknown
6483
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6484
shlibpath_var=LIBPATH
6486
# AIX 3 has no versioning support, so we append a major version to the name.
6487
soname_spec='${libname}${release}${shared_ext}$major'
6494
hardcode_into_libs=yes
6495
if test "$host_cpu" = ia64; then
6496
# AIX 5 supports IA64
6497
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6498
shlibpath_var=LD_LIBRARY_PATH
6500
# With GCC up to 2.95.x, collect2 would create an import file
6501
# for dependence libraries. The import file would start with
6502
# the line `#! .'. This would cause the generated library to
6503
# depend on `.', always an invalid library. This was fixed in
6504
# development snapshots of GCC prior to 3.0.
6506
aix4 | aix4.[[01]] | aix4.[[01]].*)
6507
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6509
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6516
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6517
# soname into executable. Probably we can add versioning support to
6518
# collect2, so additional links can be useful in future.
6519
if test "$aix_use_runtimelinking" = yes; then
6520
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6521
# instead of lib<name>.a to let people know that these are not
6522
# typical AIX shared libraries.
6523
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6525
# We preserve .a as extension for shared libraries through AIX4.2
6526
# and later when we are not doing run time linking.
6527
library_names_spec='${libname}${release}.a $libname.a'
6528
soname_spec='${libname}${release}${shared_ext}$major'
6530
shlibpath_var=LIBPATH
6535
library_names_spec='$libname.ixlibrary $libname.a'
6536
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6537
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'
6541
library_names_spec='${libname}${shared_ext}'
6542
dynamic_linker="$host_os ld.so"
6543
shlibpath_var=LIBRARY_PATH
6549
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6550
soname_spec='${libname}${release}${shared_ext}$major'
6551
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6552
shlibpath_var=LD_LIBRARY_PATH
6553
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6554
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6555
# the default ld.so.conf also contains /usr/contrib/lib and
6556
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6557
# libtool to hard-code these into programs
6560
cygwin* | mingw* | pw32*)
6561
version_type=windows
6566
case $GCC,$host_os in
6567
yes,cygwin* | yes,mingw* | yes,pw32*)
6568
library_names_spec='$libname.dll.a'
6569
# DLL is installed to $(libdir)/../bin by postinstall_cmds
6570
postinstall_cmds='base_file=`basename \${file}`~
6571
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6572
dldir=$destdir/`dirname \$dlpath`~
6573
test -d \$dldir || mkdir -p \$dldir~
6574
$install_prog $dir/$dlname \$dldir/$dlname'
6575
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6576
dlpath=$dir/\$dldll~
6578
shlibpath_overrides_runpath=yes
6582
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
6583
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6584
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6587
# MinGW DLLs use traditional 'lib' prefix
6588
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6589
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6590
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6591
# It is most probably a Windows format PATH printed by
6592
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6593
# path with ; separators, and with drive letters. We can handle the
6594
# drive letters (cygwin fileutils understands them), so leave them,
6595
# especially as we might pass files found there to a mingw objdump,
6596
# which wouldn't understand a cygwinified path. Ahh.
6597
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6599
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6603
# pw32 DLLs use 'pw' prefix rather than 'lib'
6604
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6610
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6613
dynamic_linker='Win32 ld.exe'
6614
# FIXME: first we should search . and the directory the executable is in
6618
darwin* | rhapsody*)
6619
dynamic_linker="$host_os dyld"
6623
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
6624
soname_spec='${libname}${release}${major}$shared_ext'
6625
shlibpath_overrides_runpath=yes
6626
shlibpath_var=DYLD_LIBRARY_PATH
6627
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
6628
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
6629
if test "$GCC" = yes; then
6630
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"`
6632
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
6634
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6641
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6642
soname_spec='${libname}${release}${shared_ext}$major'
6643
shlibpath_var=LD_LIBRARY_PATH
6654
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6655
soname_spec='${libname}${release}${shared_ext}$major'
6656
shlibpath_var=LD_LIBRARY_PATH
6657
shlibpath_overrides_runpath=no
6658
hardcode_into_libs=yes
6659
dynamic_linker='GNU ld.so'
6663
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6664
version_type=freebsd-$objformat
6665
case $version_type in
6667
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
6672
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
6676
shlibpath_var=LD_LIBRARY_PATH
6679
shlibpath_overrides_runpath=yes
6681
freebsd3.[01]* | freebsdelf3.[01]*)
6682
shlibpath_overrides_runpath=yes
6683
hardcode_into_libs=yes
6686
shlibpath_overrides_runpath=no
6687
hardcode_into_libs=yes
6696
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6697
soname_spec='${libname}${release}${shared_ext}$major'
6698
shlibpath_var=LD_LIBRARY_PATH
6699
hardcode_into_libs=yes
6702
hpux9* | hpux10* | hpux11*)
6703
# Give a soname corresponding to the major version so that dld.sl refuses to
6704
# link against other versions.
6711
hardcode_into_libs=yes
6712
dynamic_linker="$host_os dld.so"
6713
shlibpath_var=LD_LIBRARY_PATH
6714
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6715
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6716
soname_spec='${libname}${release}${shared_ext}$major'
6717
if test "X$HPUX_IA64_MODE" = X32; then
6718
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6720
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6722
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6726
hardcode_into_libs=yes
6727
dynamic_linker="$host_os dld.sl"
6728
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6729
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6730
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6731
soname_spec='${libname}${release}${shared_ext}$major'
6732
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6733
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6737
dynamic_linker="$host_os dld.sl"
6738
shlibpath_var=SHLIB_PATH
6739
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6740
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6741
soname_spec='${libname}${release}${shared_ext}$major'
6744
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6745
postinstall_cmds='chmod 555 $lib'
6748
irix5* | irix6* | nonstopux*)
6750
nonstopux*) version_type=nonstopux ;;
6752
if test "$lt_cv_prog_gnu_ld" = yes; then
6760
soname_spec='${libname}${release}${shared_ext}$major'
6761
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
6763
irix5* | nonstopux*)
6767
case $LD in # libtool.m4 will add one of these switches to LD
6768
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6769
libsuff= shlibsuff= libmagic=32-bit;;
6770
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6771
libsuff=32 shlibsuff=N32 libmagic=N32;;
6772
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6773
libsuff=64 shlibsuff=64 libmagic=64-bit;;
6774
*) libsuff= shlibsuff= libmagic=never-match;;
6778
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6779
shlibpath_overrides_runpath=no
6780
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6781
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6782
hardcode_into_libs=yes
6785
# No shared lib support for Linux oldld, aout, or coff.
6786
linux*oldld* | linux*aout* | linux*coff*)
6790
# This must be Linux ELF.
6795
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6796
soname_spec='${libname}${release}${shared_ext}$major'
6797
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6799
if test "x$LINUX_64_MODE" = x64; then
6800
# Some platforms are per default 64-bit, so there's no /lib64
6801
if test -d /lib64; then
6805
shlibpath_var=LD_LIBRARY_PATH
6806
shlibpath_overrides_runpath=no
6807
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6808
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6809
# This implies no fast_install, which is unacceptable.
6810
# Some rework will be needed to allow for fast_install
6811
# before this can be enabled.
6812
hardcode_into_libs=yes
6814
# We used to test for /lib/ld.so.1 and disable shared libraries on
6815
# powerpc, because MkLinux only supported shared libraries with the
6816
# GNU dynamic linker. Since this was broken with cross compilers,
6817
# most powerpc-linux boxes support dynamic linking these days and
6818
# people can always --disable-shared, the test was removed, and we
6819
# assume the GNU/Linux dynamic linker is in use.
6820
dynamic_linker='GNU/Linux ld.so'
6827
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6828
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6829
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6830
dynamic_linker='NetBSD (a.out) ld.so'
6832
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
6833
soname_spec='${libname}${release}${shared_ext}$major'
6834
dynamic_linker='NetBSD ld.elf_so'
6836
shlibpath_var=LD_LIBRARY_PATH
6837
shlibpath_overrides_runpath=yes
6838
hardcode_into_libs=yes
6843
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6844
shlibpath_var=LD_LIBRARY_PATH
6845
shlibpath_overrides_runpath=yes
6852
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6853
soname_spec='${libname}${release}${shared_ext}$major'
6854
shlibpath_var=LD_LIBRARY_PATH
6855
shlibpath_overrides_runpath=yes
6862
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6863
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6864
shlibpath_var=LD_LIBRARY_PATH
6865
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6867
openbsd2.[[89]] | openbsd2.[[89]].*)
6868
shlibpath_overrides_runpath=no
6871
shlibpath_overrides_runpath=yes
6875
shlibpath_overrides_runpath=yes
6880
libname_spec='$name'
6883
library_names_spec='$libname${shared_ext} $libname.a'
6884
dynamic_linker='OS/2 ld.exe'
6885
shlibpath_var=LIBPATH
6888
osf3* | osf4* | osf5*)
6892
soname_spec='${libname}${release}${shared_ext}$major'
6893
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6894
shlibpath_var=LD_LIBRARY_PATH
6895
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6896
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6901
soname_spec='${libname}${release}${shared_ext}$major'
6902
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6903
shlibpath_var=LD_LIBRARY_PATH
6910
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6911
soname_spec='${libname}${release}${shared_ext}$major'
6912
shlibpath_var=LD_LIBRARY_PATH
6913
shlibpath_overrides_runpath=yes
6914
hardcode_into_libs=yes
6915
# ldd complains unless libraries are executable
6916
postinstall_cmds='chmod +x $lib'
6921
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
6922
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6923
shlibpath_var=LD_LIBRARY_PATH
6924
shlibpath_overrides_runpath=yes
6925
if test "$with_gnu_ld" = yes; then
6931
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6933
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6934
soname_spec='${libname}${release}${shared_ext}$major'
6935
shlibpath_var=LD_LIBRARY_PATH
6936
case $host_vendor in
6938
shlibpath_overrides_runpath=no
6940
export_dynamic_flag_spec='${wl}-Blargedynsym'
6941
runpath_var=LD_RUN_PATH
6949
shlibpath_overrides_runpath=no
6950
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6956
if test -d /usr/nec ;then
6958
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
6959
soname_spec='$libname${shared_ext}.$major'
6960
shlibpath_var=LD_LIBRARY_PATH
6966
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6967
soname_spec='${libname}${release}${shared_ext}$major'
6968
shlibpath_var=LD_LIBRARY_PATH
6975
AC_MSG_RESULT([$dynamic_linker])
6976
test "$dynamic_linker" = no && can_build_shared=no
6977
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6982
AC_DEFUN([_LT_AC_TAGCONFIG],
6983
[AC_ARG_WITH([tags],
6984
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
6985
[include additional configurations @<:@automatic@:>@])],
6986
[tagnames="$withval"])
6988
if test -f "$ltmain" && test -n "$tagnames"; then
6989
if test ! -f "${ofile}"; then
6990
AC_MSG_WARN([output file `$ofile' does not exist])
6993
if test -z "$LTCC"; then
6994
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6995
if test -z "$LTCC"; then
6996
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6998
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7002
# Extract list of available tagged configurations in $ofile.
7003
# Note that this assumes the entire list is on one line.
7004
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7006
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7007
for tagname in $tagnames; do
7009
# Check whether tagname contains only valid characters
7010
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7012
*) AC_MSG_ERROR([invalid tag name: $tagname])
7016
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7018
AC_MSG_ERROR([tag name \"$tagname\" already exists])
7021
# Update the list of available tags.
7022
if test -n "$tagname"; then
7023
echo appending configuration tag \"$tagname\" to $ofile
7027
if test -n "$CXX" && test "X$CXX" != "Xno"; then
7028
AC_LIBTOOL_LANG_CXX_CONFIG
7035
if test -n "$F77" && test "X$F77" != "Xno"; then
7036
AC_LIBTOOL_LANG_F77_CONFIG
7043
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7044
AC_LIBTOOL_LANG_GCJ_CONFIG
7051
AC_LIBTOOL_LANG_RC_CONFIG
7055
AC_MSG_ERROR([Unsupported tag name: $tagname])
7059
# Append the new tag name to the list of available tags.
7060
if test -n "$tagname" ; then
7061
available_tags="$available_tags $tagname"
7067
# Now substitute the updated list of available tags.
7068
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7069
mv "${ofile}T" "$ofile"
7073
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7076
])# _LT_AC_TAGCONFIG
7081
# enable checks for dlopen support
7082
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7083
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7084
])# AC_LIBTOOL_DLOPEN
7087
# AC_LIBTOOL_WIN32_DLL
7088
# --------------------
7089
# declare package support for building win32 dll's
7090
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7091
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7092
])# AC_LIBTOOL_WIN32_DLL
7095
# AC_ENABLE_SHARED([DEFAULT])
7096
# ---------------------------
7097
# implement the --enable-shared flag
7098
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7099
AC_DEFUN([AC_ENABLE_SHARED],
7100
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7101
AC_ARG_ENABLE([shared],
7102
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7103
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7104
[p=${PACKAGE-default}
7106
yes) enable_shared=yes ;;
7107
no) enable_shared=no ;;
7110
# Look at the argument we got. We use all the common list separators.
7111
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7112
for pkg in $enableval; do
7114
if test "X$pkg" = "X$p"; then
7121
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7122
])# AC_ENABLE_SHARED
7127
#- set the default shared flag to --disable-shared
7128
AC_DEFUN([AC_DISABLE_SHARED],
7129
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7130
AC_ENABLE_SHARED(no)
7131
])# AC_DISABLE_SHARED
7134
# AC_ENABLE_STATIC([DEFAULT])
7135
# ---------------------------
7136
# implement the --enable-static flag
7137
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7138
AC_DEFUN([AC_ENABLE_STATIC],
7139
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7140
AC_ARG_ENABLE([static],
7141
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7142
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7143
[p=${PACKAGE-default}
7145
yes) enable_static=yes ;;
7146
no) enable_static=no ;;
7149
# Look at the argument we got. We use all the common list separators.
7150
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7151
for pkg in $enableval; do
7153
if test "X$pkg" = "X$p"; then
7160
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7161
])# AC_ENABLE_STATIC
7166
# set the default static flag to --disable-static
7167
AC_DEFUN([AC_DISABLE_STATIC],
7168
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7169
AC_ENABLE_STATIC(no)
7170
])# AC_DISABLE_STATIC
7173
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7174
# ---------------------------------
7175
# implement the --enable-fast-install flag
7176
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7177
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7178
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7179
AC_ARG_ENABLE([fast-install],
7180
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7181
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7182
[p=${PACKAGE-default}
7184
yes) enable_fast_install=yes ;;
7185
no) enable_fast_install=no ;;
7187
enable_fast_install=no
7188
# Look at the argument we got. We use all the common list separators.
7189
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7190
for pkg in $enableval; do
7192
if test "X$pkg" = "X$p"; then
7193
enable_fast_install=yes
7199
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7200
])# AC_ENABLE_FAST_INSTALL
7203
# AC_DISABLE_FAST_INSTALL
7204
# -----------------------
7205
# set the default to --disable-fast-install
7206
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7207
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7208
AC_ENABLE_FAST_INSTALL(no)
7209
])# AC_DISABLE_FAST_INSTALL
7212
# AC_LIBTOOL_PICMODE([MODE])
7213
# --------------------------
7214
# implement the --with-pic flag
7215
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7216
AC_DEFUN([AC_LIBTOOL_PICMODE],
7217
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7218
pic_mode=ifelse($#,1,$1,default)
7219
])# AC_LIBTOOL_PICMODE
7224
# This is predefined starting with Autoconf 2.54, so this conditional
7225
# definition can be removed once we require Autoconf 2.54 or later.
7226
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7227
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7228
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7229
then ac_cv_prog_egrep='grep -E'
7230
else ac_cv_prog_egrep='egrep'
7232
EGREP=$ac_cv_prog_egrep
7237
# AC_PATH_TOOL_PREFIX
7238
# -------------------
7239
# find a file program which can recognise shared library
7240
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7241
[AC_REQUIRE([AC_PROG_EGREP])dnl
7242
AC_MSG_CHECKING([for $1])
7243
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7245
[[\\/*] | ?:[\\/]*])
7246
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7249
lt_save_MAGIC_CMD="$MAGIC_CMD"
7250
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7251
dnl $ac_dummy forces splitting on constant user-supplied paths.
7252
dnl POSIX.2 word splitting is done only on the output of word expansions,
7253
dnl not every word. This closes a longstanding sh security hole.
7254
ac_dummy="ifelse([$2], , $PATH, [$2])"
7255
for ac_dir in $ac_dummy; do
7257
test -z "$ac_dir" && ac_dir=.
7258
if test -f $ac_dir/$1; then
7259
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7260
if test -n "$file_magic_test_file"; then
7261
case $deplibs_check_method in
7263
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7264
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7265
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7266
$EGREP "$file_magic_regex" > /dev/null; then
7271
*** Warning: the command libtool uses to detect shared libraries,
7272
*** $file_magic_cmd, produces output that libtool cannot recognize.
7273
*** The result is that libtool may fail to recognize shared libraries
7274
*** as such. This will affect the creation of libtool libraries that
7275
*** depend on shared libraries, but programs linked with such libtool
7276
*** libraries will work regardless of this problem. Nevertheless, you
7277
*** may want to report the problem to your system manager and/or to
7278
*** bug-libtool@gnu.org
7288
MAGIC_CMD="$lt_save_MAGIC_CMD"
7291
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7292
if test -n "$MAGIC_CMD"; then
7293
AC_MSG_RESULT($MAGIC_CMD)
7297
])# AC_PATH_TOOL_PREFIX
7302
# find a file program which can recognise a shared library
7303
AC_DEFUN([AC_PATH_MAGIC],
7304
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7305
if test -z "$lt_cv_path_MAGIC_CMD"; then
7306
if test -n "$ac_tool_prefix"; then
7307
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7317
# find the pathname to the GNU or non-GNU linker
7318
AC_DEFUN([AC_PROG_LD],
7319
[AC_ARG_WITH([gnu-ld],
7320
[AC_HELP_STRING([--with-gnu-ld],
7321
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7322
[test "$withval" = no || with_gnu_ld=yes],
7324
AC_REQUIRE([LT_AC_PROG_SED])dnl
7325
AC_REQUIRE([AC_PROG_CC])dnl
7326
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7327
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7329
if test "$GCC" = yes; then
7330
# Check if gcc -print-prog-name=ld gives a path.
7331
AC_MSG_CHECKING([for ld used by $CC])
7334
# gcc leaves a trailing carriage return which upsets mingw
7335
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7337
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7340
# Accept absolute paths.
7341
[[\\/]]* | ?:[[\\/]]*)
7342
re_direlt='/[[^/]][[^/]]*/\.\./'
7343
# Canonicalize the pathname of ld
7344
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7345
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7346
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7348
test -z "$LD" && LD="$ac_prog"
7351
# If it fails, then pretend we aren't using GCC.
7355
# If it is relative, then search for the first ld in PATH.
7359
elif test "$with_gnu_ld" = yes; then
7360
AC_MSG_CHECKING([for GNU ld])
7362
AC_MSG_CHECKING([for non-GNU ld])
7364
AC_CACHE_VAL(lt_cv_path_LD,
7365
[if test -z "$LD"; then
7366
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7367
for ac_dir in $PATH; do
7369
test -z "$ac_dir" && ac_dir=.
7370
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7371
lt_cv_path_LD="$ac_dir/$ac_prog"
7372
# Check to see if the program is GNU ld. I'd rather use --version,
7373
# but apparently some GNU ld's only accept -v.
7374
# Break only if it was the GNU/non-GNU ld that we prefer.
7375
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7376
*GNU* | *'with BFD'*)
7377
test "$with_gnu_ld" != no && break
7380
test "$with_gnu_ld" != yes && break
7387
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7390
if test -n "$LD"; then
7395
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7402
AC_DEFUN([AC_PROG_LD_GNU],
7403
[AC_REQUIRE([AC_PROG_EGREP])dnl
7404
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7405
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7406
case `$LD -v 2>&1 </dev/null` in
7407
*GNU* | *'with BFD'*)
7408
lt_cv_prog_gnu_ld=yes
7411
lt_cv_prog_gnu_ld=no
7414
with_gnu_ld=$lt_cv_prog_gnu_ld
7418
# AC_PROG_LD_RELOAD_FLAG
7419
# ----------------------
7420
# find reload flag for linker
7421
# -- PORTME Some linkers may need a different reload flag.
7422
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7423
[AC_CACHE_CHECK([for $LD option to reload object files],
7424
lt_cv_ld_reload_flag,
7425
[lt_cv_ld_reload_flag='-r'])
7426
reload_flag=$lt_cv_ld_reload_flag
7427
case $reload_flag in
7429
*) reload_flag=" $reload_flag" ;;
7431
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7432
])# AC_PROG_LD_RELOAD_FLAG
7435
# AC_DEPLIBS_CHECK_METHOD
7436
# -----------------------
7437
# how to check for library dependencies
7438
# -- PORTME fill in with the dynamic library characteristics
7439
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7440
[AC_CACHE_CHECK([how to recognise dependent libraries],
7441
lt_cv_deplibs_check_method,
7442
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7443
lt_cv_file_magic_test_file=
7444
lt_cv_deplibs_check_method='unknown'
7445
# Need to set the preceding variable on all platforms that support
7446
# interlibrary dependencies.
7447
# 'none' -- dependencies not supported.
7448
# `unknown' -- same as none, but documents that we really don't know.
7449
# 'pass_all' -- all dependencies passed with no checks.
7450
# 'test_compile' -- check by making test program.
7451
# 'file_magic [[regex]]' -- check by looking for files in library path
7452
# which responds to the $file_magic_cmd with a given extended regex.
7453
# If you have `file' or equivalent on your system and you're not sure
7454
# whether `pass_all' will *always* work, you probably want this one.
7458
lt_cv_deplibs_check_method=pass_all
7462
lt_cv_deplibs_check_method=pass_all
7466
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7467
lt_cv_file_magic_cmd='/usr/bin/file -L'
7468
lt_cv_file_magic_test_file=/shlib/libc.so
7471
cygwin* | mingw* | pw32*)
7472
# win32_libid is a shell function defined in ltmain.sh
7473
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7474
lt_cv_file_magic_cmd='win32_libid'
7477
darwin* | rhapsody*)
7478
# this will be overwritten by pass_all, but leave it in just in case
7479
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7480
lt_cv_file_magic_cmd='/usr/bin/file -L'
7482
rhapsody* | darwin1.[[012]])
7483
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7486
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7489
lt_cv_deplibs_check_method=pass_all
7493
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7496
# Not sure whether the presence of OpenBSD here was a mistake.
7497
# Let's accept both of them until this is cleared up.
7498
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7499
lt_cv_file_magic_cmd=/usr/bin/file
7500
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7504
lt_cv_deplibs_check_method=pass_all
7509
lt_cv_deplibs_check_method=pass_all
7512
hpux10.20* | hpux11*)
7513
lt_cv_file_magic_cmd=/usr/bin/file
7516
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7517
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7520
[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]']
7521
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7524
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7525
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7530
irix5* | irix6* | nonstopux*)
7532
irix5* | nonstopux*)
7533
# this will be overridden with pass_all, but let us keep it just in case
7534
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7538
*-32|*"-32 ") libmagic=32-bit;;
7539
*-n32|*"-n32 ") libmagic=N32;;
7540
*-64|*"-64 ") libmagic=64-bit;;
7541
*) libmagic=never-match;;
7543
# this will be overridden with pass_all, but let us keep it just in case
7544
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7547
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7548
lt_cv_deplibs_check_method=pass_all
7551
# This must be Linux ELF.
7554
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7555
lt_cv_deplibs_check_method=pass_all ;;
7556
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7558
lt_cv_deplibs_check_method=pass_all ;;
7560
# glibc up to 2.1.1 does not perform some relocations on ARM
7561
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7563
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7567
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7568
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7570
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7575
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7576
lt_cv_file_magic_cmd=/usr/bin/file
7577
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7581
lt_cv_deplibs_check_method=unknown
7585
lt_cv_file_magic_cmd=/usr/bin/file
7586
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7587
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7588
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7590
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7594
osf3* | osf4* | osf5*)
7595
# this will be overridden with pass_all, but let us keep it just in case
7596
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7597
lt_cv_file_magic_test_file=/shlib/libc.so
7598
lt_cv_deplibs_check_method=pass_all
7602
lt_cv_deplibs_check_method=pass_all
7606
lt_cv_deplibs_check_method=pass_all
7607
lt_cv_file_magic_test_file=/lib/libc.so
7610
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7611
case $host_vendor in
7613
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]]'
7614
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7617
lt_cv_deplibs_check_method=pass_all
7620
lt_cv_file_magic_cmd='/bin/file'
7621
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7624
lt_cv_file_magic_cmd='/bin/file'
7625
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7626
lt_cv_file_magic_test_file=/lib/libc.so
7629
lt_cv_deplibs_check_method=pass_all
7634
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7635
lt_cv_deplibs_check_method=pass_all
7639
file_magic_cmd=$lt_cv_file_magic_cmd
7640
deplibs_check_method=$lt_cv_deplibs_check_method
7641
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7642
])# AC_DEPLIBS_CHECK_METHOD
7647
# find the pathname to a BSD-compatible name lister
7648
AC_DEFUN([AC_PROG_NM],
7649
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7650
[if test -n "$NM"; then
7651
# Let the user override the test.
7654
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7655
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7657
test -z "$ac_dir" && ac_dir=.
7658
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7659
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7660
# Check to see if the nm accepts a BSD-compat flag.
7661
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7662
# nm: unknown option "B" ignored
7663
# Tru64's nm complains that /dev/null is an invalid object file
7664
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
7665
*/dev/null* | *'Invalid file or object type'*)
7666
lt_cv_path_NM="$tmp_nm -B"
7670
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7672
lt_cv_path_NM="$tmp_nm -p"
7676
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7677
continue # so that we can try to find one that supports BSD flags
7684
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7692
# check for math library
7693
AC_DEFUN([AC_CHECK_LIBM],
7694
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7697
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
7698
# These system don't have libm, or don't need it
7701
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7702
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7705
AC_CHECK_LIB(m, cos, LIBM="-lm")
7711
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7712
# -----------------------------------
7713
# sets LIBLTDL to the link flags for the libltdl convenience library and
7714
# LTDLINCL to the include flags for the libltdl header and adds
7715
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7716
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7717
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7718
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7719
# '${top_srcdir}/' (note the single quotes!). If your package is not
7720
# flat and you're not using automake, define top_builddir and
7721
# top_srcdir appropriately in the Makefiles.
7722
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7723
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7724
case $enable_ltdl_convenience in
7725
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7726
"") enable_ltdl_convenience=yes
7727
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7729
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7730
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7731
# For backwards non-gettext consistent compatibility...
7733
])# AC_LIBLTDL_CONVENIENCE
7736
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7737
# -----------------------------------
7738
# sets LIBLTDL to the link flags for the libltdl installable library and
7739
# LTDLINCL to the include flags for the libltdl header and adds
7740
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7741
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7742
# DIRECTORY is not provided and an installed libltdl is not found, it is
7743
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7744
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7745
# quotes!). If your package is not flat and you're not using automake,
7746
# define top_builddir and top_srcdir appropriately in the Makefiles.
7747
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7748
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7749
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7750
AC_CHECK_LIB(ltdl, lt_dlinit,
7751
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7752
[if test x"$enable_ltdl_install" = xno; then
7753
AC_MSG_WARN([libltdl not installed, but installation disabled])
7755
enable_ltdl_install=yes
7758
if test x"$enable_ltdl_install" = x"yes"; then
7759
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7760
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7761
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7763
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7767
# For backwards non-gettext consistent compatibility...
7769
])# AC_LIBLTDL_INSTALLABLE
7774
# enable support for C++ libraries
7775
AC_DEFUN([AC_LIBTOOL_CXX],
7776
[AC_REQUIRE([_LT_AC_LANG_CXX])
7782
AC_DEFUN([_LT_AC_LANG_CXX],
7783
[AC_REQUIRE([AC_PROG_CXX])
7784
AC_REQUIRE([AC_PROG_CXXCPP])
7785
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
7791
# enable support for Fortran 77 libraries
7792
AC_DEFUN([AC_LIBTOOL_F77],
7793
[AC_REQUIRE([_LT_AC_LANG_F77])
7799
AC_DEFUN([_LT_AC_LANG_F77],
7800
[AC_REQUIRE([AC_PROG_F77])
7801
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
7807
# enable support for GCJ libraries
7808
AC_DEFUN([AC_LIBTOOL_GCJ],
7809
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7815
AC_DEFUN([_LT_AC_LANG_GCJ],
7816
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7817
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7818
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7819
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7820
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7821
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7822
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
7828
# enable support for Windows resource files
7829
AC_DEFUN([AC_LIBTOOL_RC],
7830
[AC_REQUIRE([LT_AC_PROG_RC])
7831
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
7835
# AC_LIBTOOL_LANG_C_CONFIG
7836
# ------------------------
7837
# Ensure that the configuration vars for the C compiler are
7838
# suitably defined. Those variables are subsequently used by
7839
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7840
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7841
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7845
# Source file extension for C test sources.
7848
# Object file extension for compiled C test sources.
7850
_LT_AC_TAGVAR(objext, $1)=$objext
7852
# Code to be used in simple compile tests
7853
lt_simple_compile_test_code="int some_variable = 0;\n"
7855
# Code to be used in simple link tests
7856
lt_simple_link_test_code='int main(){return(0);}\n'
7861
# Check for any special shared library compilation flags.
7863
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7864
if test "$GCC" = no; then
7867
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7871
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7872
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7873
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7875
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7876
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7882
# Check to make sure the static flag actually works.
7884
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7885
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7886
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7888
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7892
## There is no encapsulation within the following macros, do not change
7893
## the running order or otherwise move them around unless you know exactly
7894
## what you are doing...
7895
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7896
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7897
AC_LIBTOOL_PROG_CC_C_O($1)
7898
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7899
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7900
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7901
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7902
AC_LIBTOOL_SYS_LIB_STRIP
7903
AC_LIBTOOL_DLOPEN_SELF($1)
7905
# Report which librarie types wil actually be built
7906
AC_MSG_CHECKING([if libtool supports shared libraries])
7907
AC_MSG_RESULT([$can_build_shared])
7909
AC_MSG_CHECKING([whether to build shared libraries])
7910
test "$can_build_shared" = "no" && enable_shared=no
7912
# On AIX, shared libraries and static libraries use the same namespace, and
7913
# are all built from PIC.
7916
test "$enable_shared" = yes && enable_static=no
7917
if test -n "$RANLIB"; then
7918
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7919
postinstall_cmds='$RANLIB $lib'
7924
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7925
test "$enable_shared" = yes && enable_static=no
7928
darwin* | rhapsody*)
7929
if test "$GCC" = yes; then
7930
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7932
rhapsody* | darwin1.[[012]])
7933
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
7936
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
7939
output_verbose_link_cmd='echo'
7940
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
7941
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7942
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7943
_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}'
7944
_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}'
7945
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7946
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7947
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7948
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
7949
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7951
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7955
AC_MSG_RESULT([$enable_shared])
7957
AC_MSG_CHECKING([whether to build static libraries])
7958
# Make sure either enable_shared or enable_static is yes.
7959
test "$enable_shared" = yes || enable_static=yes
7960
AC_MSG_RESULT([$enable_static])
7962
AC_LIBTOOL_CONFIG($1)
7966
])# AC_LIBTOOL_LANG_C_CONFIG
7969
# AC_LIBTOOL_LANG_CXX_CONFIG
7970
# --------------------------
7971
# Ensure that the configuration vars for the C compiler are
7972
# suitably defined. Those variables are subsequently used by
7973
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7974
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7975
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7977
AC_REQUIRE([AC_PROG_CXX])
7978
AC_REQUIRE([AC_PROG_CXXCPP])
7980
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7981
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7982
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7983
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7984
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7985
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7986
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7987
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7988
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7989
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7990
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
7991
_LT_AC_TAGVAR(module_cmds, $1)=
7992
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
7993
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7994
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7995
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7996
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7997
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7999
# Dependencies to place before and after the object being linked:
8000
_LT_AC_TAGVAR(predep_objects, $1)=
8001
_LT_AC_TAGVAR(postdep_objects, $1)=
8002
_LT_AC_TAGVAR(predeps, $1)=
8003
_LT_AC_TAGVAR(postdeps, $1)=
8004
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8006
# Source file extension for C++ test sources.
8009
# Object file extension for compiled C++ test sources.
8011
_LT_AC_TAGVAR(objext, $1)=$objext
8013
# Code to be used in simple compile tests
8014
lt_simple_compile_test_code="int some_variable = 0;\n"
8016
# Code to be used in simple link tests
8017
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8019
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8022
# Allow CC to be a program name with arguments.
8027
lt_save_with_gnu_ld=$with_gnu_ld
8028
lt_save_path_LD=$lt_cv_path_LD
8029
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8030
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8032
unset lt_cv_prog_gnu_ld
8034
if test -n "${lt_cv_path_LDCXX+set}"; then
8035
lt_cv_path_LD=$lt_cv_path_LDCXX
8039
test -z "${LDCXX+set}" || LD=$LDCXX
8042
_LT_AC_TAGVAR(compiler, $1)=$CC
8043
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8045
# We don't want -fno-exception wen compiling C++ code, so set the
8046
# no_builtin_flag separately
8047
if test "$GXX" = yes; then
8048
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8050
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8053
if test "$GXX" = yes; then
8054
# Set up default GNU C++ configuration
8058
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8059
# archiving commands below assume that GNU ld is being used.
8060
if test "$with_gnu_ld" = yes; then
8061
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8062
_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'
8064
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8065
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8067
# If archive_cmds runs LD, not CC, wlarc should be empty
8068
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8069
# investigate it a little bit more. (MM)
8072
# ancient GNU ld didn't support --whole-archive et. al.
8073
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8074
grep 'no-whole-archive' > /dev/null; then
8075
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8077
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8083
# A generic and very simple default shared library creation
8084
# command for GNU C++ for the case where it uses the native
8085
# linker, instead of GNU ld. If possible, this setting should
8086
# overridden to take advantage of the native linker features on
8087
# the platform it is being used on.
8088
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8091
# Commands to make compiler produce verbose output that lists
8092
# what "hidden" libraries, object files and flags are used when
8093
# linking a shared library.
8094
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8102
# PORTME: fill in a description of your system's C++ link characteristics
8103
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8104
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8107
# FIXME: insert proper C++ library support
8108
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8111
if test "$host_cpu" = ia64; then
8112
# On IA64, the linker does run time linking by default, so we don't
8113
# have to do anything special.
8114
aix_use_runtimelinking=no
8115
exp_sym_flag='-Bexport'
8118
# KDE requires run time linking. Make it the default.
8119
aix_use_runtimelinking=yes
8120
exp_sym_flag='-bexport'
8121
no_entry_flag='-bnoentry'
8124
# When large executables or shared objects are built, AIX ld can
8125
# have problems creating the table of contents. If linking a library
8126
# or program results in "error TOC overflow" add -mminimal-toc to
8127
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8128
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8130
_LT_AC_TAGVAR(archive_cmds, $1)=''
8131
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8132
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8133
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8135
if test "$GXX" = yes; then
8136
case $host_os in aix4.[012]|aix4.[012].*)
8137
# We only want to do this on AIX 4.2 and lower, the check
8138
# below for broken collect2 doesn't work under 4.3+
8139
collect2name=`${CC} -print-prog-name=collect2`
8140
if test -f "$collect2name" && \
8141
strings "$collect2name" | grep resolve_lib_name >/dev/null
8143
# We have reworked collect2
8144
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8146
# We have old collect2
8147
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8148
# It fails to find uninstalled libraries when the uninstalled
8149
# path is not listed in the libpath. Setting hardcode_minus_L
8150
# to unsupported forces relinking
8151
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8152
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8153
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8156
shared_flag='-shared'
8159
if test "$host_cpu" = ia64; then
8160
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8161
# chokes on -Wl,-G. The following line is correct:
8164
if test "$aix_use_runtimelinking" = yes; then
8165
shared_flag='-qmkshrobj ${wl}-G'
8167
shared_flag='-qmkshrobj'
8172
# Let the compiler handle the export list.
8173
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8174
if test "$aix_use_runtimelinking" = yes; then
8175
# Warning - without using the other runtime loading flags (-brtl),
8176
# -berok will link without error, but may produce a broken library.
8177
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8178
# Determine the default libpath from the value encoded in an empty executable.
8179
_LT_AC_SYS_LIBPATH_AIX
8180
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8182
_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"
8183
_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"
8185
if test "$host_cpu" = ia64; then
8186
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8187
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8188
_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"
8190
# Determine the default libpath from the value encoded in an empty executable.
8191
_LT_AC_SYS_LIBPATH_AIX
8192
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8193
# Warning - without using the other run time loading flags,
8194
# -berok will link without error, but may produce a broken library.
8195
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8196
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8197
# -bexpall does not export symbols beginning with underscore (_)
8198
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8199
# Exported symbols can be pulled into shared objects from archives
8200
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8201
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8202
# This is similar to how AIX traditionally builds it's shared libraries.
8203
_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'
8208
case $cc_basename in
8210
# FIXME: insert proper C++ library support
8211
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8216
cygwin* | mingw* | pw32*)
8217
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8218
# as there is no search path for DLLs.
8219
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8220
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8221
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8222
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8224
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8225
_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'
8226
# If the export-symbols file already is a .def file (1st line
8227
# is EXPORTS), use it as is; otherwise, prepend...
8228
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8229
cp $export_symbols $output_objdir/$soname.def;
8231
echo EXPORTS > $output_objdir/$soname.def;
8232
cat $export_symbols >> $output_objdir/$soname.def;
8234
$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'
8236
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8240
darwin* | rhapsody*)
8241
if test "$GXX" = yes; then
8242
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8244
rhapsody* | darwin1.[[012]])
8245
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8248
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8251
lt_int_apple_cc_single_mod=no
8252
output_verbose_link_cmd='echo'
8253
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8254
lt_int_apple_cc_single_mod=yes
8256
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8257
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8259
_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'
8261
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8263
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8264
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8265
_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}'
8267
_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}'
8269
_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}'
8270
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8271
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8272
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8273
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8274
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8276
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8281
case $cc_basename in
8283
# FIXME: insert proper C++ library support
8284
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8287
# Green Hills C++ Compiler
8288
# FIXME: insert proper C++ library support
8289
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8292
# FIXME: insert proper C++ library support
8293
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8298
# C++ shared libraries reported to be fairly broken before switch to ELF
8299
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8302
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8305
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8307
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8312
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8313
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8314
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8315
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8316
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8317
# but as the default
8318
# location of the library.
8320
case $cc_basename in
8322
# FIXME: insert proper C++ library support
8323
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8326
_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'
8327
# Commands to make compiler produce verbose output that lists
8328
# what "hidden" libraries, object files and flags are used when
8329
# linking a shared library.
8331
# There doesn't appear to be a way to prevent this compiler from
8332
# explicitly linking system object files so we need to strip them
8333
# from the output so that they don't get included in the library
8335
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'
8338
if test "$GXX" = yes; then
8339
_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'
8341
# FIXME: insert proper C++ library support
8342
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8348
if test $with_gnu_ld = no; then
8351
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8352
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8353
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8356
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8359
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8360
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8361
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8367
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8368
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8371
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8372
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8373
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8374
# but as the default
8375
# location of the library.
8378
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8379
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8380
# but as the default
8381
# location of the library.
8385
case $cc_basename in
8387
# FIXME: insert proper C++ library support
8388
_LT_AC_TAGVAR(ld_shlibs, $1)=no
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 -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8399
# Commands to make compiler produce verbose output that lists
8400
# what "hidden" libraries, object files and flags are used when
8401
# linking a shared library.
8403
# There doesn't appear to be a way to prevent this compiler from
8404
# explicitly linking system object files so we need to strip them
8405
# from the output so that they don't get included in the library
8407
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'
8410
if test "$GXX" = yes; then
8411
if test $with_gnu_ld = no; then
8414
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8417
_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'
8422
# FIXME: insert proper C++ library support
8423
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8429
case $cc_basename in
8432
_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'
8434
# Archives containing C++ object files must be created using
8435
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8436
# necessary to make sure instantiated templates are included
8438
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8441
if test "$GXX" = yes; then
8442
if test "$with_gnu_ld" = no; then
8443
_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'
8445
_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'
8448
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8451
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8452
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8455
case $cc_basename in
8457
# Kuck and Associates, Inc. (KAI) C++ Compiler
8459
# KCC will only create a shared library if the output file
8460
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8461
# to its proper name (with version) after linking.
8462
_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'
8463
_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'
8464
# Commands to make compiler produce verbose output that lists
8465
# what "hidden" libraries, object files and flags are used when
8466
# linking a shared library.
8468
# There doesn't appear to be a way to prevent this compiler from
8469
# explicitly linking system object files so we need to strip them
8470
# from the output so that they don't get included in the library
8472
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'
8474
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8475
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8477
# Archives containing C++ object files must be created using
8478
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8479
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8484
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8485
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8486
_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'
8487
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8488
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8489
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8493
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8494
_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'
8496
runpath_var=LD_RUN_PATH
8497
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8498
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8500
# Commands to make compiler produce verbose output that lists
8501
# what "hidden" libraries, object files and flags are used when
8502
# linking a shared library.
8504
# There doesn't appear to be a way to prevent this compiler from
8505
# explicitly linking system object files so we need to strip them
8506
# from the output so that they don't get included in the library
8508
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'
8513
# FIXME: insert proper C++ library support
8514
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8517
# FIXME: insert proper C++ library support
8518
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8521
case $cc_basename in
8523
# FIXME: insert proper C++ library support
8524
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8527
# FIXME: insert proper C++ library support
8528
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8533
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8534
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8536
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8537
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8538
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8540
# Workaround some broken pre-1.5 toolchains
8541
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8544
case $cc_basename in
8546
# Kuck and Associates, Inc. (KAI) C++ Compiler
8548
# KCC will only create a shared library if the output file
8549
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8550
# to its proper name (with version) after linking.
8551
_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'
8553
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8554
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8556
# Archives containing C++ object files must be created using
8557
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8558
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8562
# Rational C++ 2.4.1
8563
# FIXME: insert proper C++ library support
8564
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8567
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8568
_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'
8570
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8571
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8573
# Commands to make compiler produce verbose output that lists
8574
# what "hidden" libraries, object files and flags are used when
8575
# linking a shared library.
8577
# There doesn't appear to be a way to prevent this compiler from
8578
# explicitly linking system object files so we need to strip them
8579
# from the output so that they don't get included in the library
8581
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'
8584
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8585
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8586
_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'
8588
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8589
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8591
# Commands to make compiler produce verbose output that lists
8592
# what "hidden" libraries, object files and flags are used when
8593
# linking a shared library.
8594
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8597
# FIXME: insert proper C++ library support
8598
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8604
case $cc_basename in
8606
# Kuck and Associates, Inc. (KAI) C++ Compiler
8608
# KCC will only create a shared library if the output file
8609
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8610
# to its proper name (with version) after linking.
8611
_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'
8613
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8614
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8616
# Archives containing C++ object files must be created using
8617
# the KAI C++ compiler.
8618
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8621
# Rational C++ 2.4.1
8622
# FIXME: insert proper C++ library support
8623
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8626
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8627
_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'
8628
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8629
echo "-hidden">> $lib.exp~
8630
$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~
8633
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8634
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8636
# Commands to make compiler produce verbose output that lists
8637
# what "hidden" libraries, object files and flags are used when
8638
# linking a shared library.
8640
# There doesn't appear to be a way to prevent this compiler from
8641
# explicitly linking system object files so we need to strip them
8642
# from the output so that they don't get included in the library
8644
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'
8647
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8648
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8649
_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'
8651
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8652
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8654
# Commands to make compiler produce verbose output that lists
8655
# what "hidden" libraries, object files and flags are used when
8656
# linking a shared library.
8657
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8660
# FIXME: insert proper C++ library support
8661
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8667
# FIXME: insert proper C++ library support
8668
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8671
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8672
case $cc_basename in
8674
# FIXME: insert proper C++ library support
8675
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8678
# FIXME: insert proper C++ library support
8679
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8684
case $cc_basename in
8687
# FIXME: insert proper C++ library support
8688
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8692
# FIXME: insert proper C++ library support
8693
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8696
# FIXME: insert proper C++ library support
8697
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8702
case $cc_basename in
8704
# Sun C++ 4.2, 5.x and Centerline C++
8705
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8706
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8707
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8708
$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'
8710
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8711
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8713
solaris2.[0-5] | solaris2.[0-5].*) ;;
8715
# The C++ compiler is used as linker so we must use $wl
8716
# flag to pass the commands to the underlying system
8718
# Supported since Solaris 2.6 (maybe 2.5.1?)
8719
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8722
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8724
# Commands to make compiler produce verbose output that lists
8725
# what "hidden" libraries, object files and flags are used when
8726
# linking a shared library.
8728
# There doesn't appear to be a way to prevent this compiler from
8729
# explicitly linking system object files so we need to strip them
8730
# from the output so that they don't get included in the library
8732
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'
8734
# Archives containing C++ object files must be created using
8735
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8736
# necessary to make sure instantiated templates are included
8738
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8741
# Green Hills C++ Compiler
8742
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8744
# The C++ compiler must be used to create the archive.
8745
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8748
# GNU C++ compiler with Solaris linker
8749
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8750
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8751
if $CC --version | grep -v '^2\.7' > /dev/null; then
8752
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8753
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8754
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8756
# Commands to make compiler produce verbose output that lists
8757
# what "hidden" libraries, object files and flags are used when
8758
# linking a shared library.
8759
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8761
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8763
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8764
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8765
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
8767
# Commands to make compiler produce verbose output that lists
8768
# what "hidden" libraries, object files and flags are used when
8769
# linking a shared library.
8770
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
8773
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8778
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8779
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8782
case $cc_basename in
8784
# NonStop-UX NCC 3.20
8785
# FIXME: insert proper C++ library support
8786
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8789
# FIXME: insert proper C++ library support
8790
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8795
# FIXME: insert proper C++ library support
8796
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8799
# FIXME: insert proper C++ library support
8800
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8803
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8804
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8806
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8807
_LT_AC_TAGVAR(LD, $1)="$LD"
8810
## There is no encapsulation within the following macros, do not change
8811
## the running order or otherwise move them around unless you know exactly
8812
## what you are doing...
8813
AC_LIBTOOL_POSTDEP_PREDEP($1)
8814
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8815
AC_LIBTOOL_PROG_CC_C_O($1)
8816
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8817
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8818
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8819
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8820
AC_LIBTOOL_SYS_LIB_STRIP
8821
AC_LIBTOOL_DLOPEN_SELF($1)
8823
AC_LIBTOOL_CONFIG($1)
8830
with_gnu_ldcxx=$with_gnu_ld
8831
with_gnu_ld=$lt_save_with_gnu_ld
8832
lt_cv_path_LDCXX=$lt_cv_path_LD
8833
lt_cv_path_LD=$lt_save_path_LD
8834
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8835
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8836
])# AC_LIBTOOL_LANG_CXX_CONFIG
8838
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
8839
# ------------------------
8840
# Figure out "hidden" library dependencies from verbose
8841
# compiler output when linking a shared library.
8842
# Parse the compiler output and extract the necessary
8843
# objects, libraries and library flags.
8844
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
8845
dnl we can't use the lt_simple_compile_test_code here,
8846
dnl because it contains code intended for an executable,
8847
dnl not a library. It's possible we should let each
8848
dnl tag define a new lt_????_link_test_code variable,
8849
dnl but it's only used here...
8850
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
8852
void foo (void) { a = 0; }
8854
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
8858
Foo (void) { a = 0; }
8863
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
8871
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
8874
public void bar (void) {
8880
dnl Parse the compiler output and extract the necessary
8881
dnl objects, libraries and library flags.
8882
if AC_TRY_EVAL(ac_compile); then
8883
# Parse the compiler output and extract the necessary
8884
# objects, libraries and library flags.
8886
# Sentinel used to keep track of whether or not we are before
8887
# the conftest object file.
8888
pre_test_object_deps_done=no
8890
# The `*' in the case matches for architectures that use `case' in
8891
# $output_verbose_cmd can trigger glob expansion during the loop
8892
# eval without this substitution.
8893
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8895
for p in `eval $output_verbose_link_cmd`; do
8899
# Some compilers place space between "-{L,R}" and the path.
8902
|| test $p = "-R"; then
8909
if test "$pre_test_object_deps_done" = no; then
8912
# Internal compiler library paths should come after those
8913
# provided the user. The postdeps already come after the
8914
# user supplied libs so there is no need to process them.
8915
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8916
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8918
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8921
# The "-l" case would never come before the object being
8922
# linked, so don't bother handling this case.
8925
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8926
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8928
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8933
*.$objext|*.$libext)
8934
# This assumes that the test object file only shows up
8935
# once in the compiler output.
8936
if test "$p" = "conftest.$objext"; then
8937
pre_test_object_deps_done=yes
8941
if test "$pre_test_object_deps_done" = no; then
8942
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8943
_LT_AC_TAGVAR(predep_objects, $1)="$p"
8945
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8948
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8949
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
8951
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8956
*) ;; # Ignore the rest.
8964
echo "libtool.m4: error: problem compiling $1 test program"
8967
$rm -f confest.$objext
8969
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8970
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8972
])# AC_LIBTOOL_POSTDEP_PREDEP
8974
# AC_LIBTOOL_LANG_F77_CONFIG
8975
# ------------------------
8976
# Ensure that the configuration vars for the C compiler are
8977
# suitably defined. Those variables are subsequently used by
8978
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8979
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
8980
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
8981
[AC_REQUIRE([AC_PROG_F77])
8982
AC_LANG_PUSH(Fortran 77)
8984
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8985
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8986
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8987
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8988
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8989
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8991
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8992
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8993
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8994
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8995
_LT_AC_TAGVAR(module_cmds, $1)=
8996
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8997
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8998
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8999
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9000
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9001
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9003
# Source file extension for f77 test sources.
9006
# Object file extension for compiled f77 test sources.
9008
_LT_AC_TAGVAR(objext, $1)=$objext
9010
# Code to be used in simple compile tests
9011
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
9013
# Code to be used in simple link tests
9014
lt_simple_link_test_code=" program t\n end\n"
9016
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9019
# Allow CC to be a program name with arguments.
9023
_LT_AC_TAGVAR(compiler, $1)=$CC
9024
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9026
AC_MSG_CHECKING([if libtool supports shared libraries])
9027
AC_MSG_RESULT([$can_build_shared])
9029
AC_MSG_CHECKING([whether to build shared libraries])
9030
test "$can_build_shared" = "no" && enable_shared=no
9032
# On AIX, shared libraries and static libraries use the same namespace, and
9033
# are all built from PIC.
9036
test "$enable_shared" = yes && enable_static=no
9037
if test -n "$RANLIB"; then
9038
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9039
postinstall_cmds='$RANLIB $lib'
9043
test "$enable_shared" = yes && enable_static=no
9046
AC_MSG_RESULT([$enable_shared])
9048
AC_MSG_CHECKING([whether to build static libraries])
9049
# Make sure either enable_shared or enable_static is yes.
9050
test "$enable_shared" = yes || enable_static=yes
9051
AC_MSG_RESULT([$enable_static])
9053
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9055
_LT_AC_TAGVAR(GCC, $1)="$G77"
9056
_LT_AC_TAGVAR(LD, $1)="$LD"
9058
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9059
AC_LIBTOOL_PROG_CC_C_O($1)
9060
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9061
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9062
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9063
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9064
AC_LIBTOOL_SYS_LIB_STRIP
9067
AC_LIBTOOL_CONFIG($1)
9071
])# AC_LIBTOOL_LANG_F77_CONFIG
9074
# AC_LIBTOOL_LANG_GCJ_CONFIG
9075
# --------------------------
9076
# Ensure that the configuration vars for the C compiler are
9077
# suitably defined. Those variables are subsequently used by
9078
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9079
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9080
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9083
# Source file extension for Java test sources.
9086
# Object file extension for compiled Java test sources.
9088
_LT_AC_TAGVAR(objext, $1)=$objext
9090
# Code to be used in simple compile tests
9091
lt_simple_compile_test_code="class foo {}\n"
9093
# Code to be used in simple link tests
9094
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9096
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9099
# Allow CC to be a program name with arguments.
9103
_LT_AC_TAGVAR(compiler, $1)=$CC
9105
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9106
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9109
## There is no encapsulation within the following macros, do not change
9110
## the running order or otherwise move them around unless you know exactly
9111
## what you are doing...
9112
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9113
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9114
AC_LIBTOOL_PROG_CC_C_O($1)
9115
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9116
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9117
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9118
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9119
AC_LIBTOOL_SYS_LIB_STRIP
9120
AC_LIBTOOL_DLOPEN_SELF($1)
9122
AC_LIBTOOL_CONFIG($1)
9126
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9129
# AC_LIBTOOL_LANG_RC_CONFIG
9130
# --------------------------
9131
# Ensure that the configuration vars for the Windows resource compiler are
9132
# suitably defined. Those variables are subsequently used by
9133
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9134
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9135
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9138
# Source file extension for RC test sources.
9141
# Object file extension for compiled RC test sources.
9143
_LT_AC_TAGVAR(objext, $1)=$objext
9145
# Code to be used in simple compile tests
9146
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9148
# Code to be used in simple link tests
9149
lt_simple_link_test_code="$lt_simple_compile_test_code"
9151
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9154
# Allow CC to be a program name with arguments.
9158
_LT_AC_TAGVAR(compiler, $1)=$CC
9159
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9161
AC_LIBTOOL_CONFIG($1)
9165
])# AC_LIBTOOL_LANG_RC_CONFIG
9168
# AC_LIBTOOL_CONFIG([TAGNAME])
9169
# ----------------------------
9170
# If TAGNAME is not passed, then create an initial libtool script
9171
# with a default configuration from the untagged config vars. Otherwise
9172
# add code to config.status for appending the configuration named by
9173
# TAGNAME from the matching tagged config vars.
9174
AC_DEFUN([AC_LIBTOOL_CONFIG],
9175
[# The else clause should only fire when bootstrapping the
9176
# libtool distribution, otherwise you forgot to ship ltmain.sh
9177
# with your package, and you will get complaints that there are
9178
# no rules to generate ltmain.sh.
9179
if test -f "$ltmain"; then
9180
# See if we are running on zsh, and set the options which allow our commands through
9181
# without removal of \ escapes.
9182
if test -n "${ZSH_VERSION+set}" ; then
9183
setopt NO_GLOB_SUBST
9185
# Now quote all the things that may contain metacharacters while being
9186
# careful not to overquote the AC_SUBSTed values. We take copies of the
9187
# variables and quote the copies for generation of the libtool script.
9188
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9189
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9190
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9191
deplibs_check_method reload_flag reload_cmds need_locks \
9192
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9193
lt_cv_sys_global_symbol_to_c_name_address \
9194
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9195
old_postinstall_cmds old_postuninstall_cmds \
9196
_LT_AC_TAGVAR(compiler, $1) \
9197
_LT_AC_TAGVAR(CC, $1) \
9198
_LT_AC_TAGVAR(LD, $1) \
9199
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9200
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9201
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9202
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9203
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9204
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9205
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9206
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9207
_LT_AC_TAGVAR(old_archive_cmds, $1) \
9208
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9209
_LT_AC_TAGVAR(predep_objects, $1) \
9210
_LT_AC_TAGVAR(postdep_objects, $1) \
9211
_LT_AC_TAGVAR(predeps, $1) \
9212
_LT_AC_TAGVAR(postdeps, $1) \
9213
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9214
_LT_AC_TAGVAR(archive_cmds, $1) \
9215
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9216
_LT_AC_TAGVAR(postinstall_cmds, $1) \
9217
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
9218
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9219
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
9220
_LT_AC_TAGVAR(no_undefined_flag, $1) \
9221
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
9222
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9223
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9224
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9225
_LT_AC_TAGVAR(hardcode_automatic, $1) \
9226
_LT_AC_TAGVAR(module_cmds, $1) \
9227
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
9228
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9229
_LT_AC_TAGVAR(exclude_expsyms, $1) \
9230
_LT_AC_TAGVAR(include_expsyms, $1); do
9233
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
9234
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9235
_LT_AC_TAGVAR(archive_cmds, $1) | \
9236
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9237
_LT_AC_TAGVAR(module_cmds, $1) | \
9238
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9239
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9240
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9241
extract_expsyms_cmds | reload_cmds | finish_cmds | \
9242
postinstall_cmds | postuninstall_cmds | \
9243
old_postinstall_cmds | old_postuninstall_cmds | \
9244
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9245
# Double-quote double-evaled strings.
9246
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9249
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9255
*'\[$]0 --fallback-echo"')
9256
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9261
[cfgfile="${ofile}T"
9262
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9264
AC_MSG_NOTICE([creating $ofile])],
9267
cat <<__EOF__ >> "$cfgfile"
9271
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9272
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9273
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9275
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9276
# Free Software Foundation, Inc.
9278
# This file is part of GNU Libtool:
9279
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9281
# This program is free software; you can redistribute it and/or modify
9282
# it under the terms of the GNU General Public License as published by
9283
# the Free Software Foundation; either version 2 of the License, or
9284
# (at your option) any later version.
9286
# This program is distributed in the hope that it will be useful, but
9287
# WITHOUT ANY WARRANTY; without even the implied warranty of
9288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9289
# General Public License for more details.
9291
# You should have received a copy of the GNU General Public License
9292
# along with this program; if not, write to the Free Software
9293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9295
# As a special exception to the GNU General Public License, if you
9296
# distribute this file as part of a program that contains a
9297
# configuration script generated by Autoconf, you may include it under
9298
# the same distribution terms that you use for the rest of that program.
9300
# A sed program that does not truncate output.
9303
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9304
Xsed="$SED -e s/^X//"
9306
# The HP-UX ksh and POSIX shell print the target directory to stdout
9308
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9310
# The names of the tagged configurations supported by this script.
9313
# ### BEGIN LIBTOOL CONFIG],
9314
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9316
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9318
# Shell to use when invoking shell scripts.
9321
# Whether or not to build shared libraries.
9322
build_libtool_libs=$enable_shared
9324
# Whether or not to build static libraries.
9325
build_old_libs=$enable_static
9327
# Whether or not to add -lc for building shared libraries.
9328
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9330
# Whether or not to disallow shared libs when runtime libs are static
9331
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9333
# Whether or not to optimize for fast installation.
9334
fast_install=$enable_fast_install
9337
host_alias=$host_alias
9340
# An echo program that does not interpret backslashes.
9345
AR_FLAGS=$lt_AR_FLAGS
9350
# A language-specific compiler.
9351
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9353
# Is the compiler the GNU C compiler?
9354
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9359
# The linker used to build libraries.
9360
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9362
# Whether we need hard or soft links.
9365
# A BSD-compatible nm program.
9368
# A symbol stripping program
9371
# Used to examine libraries when file_magic_cmd begins "file"
9372
MAGIC_CMD=$MAGIC_CMD
9374
# Used on cygwin: DLL creation program.
9377
# Used on cygwin: object dumper.
9380
# Used on cygwin: assembler.
9383
# The name of the directory that contains temporary libtool files.
9386
# How to create reloadable object files.
9387
reload_flag=$lt_reload_flag
9388
reload_cmds=$lt_reload_cmds
9390
# How to pass a linker flag through the compiler.
9391
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9393
# Object file suffix (normally "o").
9396
# Old archive suffix (normally "a").
9399
# Shared library suffix (normally ".so").
9402
# Executable file suffix (normally "").
9405
# Additional compiler flags for building library objects.
9406
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9409
# What is the maximum length of a command?
9410
max_cmd_len=$lt_cv_sys_max_cmd_len
9412
# Does compiler simultaneously support -c and -o options?
9413
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9415
# Must we lock files when doing compilation ?
9416
need_locks=$lt_need_locks
9418
# Do we need the lib prefix for modules?
9419
need_lib_prefix=$need_lib_prefix
9421
# Do we need a version for libraries?
9422
need_version=$need_version
9424
# Whether dlopen is supported.
9425
dlopen_support=$enable_dlopen
9427
# Whether dlopen of programs is supported.
9428
dlopen_self=$enable_dlopen_self
9430
# Whether dlopen of statically linked programs is supported.
9431
dlopen_self_static=$enable_dlopen_self_static
9433
# Compiler flag to prevent dynamic linking.
9434
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9436
# Compiler flag to turn off builtin functions.
9437
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9439
# Compiler flag to allow reflexive dlopens.
9440
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9442
# Compiler flag to generate shared objects directly from archives.
9443
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9445
# Compiler flag to generate thread-safe objects.
9446
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9448
# Library versioning type.
9449
version_type=$version_type
9451
# Format of library name prefix.
9452
libname_spec=$lt_libname_spec
9454
# List of archive names. First name is the real one, the rest are links.
9455
# The last name is the one that the linker finds with -lNAME.
9456
library_names_spec=$lt_library_names_spec
9458
# The coded name of the library, if different from the real name.
9459
soname_spec=$lt_soname_spec
9461
# Commands used to build and install an old-style archive.
9463
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9464
old_postinstall_cmds=$lt_old_postinstall_cmds
9465
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9467
# Create an old-style archive from a shared archive.
9468
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9470
# Create a temporary old-style archive to link instead of a shared archive.
9471
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9473
# Commands used to build and install a shared archive.
9474
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9475
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9476
postinstall_cmds=$lt_postinstall_cmds
9477
postuninstall_cmds=$lt_postuninstall_cmds
9479
# Commands used to build a loadable module (assumed same as above if empty)
9480
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9481
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9483
# Commands to strip libraries.
9484
old_striplib=$lt_old_striplib
9485
striplib=$lt_striplib
9487
# Dependencies to place before the objects being linked to create a
9489
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9491
# Dependencies to place after the objects being linked to create a
9493
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9495
# Dependencies to place before the objects being linked to create a
9497
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9499
# Dependencies to place after the objects being linked to create a
9501
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9503
# The library search path used internally by the compiler when linking
9505
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9507
# Method to check whether dependent libraries are shared objects.
9508
deplibs_check_method=$lt_deplibs_check_method
9510
# Command to use when deplibs_check_method == file_magic.
9511
file_magic_cmd=$lt_file_magic_cmd
9513
# Flag that allows shared libraries with undefined symbols to be built.
9514
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9516
# Flag that forces no undefined symbols.
9517
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9519
# Commands used to finish a libtool library installation in a directory.
9520
finish_cmds=$lt_finish_cmds
9522
# Same as above, but a single script fragment to be evaled but not shown.
9523
finish_eval=$lt_finish_eval
9525
# Take the output of nm and produce a listing of raw symbols and C names.
9526
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9528
# Transform the output of nm in a proper C declaration
9529
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9531
# Transform the output of nm in a C name address pair
9532
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9534
# This is the shared library runtime path variable.
9535
runpath_var=$runpath_var
9537
# This is the shared library path variable.
9538
shlibpath_var=$shlibpath_var
9540
# Is shlibpath searched before the hard-coded library search path?
9541
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9543
# How to hardcode a shared library path into an executable.
9544
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9546
# Whether we should hardcode library paths into libraries.
9547
hardcode_into_libs=$hardcode_into_libs
9549
# Flag to hardcode \$libdir into a binary during linking.
9550
# This must work even if \$libdir does not exist.
9551
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9553
# If ld is used when linking, flag to hardcode \$libdir into
9554
# a binary during linking. This must work even if \$libdir does
9556
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9558
# Whether we need a single -rpath flag with a separated argument.
9559
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9561
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9563
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9565
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9567
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9569
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9570
# the resulting binary.
9571
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9573
# Set to yes if building a shared library automatically hardcodes DIR into the library
9574
# and all subsequent libraries and executables linked against it.
9575
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9577
# Variables whose values should be saved in libtool wrapper scripts and
9578
# restored at relink time.
9579
variables_saved_for_relink="$variables_saved_for_relink"
9581
# Whether libtool must link a program against all its dependency libraries.
9582
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9584
# Compile-time system search path for libraries
9585
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9587
# Run-time system search path for libraries
9588
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9590
# Fix the shell variable \$srcfile for the compiler.
9591
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9593
# Set to yes if exported symbols are required.
9594
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9596
# The commands to list exported symbols.
9597
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9599
# The commands to extract the exported symbol list from a shared archive.
9600
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9602
# Symbols that should not be listed in the preloaded symbols.
9603
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9605
# Symbols that must always be exported.
9606
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9609
[# ### END LIBTOOL CONFIG],
9610
[# ### END LIBTOOL TAG CONFIG: $tagname])
9617
cat <<\EOF >> "$cfgfile"
9619
# AIX sometimes has problems with the GCC collect2 program. For some
9620
# reason, if we set the COLLECT_NAMES environment variable, the problems
9621
# vanish in a puff of smoke.
9622
if test "X${COLLECT_NAMES+set}" != Xset; then
9624
export COLLECT_NAMES
9630
# We use sed instead of cat because bash on DJGPP gets confused if
9631
# if finds mixed CR/LF and LF-only lines. Since sed operates in
9632
# text mode, it properly converts lines to CR/LF. This bash problem
9633
# is reportedly fixed, but why not run on old versions too?
9634
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9636
mv -f "$cfgfile" "$ofile" || \
9637
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9641
# If there is no Makefile yet, we rely on a make rule to execute
9642
# `config.status --recheck' to rerun these tests and create the
9643
# libtool script then.
9644
test -f Makefile && make "$ltmain"
9646
])# AC_LIBTOOL_CONFIG
9649
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9650
# -------------------------------------------
9651
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9652
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9654
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9656
if test "$GCC" = yes; then
9657
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9659
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9660
lt_cv_prog_compiler_rtti_exceptions,
9661
[-fno-rtti -fno-exceptions], [],
9662
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9664
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9667
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9668
# ---------------------------------
9669
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9670
[AC_REQUIRE([AC_CANONICAL_HOST])
9671
AC_REQUIRE([AC_PROG_NM])
9672
AC_REQUIRE([AC_OBJEXT])
9673
# Check for command to grab the raw symbol name followed by C symbol from nm.
9674
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9675
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9677
# These are sane defaults that work on at least a few old systems.
9678
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9680
# Character class describing NM global symbol codes.
9681
symcode='[[BCDEGRST]]'
9683
# Regexp to match symbols that can be accessed directly from C.
9684
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9686
# Transform the above into a raw symbol and a C symbol.
9687
symxfrm='\1 \2\3 \3'
9689
# Transform an extracted symbol line into a proper C declaration
9690
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9692
# Transform an extracted symbol line into symbol name and symbol address
9693
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'"
9695
# Define system-specific variables.
9700
cygwin* | mingw* | pw32*)
9701
symcode='[[ABCDGISTW]]'
9703
hpux*) # Its linker distinguishes data from code symbols
9704
if test "$host_cpu" = ia64; then
9705
symcode='[[ABCDEGRST]]'
9707
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9708
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'"
9711
symcode='[[BCDEGRST]]'
9714
symcode='[[BCDEGQRST]]'
9720
symcode='[[DFNSTU]]'
9724
# Handle CRLF in mingw tool chain
9728
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9732
# If we're using GNU nm, then use its standard symbol codes.
9733
case `$NM -V 2>&1` in
9734
*GNU* | *'with BFD'*)
9735
symcode='[[ABCDGISTW]]' ;;
9738
# Try without a prefix undercore, then with it.
9739
for ac_symprfx in "" "_"; do
9741
# Write the raw and C identifiers.
9742
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9744
# Check to see that the pipe works correctly.
9748
cat > conftest.$ac_ext <<EOF
9753
void nm_test_func(){}
9757
int main(){nm_test_var='a';nm_test_func();return(0);}
9760
if AC_TRY_EVAL(ac_compile); then
9761
# Now try to grab the symbols.
9763
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9764
# Try sorting and uniquifying the output.
9765
if sort "$nlist" | uniq > "$nlist"T; then
9766
mv -f "$nlist"T "$nlist"
9771
# Make sure that we snagged all the symbols we need.
9772
if grep ' nm_test_var$' "$nlist" >/dev/null; then
9773
if grep ' nm_test_func$' "$nlist" >/dev/null; then
9774
cat <<EOF > conftest.$ac_ext
9780
# Now generate the symbol file.
9781
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9783
cat <<EOF >> conftest.$ac_ext
9784
#if defined (__STDC__) && __STDC__
9785
# define lt_ptr_t void *
9787
# define lt_ptr_t char *
9791
/* The mapping between symbol names and symbols. */
9796
lt_preloaded_symbols[[]] =
9799
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9800
cat <<\EOF >> conftest.$ac_ext
9808
# Now try linking the two files.
9809
mv conftest.$ac_objext conftstm.$ac_objext
9810
lt_save_LIBS="$LIBS"
9811
lt_save_CFLAGS="$CFLAGS"
9812
LIBS="conftstm.$ac_objext"
9813
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9814
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9817
LIBS="$lt_save_LIBS"
9818
CFLAGS="$lt_save_CFLAGS"
9820
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9823
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9826
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9829
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9830
cat conftest.$ac_ext >&5
9832
rm -f conftest* conftst*
9834
# Do not use the global_symbol_pipe unless it works.
9835
if test "$pipe_works" = yes; then
9838
lt_cv_sys_global_symbol_pipe=
9842
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9843
lt_cv_sys_global_symbol_to_cdecl=
9845
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9846
AC_MSG_RESULT(failed)
9850
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9853
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9854
# ---------------------------------------
9855
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9856
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9857
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9858
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9860
AC_MSG_CHECKING([for $compiler option to produce PIC])
9862
# C++ specific cases for pic, static, wl, etc.
9863
if test "$GXX" = yes; then
9864
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9865
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9869
# All AIX code is PIC.
9870
if test "$host_cpu" = ia64; then
9871
# AIX 5 now supports IA64 processor
9872
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9876
# FIXME: we need at least 68020 code to build shared libraries, but
9877
# adding the `-m68020' flag to GCC prevents building anything better,
9879
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9881
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9882
# PIC is the default for these OSes.
9884
mingw* | os2* | pw32*)
9885
# This hack is so that the source file can tell whether it is being
9886
# built for inclusion in a dll (and should export symbols for example).
9887
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9889
darwin* | rhapsody*)
9890
# PIC is the default on this platform
9891
# Common symbols not allowed in MH_DYLIB files
9892
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9895
# DJGPP does not support shared libraries at all
9896
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9899
if test -d /usr/nec; then
9900
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9904
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9910
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9915
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9921
# All AIX code is PIC.
9922
if test "$host_cpu" = ia64; then
9923
# AIX 5 now supports IA64 processor
9924
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9926
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9930
case $cc_basename in
9932
# Green Hills C++ Compiler
9933
# _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"
9938
case $cc_basename in
9940
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9943
# Green Hills C++ Compiler
9944
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9951
# FreeBSD uses GNU C++
9953
hpux9* | hpux10* | hpux11*)
9954
case $cc_basename in
9956
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9957
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9958
if test "$host_cpu" != ia64; then
9959
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9963
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9964
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9970
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9978
irix5* | irix6* | nonstopux*)
9979
case $cc_basename in
9981
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9982
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9983
# CC pic flag -KPIC is the default.
9990
case $cc_basename in
9993
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9994
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9998
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9999
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10000
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10004
# Make sure the PIC flag is empty. It appears that all Alpha
10005
# Linux and Compaq Tru64 Unix objects are PIC.
10006
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10007
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10018
case $cc_basename in
10020
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10028
osf3* | osf4* | osf5*)
10029
case $cc_basename in
10031
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10034
# Rational C++ 2.4.1
10035
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10038
# Digital/Compaq C++
10039
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10040
# Make sure the PIC flag is empty. It appears that all Alpha
10041
# Linux and Compaq Tru64 Unix objects are PIC.
10042
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10043
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10052
case $cc_basename in
10054
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10061
case $cc_basename in
10063
# Sun C++ 4.2, 5.x and Centerline C++
10064
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10065
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10066
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10069
# Green Hills C++ Compiler
10070
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10077
case $cc_basename in
10080
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10081
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10085
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10092
case $cc_basename in
10094
# NonStop-UX NCC 3.20
10095
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10106
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10112
if test "$GCC" = yes; then
10113
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10114
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10118
# All AIX code is PIC.
10119
if test "$host_cpu" = ia64; then
10120
# AIX 5 now supports IA64 processor
10121
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10126
# FIXME: we need at least 68020 code to build shared libraries, but
10127
# adding the `-m68020' flag to GCC prevents building anything better,
10129
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10132
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10133
# PIC is the default for these OSes.
10136
mingw* | pw32* | os2*)
10137
# This hack is so that the source file can tell whether it is being
10138
# built for inclusion in a dll (and should export symbols for example).
10139
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10142
darwin* | rhapsody*)
10143
# PIC is the default on this platform
10144
# Common symbols not allowed in MH_DYLIB files
10145
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10149
# Just because we use GCC doesn't mean we suddenly get shared libraries
10150
# on systems that don't support them.
10151
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10156
if test -d /usr/nec; then
10157
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10162
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10163
# not for PA HP-UX.
10164
case "$host_cpu" in
10169
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10175
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10179
# PORTME Check for flag to pass linker flags through the system compiler.
10182
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10183
if test "$host_cpu" = ia64; then
10184
# AIX 5 now supports IA64 processor
10185
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10187
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10191
mingw* | pw32* | os2*)
10192
# This hack is so that the source file can tell whether it is being
10193
# built for inclusion in a dll (and should export symbols for example).
10194
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10197
hpux9* | hpux10* | hpux11*)
10198
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10199
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10200
# not for PA HP-UX.
10201
case "$host_cpu" in
10206
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10209
# Is there a better lt_prog_compiler_static that works with the bundled CC?
10210
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10213
irix5* | irix6* | nonstopux*)
10214
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10215
# PIC (with -KPIC) is the default.
10216
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10220
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10221
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10227
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10228
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10229
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10232
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10233
# All Alpha code is PIC.
10234
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10239
osf3* | osf4* | osf5*)
10240
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10241
# All OSF/1 code is PIC.
10242
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10246
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10247
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10251
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10252
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10253
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10257
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10258
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10259
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10262
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10263
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10264
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10265
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10269
if test -d /usr/nec ;then
10270
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10271
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10276
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10277
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10281
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10286
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10289
# Check to make sure the PIC flag actually works.
10291
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10292
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10293
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10294
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10295
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10297
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10299
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10300
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10303
# For platforms which do not support PIC, -DPIC is meaningless:
10305
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10308
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10314
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10315
# ------------------------------------
10316
# See if the linker supports building shared libraries.
10317
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10318
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10319
ifelse([$1],[CXX],[
10320
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10323
# If we're using GNU nm, then we don't want the "-C" option.
10324
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10325
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10326
_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'
10328
_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'
10332
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10335
_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'
10338
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10343
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10344
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10345
_LT_AC_TAGVAR(archive_cmds, $1)=
10346
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10347
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10348
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10349
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10350
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10351
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10352
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10353
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10354
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10355
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10356
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10357
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10358
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10359
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
10360
_LT_AC_TAGVAR(module_cmds, $1)=
10361
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
10362
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10363
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10364
# include_expsyms should be a list of space-separated symbols to be *always*
10365
# included in the symbol list
10366
_LT_AC_TAGVAR(include_expsyms, $1)=
10367
# exclude_expsyms can be an extended regexp of symbols to exclude
10368
# it will be wrapped by ` (' and `)$', so one must not match beginning or
10369
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10370
# as well as any symbol that contains `d'.
10371
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10372
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10373
# platforms (ab)use it in PIC code, but their linkers get confused if
10374
# the symbol is explicitly referenced. Since portable code cannot
10375
# rely on this symbol name, it's probably fine to never include it in
10376
# preloaded symbol tables.
10377
extract_expsyms_cmds=
10380
cygwin* | mingw* | pw32*)
10381
# FIXME: the MSVC++ port hasn't been tested in a loooong time
10382
# When not using gcc, we currently assume that we are using
10383
# Microsoft Visual C++.
10384
if test "$GCC" != yes; then
10393
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10394
if test "$with_gnu_ld" = yes; then
10395
# If archive_cmds runs LD, not CC, wlarc should be empty
10398
# See if GNU ld supports shared libraries.
10400
aix3* | aix4* | aix5*)
10401
# On AIX/PPC, the GNU linker is very broken
10402
if test "$host_cpu" != ia64; then
10403
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10406
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10407
*** to be unable to reliably create shared libraries on AIX.
10408
*** Therefore, libtool is disabling shared libraries support. If you
10409
*** really care for shared libraries, you may want to modify your PATH
10410
*** so that a non-GNU linker is found, and then restart.
10417
_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)'
10418
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10419
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10421
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10422
# that the semantics of dynamic libraries on AmigaOS, at least up
10423
# to version 4, is to share data among multiple programs linked
10424
# with the same dynamic library. Since this doesn't match the
10425
# behavior of shared libraries on other platforms, we can't use
10427
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10431
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10432
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10433
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10434
# support --undefined. This deserves some investigation. FIXME
10435
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10437
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10441
cygwin* | mingw* | pw32*)
10442
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10443
# as there is no search path for DLLs.
10444
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10445
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10446
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10447
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10448
_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'
10450
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10451
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10452
# If the export-symbols file already is a .def file (1st line
10453
# is EXPORTS), use it as is; otherwise, prepend...
10454
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10455
cp $export_symbols $output_objdir/$soname.def;
10457
echo EXPORTS > $output_objdir/$soname.def;
10458
cat $export_symbols >> $output_objdir/$soname.def;
10460
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10467
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10468
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10471
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10472
_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'
10477
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10478
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10481
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10482
*** create shared libraries on Solaris systems. Therefore, libtool
10483
*** is disabling shared libraries support. We urge you to upgrade GNU
10484
*** binutils to release 2.9.1 or newer. Another option is to modify
10485
*** your PATH or compiler configuration so that the native linker is
10486
*** used, and then restart.
10489
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10490
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10491
_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'
10493
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10498
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10500
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10501
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10505
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10506
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10507
_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'
10509
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10514
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10515
runpath_var=LD_RUN_PATH
10516
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10517
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10518
# ancient GNU ld didn't support --whole-archive et. al.
10519
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10520
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10522
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10526
# PORTME fill in a description of your system's linker (not GNU ld)
10529
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10530
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10531
_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'
10532
# Note: this linker hardcodes the directories in LIBPATH if there
10533
# are no directories specified by -L.
10534
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10535
if test "$GCC" = yes && test -z "$link_static_flag"; then
10536
# Neither direct hardcoding nor static linking is supported with a
10538
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10543
if test "$host_cpu" = ia64; then
10544
# On IA64, the linker does run time linking by default, so we don't
10545
# have to do anything special.
10546
aix_use_runtimelinking=no
10547
exp_sym_flag='-Bexport'
10550
# If we're using GNU nm, then we don't want the "-C" option.
10551
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10552
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10553
_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'
10555
_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'
10558
# KDE requires run time linking. Make it the default.
10559
aix_use_runtimelinking=yes
10560
exp_sym_flag='-bexport'
10561
no_entry_flag='-bnoentry'
10564
# When large executables or shared objects are built, AIX ld can
10565
# have problems creating the table of contents. If linking a library
10566
# or program results in "error TOC overflow" add -mminimal-toc to
10567
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10568
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10570
_LT_AC_TAGVAR(archive_cmds, $1)=''
10571
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10572
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10573
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10575
if test "$GCC" = yes; then
10576
case $host_os in aix4.[012]|aix4.[012].*)
10577
# We only want to do this on AIX 4.2 and lower, the check
10578
# below for broken collect2 doesn't work under 4.3+
10579
collect2name=`${CC} -print-prog-name=collect2`
10580
if test -f "$collect2name" && \
10581
strings "$collect2name" | grep resolve_lib_name >/dev/null
10583
# We have reworked collect2
10584
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10586
# We have old collect2
10587
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10588
# It fails to find uninstalled libraries when the uninstalled
10589
# path is not listed in the libpath. Setting hardcode_minus_L
10590
# to unsupported forces relinking
10591
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10592
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10593
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10596
shared_flag='-shared'
10599
if test "$host_cpu" = ia64; then
10600
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10601
# chokes on -Wl,-G. The following line is correct:
10604
if test "$aix_use_runtimelinking" = yes; then
10605
shared_flag='-qmkshrobj ${wl}-G'
10607
shared_flag='-qmkshrobj'
10612
# Let the compiler handle the export list.
10613
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10614
if test "$aix_use_runtimelinking" = yes; then
10615
# Warning - without using the other runtime loading flags (-brtl),
10616
# -berok will link without error, but may produce a broken library.
10617
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10618
# Determine the default libpath from the value encoded in an empty executable.
10619
_LT_AC_SYS_LIBPATH_AIX
10620
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10621
_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"
10622
_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"
10624
if test "$host_cpu" = ia64; then
10625
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10626
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10627
_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"
10629
# Determine the default libpath from the value encoded in an empty executable.
10630
_LT_AC_SYS_LIBPATH_AIX
10631
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10632
# Warning - without using the other run time loading flags,
10633
# -berok will link without error, but may produce a broken library.
10634
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10635
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10636
# -bexpall does not export symbols beginning with underscore (_)
10637
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10638
# Exported symbols can be pulled into shared objects from archives
10639
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10640
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10641
# This is similar to how AIX traditionally builds it's shared libraries.
10642
_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'
10648
_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)'
10649
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10650
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10651
# see comment about different semantics on the GNU ld section
10652
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10656
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10659
cygwin* | mingw* | pw32*)
10660
# When not using gcc, we currently assume that we are using
10661
# Microsoft Visual C++.
10662
# hardcode_libdir_flag_spec is actually meaningless, as there is
10663
# no search path for DLLs.
10664
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10665
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10666
# Tell ltmain to make .lib files, not .a files.
10668
# Tell ltmain to make .dll files, not .so files.
10670
# FIXME: Setting linknames here is a bad hack.
10671
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10672
# The linker will automatically build a .lib file if we build a DLL.
10673
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10674
# FIXME: Should let the user specify the lib program.
10675
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10676
fix_srcfile_path='`cygpath -w "$srcfile"`'
10677
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10680
darwin* | rhapsody*)
10681
if test "$GXX" = yes ; then
10682
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10684
rhapsody* | darwin1.[[012]])
10685
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10688
test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10691
lt_int_apple_cc_single_mod=no
10692
output_verbose_link_cmd='echo'
10693
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
10694
lt_int_apple_cc_single_mod=yes
10696
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10697
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
10699
_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'
10701
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
10702
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10703
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10704
_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}'
10706
_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}'
10708
_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}'
10709
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10710
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10711
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10712
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10713
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10715
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10720
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10721
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10722
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10726
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10729
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10730
# support. Future versions do this automatically, but an explicit c++rt0.o
10731
# does not break anything, and helps significantly (at the cost of a little
10734
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10735
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10736
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10737
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10740
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
10742
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10743
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10744
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10745
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10748
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10750
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10751
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10752
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10753
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10757
if test "$GCC" = yes; then
10758
_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'
10760
_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'
10762
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10763
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10764
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10766
# hardcode_minus_L: Not really in the search PATH,
10767
# but as the default location of the library.
10768
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10769
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10773
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
10774
case "$host_cpu" in
10776
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10779
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10783
case "$host_cpu" in
10785
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10788
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10792
if test "$with_gnu_ld" = no; then
10793
case "$host_cpu" in
10795
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10796
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
10797
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10798
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10799
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10802
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10803
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10804
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10806
# hardcode_minus_L: Not really in the search PATH,
10807
# but as the default location of the library.
10808
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10811
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10812
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10813
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10814
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10816
# hardcode_minus_L: Not really in the search PATH,
10817
# but as the default location of the library.
10818
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10824
irix5* | irix6* | nonstopux*)
10825
if test "$GCC" = yes; then
10826
_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'
10828
_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'
10829
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
10831
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10832
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10833
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10837
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10838
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10840
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10842
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10843
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10844
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10848
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10849
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10850
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10851
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10852
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10856
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10857
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10858
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10859
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10860
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10861
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10864
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10865
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10866
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10869
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10870
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10877
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10878
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10879
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10880
_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'
10881
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10885
if test "$GCC" = yes; then
10886
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10887
_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'
10889
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10890
_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'
10892
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10893
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10896
osf4* | osf5*) # as osf3* with the addition of -msym flag
10897
if test "$GCC" = yes; then
10898
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10899
_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'
10900
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10902
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10903
_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'
10904
_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~
10905
$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'
10907
# Both c and cxx compiler support -rpath directly
10908
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10910
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10914
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10915
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10916
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10917
runpath_var=LD_RUN_PATH
10918
hardcode_runpath_var=yes
10922
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10923
if test "$GCC" = yes; then
10924
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10925
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10926
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10928
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10929
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10930
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10932
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10933
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10935
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10936
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
10937
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10939
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10943
if test "x$host_vendor" = xsequent; then
10944
# Use $CC to link under sequent, because it throws in some extra .o
10945
# files that make .init and .fini sections work.
10946
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10948
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10950
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10951
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10952
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10953
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10957
case $host_vendor in
10959
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10960
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10963
## LD is ld it makes a PLAMLIB
10964
## CC just makes a GrossModule.
10965
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10966
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
10967
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10970
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10971
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10974
runpath_var='LD_RUN_PATH'
10975
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10979
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10980
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10981
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10985
if test -d /usr/nec; then
10986
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10987
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10988
runpath_var=LD_RUN_PATH
10989
hardcode_runpath_var=yes
10990
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10995
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10996
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10997
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10998
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10999
hardcode_runpath_var=yes
11000
runpath_var=LD_RUN_PATH
11003
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
11004
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11005
if test "$GCC" = yes; then
11006
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11008
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11010
runpath_var='LD_RUN_PATH'
11011
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11015
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11016
# $CC -shared without GNU ld will not create a library from C++
11017
# object files and a static libstdc++, better avoid it by now
11018
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11019
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11020
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11021
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11022
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11023
runpath_var='LD_RUN_PATH'
11027
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11028
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11029
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11033
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11038
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11039
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11041
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11042
if test "$GCC" = yes; then
11043
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11047
# Do we need to explicitly link libc?
11049
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11051
# Assume -lc should be added
11052
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11054
if test "$enable_shared" = yes && test "$GCC" = yes; then
11055
case $_LT_AC_TAGVAR(archive_cmds, $1) in
11057
# FIXME: we may have to deal with multi-command sequences.
11060
# Test whether the compiler implicitly links with -lc since on some
11061
# systems, -lgcc has to come before -lc. If gcc already passes -lc
11062
# to ld, don't add -lc before -lgcc.
11063
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11065
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11067
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11070
libobjs=conftest.$ac_objext
11072
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11078
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11079
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11080
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11082
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11084
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11086
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11088
cat conftest.err 1>&5
11091
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11097
])# AC_LIBTOOL_PROG_LD_SHLIBS
11100
# _LT_AC_FILE_LTDLL_C
11101
# -------------------
11102
# Be careful that the start marker always follows a newline.
11103
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11104
# /* ltdll.c starts here */
11105
# #define WIN32_LEAN_AND_MEAN
11106
# #include <windows.h>
11107
# #undef WIN32_LEAN_AND_MEAN
11108
# #include <stdio.h>
11110
# #ifndef __CYGWIN__
11111
# # ifdef __CYGWIN32__
11112
# # define __CYGWIN__ __CYGWIN32__
11116
# #ifdef __cplusplus
11119
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11120
# #ifdef __cplusplus
11124
# #ifdef __CYGWIN__
11125
# #include <cygwin/cygwin_dll.h>
11126
# DECLARE_CYGWIN_DLL( DllMain );
11128
# HINSTANCE __hDllInstance_base;
11131
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11133
# __hDllInstance_base = hInst;
11136
# /* ltdll.c ends here */
11137
])# _LT_AC_FILE_LTDLL_C
11140
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11141
# ---------------------------------
11142
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11146
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11147
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11148
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11149
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11150
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11151
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11152
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11154
# This is just to silence aclocal about the macro not being used
11155
ifelse([AC_DISABLE_FAST_INSTALL])
11157
AC_DEFUN([LT_AC_PROG_GCJ],
11158
[AC_CHECK_TOOL(GCJ, gcj, no)
11159
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11163
AC_DEFUN([LT_AC_PROG_RC],
11164
[AC_CHECK_TOOL(RC, windres, no)
11167
############################################################
11168
# NOTE: This macro has been submitted for inclusion into #
11169
# GNU Autoconf as AC_PROG_SED. When it is available in #
11170
# a released version of Autoconf we should remove this #
11171
# macro and use it instead. #
11172
############################################################
11175
# Check for a fully-functional sed program, that truncates
11176
# as few characters as possible. Prefer GNU sed if found.
11177
AC_DEFUN([LT_AC_PROG_SED],
11178
[AC_MSG_CHECKING([for a sed that does not truncate output])
11179
AC_CACHE_VAL(lt_cv_path_SED,
11180
[# Loop through the user's path and test for sed and gsed.
11181
# Then use that list of sed's as ones to test for truncation.
11182
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11183
for as_dir in $PATH
11186
test -z "$as_dir" && as_dir=.
11187
for lt_ac_prog in sed gsed; do
11188
for ac_exec_ext in '' $ac_executable_extensions; do
11189
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11190
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11197
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11198
# along with /bin/sed that truncates output.
11199
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11200
test ! -f $lt_ac_sed && break
11201
cat /dev/null > conftest.in
11203
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11204
# Check for GNU sed and select it if it is found.
11205
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11206
lt_cv_path_SED=$lt_ac_sed
11210
cat conftest.in conftest.in >conftest.tmp
11211
mv conftest.tmp conftest.in
11212
cp conftest.in conftest.nl
11214
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11215
cmp -s conftest.out conftest.nl || break
11216
# 10000 chars as input seems more than enough
11217
test $lt_ac_count -gt 10 && break
11218
lt_ac_count=`expr $lt_ac_count + 1`
11219
if test $lt_ac_count -gt $lt_ac_max; then
11220
lt_ac_max=$lt_ac_count
11221
lt_cv_path_SED=$lt_ac_sed
11226
SED=$lt_cv_path_SED
11227
AC_MSG_RESULT([$SED])