11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
15
dnl This file is part of the KDE libraries/packages
16
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
17
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
19
dnl This file is free software; you can redistribute it and/or
20
dnl modify it under the terms of the GNU Library General Public
21
dnl License as published by the Free Software Foundation; either
22
dnl version 2 of the License, or (at your option) any later version.
24
dnl This library is distributed in the hope that it will be useful,
25
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
26
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
dnl Library General Public License for more details.
29
dnl You should have received a copy of the GNU Library General Public License
30
dnl along with this library; see the file COPYING.LIB. If not, write to
31
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32
dnl Boston, MA 02111-1307, USA.
35
dnl Please do not modify this file unless you expect your modifications to be
36
dnl carried into every other module in the repository.
38
dnl Single-module modifications are best placed in configure.in for kdelibs
39
dnl and kdebase or configure.in.in if present.
42
dnl Internal subroutine of AC_PATH_X.
43
dnl Set ac_x_includes and/or ac_x_libraries.
44
AC_DEFUN([KDE_PATH_X_DIRECT],
46
AC_REQUIRE([KDE_CHECK_LIB64])
48
if test "$ac_x_includes" = NO; then
49
# Guess where to find include files, by looking for this one X11 .h file.
50
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
52
# First, try using that file with no special directory specified.
53
AC_TRY_CPP([#include <$x_direct_test_include>],
54
[# We can compile using X headers with no special include directory.
56
[# Look for the header file in a standard set of common directories.
57
# Check X11 before X11Rn because it is often a symlink to the current release.
69
/usr/local/X11/include \
70
/usr/local/X11R6/include \
71
/usr/local/X11R5/include \
72
/usr/local/X11R4/include \
74
/usr/local/include/X11 \
75
/usr/local/include/X11R6 \
76
/usr/local/include/X11R5 \
77
/usr/local/include/X11R4 \
81
/usr/XFree86/include/X11 \
85
/usr/unsupported/include \
87
/usr/local/x11r5/include \
88
/usr/lpp/Xamples/include \
90
/usr/openwin/include \
91
/usr/openwin/share/include \
94
if test -r "$ac_dir/$x_direct_test_include"; then
99
fi # $ac_x_includes = NO
101
if test "$ac_x_libraries" = NO; then
102
# Check for the libraries.
104
test -z "$x_direct_test_library" && x_direct_test_library=Xt
105
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
107
# See if we find them without any special options.
108
# Don't add to $LIBS permanently.
110
LIBS="-l$x_direct_test_library $LIBS"
111
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
112
[LIBS="$ac_save_LIBS"
113
# We can link X programs with no special library path.
115
[LIBS="$ac_save_LIBS"
116
# First see if replacing the include by lib works.
117
# Check X11 before X11Rn because it is often a symlink to the current release.
118
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
119
/usr/X11/lib${kdelibsuff} \
120
/usr/X11R6/lib${kdelibsuff} \
121
/usr/X11R5/lib${kdelibsuff} \
122
/usr/X11R4/lib${kdelibsuff} \
124
/usr/lib${kdelibsuff}/X11 \
125
/usr/lib${kdelibsuff}/X11R6 \
126
/usr/lib${kdelibsuff}/X11R5 \
127
/usr/lib${kdelibsuff}/X11R4 \
129
/usr/local/X11/lib${kdelibsuff} \
130
/usr/local/X11R6/lib${kdelibsuff} \
131
/usr/local/X11R5/lib${kdelibsuff} \
132
/usr/local/X11R4/lib${kdelibsuff} \
134
/usr/local/lib${kdelibsuff}/X11 \
135
/usr/local/lib${kdelibsuff}/X11R6 \
136
/usr/local/lib${kdelibsuff}/X11R5 \
137
/usr/local/lib${kdelibsuff}/X11R4 \
139
/usr/X386/lib${kdelibsuff} \
140
/usr/x386/lib${kdelibsuff} \
141
/usr/XFree86/lib${kdelibsuff}/X11 \
143
/usr/lib${kdelibsuff} \
144
/usr/local/lib${kdelibsuff} \
145
/usr/unsupported/lib${kdelibsuff} \
146
/usr/athena/lib${kdelibsuff} \
147
/usr/local/x11r5/lib${kdelibsuff} \
148
/usr/lpp/Xamples/lib${kdelibsuff} \
149
/lib/usr/lib${kdelibsuff}/X11 \
151
/usr/openwin/lib${kdelibsuff} \
152
/usr/openwin/share/lib${kdelibsuff} \
155
dnl Don't even attempt the hair of trying to link an X program!
156
for ac_extension in a so sl; do
157
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
158
ac_x_libraries=$ac_dir
163
fi # $ac_x_libraries = NO
167
dnl ------------------------------------------------------------------------
168
dnl Find a file (or one of more files in a list of dirs)
169
dnl ------------------------------------------------------------------------
171
AC_DEFUN([AC_FIND_FILE],
178
echo "configure: __oline__: $i/$j" >&AC_FD_CC
179
if test -r "$i/$j"; then
180
echo "taking that" >&AC_FD_CC
188
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
189
dnl if-not-found, test-parameter, prepend-path)
191
dnl Look for program-name in list-of-dirs+$PATH.
192
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
193
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
194
dnl test-parameter: if set, the program is executed with this arg,
195
dnl and only a successful exit code is required.
196
AC_DEFUN([KDE_FIND_PATH],
198
AC_MSG_CHECKING([for $1])
199
if test -n "$$2"; then
202
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
204
AC_CACHE_VAL(kde_cv_path_$kde_cache,
213
if test -z "$6"; then dnl Append dirs in PATH (default)
215
else dnl Prepend dirs in PATH (if 6th arg is set)
221
if test -x "$dir/$1"; then
224
evalstr="$dir/$1 $5 2>&1 "
225
if eval $evalstr; then
226
kde_cv_path="$dir/$1"
230
kde_cv_path="$dir/$1"
236
eval "kde_cv_path_$kde_cache=$kde_cv_path"
240
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
244
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
245
AC_MSG_RESULT(not found)
248
AC_MSG_RESULT($kde_cv_path)
254
AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
256
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
257
Please check whether you installed Qt correctly.
258
You need to have a running moc binary.
259
configure tried to run $ac_cv_path_moc and the test didn't
260
succeed. If configure shouldn't have tried this one, set
261
the environment variable MOC to the right one before running
266
AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
268
AC_MSG_WARN([No Qt ui compiler (uic) found!
269
Please check whether you installed Qt correctly.
270
You need to have a running uic binary.
271
configure tried to run $ac_cv_path_uic and the test didn't
272
succeed. If configure shouldn't have tried this one, set
273
the environment variable UIC to the right one before running
279
AC_DEFUN([KDE_CHECK_UIC_FLAG],
281
AC_MSG_CHECKING([whether uic supports -$1 ])
282
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
283
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
285
cat >conftest.ui <<EOT
286
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
288
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
289
if AC_TRY_EVAL(ac_uic_testrun); then
290
eval "kde_cv_prog_uic_$kde_cache=yes"
292
eval "kde_cv_prog_uic_$kde_cache=no"
297
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
309
dnl ------------------------------------------------------------------------
310
dnl Find the meta object compiler and the ui compiler in the PATH,
311
dnl in $QTDIR/bin, and some more usual places
312
dnl ------------------------------------------------------------------------
314
AC_DEFUN([AC_PATH_QT_MOC_UIC],
316
AC_REQUIRE([KDE_CHECK_PERL])
318
for dir in $kde_qt_dirs; do
319
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
321
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
322
if test ! "$ac_qt_bindir" = "NO"; then
323
qt_bindirs="$ac_qt_bindir $qt_bindirs"
326
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
327
if test -z "$UIC_NOT_NEEDED"; then
328
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
329
if test -z "$UIC_PATH" ; then
330
KDE_UIC_ERROR_MESSAGE
335
if test $kde_qtver = 3; then
336
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
337
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
339
if test x$ac_uic_supports_libpath = xyes; then
340
UIC="$UIC -L \$(kde_widgetdir)"
342
if test x$ac_uic_supports_nounload = xyes; then
348
UIC="echo uic not available: "
355
if test $kde_qtver = 3; then
362
AC_DEFUN([KDE_1_CHECK_PATHS],
364
KDE_1_CHECK_PATH_HEADERS
368
if test -n "$USE_RPATH"; then
370
if test -n "$kde_libraries"; then
371
KDE_TEST_RPATH="-R $kde_libraries"
374
if test -n "$qt_libraries"; then
375
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
378
if test -n "$x_libraries"; then
379
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
382
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
385
AC_MSG_CHECKING([for KDE libraries installed])
386
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
388
if AC_TRY_EVAL(ac_link) && test -s conftest; then
391
AC_MSG_ERROR([your system fails at linking a small KDE application!
392
Check, if your compiler is installed correctly and if you have used the
393
same compiler to compile Qt and kdelibs as you did use now.
394
For more details about this problem, look at the end of config.log.])
397
if eval `KDEDIR= ./conftest 2>&5`; then
403
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
404
kde_have_all_paths=yes
406
KDE_SET_PATHS($kde_result)
410
AC_DEFUN([KDE_SET_PATHS],
412
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
413
kde_htmldir=\"$kde_htmldir\" \
414
kde_appsdir=\"$kde_appsdir\" \
415
kde_icondir=\"$kde_icondir\" \
416
kde_sounddir=\"$kde_sounddir\" \
417
kde_datadir=\"$kde_datadir\" \
418
kde_locale=\"$kde_locale\" \
419
kde_cgidir=\"$kde_cgidir\" \
420
kde_confdir=\"$kde_confdir\" \
421
kde_kcfgdir=\"$kde_kcfgdir\" \
422
kde_mimedir=\"$kde_mimedir\" \
423
kde_toolbardir=\"$kde_toolbardir\" \
424
kde_wallpaperdir=\"$kde_wallpaperdir\" \
425
kde_templatesdir=\"$kde_templatesdir\" \
426
kde_bindir=\"$kde_bindir\" \
427
kde_servicesdir=\"$kde_servicesdir\" \
428
kde_servicetypesdir=\"$kde_servicetypesdir\" \
429
kde_moduledir=\"$kde_moduledir\" \
430
kde_styledir=\"$kde_styledir\" \
431
kde_widgetdir=\"$kde_widgetdir\" \
432
xdg_appsdir=\"$xdg_appsdir\" \
433
xdg_menudir=\"$xdg_menudir\" \
434
xdg_directorydir=\"$xdg_directorydir\" \
438
AC_DEFUN([KDE_SET_DEFAULT_PATHS],
440
if test "$1" = "default"; then
442
if test -z "$kde_htmldir"; then
443
kde_htmldir='\${datadir}/doc/HTML'
445
if test -z "$kde_appsdir"; then
446
kde_appsdir='\${datadir}/applnk'
448
if test -z "$kde_icondir"; then
449
kde_icondir='\${datadir}/icons'
451
if test -z "$kde_sounddir"; then
452
kde_sounddir='\${datadir}/sounds'
454
if test -z "$kde_datadir"; then
455
kde_datadir='\${datadir}/apps'
457
if test -z "$kde_locale"; then
458
kde_locale='\${datadir}/locale'
460
if test -z "$kde_cgidir"; then
461
kde_cgidir='\${exec_prefix}/cgi-bin'
463
if test -z "$kde_confdir"; then
464
kde_confdir='\${datadir}/config'
466
if test -z "$kde_kcfgdir"; then
467
kde_kcfgdir='\${datadir}/config.kcfg'
469
if test -z "$kde_mimedir"; then
470
kde_mimedir='\${datadir}/mimelnk'
472
if test -z "$kde_toolbardir"; then
473
kde_toolbardir='\${datadir}/toolbar'
475
if test -z "$kde_wallpaperdir"; then
476
kde_wallpaperdir='\${datadir}/wallpapers'
478
if test -z "$kde_templatesdir"; then
479
kde_templatesdir='\${datadir}/templates'
481
if test -z "$kde_bindir"; then
482
kde_bindir='\${exec_prefix}/bin'
484
if test -z "$kde_servicesdir"; then
485
kde_servicesdir='\${datadir}/services'
487
if test -z "$kde_servicetypesdir"; then
488
kde_servicetypesdir='\${datadir}/servicetypes'
490
if test -z "$kde_moduledir"; then
491
if test "$kde_qtver" = "2"; then
492
kde_moduledir='\${libdir}/kde2'
494
kde_moduledir='\${libdir}/kde3'
497
if test -z "$kde_styledir"; then
498
kde_styledir='\${libdir}/kde3/plugins/styles'
500
if test -z "$kde_widgetdir"; then
501
kde_widgetdir='\${libdir}/kde3/plugins/designer'
503
if test -z "$xdg_appsdir"; then
504
xdg_appsdir='\${datadir}/applications/kde'
506
if test -z "$xdg_menudir"; then
507
xdg_menudir='\${sysconfdir}/xdg/menus'
509
if test -z "$xdg_directorydir"; then
510
xdg_directorydir='\${datadir}/desktop-directories'
513
KDE_SET_PATHS(defaults)
517
if test $kde_qtver = 1; then
518
AC_MSG_RESULT([compiling])
521
AC_MSG_ERROR([path checking not yet supported for KDE 2])
527
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
528
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
529
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
530
test -z "$kde_datadir" || test -z "$kde_locale" ||
531
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
532
test -z "$kde_kcfgdir" ||
533
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
534
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
535
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
536
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
537
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
538
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
539
test "x$kde_have_all_paths" != "xyes"; then
540
kde_have_all_paths=no
544
AC_DEFUN([KDE_MISSING_PROG_ERROR],
546
AC_MSG_ERROR([The important program $1 was not found!
547
Please check whether you installed KDE correctly.
551
AC_DEFUN([KDE_MISSING_ARTS_ERROR],
553
AC_MSG_ERROR([The important program $1 was not found!
554
Please check whether you installed aRts correctly or use
555
--without-arts to compile without aRts support (this will remove functionality).
559
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
561
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
562
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
563
if test -n "$KDEDIRS"; then
566
for dir in $KDEDIRS; do
567
kde_default_bindirs="$dir/bin $kde_default_bindirs "
573
AC_DEFUN([KDE_SUBST_PROGRAMS],
576
AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
577
[build_arts=$withval],
580
AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
581
if test "$build_arts" = "no"; then
582
AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
585
KDE_SET_DEFAULT_BINDIRS
586
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
587
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
588
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
589
if test "$build_arts" '!=' "no"; then
590
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
591
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
593
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
597
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
601
if test "$kde_qtver" = "3"; then
602
if test "$kde_qtsubver" -le 1; then
605
if test "$kde_qtsubver" -le 2 -o `kde-config --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` == 3.2; then
611
if test -n "$kde32ornewer"; then
612
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
613
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
615
if test -n "$kde33ornewer"; then
616
KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
617
AC_SUBST(MAKEKDEWIDGETS)
619
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
621
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
622
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
623
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
624
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
625
if test "$KDE_XSL_STYLESHEET" = "NO"; then
626
KDE_XSL_STYLESHEET=""
628
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
632
DCOP_DEPENDENCIES='$(DCOPIDL)'
633
if test -n "$kde32ornewer"; then
634
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
635
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
636
AC_SUBST(KCONFIG_COMPILER)
637
AC_SUBST(KCFG_DEPENDENCIES)
641
AC_SUBST(DCOPIDL2CPP)
642
AC_SUBST(DCOP_DEPENDENCIES)
644
AC_SUBST(ARTSCCONFIG)
646
AC_SUBST(KDE_XSL_STYLESHEET)
650
AC_DEFUN([AC_CREATE_KFSSTND],
652
AC_REQUIRE([AC_CHECK_RPATH])
654
AC_MSG_CHECKING([for KDE paths])
657
AC_CACHE_VAL(kde_cv_all_paths,
659
KDE_SET_DEFAULT_PATHS($1)
662
eval "$kde_cv_all_paths"
663
KDE_CHECK_PATHS_FOR_COMPLETENESS
664
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
665
# wrong values were cached, may be, we can set better ones
667
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
668
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir=
669
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
670
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
674
xdg_appsdir = xdg_menudir= xdg_directorydir=
675
KDE_SET_DEFAULT_PATHS($1)
676
eval "$kde_cv_all_paths"
677
KDE_CHECK_PATHS_FOR_COMPLETENESS
678
kde_result="$kde_result (cache overridden)"
680
if test "$kde_have_all_paths" = "no"; then
681
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
682
Since it had compiled and linked before, it must be a strange problem on your system.
683
Look at config.log for details. If you are not able to fix this, look at
684
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
685
(If you're using an egcs version on Linux, you may update binutils!)
689
AC_MSG_RESULT($kde_result)
698
AC_DEFUN([AC_SUBST_KFSSTND],
700
AC_SUBST(kde_htmldir)
701
AC_SUBST(kde_appsdir)
702
AC_SUBST(kde_icondir)
703
AC_SUBST(kde_sounddir)
704
AC_SUBST(kde_datadir)
706
AC_SUBST(kde_confdir)
707
AC_SUBST(kde_kcfgdir)
708
AC_SUBST(kde_mimedir)
709
AC_SUBST(kde_wallpaperdir)
711
dnl X Desktop Group standards
712
AC_SUBST(xdg_appsdir)
713
AC_SUBST(xdg_menudir)
714
AC_SUBST(xdg_directorydir)
716
AC_SUBST(kde_templatesdir)
717
AC_SUBST(kde_servicesdir)
718
AC_SUBST(kde_servicetypesdir)
719
AC_SUBST(kde_moduledir)
720
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
721
AC_SUBST(kde_styledir)
722
AC_SUBST(kde_widgetdir)
723
if test "$kde_qtver" = 1; then
724
kde_minidir="$kde_icondir/mini"
726
# for KDE 1 - this breaks KDE2 apps using minidir, but
727
# that's the plan ;-/
728
kde_minidir="/dev/null"
730
dnl AC_SUBST(kde_minidir)
731
dnl AC_SUBST(kde_cgidir)
732
dnl AC_SUBST(kde_toolbardir)
735
AC_DEFUN([KDE_MISC_TESTS],
737
dnl Checks for libraries.
738
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
740
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
743
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
744
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
745
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
746
You should install libcrypt from another source or configure with PAM
751
if test $kde_have_crypt = yes; then
752
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
755
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
756
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
757
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
758
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
760
AC_CHECK_FUNC(inet_ntoa)
761
if test $ac_cv_func_inet_ntoa = no; then
762
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
764
AC_CHECK_FUNC(connect)
765
if test $ac_cv_func_connect = no; then
766
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
770
AC_CHECK_FUNC(remove)
771
if test $ac_cv_func_remove = no; then
772
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
775
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
776
AC_CHECK_FUNC(shmat, ,
777
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
779
# more headers that need to be explicitly included on darwin
780
AC_CHECK_HEADERS(sys/types.h stdint.h)
782
# sys/bitypes.h is needed for uint32_t and friends on Tru64
783
AC_CHECK_HEADERS(sys/bitypes.h)
785
# darwin requires a poll emulation library
786
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
788
# for some image handling on Mac OS X
789
AC_CHECK_HEADERS(Carbon/Carbon.h)
791
# CoreAudio framework
792
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
793
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
794
FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
799
AC_SUBST(FRAMEWORK_COREAUDIO)
800
LIBSOCKET="$X_EXTRA_LIBS"
802
AC_SUBST(X_EXTRA_LIBS)
803
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
806
case $host in dnl this *is* LynxOS specific
808
AC_MSG_CHECKING([LynxOS header file wrappers])
809
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
810
AC_MSG_RESULT(disabled)
811
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
819
# darwin needs this to initialize the environment
820
AC_CHECK_HEADERS(crt_externs.h)
821
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
823
AH_VERBATIM(_DARWIN_ENVIRON,
825
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
826
# include <sys/time.h>
827
# include <crt_externs.h>
828
# define environ (*_NSGetEnviron())
832
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
835
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
836
* that defines bzero.
844
AC_CHECK_FUNCS([vsnprintf snprintf])
848
* On HP-UX, the declaration of vsnprintf() is needed every time !
851
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
861
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
865
int snprintf(char *str, size_t n, char const *fmt, ...);
871
dnl ------------------------------------------------------------------------
872
dnl Find the header files and libraries for X-Windows. Extended the
874
dnl ------------------------------------------------------------------------
878
AC_REQUIRE([KDE_MISC_TESTS])dnl
879
AC_REQUIRE([KDE_CHECK_LIB64])
883
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
884
kde_use_qt_emb=$enableval,
890
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
891
kde_use_qt_emb_palm=$enableval,
892
kde_use_qt_emb_palm=no
897
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
898
kde_use_qt_mac=$enableval,
902
# used to disable x11-specific stuff on special platforms
903
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
905
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
907
AC_MSG_CHECKING(for X)
909
AC_CACHE_VAL(kde_cv_have_x,
910
[# One or both of the vars are not set, and there is no cached value.
911
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
914
kde_x_includes=$x_includes
916
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
919
kde_x_libraries=$x_libraries
922
# below we use the standard autoconf calls
923
ac_x_libraries=$kde_x_libraries
924
ac_x_includes=$kde_x_includes
927
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
928
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
929
dnl location. The correct location is /usr/lib32 or an undefined value
930
dnl (the linker is smart enough to pick the correct default library).
931
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
932
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
933
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
934
dnl x_includes should be left alone.
942
if test -z "$ac_x_includes"; then
945
if test -z "$ac_x_libraries"; then
946
ac_x_libraries="/usr/lib${kdelibsuff}"
949
#from now on we use our own again
951
# when the user already gave --x-includes, we ignore
952
# what the standard autoconf macros told us.
953
if test "$kde_x_includes" = NO; then
954
kde_x_includes=$ac_x_includes
957
# for --x-libraries too
958
if test "$kde_x_libraries" = NO; then
959
kde_x_libraries=$ac_x_libraries
962
if test "$kde_x_includes" = NO; then
963
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
966
if test "$kde_x_libraries" = NO; then
967
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
970
# Record where we found X for the cache.
971
kde_cv_have_x="have_x=yes \
972
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
975
eval "$kde_cv_have_x"
977
if test "$have_x" != yes; then
978
AC_MSG_RESULT($have_x)
981
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
984
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
986
x_includes="."; dnl better than nothing :-
988
x_includes=$kde_x_includes
989
X_INCLUDES="-I$x_includes"
992
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
994
x_libraries="/usr/lib"; dnl better than nothing :-
996
x_libraries=$kde_x_libraries
997
X_LDFLAGS="-L$x_libraries"
999
all_includes="$X_INCLUDES"
1000
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
1002
# Check for libraries that X11R6 Xt/Xaw programs need.
1003
ac_save_LDFLAGS="$LDFLAGS"
1004
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1005
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1006
# check for ICE first), but we must link in the order -lSM -lICE or
1007
# we get undefined symbols. So assume we have SM if we have ICE.
1008
# These have to be linked with before -lX11, unlike the other
1009
# libraries we check for below, so use a different variable.
1010
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1011
AC_CHECK_LIB(ICE, IceConnectionNumber,
1012
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
1013
LDFLAGS="$ac_save_LDFLAGS"
1015
LIB_X11='-lX11 $(LIBSOCKET)'
1017
AC_MSG_CHECKING(for libXext)
1018
AC_CACHE_VAL(kde_cv_have_libXext,
1020
kde_ldflags_safe="$LDFLAGS"
1021
kde_libs_safe="$LIBS"
1023
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
1024
LIBS="-lXext -lX11 $LIBSOCKET"
1029
# include <stdlib.h>
1033
printf("hello Xext\n");
1035
kde_cv_have_libXext=yes,
1036
kde_cv_have_libXext=no
1039
LDFLAGS=$kde_ldflags_safe
1043
AC_MSG_RESULT($kde_cv_have_libXext)
1045
if test "$kde_cv_have_libXext" = "no"; then
1046
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
1047
can't find it itself, we stop here assuming that make wouldn't find
1054
elif test "$kde_use_qt_emb" = "yes"; then
1055
dnl We're using QT Embedded
1057
CXXFLAGS="$CXXFLAGS -fno-rtti"
1058
QTE_NORTTI="-fno-rtti -DQWS"
1068
elif test "$kde_use_qt_mac" = "yes"; then
1069
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1070
dnl be included to get the information) --Sam
1071
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1072
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1083
AC_SUBST(X_PRE_LIBS)
1085
AC_SUBST(LIB_XRENDER)
1087
AC_SUBST(X_INCLUDES)
1089
AC_SUBST(x_includes)
1090
AC_SUBST(x_libraries)
1091
AC_SUBST(QTE_NORTTI)
1096
AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1098
AC_REQUIRE([KDE_USE_QT])
1099
cat > conftest.$ac_ext <<EOF
1100
#include "confdefs.h"
1101
#include <qglobal.h>
1102
#include <qapplication.h>
1104
if test "$kde_qtver" = "2"; then
1105
cat >> conftest.$ac_ext <<EOF
1107
#include <qstring.h>
1111
if test $kde_qtsubver -gt 0; then
1112
cat >> conftest.$ac_ext <<EOF
1113
#if QT_VERSION < 210
1120
if test "$kde_qtver" = "3"; then
1121
cat >> conftest.$ac_ext <<EOF
1122
#include <qcursor.h>
1123
#include <qstylefactory.h>
1124
#include <private/qucomextra_p.h>
1128
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1129
cat >> conftest.$ac_ext <<EOF
1135
if test "$kde_qtver" = "2"; then
1136
cat >> conftest.$ac_ext <<EOF
1137
QStringList *t = new QStringList();
1140
if test $kde_qtsubver -gt 0; then
1141
cat >> conftest.$ac_ext <<EOF
1143
s.setLatin1("Elvis is alive", 14);
1147
if test "$kde_qtver" = "3"; then
1148
cat >> conftest.$ac_ext <<EOF
1149
(void)QStyleFactory::create(QString::null);
1150
QCursor c(Qt::WhatsThisCursor);
1153
cat >> conftest.$ac_ext <<EOF
1159
AC_DEFUN([KDE_USE_QT],
1161
if test -z "$1"; then
1162
# Current default Qt version: 3.3
1166
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1167
# following is the check if subversion isnt found in passed argument
1168
if test "$kde_qtsubver" = "$1"; then
1171
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1172
if test "$kde_qtver" = "1"; then
1177
if test -z "$2"; then
1178
if test "$kde_qtver" = "2"; then
1179
if test $kde_qtsubver -gt 0; then
1180
kde_qt_minversion=">= Qt 2.2.2"
1182
kde_qt_minversion=">= Qt 2.0.2"
1185
if test "$kde_qtver" = "3"; then
1186
if test $kde_qtsubver -gt 0; then
1187
if test $kde_qtsubver -gt 1; then
1188
if test $kde_qtsubver -gt 2; then
1189
kde_qt_minversion=">= Qt 3.3"
1191
kde_qt_minversion=">= Qt 3.2"
1194
kde_qt_minversion=">= Qt 3.1 (20021021)"
1197
kde_qt_minversion=">= Qt 3.0"
1200
if test "$kde_qtver" = "1"; then
1201
kde_qt_minversion=">= 1.42 and < 2.0"
1204
kde_qt_minversion="$2"
1207
if test -z "$3"; then
1208
if test $kde_qtver = 3; then
1209
if test $kde_qtsubver -gt 0; then
1210
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1211
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1212
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1214
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1217
if test $kde_qtver = 2; then
1218
if test $kde_qtsubver -gt 0; then
1219
kde_qt_verstring="QT_VERSION >= 222"
1221
kde_qt_verstring="QT_VERSION >= 200"
1224
if test $kde_qtver = 1; then
1225
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1228
kde_qt_verstring="$3"
1231
if test $kde_qtver = 3; then
1232
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1234
if test $kde_qtver = 2; then
1235
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1237
if test $kde_qtver = 1; then
1238
kde_qt_dirs="$QTDIR /usr/lib/qt"
1242
AC_DEFUN([KDE_CHECK_QT_DIRECT],
1244
AC_REQUIRE([KDE_USE_QT])
1245
AC_MSG_CHECKING([if Qt compiles without flags])
1246
AC_CACHE_VAL(kde_cv_qt_direct,
1250
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1251
ac_LIBRARY_PATH="$LIBRARY_PATH"
1252
ac_cxxflags_safe="$CXXFLAGS"
1253
ac_ldflags_safe="$LDFLAGS"
1254
ac_libs_safe="$LIBS"
1256
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1257
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1258
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1259
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1261
LIBS="$LIBQT $LIBSOCKET"
1264
export LD_LIBRARY_PATH
1268
KDE_PRINT_QT_PROGRAM
1270
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1271
kde_cv_qt_direct="yes"
1273
kde_cv_qt_direct="no"
1274
echo "configure: failed program was:" >&AC_FD_CC
1275
cat conftest.$ac_ext >&AC_FD_CC
1279
CXXFLAGS="$ac_cxxflags_safe"
1280
LDFLAGS="$ac_ldflags_safe"
1281
LIBS="$ac_libs_safe"
1283
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1284
export LD_LIBRARY_PATH
1285
LIBRARY_PATH="$ac_LIBRARY_PATH"
1290
if test "$kde_cv_qt_direct" = "yes"; then
1299
dnl ------------------------------------------------------------------------
1300
dnl Try to find the Qt headers and libraries.
1301
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1302
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1303
dnl ------------------------------------------------------------------------
1305
AC_DEFUN([AC_PATH_QT_1_3],
1307
AC_REQUIRE([K_PATH_X])
1308
AC_REQUIRE([KDE_USE_QT])
1309
AC_REQUIRE([KDE_CHECK_LIB64])
1311
dnl ------------------------------------------------------------------------
1312
dnl Add configure flag to enable linking to MT version of Qt library.
1313
dnl ------------------------------------------------------------------------
1317
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
1318
kde_use_qt_mt=$enableval,
1320
if test $kde_qtver = 3; then
1330
dnl ------------------------------------------------------------------------
1331
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1332
dnl ------------------------------------------------------------------------
1336
if test "x$kde_use_qt_mt" = "xyes"; then
1338
if test "x$kde_use_threading" = "xyes"; then
1339
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1340
KDE_MT_LDFLAGS="$USE_THREADS"
1341
KDE_MT_LIBS="$LIBPTHREAD"
1346
AC_SUBST(KDE_MT_LDFLAGS)
1347
AC_SUBST(KDE_MT_LIBS)
1349
kde_qt_was_given=yes
1351
dnl ------------------------------------------------------------------------
1352
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1353
dnl ------------------------------------------------------------------------
1354
if test -z "$LIBQT_GLOB"; then
1355
if test "x$kde_use_qt_emb" = "xyes"; then
1356
LIBQT_GLOB="libqte.*"
1358
LIBQT_GLOB="libqt.*"
1362
if test -z "$LIBQT"; then
1363
dnl ------------------------------------------------------------
1364
dnl If we got --enable-embedded then adjust the Qt library name.
1365
dnl ------------------------------------------------------------
1366
if test "x$kde_use_qt_emb" = "xyes"; then
1372
kde_int_qt="-l$qtlib"
1378
if test -z "$LIBQPE"; then
1379
dnl ------------------------------------------------------------
1380
dnl If we got --enable-palmtop then add -lqpe to the link line
1381
dnl ------------------------------------------------------------
1382
if test "x$kde_use_qt_emb" = "xyes"; then
1383
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1393
dnl ------------------------------------------------------------------------
1394
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1395
dnl ------------------------------------------------------------------------
1397
if test "x$kde_use_qt_mt" = "xyes"; then
1398
if test -z "$LIBQT"; then
1400
kde_int_qt="-l$qtlib-mt"
1403
kde_int_qt="$qtlib-mt"
1405
LIBQT_GLOB="lib$qtlib-mt.*"
1406
USING_QT_MT="using -mt"
1411
if test $kde_qtver != 1; then
1413
AC_REQUIRE([AC_FIND_PNG])
1414
AC_REQUIRE([AC_FIND_JPEG])
1415
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1418
if test $kde_qtver = 3; then
1419
AC_REQUIRE([KDE_CHECK_LIBDL])
1420
LIBQT="$LIBQT $LIBDL"
1423
AC_MSG_CHECKING([for Qt])
1425
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1426
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1428
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1432
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
1433
[ ac_qt_includes="$withval"/include
1434
ac_qt_libraries="$withval"/lib${kdelibsuff}
1435
ac_qt_bindir="$withval"/bin
1438
AC_ARG_WITH(qt-includes,
1439
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
1441
ac_qt_includes="$withval"
1444
kde_qt_libs_given=no
1446
AC_ARG_WITH(qt-libraries,
1447
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
1448
[ ac_qt_libraries="$withval"
1449
kde_qt_libs_given=yes
1452
AC_CACHE_VAL(ac_cv_have_qt,
1453
[#try to guess Qt locations
1456
for dir in $kde_qt_dirs; do
1457
qt_incdirs="$qt_incdirs $dir/include $dir"
1459
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"
1460
if test ! "$ac_qt_includes" = "NO"; then
1461
qt_incdirs="$ac_qt_includes $qt_incdirs"
1464
if test "$kde_qtver" != "1"; then
1465
kde_qt_header=qstyle.h
1467
kde_qt_header=qglobal.h
1470
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1471
ac_qt_includes="$qt_incdir"
1474
for dir in $kde_qt_dirs; do
1475
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1477
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1478
if test ! "$ac_qt_libraries" = "NO"; then
1479
qt_libdir=$ac_qt_libraries
1481
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1482
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1484
for dir in $qt_libdirs; do
1485
try="ls -1 $dir/${LIBQT_GLOB}"
1486
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1489
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1490
if test -e "$a"; then
1491
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1496
ac_qt_libraries="$qt_libdir"
1501
ac_cxxflags_safe="$CXXFLAGS"
1502
ac_ldflags_safe="$LDFLAGS"
1503
ac_libs_safe="$LIBS"
1505
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1506
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1507
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1509
KDE_PRINT_QT_PROGRAM
1511
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1514
echo "configure: failed program was:" >&AC_FD_CC
1515
cat conftest.$ac_ext >&AC_FD_CC
1516
ac_qt_libraries="NO"
1519
CXXFLAGS="$ac_cxxflags_safe"
1520
LDFLAGS="$ac_ldflags_safe"
1521
LIBS="$ac_libs_safe"
1524
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1525
ac_cv_have_qt="have_qt=no"
1528
if test "$ac_qt_includes" = NO; then
1529
if test "$ac_qt_libraries" = NO; then
1530
ac_qt_notfound="(headers and libraries)";
1532
ac_qt_notfound="(headers)";
1535
if test "x$kde_use_qt_mt" = "xyes"; then
1537
Make sure that you have compiled Qt with thread support!"
1538
ac_qt_notfound="(library $qtlib-mt)";
1540
ac_qt_notfound="(library $qtlib)";
1544
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1545
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1551
eval "$ac_cv_have_qt"
1553
if test "$have_qt" != yes; then
1554
AC_MSG_RESULT([$have_qt]);
1556
ac_cv_have_qt="have_qt=yes \
1557
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1558
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1560
qt_libraries="$ac_qt_libraries"
1561
qt_includes="$ac_qt_includes"
1564
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
1565
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1568
AC_SUBST(qt_libraries)
1569
AC_SUBST(qt_includes)
1571
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1574
QT_INCLUDES="-I$qt_includes"
1575
all_includes="$QT_INCLUDES $all_includes"
1578
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1581
QT_LDFLAGS="-L$qt_libraries"
1582
all_libraries="$QT_LDFLAGS $all_libraries"
1584
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1586
AC_SUBST(QT_INCLUDES)
1587
AC_SUBST(QT_LDFLAGS)
1592
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1593
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1595
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1597
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1598
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1599
if test -e "$a"; then
1600
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1611
AC_DEFUN([AC_PATH_QT],
1616
AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
1618
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1620
if test x$ac_uic_supports_libpath = xyes; then
1622
AC_MSG_CHECKING([if UIC has KDE plugins available])
1623
AC_CACHE_VAL(kde_cv_uic_plugins,
1625
cat > actest.ui << EOF
1626
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1627
<class>NewConnectionDialog</class>
1628
<widget class="QDialog">
1629
<widget class="KLineEdit">
1630
<property name="name">
1631
<cstring>testInput</cstring>
1640
kde_cv_uic_plugins=no
1641
kde_line="$UIC_PATH -L $kde_widgetdir"
1642
if test x$ac_uic_supports_nounload = xyes; then
1643
kde_line="$kde_line -nounload"
1645
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1646
if AC_TRY_EVAL(kde_line); then
1647
# if you're trying to debug this check and think it's incorrect,
1648
# better check your installation. The check _is_ correct - your
1649
# installation is not.
1650
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1651
kde_cv_uic_plugins=yes
1654
rm -f actest.ui actest.cpp
1657
AC_MSG_RESULT([$kde_cv_uic_plugins])
1658
if test "$kde_cv_uic_plugins" != yes; then
1660
you need to install kdelibs first.
1662
If you did install kdelibs, then the Qt version that is picked up by
1663
this configure is not the same version you used to compile kdelibs.
1664
The Qt Plugin installed by kdelibs is *ONLY* loadable if its the
1665
same Qt version, compiled with the same compiler and the same Qt
1666
configuration settings.
1672
AC_DEFUN([KDE_CHECK_FINAL],
1674
AC_ARG_ENABLE(final,
1675
AC_HELP_STRING([--enable-final],
1676
[build size optimized apps (experimental - needs lots of memory)]),
1677
kde_use_final=$enableval, kde_use_final=no)
1679
if test "x$kde_use_final" = "xyes"; then
1680
KDE_USE_FINAL_TRUE=""
1681
KDE_USE_FINAL_FALSE="#"
1683
KDE_USE_FINAL_TRUE="#"
1684
KDE_USE_FINAL_FALSE=""
1686
AC_SUBST(KDE_USE_FINAL_TRUE)
1687
AC_SUBST(KDE_USE_FINAL_FALSE)
1690
AC_DEFUN([KDE_CHECK_CLOSURE],
1692
AC_ARG_ENABLE(closure,
1693
AC_HELP_STRING([--enable-closure],[delay template instantiation]),
1694
kde_use_closure=$enableval, kde_use_closure=no)
1697
if test "x$kde_use_closure" = "xyes"; then
1698
KDE_USE_CLOSURE_TRUE=""
1699
KDE_USE_CLOSURE_FALSE="#"
1700
# CXXFLAGS="$CXXFLAGS $REPO"
1702
KDE_USE_CLOSURE_TRUE="#"
1703
KDE_USE_CLOSURE_FALSE=""
1707
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1708
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1709
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1710
[KDE_NO_UNDEFINED=""])],
1711
[KDE_NO_UNDEFINED=""])
1715
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1716
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1717
AC_SUBST(KDE_NO_UNDEFINED)
1720
dnl Check if the linker supports --enable-new-dtags and --as-needed
1721
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
1723
AC_ARG_ENABLE(new_ldflags,
1724
AC_HELP_STRING([--enable-new-ldflags],
1725
[enable the new linker flags]),
1726
kde_use_new_ldflags=$enableval,
1727
kde_use_new_ldflags=no)
1729
LDFLAGS_AS_NEEDED=""
1730
LDFLAGS_NEW_DTAGS=""
1731
if test "x$kde_use_new_ldflags" = "xyes"; then
1732
LDFLAGS_NEW_DTAGS=""
1733
KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
1734
[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
1736
KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
1737
[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
1739
AC_SUBST(LDFLAGS_AS_NEEDED)
1740
AC_SUBST(LDFLAGS_NEW_DTAGS)
1743
AC_DEFUN([KDE_CHECK_NMCHECK],
1745
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1746
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1748
if test "$kde_use_nmcheck" = "yes"; then
1749
KDE_USE_NMCHECK_TRUE=""
1750
KDE_USE_NMCHECK_FALSE="#"
1752
KDE_USE_NMCHECK_TRUE="#"
1753
KDE_USE_NMCHECK_FALSE=""
1755
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1756
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1759
AC_DEFUN([KDE_EXPAND_MAKEVAR], [
1761
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1763
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
1767
dnl ------------------------------------------------------------------------
1768
dnl Now, the same with KDE
1769
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1770
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1771
dnl ------------------------------------------------------------------------
1773
AC_DEFUN([AC_BASE_PATH_KDE],
1775
AC_REQUIRE([KDE_CHECK_STL])
1776
AC_REQUIRE([AC_PATH_QT])dnl
1777
AC_REQUIRE([KDE_CHECK_LIB64])
1780
AC_MSG_CHECKING([for KDE])
1782
if test "${prefix}" != NONE; then
1783
kde_includes=${includedir}
1784
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
1786
kde_libraries=${libdir}
1787
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
1796
AC_CACHE_VAL(ac_cv_have_kde,
1797
[#try to guess kde locations
1799
if test "$kde_qtver" = 1; then
1800
kde_check_header="ksock.h"
1801
kde_check_lib="libkdecore.la"
1803
kde_check_header="ksharedptr.h"
1804
kde_check_lib="libkio.la"
1807
if test -z "$1"; then
1809
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1810
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1811
kde_incdirs="$ac_kde_includes $kde_incdirs"
1812
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1813
ac_kde_includes="$kde_incdir"
1815
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1817
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1818
So, check this please and use another prefix!])
1821
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1822
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1823
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1824
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1825
ac_kde_libraries="$kde_libdir"
1828
dnl this might be somewhere else
1829
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1831
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1833
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1834
So, check this please and use another prefix!])
1837
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1839
I can't find the designer plugins. These are required and should have been installed
1843
if test -n "$kde_widgetdir"; then
1844
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1848
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1849
ac_cv_have_kde="have_kde=no"
1851
ac_cv_have_kde="have_kde=yes \
1852
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1855
else dnl test -z $1, e.g. from kdelibs
1857
ac_cv_have_kde="have_kde=no"
1862
eval "$ac_cv_have_kde"
1864
if test "$have_kde" != "yes"; then
1865
if test "${prefix}" = NONE; then
1866
ac_kde_prefix="$ac_default_prefix"
1868
ac_kde_prefix="$prefix"
1870
if test "$exec_prefix" = NONE; then
1871
ac_kde_exec_prefix="$ac_kde_prefix"
1872
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1874
ac_kde_exec_prefix="$exec_prefix"
1875
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1878
kde_libraries="${libdir}"
1879
kde_includes="${includedir}"
1882
ac_cv_have_kde="have_kde=yes \
1883
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1884
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1886
kde_libraries="$ac_kde_libraries"
1887
kde_includes="$ac_kde_includes"
1889
AC_SUBST(kde_libraries)
1890
AC_SUBST(kde_includes)
1892
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1895
KDE_INCLUDES="-I$kde_includes"
1896
all_includes="$KDE_INCLUDES $all_includes"
1899
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1901
KDE_LDFLAGS="-L$kde_libraries"
1902
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1903
all_libraries="$KDE_LDFLAGS $all_libraries"
1906
AC_SUBST(KDE_LDFLAGS)
1907
AC_SUBST(KDE_INCLUDES)
1909
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1911
all_libraries="$all_libraries $USER_LDFLAGS"
1912
all_includes="$all_includes $USER_INCLUDES"
1913
AC_SUBST(all_includes)
1914
AC_SUBST(all_libraries)
1916
if test -z "$1"; then
1917
KDE_CHECK_UIC_PLUGINS
1920
ac_kde_libraries="$kde_libdir"
1927
AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
1929
AC_MSG_CHECKING(for extra includes)
1930
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
1931
kde_use_extra_includes="$withval",
1932
kde_use_extra_includes=NONE
1935
if test -n "$kde_use_extra_includes" && \
1936
test "$kde_use_extra_includes" != "NONE"; then
1940
for dir in $kde_use_extra_includes; do
1941
kde_extra_includes="$kde_extra_includes $dir"
1942
USER_INCLUDES="$USER_INCLUDES -I$dir"
1945
kde_use_extra_includes="added"
1947
kde_use_extra_includes="no"
1949
AC_SUBST(USER_INCLUDES)
1951
AC_MSG_RESULT($kde_use_extra_includes)
1954
AC_MSG_CHECKING(for extra libs)
1955
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
1956
kde_use_extra_libs=$withval,
1957
kde_use_extra_libs=NONE
1959
if test -n "$kde_use_extra_libs" && \
1960
test "$kde_use_extra_libs" != "NONE"; then
1964
for dir in $kde_use_extra_libs; do
1965
kde_extra_libs="$kde_extra_libs $dir"
1966
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1967
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1970
kde_use_extra_libs="added"
1972
kde_use_extra_libs="no"
1975
AC_SUBST(USER_LDFLAGS)
1977
AC_MSG_RESULT($kde_use_extra_libs)
1981
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
1983
AC_MSG_CHECKING([for KDE headers installed])
1986
cat > conftest.$ac_ext <<EOF
1988
# include <stdlib.h>
1991
#include "confdefs.h"
1995
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1996
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1997
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1998
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1999
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
2000
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
2001
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
2002
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
2003
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
2004
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
2005
printf("kde_wallpaperdir=\\"%s\\"\n",
2006
KApplication::kde_wallpaperdir().data());
2007
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
2008
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
2009
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
2010
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
2011
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
2012
printf("kde_styledir=\\"/tmp/dummy\\"\n");
2013
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
2014
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
2015
printf("xdg_menudir=\\"/tmp/dummy\\"\n");
2016
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
2017
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
2022
ac_save_CPPFLAGS=$CPPFLAGS
2023
CPPFLAGS="$all_includes $CPPFLAGS"
2024
if AC_TRY_EVAL(ac_compile); then
2027
AC_MSG_ERROR([your system is not able to compile a small KDE application!
2028
Check, if you installed the KDE header files correctly.
2029
For more details about this problem, look at the end of config.log.])
2031
CPPFLAGS=$ac_save_CPPFLAGS
2036
AC_DEFUN([KDE_CHECK_KDEQTADDON],
2038
AC_MSG_CHECKING(for kde-qt-addon)
2039
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
2041
kde_ldflags_safe="$LDFLAGS"
2042
kde_libs_safe="$LIBS"
2043
kde_cxxflags_safe="$CXXFLAGS"
2045
LIBS="-lkde-qt-addon $LIBQT $LIBS"
2046
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
2047
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
2055
kde_cv_have_kdeqtaddon=yes,
2056
kde_cv_have_kdeqtaddon=no
2059
LDFLAGS=$kde_ldflags_safe
2061
CXXFLAGS=$kde_cxxflags_safe
2064
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
2066
if test "$kde_cv_have_kdeqtaddon" = "no"; then
2067
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
2068
It is a separate package (and CVS module) named kde-qt-addon.])
2072
AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
2074
AC_REQUIRE([KDE_MISC_TESTS])
2075
AC_REQUIRE([KDE_CHECK_LIBDL])
2076
AC_REQUIRE([K_PATH_X])
2078
if test $kde_qtver = 3; then
2080
*cygwin*) lib_kded="-lkdeinit_kded" ;;
2083
AC_SUBST(LIB_KDED, $lib_kded)
2084
AC_SUBST(LIB_KDECORE, "-lkdecore")
2085
AC_SUBST(LIB_KDEUI, "-lkdeui")
2086
AC_SUBST(LIB_KIO, "-lkio")
2087
AC_SUBST(LIB_KJS, "-lkjs")
2088
AC_SUBST(LIB_SMB, "-lsmb")
2089
AC_SUBST(LIB_KAB, "-lkab")
2090
AC_SUBST(LIB_KABC, "-lkabc")
2091
AC_SUBST(LIB_KHTML, "-lkhtml")
2092
AC_SUBST(LIB_KSPELL, "-lkspell")
2093
AC_SUBST(LIB_KPARTS, "-lkparts")
2094
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2095
AC_SUBST(LIB_KUTILS, "-lkutils")
2096
AC_SUBST(LIB_KDEPIM, "-lkdepim")
2097
AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
2098
AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
2099
AC_SUBST(LIB_KDNSSD, "-lkdnssd")
2100
AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2101
# these are for backward compatibility
2102
AC_SUBST(LIB_KSYCOCA, "-lkio")
2103
AC_SUBST(LIB_KFILE, "-lkio")
2104
elif test $kde_qtver = 2; then
2105
AC_SUBST(LIB_KDECORE, "-lkdecore")
2106
AC_SUBST(LIB_KDEUI, "-lkdeui")
2107
AC_SUBST(LIB_KIO, "-lkio")
2108
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2109
AC_SUBST(LIB_SMB, "-lsmb")
2110
AC_SUBST(LIB_KFILE, "-lkfile")
2111
AC_SUBST(LIB_KAB, "-lkab")
2112
AC_SUBST(LIB_KHTML, "-lkhtml")
2113
AC_SUBST(LIB_KSPELL, "-lkspell")
2114
AC_SUBST(LIB_KPARTS, "-lkparts")
2115
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2117
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2118
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2119
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2120
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2121
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2125
AC_DEFUN([AC_PATH_KDE],
2128
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
2130
if test "$enableval" = "no";
2131
then ac_use_path_checking="default"
2132
else ac_use_path_checking=""
2136
if test "$kde_qtver" = 1;
2137
then ac_use_path_checking=""
2138
else ac_use_path_checking="default"
2143
AC_CREATE_KFSSTND($ac_use_path_checking)
2146
KDE_CREATE_LIBS_ALIASES
2149
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2150
AC_DEFUN([KDE_CHECK_FUNC_EXT],
2152
AC_MSG_CHECKING(for $1)
2153
AC_CACHE_VAL(kde_cv_func_$1,
2157
save_CXXFLAGS="$CXXFLAGS"
2158
kde_safe_LIBS="$LIBS"
2159
LIBS="$LIBS $X_EXTRA_LIBS"
2160
if test "$GXX" = "yes"; then
2161
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2171
CXXFLAGS="$save_CXXFLAGS"
2172
LIBS="$kde_safe_LIBS"
2176
AC_MSG_RESULT($kde_cv_func_$1)
2178
AC_MSG_CHECKING([if $1 needs custom prototype])
2179
AC_CACHE_VAL(kde_cv_proto_$1,
2181
if test "x$kde_cv_func_$1" = xyes; then
2185
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2186
kde_cv_proto_$1="yes - in libkdefakes"
2189
kde_cv_proto_$1=unknown
2194
if test "x$kde_cv_proto_$1" = xunknown; then
2199
LIBS="$LIBS $X_EXTRA_LIBS"
2208
[ kde_cv_func_$1=yes
2209
kde_cv_proto_$1=yes ],
2210
[kde_cv_proto_$1="$1 unavailable"]
2216
AC_MSG_RESULT($kde_cv_proto_$1)
2218
if test "x$kde_cv_func_$1" = xyes; then
2219
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2222
if test "x$kde_cv_proto_$1" = xno; then
2223
AC_DEFINE(HAVE_$5_PROTO, 1,
2224
[Define if you have the $1 prototype])
2227
AH_VERBATIM([_HAVE_$5_PROTO],
2229
#if !defined(HAVE_$5_PROTO)
2241
AC_DEFUN([AC_CHECK_SETENV],
2243
KDE_CHECK_FUNC_EXT(setenv, [
2246
[setenv("VAR", "VALUE", 1);],
2247
[int setenv (const char *, const char *, int)],
2251
AC_DEFUN([AC_CHECK_UNSETENV],
2253
KDE_CHECK_FUNC_EXT(unsetenv, [
2257
[void unsetenv (const char *)],
2261
AC_DEFUN([AC_CHECK_GETDOMAINNAME],
2263
KDE_CHECK_FUNC_EXT(getdomainname, [
2270
getdomainname(buffer, 200);
2272
[#include <sys/types.h>
2273
int getdomainname (char *, size_t)],
2277
AC_DEFUN([AC_CHECK_GETHOSTNAME],
2279
KDE_CHECK_FUNC_EXT(gethostname, [
2285
gethostname(buffer, 200);
2287
[int gethostname (char *, unsigned int)],
2291
AC_DEFUN([AC_CHECK_USLEEP],
2293
KDE_CHECK_FUNC_EXT(usleep, [
2299
[int usleep (unsigned int)],
2304
AC_DEFUN([AC_CHECK_RANDOM],
2306
KDE_CHECK_FUNC_EXT(random, [
2312
[long int random(void)],
2315
KDE_CHECK_FUNC_EXT(srandom, [
2321
[void srandom(unsigned int)],
2326
AC_DEFUN([AC_CHECK_INITGROUPS],
2328
KDE_CHECK_FUNC_EXT(initgroups, [
2329
#include <sys/types.h>
2335
initgroups(buffer, 27);
2337
[int initgroups(const char *, gid_t)],
2341
AC_DEFUN([AC_CHECK_MKSTEMPS],
2343
KDE_CHECK_FUNC_EXT(mkstemps, [
2348
mkstemps("/tmp/aaaXXXXXX", 6);
2350
[int mkstemps(char *, int)],
2354
AC_DEFUN([AC_CHECK_MKSTEMP],
2356
KDE_CHECK_FUNC_EXT(mkstemp, [
2361
mkstemp("/tmp/aaaXXXXXX");
2363
[int mkstemp(char *)],
2367
AC_DEFUN([AC_CHECK_MKDTEMP],
2369
KDE_CHECK_FUNC_EXT(mkdtemp, [
2374
mkdtemp("/tmp/aaaXXXXXX");
2376
[char *mkdtemp(char *)],
2381
AC_DEFUN([AC_CHECK_RES_INIT],
2383
AC_MSG_CHECKING([if res_init needs -lresolv])
2384
kde_libs_safe="$LIBS"
2385
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2388
#include <sys/types.h>
2389
#include <netinet/in.h>
2390
#include <arpa/nameser.h>
2397
LIBRESOLV="-lresolv"
2399
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2401
[ AC_MSG_RESULT(no) ]
2406
KDE_CHECK_FUNC_EXT(res_init,
2408
#include <sys/types.h>
2409
#include <netinet/in.h>
2410
#include <arpa/nameser.h>
2414
[int res_init(void)],
2418
AC_DEFUN([AC_CHECK_STRLCPY],
2420
KDE_CHECK_FUNC_EXT(strlcpy, [
2424
strlcpy(buf, "KDE function test", sizeof(buf));
2426
[unsigned long strlcpy(char*, const char*, unsigned long)],
2430
AC_DEFUN([AC_CHECK_STRLCAT],
2432
KDE_CHECK_FUNC_EXT(strlcat, [
2437
strlcat(buf, "KDE function test", sizeof(buf));
2439
[unsigned long strlcat(char*, const char*, unsigned long)],
2443
AC_DEFUN([AC_CHECK_RES_QUERY],
2445
KDE_CHECK_FUNC_EXT(res_query, [
2446
#include <sys/types.h>
2447
#include <netinet/in.h>
2448
#include <arpa/nameser.h>
2453
res_query(NULL, 0, 0, NULL, 0);
2455
[int res_query(const char *, int, int, unsigned char *, int)],
2459
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
2461
KDE_CHECK_FUNC_EXT(dn_skipname, [
2462
#include <sys/types.h>
2463
#include <netinet/in.h>
2464
#include <arpa/nameser.h>
2468
dn_skipname (NULL, NULL);
2470
[int dn_skipname (unsigned char *, unsigned char *)],
2475
AC_DEFUN([AC_FIND_GIF],
2476
[AC_MSG_CHECKING([for giflib])
2477
AC_CACHE_VAL(ac_cv_lib_gif,
2478
[ac_save_LIBS="$LIBS"
2479
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2480
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2482
LIBS="$all_libraries -lgif"
2489
int GifLastError(void);
2493
/* We use char because int might match the return type of a gcc2
2494
builtin and then its argument prototype would still apply. */
2496
[return GifLastError();],
2497
eval "ac_cv_lib_gif=yes",
2498
eval "ac_cv_lib_gif=no")
2499
LIBS="$ac_save_LIBS"
2501
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2503
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2505
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2509
AC_DEFUN([KDE_FIND_JPEG_HELPER],
2511
AC_MSG_CHECKING([for libjpeg$2])
2512
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2514
ac_save_LIBS="$LIBS"
2515
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2516
ac_save_CFLAGS="$CFLAGS"
2517
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2519
[/* Override any gcc2 internal prototype to avoid an error. */
2520
struct jpeg_decompress_struct;
2521
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2526
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2527
int version, size_t structsize);
2531
/* We use char because int might match the return type of a gcc2
2532
builtin and then its argument prototype would still apply. */
2534
[jpeg_CreateDecompress(0L, 0, 0);],
2535
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2536
eval "ac_cv_lib_jpeg_$1=no")
2537
LIBS="$ac_save_LIBS"
2538
CFLAGS="$ac_save_CFLAGS"
2541
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2542
LIBJPEG="$ac_cv_lib_jpeg_$1"
2543
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2551
AC_DEFUN([AC_FIND_JPEG],
2553
dnl first look for libraries
2554
KDE_FIND_JPEG_HELPER(6b, 6b,
2555
KDE_FIND_JPEG_HELPER(normal, [],
2562
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2563
dnl requires system dependent includes loaded before it)
2564
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2565
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2566
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2568
dnl if headers _and_ libraries are missing, this is no error, and we
2569
dnl continue with a warning (the user will get no jpeg support in khtml)
2570
dnl if only one is missing, it means a configuration error, but we still
2572
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2573
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2575
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2577
There is an installation error in jpeg support. You seem to have only one
2578
of either the headers _or_ the libraries installed. You may need to either
2579
provide correct --with-extra-... options, or the development package of
2580
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2581
Disabling JPEG support.
2584
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2591
AH_VERBATIM(_AC_CHECK_JPEG,
2593
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2594
* headers and I'm too lazy to write a configure test as long as only
2595
* unixware is related
2598
#define HAVE_BOOLEAN
2603
AC_DEFUN([KDE_CHECK_QT_JPEG],
2605
if test -n "$LIBJPEG"; then
2606
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2607
AC_CACHE_VAL(kde_cv_qt_jpeg,
2611
ac_save_LIBS="$LIBS"
2612
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2613
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2614
ac_save_CXXFLAGS="$CXXFLAGS"
2615
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2617
[#include <qapplication.h>],
2621
QApplication app(argc, argv);],
2622
eval "kde_cv_qt_jpeg=no",
2623
eval "kde_cv_qt_jpeg=yes")
2624
LIBS="$ac_save_LIBS"
2625
CXXFLAGS="$ac_save_CXXFLAGS"
2630
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2632
LIBJPEG_QT='$(LIBJPEG)'
2640
AC_DEFUN([AC_FIND_ZLIB],
2642
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2643
AC_MSG_CHECKING([for libz])
2644
AC_CACHE_VAL(ac_cv_lib_z,
2646
kde_save_LIBS="$LIBS"
2647
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2648
kde_save_CFLAGS="$CFLAGS"
2649
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2656
gzFile f = (gzFile) 0;
2657
/* this would segfault.. but we only link, don't run */
2658
(void) gzgets(f, buf, sizeof(buf));
2660
return (zlibVersion() == ZLIB_VERSION);
2662
eval "ac_cv_lib_z='-lz'",
2663
eval "ac_cv_lib_z=no")
2664
LIBS="$kde_save_LIBS"
2665
CFLAGS="$kde_save_CFLAGS"
2667
if test ! "$ac_cv_lib_z" = no; then
2668
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2670
AC_MSG_RESULT($ac_cv_lib_z)
2672
AC_MSG_ERROR(not found.
2673
Possibly configure picks up an outdated version
2674
installed by XFree86. Remove it from your system.
2676
Check your installation and look into config.log)
2682
AC_DEFUN([KDE_TRY_TIFFLIB],
2684
AC_MSG_CHECKING([for libtiff $1])
2686
AC_CACHE_VAL(kde_cv_libtiff_$1,
2690
kde_save_LIBS="$LIBS"
2691
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2692
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2694
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2696
kde_save_CXXFLAGS="$CXXFLAGS"
2697
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2703
[return (TIFFOpen( "", "r") == 0); ],
2705
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2707
kde_cv_libtiff_$1=no
2710
LIBS="$kde_save_LIBS"
2711
CXXFLAGS="$kde_save_CXXFLAGS"
2715
if test "$kde_cv_libtiff_$1" = "no"; then
2720
LIBTIFF="$kde_cv_libtiff_$1"
2722
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2728
AC_DEFUN([AC_FIND_TIFF],
2730
AC_REQUIRE([K_PATH_X])
2731
AC_REQUIRE([AC_FIND_ZLIB])
2732
AC_REQUIRE([AC_FIND_JPEG])
2733
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2735
KDE_TRY_TIFFLIB(tiff, [],
2736
KDE_TRY_TIFFLIB(tiff34))
2742
AC_DEFUN([AC_FIND_PNG],
2744
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2745
AC_REQUIRE([AC_FIND_ZLIB])
2746
AC_MSG_CHECKING([for libpng])
2747
AC_CACHE_VAL(ac_cv_lib_png,
2749
kde_save_LIBS="$LIBS"
2750
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2751
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2753
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2755
kde_save_CFLAGS="$CFLAGS"
2756
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2763
png_structp png_ptr = png_create_read_struct( /* image ptr */
2764
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2765
return( png_ptr != 0 );
2767
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2768
eval "ac_cv_lib_png=no"
2770
LIBS="$kde_save_LIBS"
2771
CFLAGS="$kde_save_CFLAGS"
2773
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2774
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2775
LIBPNG="$ac_cv_lib_png"
2777
AC_MSG_RESULT($ac_cv_lib_png)
2786
AC_DEFUN([AC_FIND_JASPER],
2788
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2789
AC_REQUIRE([AC_FIND_JPEG])
2790
AC_MSG_CHECKING([for jasper])
2791
AC_CACHE_VAL(ac_cv_jasper,
2793
kde_save_LIBS="$LIBS"
2794
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2795
kde_save_CFLAGS="$CFLAGS"
2796
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2800
#include<jasper/jasper.h>
2803
return( jas_init() );
2805
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2806
eval "ac_cv_jasper=no"
2808
LIBS="$kde_save_LIBS"
2809
CFLAGS="$kde_save_CFLAGS"
2811
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2812
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2813
LIB_JASPER="$ac_cv_jasper"
2814
AC_MSG_RESULT($ac_cv_jasper)
2819
AC_SUBST(LIB_JASPER)
2822
AC_DEFUN([AC_CHECK_BOOL],
2824
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2827
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
2829
AC_MSG_CHECKING(if you need GNU extensions)
2830
AC_CACHE_VAL(ac_cv_gnu_extensions,
2832
cat > conftest.c << EOF
2833
#include <features.h>
2835
#ifdef __GNU_LIBRARY__
2840
if (eval "$ac_cpp conftest.c") 2>&5 |
2841
egrep "yes" >/dev/null 2>&1; then
2843
ac_cv_gnu_extensions=yes
2845
ac_cv_gnu_extensions=no
2849
AC_MSG_RESULT($ac_cv_gnu_extensions)
2850
if test "$ac_cv_gnu_extensions" = "yes"; then
2851
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2855
AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
2857
AC_MSG_CHECKING([whether $CXX supports -$1])
2858
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2859
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2863
save_CXXFLAGS="$CXXFLAGS"
2864
CXXFLAGS="$CXXFLAGS -$1"
2865
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2866
CXXFLAGS="$save_CXXFLAGS"
2869
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2880
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
2882
AC_MSG_CHECKING([whether $CC supports -$1])
2883
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2884
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
2888
save_CFLAGS="$CFLAGS"
2889
CFLAGS="$CFLAGS -$1"
2890
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
2891
CFLAGS="$save_CFLAGS"
2894
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
2906
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2907
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2908
dnl it's all white-space separated
2909
AC_DEFUN([AC_REMOVE_FORBIDDEN],
2912
if test -n "$__val"; then
2918
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2919
*) # Careful to not add spaces, where there were none, because otherwise
2920
# libtool gets confused, if we change e.g. CXX
2921
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2930
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
2932
AC_MSG_CHECKING([whether $CC is blacklisted])
2934
dnl In theory we have tu run this test against $CC and $CXX
2935
dnl in C and in C++ mode, because its perfectly legal for
2936
dnl the user to mix compiler versions, since C has a defined
2939
dnl For now, we assume the user is not on crack.
2943
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
2948
kde_bad_compiler=no,
2949
kde_bad_compiler=yes
2952
AC_MSG_RESULT($kde_bad_compiler)
2954
if test "$kde_bad_compiler" = "yes"; then
2957
This particular compiler version is blacklisted because it
2958
is known to miscompile KDE. Please use a newer version, or
2959
if that is not yet available, choose an older version.
2961
Please do not report a bug or bother us reporting this
2962
configure error. We know about it, and we introduced
2963
it by intention to avoid untraceable bugs or crashes in KDE.
2970
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2971
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2973
if test "x$kde_use_qt_emb" != "xyes"; then
2974
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2975
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2977
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2978
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2982
AC_DEFUN([AC_CHECK_COMPILERS],
2984
AC_ARG_ENABLE(debug,
2985
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
2989
kde_use_debug_code="yes"
2990
kde_use_debug_define=no
2993
kde_use_debug_code="full"
2994
kde_use_debug_define=no
2997
kde_use_debug_code="no"
2998
kde_use_debug_define=yes
3002
[kde_use_debug_code="no"
3003
kde_use_debug_define=no
3006
dnl Just for configure --help
3007
AC_ARG_ENABLE(dummyoption,
3008
AC_HELP_STRING([--disable-debug],
3009
[disables debug output and debug symbols [default=no]]),
3012
AC_ARG_ENABLE(strict,
3013
AC_HELP_STRING([--enable-strict],
3014
[compiles with strict compiler options (may not work!)]),
3016
if test $enableval = "no"; then
3017
kde_use_strict_options="no"
3019
kde_use_strict_options="yes"
3021
], [kde_use_strict_options="no"])
3023
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
3025
if test $enableval = "no"; then
3026
kde_use_warnings="no"
3028
kde_use_warnings="yes"
3030
], [kde_use_warnings="yes"])
3032
dnl enable warnings for debug build
3033
if test "$kde_use_debug_code" != "no"; then
3034
kde_use_warnings=yes
3037
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
3038
[kde_use_profiling=$enableval],
3039
[kde_use_profiling="no"]
3042
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
3049
if test "$GCC" = "yes"; then
3050
if test "$kde_use_debug_code" != "no"; then
3051
if test $kde_use_debug_code = "full"; then
3052
CFLAGS="-g3 -fno-inline $CFLAGS"
3054
CFLAGS="-g -O2 $CFLAGS"
3057
CFLAGS="-O2 $CFLAGS"
3061
if test "$kde_use_debug_define" = "yes"; then
3062
CFLAGS="-DNDEBUG $CFLAGS"
3067
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
3068
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
3071
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
3075
CXXFLAGS=" $CXXFLAGS"
3079
KDE_CHECK_FOR_BAD_COMPILER
3081
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
3082
if test "$kde_use_debug_code" != "no"; then
3083
if test "$CXX" = "KCC"; then
3084
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
3086
if test "$kde_use_debug_code" = "full"; then
3087
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
3089
CXXFLAGS="-g -O2 $CXXFLAGS"
3092
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
3094
dnl convenience compiler flags
3095
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
3096
AC_SUBST(WOVERLOADED_VIRTUAL)
3098
if test "$CXX" = "KCC"; then
3099
CXXFLAGS="+K3 $CXXFLAGS"
3101
CXXFLAGS="-O2 $CXXFLAGS"
3106
if test "$kde_use_debug_define" = "yes"; then
3107
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
3110
if test "$kde_use_profiling" = "yes"; then
3111
KDE_CHECK_COMPILER_FLAG(pg,
3113
CFLAGS="-pg $CFLAGS"
3114
CXXFLAGS="-pg $CXXFLAGS"
3118
if test "$kde_use_warnings" = "yes"; then
3119
if test "$GCC" = "yes"; then
3120
dnl ### FIXME: remove -Wno-non-virtual-dtor for KDE 4
3121
CXXFLAGS="-Wall -W -Wpointer-arith -Wno-non-virtual-dtor $CXXFLAGS"
3124
CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
3125
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
3126
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
3127
KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
3130
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
3131
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
3132
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
3136
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
3137
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
3141
AC_HELP_STRING([--enable-pch],
3142
[enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
3143
[ kde_use_pch=$enableval ],[ kde_use_pch=no ])
3145
HAVE_GCC_VISIBILITY=0
3146
AC_SUBST([HAVE_GCC_VISIBILITY])
3148
if test "$GXX" = "yes"; then
3149
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
3150
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
3151
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
3152
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
3153
ENABLE_PERMISSIVE_FLAG="-fpermissive"
3155
if test "$kde_use_pch" = "yes"; then
3156
AC_MSG_CHECKING(whether gcc supports precompiling c header files)
3158
if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
3159
kde_gcc_supports_pch=yes
3162
kde_gcc_supports_pch=no
3165
if test "$kde_gcc_supports_pch" = "yes"; then
3166
AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
3167
if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
3168
kde_gcc_supports_pch=yes
3171
kde_gcc_supports_pch=no
3175
rm -f conftest.h conftest.h.gch
3178
AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
3179
if test "$CXX" = "KCC"; then
3180
dnl unfortunately we currently cannot disable exception support in KCC
3181
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
3182
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
3183
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
3185
if test "$kde_use_pch" = "yes"; then
3186
dnl TODO: support --pch-dir!
3187
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3188
dnl the below works (but the dir must exist), but it's
3189
dnl useless for a whole package.
3190
dnl The are precompiled headers for each source file, so when compiling
3191
dnl from scratch, it doesn't make a difference, and they take up
3192
dnl around ~5Mb _per_ sourcefile.
3193
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
3194
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
3196
dnl this flag controls inlining. by default KCC inlines in optimisation mode
3197
dnl all implementations that are defined inside the class {} declaration.
3198
dnl because of templates-compatibility with broken gcc compilers, this
3199
dnl can cause excessive inlining. This flag limits it to a sane level
3200
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
3201
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
3202
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
3203
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
3204
dnl Some source files are shared between multiple executables
3205
dnl (or libraries) and some of those need template instantiations.
3206
dnl In that case KCC needs to compile those sources with
3207
dnl --one_instantiation_per_object. To make it easy for us we compile
3208
dnl _all_ objects with that flag (--one_per is a shorthand).
3209
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
3211
AC_SUBST(USE_EXCEPTIONS)
3212
dnl obsolete macro - provided to keep things going
3217
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
3218
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
3219
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
3221
if test "$GXX" = yes; then
3222
libstdcpp=`$CXX -print-file-name=libstdc++.so`
3223
if test ! -f $libstdcpp; then
3224
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])
3230
AC_VALIDIFY_CXXFLAGS
3234
if test "$GCC" = yes; then
3237
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3239
AC_ARG_ENABLE(coverage,
3240
AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
3241
if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
3242
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3243
ac_coverage_linker="-lgcc"
3244
elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
3245
ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
3246
ac_coverage_linker=""
3248
AC_MSG_ERROR([coverage with your compiler is not supported])
3250
CFLAGS="$CFLAGS $ac_coverage_compiler"
3251
CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
3252
LDFLAGS="$LDFLAGS $ac_coverage_linker"
3255
AC_SUBST(NOOPT_CXXFLAGS)
3256
AC_SUBST(NOOPT_CFLAGS)
3257
AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3259
KDE_CHECK_NEW_LDFLAGS
3264
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3267
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
3269
AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
3274
safe_CXXFLAGS=$CXXFLAGS
3275
safe_LDFLAGS=$LDFLAGS
3276
CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
3277
LDFLAGS="$LDFLAGS -shared -fPIC"
3281
/* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
3283
int some_function( void ) __attribute__ ((visibility("default")));
3284
int some_function( void )
3286
std::string s("blafasel");
3289
], [/* elvis is alive */],
3290
kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
3292
CXXFLAGS=$safe_CXXFLAGS
3293
LDFLAGS=$safe_LDFLAGS
3298
if test x$kde_cv_val_gcc_visibility_bug = xno; then
3299
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
3304
AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY],
3306
if test "$GXX" = "yes"; then
3307
KDE_CHECK_COMPILER_FLAG(fvisibility=hidden,
3309
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
3310
KDE_CHECK_VISIBILITY_GCC_BUG
3312
HAVE_GCC_VISIBILITY=1
3313
AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
3318
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
3320
AC_REQUIRE([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY])
3323
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3325
[A]M_DEPENDENCIES(CC)
3326
[A]M_DEPENDENCIES(CXX)
3329
dnl just a wrapper to clean up configure.in
3330
AC_DEFUN([KDE_PROG_LIBTOOL],
3332
AC_REQUIRE([AC_CHECK_COMPILERS])
3333
AC_REQUIRE([AC_ENABLE_SHARED])
3334
AC_REQUIRE([AC_ENABLE_STATIC])
3336
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3337
AC_REQUIRE([KDE_CHECK_LIB64])
3345
LIBTOOL_SHELL="/bin/sh ./libtool"
3346
# LIBTOOL="$LIBTOOL --silent"
3347
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3348
AC_SUBST(KDE_PLUGIN)
3350
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
3351
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
3352
AC_SUBST(KDE_CHECK_PLUGIN)
3354
# we patch configure quite some so we better keep that consistent for incremental runs
3355
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3358
AC_DEFUN([KDE_CHECK_LIB64],
3360
kdelibsuff="$kde_libs_suffix"
3361
if test -z "$kdelibsuff"; then
3364
AC_ARG_ENABLE(libsuffix,
3365
AC_HELP_STRING([--enable-libsuffix],
3366
[/lib directory suffix (64,32,none[=default])]),
3367
kdelibsuff=$enableval)
3368
# TODO: add an auto case that compiles a little C app to check
3369
# where the glibc is
3370
if test "$kdelibsuff" = "no"; then
3373
if test -z "$kdelibsuff"; then
3374
AC_MSG_RESULT([not using lib directory suffix])
3375
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3377
if test "$libdir" = '${exec_prefix}/lib'; then
3378
libdir="$libdir${kdelibsuff}"
3379
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3381
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3382
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3386
AC_DEFUN([KDE_CHECK_TYPES],
3387
[ AC_CHECK_SIZEOF(int, 4)dnl
3388
AC_CHECK_SIZEOF(short)dnl
3389
AC_CHECK_SIZEOF(long, 4)dnl
3390
AC_CHECK_SIZEOF(char *, 4)dnl
3393
dnl Not used - kept for compat only?
3394
AC_DEFUN([KDE_DO_IT_ALL],
3398
AM_INIT_AUTOMAKE($1, $2)
3399
AM_DISABLE_LIBRARIES
3400
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3407
AC_DEFUN([AC_CHECK_RPATH],
3409
AC_MSG_CHECKING(for rpath)
3410
AC_ARG_ENABLE(rpath,
3411
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
3412
USE_RPATH=$enableval, USE_RPATH=yes)
3414
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3416
KDE_RPATH="-R \$(libdir)"
3418
if test "$kde_libraries" != "$libdir"; then
3419
KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
3422
if test -n "$qt_libraries"; then
3423
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3425
dnl $x_libraries is set to /usr/lib in case
3426
if test -n "$X_LDFLAGS"; then
3427
X_RPATH="-R \$(x_libraries)"
3428
KDE_RPATH="$KDE_RPATH $X_RPATH"
3430
if test -n "$KDE_EXTRA_RPATH"; then
3431
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3434
AC_SUBST(KDE_EXTRA_RPATH)
3437
AC_MSG_RESULT($USE_RPATH)
3440
dnl Check for the type of the third argument of getsockname
3441
AC_DEFUN([AC_CHECK_SOCKLEN_T],
3443
AC_MSG_CHECKING(for socklen_t)
3444
AC_CACHE_VAL(kde_cv_socklen_t,
3449
#include <sys/types.h>
3450
#include <sys/socket.h>
3454
getpeername(0,0,&len);
3457
kde_cv_socklen_t=yes
3458
kde_cv_socklen_t_equiv=socklen_t
3462
AC_MSG_RESULT($kde_cv_socklen_t)
3463
if test $kde_cv_socklen_t = no; then
3464
AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
3465
AC_CACHE_VAL(kde_cv_socklen_t_equiv,
3467
kde_cv_socklen_t_equiv=int
3469
for t in int size_t unsigned long "unsigned long"; do
3471
#include <sys/types.h>
3472
#include <sys/socket.h>
3476
getpeername(0,0,&len);
3479
kde_cv_socklen_t_equiv="$t"
3485
AC_MSG_RESULT($kde_cv_socklen_t_equiv)
3487
AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
3488
[type to use in place of socklen_t if not defined])
3489
AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
3490
[type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3493
dnl This is a merge of some macros out of the gettext aclocal.m4
3494
dnl since we don't need anything, I took the things we need
3495
dnl the copyright for them is:
3497
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3498
dnl This Makefile.in is free software; the Free Software Foundation
3499
dnl gives unlimited permission to copy and/or distribute it,
3500
dnl with or without modifications, as long as this notice is preserved.
3502
dnl This program is distributed in the hope that it will be useful,
3503
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3504
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3505
dnl PARTICULAR PURPOSE.
3507
dnl for this file it is relicensed under LGPL
3509
AC_DEFUN([AM_KDE_WITH_NLS],
3511
dnl If we use NLS figure out what method
3513
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3514
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3515
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3517
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3518
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3525
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3526
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3528
dnl Test whether we really found GNU xgettext.
3529
if test "$XGETTEXT" != ":"; then
3530
dnl If it is no GNU xgettext we define it as : so that the
3531
dnl Makefiles still can work.
3532
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3536
[found xgettext programs is not GNU xgettext; ignore it])
3544
# Search path for a program which passes the given test.
3545
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3548
# Stephan Kulow: I appended a _KDE against name conflicts
3550
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3551
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3552
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
3553
[# Extract the first word of "$2", so it can be a program name with args.
3554
set dummy $2; ac_word=[$]2
3555
AC_MSG_CHECKING([for $ac_word])
3556
AC_CACHE_VAL(ac_cv_path_$1,
3559
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3562
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3563
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3564
test -z "$ac_dir" && ac_dir=.
3565
if test -f $ac_dir/$ac_word; then
3567
ac_cv_path_$1="$ac_dir/$ac_word"
3573
dnl If no 4th arg is given, leave the cache variable unset,
3574
dnl so AC_PATH_PROGS will keep looking.
3575
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3580
if test -n "[$]$1"; then
3581
AC_MSG_RESULT([$]$1)
3589
# Check whether LC_MESSAGES is available in <locale.h>.
3590
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3594
AC_DEFUN([AM_LC_MESSAGES],
3595
[if test $ac_cv_header_locale_h = yes; then
3596
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3597
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3598
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3599
if test $am_cv_val_LC_MESSAGES = yes; then
3600
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3604
dnl From Jim Meyering.
3605
dnl FIXME: migrate into libit.
3607
AC_DEFUN([AM_FUNC_OBSTACK],
3608
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3609
[AC_TRY_LINK([#include "obstack.h"],
3610
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3611
am_cv_func_obstack=yes,
3612
am_cv_func_obstack=no)])
3613
if test $am_cv_func_obstack = yes; then
3614
AC_DEFINE(HAVE_OBSTACK)
3616
LIBOBJS="$LIBOBJS obstack.o"
3620
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3621
dnl FIXME: Migrate into libit
3623
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3624
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3625
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3626
am_cv_lib_error_at_line=yes,
3627
am_cv_lib_error_at_line=no)])
3628
if test $am_cv_lib_error_at_line = no; then
3629
LIBOBJS="$LIBOBJS error.o"
3631
AC_SUBST(LIBOBJS)dnl
3634
# Macro to add for using GNU gettext.
3635
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3638
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3640
AC_DEFUN([AM_KDE_GNU_GETTEXT],
3641
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3642
AC_REQUIRE([AC_PROG_RANLIB])dnl
3643
AC_REQUIRE([AC_HEADER_STDC])dnl
3644
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3645
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3646
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3647
AC_REQUIRE([AC_FUNC_MMAP])dnl
3648
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3649
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3650
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3651
__argz_count __argz_stringify __argz_next])
3653
AC_MSG_CHECKING(for stpcpy)
3654
AC_CACHE_VAL(kde_cv_func_stpcpy,
3656
kde_safe_cxxflags=$CXXFLAGS
3665
stpcpy(buffer, buffer);
3667
kde_cv_func_stpcpy=yes,
3668
kde_cv_func_stpcpy=no)
3670
CXXFLAGS=$kde_safe_cxxflags
3672
AC_MSG_RESULT($kde_cv_func_stpcpy)
3673
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3674
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3679
if test "x$CATOBJEXT" != "x"; then
3680
if test "x$ALL_LINGUAS" = "x"; then
3683
AC_MSG_CHECKING(for catalogs to be installed)
3685
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3686
case "$ALL_LINGUAS" in
3687
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3690
LINGUAS=$NEW_LINGUAS
3691
AC_MSG_RESULT($LINGUAS)
3694
dnl Construct list of names of catalog files to be constructed.
3695
if test -n "$LINGUAS"; then
3696
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3702
AC_DEFUN([AC_HAVE_XPM],
3703
[AC_REQUIRE_CPP()dnl
3704
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3706
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3707
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3709
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
3710
xpm_test=$withval, xpm_test="yes")
3711
if test "x$xpm_test" = xno; then
3714
AC_MSG_CHECKING(for XPM)
3715
AC_CACHE_VAL(ac_cv_have_xpm,
3717
ac_save_ldflags="$LDFLAGS"
3718
ac_save_cflags="$CFLAGS"
3719
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3720
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3722
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3724
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3725
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3726
AC_TRY_LINK([#include <X11/xpm.h>],[],
3727
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3728
LDFLAGS="$ac_save_ldflags"
3729
CFLAGS="$ac_save_cflags"
3732
if test "$ac_cv_have_xpm" = no; then
3738
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3739
if test "$XPM_LDFLAGS" = ""; then
3740
XPMLIB='-lXpm $(LIB_X11)'
3742
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3744
if test "$XPM_INCLUDE" = ""; then
3747
XPMINC="-I$XPM_INCLUDE"
3757
AC_DEFUN([AC_HAVE_DPMS],
3758
[AC_REQUIRE_CPP()dnl
3759
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3761
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3762
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3765
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
3766
dpms_test=$withval, dpms_test="yes")
3767
if test "x$dpms_test" = xno; then
3770
AC_MSG_CHECKING(for DPMS)
3771
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3772
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3773
AC_CACHE_VAL(ac_cv_have_dpms,
3775
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3777
ac_cv_have_dpms="no"
3779
ac_save_ldflags="$LDFLAGS"
3780
ac_save_cflags="$CFLAGS"
3781
ac_save_libs="$LIBS"
3782
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3783
CFLAGS="$CFLAGS $X_INCLUDES"
3784
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3786
#include <X11/Xproto.h>
3788
#include <X11/Xlib.h>
3789
#include <X11/extensions/dpms.h>
3791
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3792
ac_cv_have_dpms="yes", [
3793
LDFLAGS="$ac_save_ldflags"
3794
CFLAGS="$ac_save_cflags"
3795
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3796
LIBS="$LIBS -lXdpms"
3797
CFLAGS="$CFLAGS $X_INCLUDES"
3798
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3800
#include <X11/Xproto.h>
3802
#include <X11/Xlib.h>
3803
#include <X11/extensions/dpms.h>
3805
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3807
ac_cv_have_dpms="-lXdpms"
3808
],ac_cv_have_dpms="no")
3810
LDFLAGS="$ac_save_ldflags"
3811
CFLAGS="$ac_save_cflags"
3812
LIBS="$ac_save_libs"
3816
if test "$ac_cv_have_dpms" = no; then
3822
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3823
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3826
if test "$DPMS_LDFLAGS" = ""; then
3827
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3829
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3831
if test "$DPMS_INCLUDE" = ""; then
3834
DPMSINC="-I$DPMS_INCLUDE"
3840
ac_save_cflags="$CFLAGS"
3841
CFLAGS="$CFLAGS $X_INCLUDES"
3842
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3843
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
3844
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3845
AC_CHECK_DECL(DPMSCapable,
3846
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3847
[#include <X11/extensions/dpms.h>])
3848
AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3849
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3850
AC_CHECK_DECL(DPMSInfo,
3851
AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3852
[#include <X11/extensions/dpms.h>])
3853
CFLAGS="$ac_save_cflags"
3858
AC_DEFUN([AC_HAVE_GL],
3859
[AC_REQUIRE_CPP()dnl
3860
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3862
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3863
test -z "$GL_INCLUDE" && GL_INCLUDE=
3865
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
3866
gl_test=$withval, gl_test="yes")
3867
if test "x$kde_use_qt_emb" = "xyes"; then
3868
# GL and Qt Embedded is a no-go for now.
3870
elif test "x$gl_test" = xno; then
3873
AC_MSG_CHECKING(for GL)
3874
AC_CACHE_VAL(ac_cv_have_gl,
3878
ac_save_ldflags=$LDFLAGS
3879
ac_save_cxxflags=$CXXFLAGS
3881
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
3882
LIBS="$LIBS -lGL -lGLU"
3883
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
3884
LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
3885
CXXFLAGS="$CFLAGS $X_INCLUDES"
3886
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3887
AC_TRY_LINK([#include <GL/gl.h>
3890
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3892
LDFLAGS=$ac_save_ldflags
3893
CXXFLAGS=$ac_save_cxxflags
3897
if test "$ac_cv_have_gl" = "no"; then
3903
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3904
if test "$GL_LDFLAGS" = ""; then
3905
GLLIB='-lGLU -lGL $(LIB_X11)'
3907
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3909
if test "$GL_INCLUDE" = ""; then
3912
GLINC="-I$GL_INCLUDE"
3914
AC_MSG_RESULT($ac_cv_have_gl)
3923
dnl shadow password and PAM magic - maintained by ossi@kde.org
3925
AC_DEFUN([KDE_PAM], [
3926
AC_REQUIRE([KDE_CHECK_LIBDL])
3930
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
3931
[ if test "x$withval" = "xyes"; then
3934
elif test "x$withval" = "xno"; then
3938
pam_service=$withval
3940
], [ pam_service=kde ])
3944
if test "x$want_pam" != xno; then
3945
AC_CHECK_LIB(pam, pam_start, [
3946
AC_CHECK_HEADER(security/pam_appl.h,
3947
[ pam_header=security/pam_appl.h ],
3948
[ AC_CHECK_HEADER(pam/pam_appl.h,
3949
[ pam_header=pam/pam_appl.h ],
3951
AC_MSG_WARN([PAM detected, but no headers found!
3952
Make sure you have the necessary development packages installed.])
3958
if test -z "$pam_header"; then
3959
if test "x$want_pam" = xyes; then
3960
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
3963
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3964
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3967
dnl darwin claims to be something special
3968
if test "$pam_header" = "pam/pam_appl.h"; then
3969
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
3972
dnl test whether struct pam_message is const (Linux) or not (Sun)
3973
AC_MSG_CHECKING(for const pam_message)
3974
AC_EGREP_HEADER([struct pam_message], $pam_header,
3975
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3976
[AC_MSG_RESULT([const: Linux-type PAM])],
3977
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3978
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3980
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3987
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3988
AC_DEFUN([DEF_PAM_SERVICE], [
3990
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
3991
[ if test "x$use_pam" = xyes; then
3992
$3_PAM_SERVICE=$withval
3994
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3995
You may want to enforce it by using --with-pam.])
3998
[ if test "x$use_pam" = xyes; then
3999
$3_PAM_SERVICE="$pam_service"
4002
if test -n "$$3_PAM_SERVICE"; then
4003
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
4004
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
4006
AC_SUBST($3_PAM_SERVICE)
4009
AC_DEFUN([KDE_SHADOWPASSWD], [
4010
AC_REQUIRE([KDE_PAM])
4012
AC_CHECK_LIB(shadow, getspent,
4013
[ LIBSHADOW="-lshadow"
4017
AC_CHECK_LIB(gen, getspent,
4021
[ AC_CHECK_FUNC(getspent,
4022
[ ac_use_shadow=yes ],
4023
[ ac_use_shadow=no ])
4029
AC_MSG_CHECKING([for shadow passwords])
4032
AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
4033
[ if test "x$withval" != "xno"; then
4039
use_shadow="$ac_use_shadow"
4042
if test "x$use_shadow" = xyes; then
4044
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
4051
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
4052
dnl this still applies, if we could use it indirectly through pam.
4053
if test "x$use_shadow" = xyes ||
4054
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
4056
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
4057
SETUIDFLAGS="-m 4755 -o root";;
4059
SETUIDFLAGS="-m 4755";;
4062
AC_SUBST(SETUIDFLAGS)
4066
AC_DEFUN([KDE_PASSWDLIBS], [
4067
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
4068
AC_REQUIRE([KDE_PAM])
4069
AC_REQUIRE([KDE_SHADOWPASSWD])
4071
if test "x$use_pam" = "xyes"; then
4072
PASSWDLIBS="$PAMLIBS"
4074
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
4077
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
4078
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
4079
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
4080
dnl may need to read /etc/master.passwd).
4083
SETUIDFLAGS="-m 4755 -o root"
4089
AC_SUBST(PASSWDLIBS)
4092
AC_DEFUN([KDE_CHECK_LIBDL],
4094
AC_CHECK_LIB(dl, dlopen, [
4096
ac_cv_have_dlfcn=yes
4099
AC_CHECK_LIB(dld, shl_unload, [
4101
ac_cv_have_shload=yes
4107
AC_DEFUN([KDE_CHECK_DLOPEN],
4110
AC_CHECK_HEADERS(dlfcn.h dl.h)
4111
if test "$ac_cv_header_dlfcn_h" = "no"; then
4115
if test "$ac_cv_header_dl_h" = "no"; then
4116
ac_cv_have_shload=no
4119
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
4121
AC_ARG_ENABLE(dlopen,
4122
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
4123
enable_dlopen=$enableval,
4126
# override the user's opinion, if we know it better ;)
4127
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
4131
if test "$ac_cv_have_dlfcn" = "yes"; then
4132
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
4135
if test "$ac_cv_have_shload" = "yes"; then
4136
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
4139
if test "$enable_dlopen" = no ; then
4140
test -n "$1" && eval $1
4142
test -n "$2" && eval $2
4147
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
4149
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
4151
AC_MSG_CHECKING([dynamic loading])
4152
eval "`egrep '^build_libtool_libs=' libtool`"
4153
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
4155
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
4159
AC_MSG_RESULT($dynamic_loading)
4160
if test "$dynamic_loading" = "yes"; then
4167
AC_DEFUN([KDE_ADD_INCLUDES],
4169
if test -z "$1"; then
4170
test_include="Pix.h"
4175
AC_MSG_CHECKING([for libg++ ($test_include)])
4177
AC_CACHE_VAL(kde_cv_libgpp_includes,
4179
kde_cv_libgpp_includes=no
4185
/usr/unsupported/include \
4190
if test -r "$ac_dir/$test_include"; then
4191
kde_cv_libgpp_includes=$ac_dir
4197
AC_MSG_RESULT($kde_cv_libgpp_includes)
4198
if test "$kde_cv_libgpp_includes" != "no"; then
4199
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
4204
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
4206
dnl This code is here specifically to handle the
4207
dnl various flavors of threading library on FreeBSD
4208
dnl 4-, 5-, and 6-, and the (weird) rules around it.
4209
dnl There may be an environment PTHREAD_LIBS that
4210
dnl specifies what to use; otherwise, search for it.
4211
dnl -pthread is special cased and unsets LIBPTHREAD
4215
if test -n "$PTHREAD_LIBS"; then
4216
if test "x$PTHREAD_LIBS" = "x-pthread" ; then
4217
LIBPTHREAD="PTHREAD"
4219
PTHREAD_LIBS_save="$PTHREAD_LIBS"
4220
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
4221
AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
4222
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
4223
LIBPTHREAD="$PTHREAD_LIBS_save"])
4224
PTHREAD_LIBS="$PTHREAD_LIBS_save"
4228
dnl Is this test really needed, in the face of the Tru64 test below?
4229
if test -z "$LIBPTHREAD"; then
4230
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
4233
dnl This is a special Tru64 check, see BR 76171 issue #18.
4234
if test -z "$LIBPTHREAD" ; then
4235
AC_MSG_CHECKING([for pthread_create in -lpthread])
4237
LIBS="$LIBS -lpthread"
4238
AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
4240
LIBPTHREAD="-lpthread"],[
4245
dnl Un-special-case for FreeBSD.
4246
if test "x$LIBPTHREAD" = "xPTHREAD" ; then
4250
AC_SUBST(LIBPTHREAD)
4253
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
4256
if test -z "$LIBPTHREAD"; then
4257
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
4260
AH_VERBATIM(__svr_define, [
4261
#if defined(__SVR4) && !defined(__svr4__)
4267
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4268
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4271
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
4274
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4275
LIBPTHREAD="$LIBPTHREAD -lc_r"
4277
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4278
if test "$CXX" = "KCC"; then
4279
CXXFLAGS="$CXXFLAGS --thread_safe"
4280
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4286
AC_SUBST(USE_THREADS)
4287
AC_SUBST(LIBPTHREAD)
4290
AC_DEFUN([KDE_CHECK_THREADING],
4292
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4293
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4294
dnl default is yes if libpthread is found and no if no libpthread is available
4295
if test -z "$LIBPTHREAD"; then
4296
if test -z "$USE_THREADS"; then
4297
kde_check_threading_default=no
4299
kde_check_threading_default=yes
4302
kde_check_threading_default=yes
4304
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
4305
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4306
if test "x$kde_use_threading" = "xyes"; then
4307
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4311
AC_DEFUN([KDE_TRY_LINK_PYTHON],
4313
if test "$kde_python_link_found" = no; then
4315
if test "$1" = normal; then
4316
AC_MSG_CHECKING(if a Python application links)
4318
AC_MSG_CHECKING(if Python depends on $2)
4321
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4323
kde_save_cflags="$CFLAGS"
4324
CFLAGS="$CFLAGS $PYTHONINC"
4325
kde_save_libs="$LIBS"
4326
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4327
kde_save_ldflags="$LDFLAGS"
4328
LDFLAGS="$LDFLAGS $PYTHONLIB"
4334
PySys_SetArgv(1, 0);
4336
[kde_cv_try_link_python_$1=yes],
4337
[kde_cv_try_link_python_$1=no]
4339
CFLAGS="$kde_save_cflags"
4340
LIBS="$kde_save_libs"
4341
LDFLAGS="$kde_save_ldflags"
4344
if test "$kde_cv_try_link_python_$1" = "yes"; then
4346
kde_python_link_found=yes
4347
if test ! "$1" = normal; then
4348
LIBPYTHON="$LIBPYTHON $2"
4360
AC_DEFUN([KDE_CHECK_PYTHON_DIR],
4362
AC_MSG_CHECKING([for Python directory])
4364
AC_CACHE_VAL(kde_cv_pythondir,
4366
if test -z "$PYTHONDIR"; then
4367
kde_cv_pythondir=/usr/local
4369
kde_cv_pythondir="$PYTHONDIR"
4373
AC_ARG_WITH(pythondir,
4374
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
4376
ac_python_dir=$withval
4377
], ac_python_dir=$kde_cv_pythondir
4380
AC_MSG_RESULT($ac_python_dir)
4383
AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
4385
AC_REQUIRE([KDE_CHECK_LIBDL])
4386
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4387
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4389
if test -z "$1"; then
4395
AC_MSG_CHECKING([for Python$version])
4397
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4398
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4399
if test ! -r $python_incdir/Python.h; then
4400
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4401
python_incdir=$python_incdir/python$version
4402
if test ! -r $python_incdir/Python.h; then
4407
PYTHONINC=-I$python_incdir
4409
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
4410
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
4411
if test ! -r $python_libdir/libpython$version.so; then
4412
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4413
if test ! -r $python_libdir/libpython$version.a; then
4414
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4415
python_libdir=$python_libdir/python$version/config
4416
if test ! -r $python_libdir/libpython$version.a; then
4422
PYTHONLIB=-L$python_libdir
4423
kde_orig_LIBPYTHON=$LIBPYTHON
4424
if test -z "$LIBPYTHON"; then
4425
LIBPYTHON=-lpython$version
4428
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4429
python_moddir=$python_moddir/python$version
4430
if test ! -r $python_moddir/copy.py; then
4434
PYTHONMODDIR=$python_moddir
4436
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4438
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4439
LIBPYTHON=$kde_orig_LIBPYTHON
4440
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4441
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4444
dnl Note: this test is very weak
4445
kde_python_link_found=no
4446
KDE_TRY_LINK_PYTHON(normal)
4447
KDE_TRY_LINK_PYTHON(m, -lm)
4448
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4449
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4450
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4451
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4452
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4453
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4454
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4455
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4456
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4457
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4458
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4459
[AC_MSG_WARN([it seems, Python depends on another library.
4460
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4461
and contact the authors to let them know about this problem])
4464
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4468
AC_SUBST(PYTHONMODDIR)
4469
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4475
AC_DEFUN([KDE_CHECK_PYTHON],
4477
KDE_CHECK_PYTHON_INTERN("2.4",
4478
[KDE_CHECK_PYTHON_INTERN("2.3",
4479
[KDE_CHECK_PYTHON_INTERN("2.2",
4480
[KDE_CHECK_PYTHON_INTERN("2.1",
4481
[KDE_CHECK_PYTHON_INTERN("2.0",
4482
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4489
AC_DEFUN([KDE_CHECK_STL],
4493
ac_save_CXXFLAGS="$CXXFLAGS"
4494
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4496
AC_MSG_CHECKING([if C++ programs can be compiled])
4497
AC_CACHE_VAL(kde_cv_stl_works,
4501
using namespace std;
4503
string astring="Hallo Welt.";
4504
astring.erase(0, 6); // now astring is "Welt"
4506
], kde_cv_stl_works=yes,
4507
kde_cv_stl_works=no)
4510
AC_MSG_RESULT($kde_cv_stl_works)
4512
if test "$kde_cv_stl_works" = "yes"; then
4514
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4516
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4517
Check config.log for details - if you're using a Linux distribution you might miss
4518
a package named similar to libstdc++-dev.])
4521
CXXFLAGS="$ac_save_CXXFLAGS"
4525
AC_DEFUN([AC_FIND_QIMGIO],
4526
[AC_REQUIRE([AC_FIND_JPEG])
4527
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4528
AC_MSG_CHECKING([for qimgio])
4529
AC_CACHE_VAL(ac_cv_lib_qimgio,
4533
ac_save_LIBS="$LIBS"
4534
ac_save_CXXFLAGS="$CXXFLAGS"
4535
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4536
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4539
#include <qimageio.h>
4540
#include <qstring.h>
4542
QString t = "hallo";
4547
ac_cv_lib_qimgio=yes,
4548
ac_cv_lib_qimgio=no,
4549
ac_cv_lib_qimgio=no)
4550
LIBS="$ac_save_LIBS"
4551
CXXFLAGS="$ac_save_CXXFLAGS"
4554
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4555
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4557
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4560
AC_MSG_RESULT(not found)
4564
AC_DEFUN([AM_DISABLE_LIBRARIES],
4566
AC_PROVIDE([AM_ENABLE_STATIC])
4567
AC_PROVIDE([AM_ENABLE_SHARED])
4573
AC_DEFUN([AC_CHECK_UTMP_FILE],
4575
AC_MSG_CHECKING([for utmp file])
4577
AC_CACHE_VAL(kde_cv_utmp_file,
4588
if test -r "$ac_file"; then
4589
kde_cv_utmp_file=$ac_file
4595
if test "$kde_cv_utmp_file" != "no"; then
4596
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4598
AC_MSG_RESULT($kde_cv_utmp_file)
4601
AC_MSG_RESULT([non found])
4606
AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
4609
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4612
if test ! -s $srcdir/subdirs; then
4613
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4614
files=`cd $srcdir && ls -1`
4615
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4617
echo $i >> $srcdir/subdirs
4622
if test -s $srcdir/inst-apps; then
4623
ac_topsubdirs="`cat $srcdir/inst-apps`"
4624
elif test -s $srcdir/subdirs; then
4625
ac_topsubdirs="`cat $srcdir/subdirs`"
4628
for i in $ac_topsubdirs; do
4629
AC_MSG_CHECKING([if $i should be compiled])
4630
if test -d $srcdir/$i; then
4632
for j in $DO_NOT_COMPILE; do
4633
if test $i = $j; then
4640
AC_MSG_RESULT($install_it)
4641
vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4642
if test $install_it = "yes"; then
4643
TOPSUBDIRS="$TOPSUBDIRS $i"
4644
eval "$vari""_SUBDIR_included=yes"
4646
eval "$vari""_SUBDIR_included=no"
4650
AC_SUBST(TOPSUBDIRS)
4653
AC_DEFUN([KDE_CHECK_NAMESPACES],
4655
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4669
int Foo::Bar::i = 1;
4672
AC_DEFINE(HAVE_NAMESPACES)
4679
dnl ------------------------------------------------------------------------
4680
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4681
dnl ------------------------------------------------------------------------
4683
AC_DEFUN([AC_CHECK_S_ISSOCK],
4685
AC_MSG_CHECKING(for S_ISSOCK)
4686
AC_CACHE_VAL(ac_cv_have_s_issock,
4690
#include <sys/stat.h>
4694
int b = S_ISSOCK( buff.st_mode );
4696
ac_cv_have_s_issock=yes,
4697
ac_cv_have_s_issock=no)
4699
AC_MSG_RESULT($ac_cv_have_s_issock)
4700
if test "$ac_cv_have_s_issock" = "yes"; then
4701
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4704
AH_VERBATIM(_ISSOCK,
4706
#ifndef HAVE_S_ISSOCK
4707
#define HAVE_S_ISSOCK
4708
#define S_ISSOCK(mode) (1==0)
4714
dnl ------------------------------------------------------------------------
4715
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4716
dnl ------------------------------------------------------------------------
4718
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
4720
AC_MSG_CHECKING(for MAXPATHLEN)
4721
AC_CACHE_VAL(ac_cv_maxpathlen,
4723
cat > conftest.$ac_ext <<EOF
4725
# include <stdlib.h>
4728
#include <sys/param.h>
4730
#define MAXPATHLEN 1024
4733
KDE_HELLO MAXPATHLEN
4737
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4739
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4740
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4742
ac_cv_maxpathlen=1024
4748
AC_MSG_RESULT($ac_cv_maxpathlen)
4749
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4752
AC_DEFUN([KDE_CHECK_HEADER],
4754
kde_safe_cppflags=$CPPFLAGS
4755
CPPFLAGS="$CPPFLAGS $all_includes"
4758
AC_CHECK_HEADER([$1], [$2], [$3], [$4])
4760
CPPFLAGS=$kde_safe_cppflags
4763
AC_DEFUN([KDE_CHECK_HEADERS],
4765
AH_CHECK_HEADERS([$1])
4767
kde_safe_cppflags=$CPPFLAGS
4768
CPPFLAGS="$CPPFLAGS $all_includes"
4770
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4771
CPPFLAGS=$kde_safe_cppflags
4775
AC_DEFUN([KDE_FAST_CONFIGURE],
4777
dnl makes configure fast (needs perl)
4778
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
4779
with_fast_perl=$enableval, with_fast_perl=yes)
4782
AC_DEFUN([KDE_CONF_FILES],
4785
if test -f $srcdir/configure.files ; then
4786
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4789
if test -n "$val" ; then
4791
CONF_FILES="$CONF_FILES $i"
4794
AC_SUBST(CONF_FILES)
4797
dnl This sets the prefix, for arts and kdelibs
4798
dnl Do NOT use in any other module.
4799
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
4800
AC_DEFUN([KDE_SET_PREFIX_CORE],
4803
dnl make $KDEDIR the default for the installation
4804
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4806
if test "x$prefix" = "xNONE"; then
4807
prefix=$ac_default_prefix
4808
ac_configure_args="$ac_configure_args --prefix=$prefix"
4810
# And delete superfluous '/' to make compares easier
4811
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4812
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4814
kde_libs_prefix='$(prefix)'
4815
kde_libs_htmldir='$(kde_htmldir)'
4816
AC_SUBST(kde_libs_prefix)
4817
AC_SUBST(kde_libs_htmldir)
4823
AC_DEFUN([KDE_SET_PREFIX],
4826
dnl We can't give real code to that macro, only a value.
4827
dnl It only matters for --help, since we set the prefix in this function anyway.
4828
AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
4830
KDE_SET_DEFAULT_BINDIRS
4831
if test "x$prefix" = "xNONE"; then
4832
dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
4833
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4835
dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
4836
kde_save_PATH="$PATH"
4837
PATH="$exec_prefix/bin:$prefix/bin:$PATH"
4838
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
4839
PATH="$kde_save_PATH"
4842
kde_libs_prefix=`$KDECONFIG --prefix`
4843
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
4844
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
4845
This means it has been moved since you installed it.
4846
This won't work. Please recompile kdelibs for the new prefix.
4849
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
4850
kde_libs_suffix=`$KDECONFIG --libsuffix`
4852
AC_MSG_CHECKING([where to install])
4853
if test "x$prefix" = "xNONE"; then
4854
prefix=$kde_libs_prefix
4855
AC_MSG_RESULT([$prefix (as returned by kde-config)])
4857
dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
4858
given_prefix=$prefix
4859
AC_MSG_RESULT([$prefix (as requested)])
4862
# And delete superfluous '/' to make compares easier
4863
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4864
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4865
given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4868
AC_SUBST(kde_libs_prefix)
4869
AC_SUBST(kde_libs_htmldir)
4875
pushdef([AC_PROG_INSTALL],
4877
dnl our own version, testing for a -p flag
4878
popdef([AC_PROG_INSTALL])
4879
dnl as AC_PROG_INSTALL works as it works we first have
4880
dnl to save if the user didn't specify INSTALL, as the
4881
dnl autoconf one overwrites INSTALL and we have no chance to find
4883
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4884
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4885
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4888
if test -z "$kde_save_INSTALL_given" ; then
4889
# OK, user hasn't given any INSTALL, autoconf found one for us
4890
# now we test, if it supports the -p flag
4891
AC_MSG_CHECKING(for -p flag to install)
4892
rm -f confinst.$$.* > /dev/null 2>&1
4893
echo "Testtest" > confinst.$$.orig
4895
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4896
if test -f confinst.$$.new ; then
4897
# OK, -p seems to do no harm to install
4898
INSTALL="${INSTALL} -p"
4903
AC_MSG_RESULT($ac_res)
4905
dnl the following tries to resolve some signs and wonders coming up
4906
dnl with different autoconf/automake versions
4908
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4909
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4910
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4911
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4912
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4913
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4914
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4915
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4916
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4917
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4918
dnl automake (due to broken Makefile.am or whatever) to install programs,
4919
dnl and so does not see the -s flag in automake > 1.4
4920
dnl to clean up that mess we:
4921
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4922
dnl which cleans KDE's program with automake > 1.4;
4923
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4924
dnl with automake<=1.4
4925
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4926
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4928
dnl And to all this comes, that I even can't write in comments variable
4929
dnl names used by automake, because it is so stupid to think I wanted to
4930
dnl _use_ them, therefor I have written A_M_... instead of AM_
4931
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4933
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4934
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4936
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4937
INSTALL_SCRIPT='${INSTALL}'
4941
AC_DEFUN([KDE_LANG_CPLUSPLUS],
4943
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4944
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4947
pushdef([AC_LANG_CPLUSPLUS],
4948
[popdef([AC_LANG_CPLUSPLUS])
4952
AC_DEFUN([KDE_CHECK_LONG_LONG],
4954
AC_MSG_CHECKING(for long long)
4955
AC_CACHE_VAL(kde_cv_c_long_long,
4963
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4966
AC_MSG_RESULT($kde_cv_c_long_long)
4967
if test "$kde_cv_c_long_long" = yes; then
4968
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4972
AC_DEFUN([KDE_CHECK_LIB],
4974
kde_save_LDFLAGS="$LDFLAGS"
4975
dnl AC_CHECK_LIB modifies LIBS, so save it here
4976
kde_save_LIBS="$LIBS"
4977
LDFLAGS="$LDFLAGS $all_libraries"
4979
aix*) LDFLAGS="-brtl $LDFLAGS"
4980
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4983
AC_CHECK_LIB($1, $2, $3, $4, $5)
4984
LDFLAGS="$kde_save_LDFLAGS"
4985
LIBS="$kde_save_LIBS"
4988
AC_DEFUN([KDE_JAVA_PREFIX],
4991
base=`basename "$1"`
4992
list=`ls -1 $dir 2> /dev/null`
4993
for entry in $list; do
4994
if test -d $dir/$entry/bin; then
4997
javadirs="$javadirs $dir/$entry/bin"
5000
elif test -d $dir/$entry/jre/bin; then
5003
javadirs="$javadirs $dir/$entry/jre/bin"
5010
dnl KDE_CHEC_JAVA_DIR(onlyjre)
5011
AC_DEFUN([KDE_CHECK_JAVA_DIR],
5015
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
5016
[ ac_java_dir=$withval
5020
AC_MSG_CHECKING([for Java])
5022
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
5023
if test "x$ac_java_dir" = "xno"; then
5025
kde_java_includedir=no
5026
kde_java_libjvmdir=no
5027
kde_java_libgcjdir=no
5028
kde_java_libhpidir=no
5030
if test "x$ac_java_dir" = "x"; then
5033
dnl No option set -> collect list of candidate paths
5034
if test -n "$JAVA_HOME"; then
5035
KDE_JAVA_PREFIX($JAVA_HOME)
5037
KDE_JAVA_PREFIX(/usr/j2se)
5038
KDE_JAVA_PREFIX(/usr/lib/j2se)
5039
KDE_JAVA_PREFIX(/usr/j*dk*)
5040
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
5041
KDE_JAVA_PREFIX(/opt/j*sdk*)
5042
KDE_JAVA_PREFIX(/usr/lib/java*)
5043
KDE_JAVA_PREFIX(/usr/java*)
5044
KDE_JAVA_PREFIX(/usr/java/j*dk*)
5045
KDE_JAVA_PREFIX(/usr/java/j*re*)
5046
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
5047
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
5048
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
5049
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
5050
KDE_JAVA_PREFIX(/opt/java*)
5055
for dir in $PATH; do
5056
if test -d "$dir"; then
5057
javadirs="$javadirs $dir"
5063
dnl Now javadirs contains a list of paths that exist, all ending with bin/
5064
for dir in $javadirs; do
5065
dnl Check for the java executable
5066
if test -x "$dir/java"; then
5067
dnl And also check for a libjvm.so somewhere under there
5068
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
5069
if test "$dir" != "/usr/bin"; then
5070
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5071
if test ! -f $libjvmdir/libjvm.so; then continue; fi
5072
jredirs="$jredirs $dir"
5077
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
5081
for dir in $jredirs; do
5083
kde_java_bindir=$dir
5084
if test -x "$dir/javac"; then
5090
if test -n "$JAVAC"; then
5091
dnl this substitution might not work - well, we test for jni.h below
5092
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
5094
kde_java_includedir=no
5097
dnl config option set
5098
kde_java_bindir=$ac_java_dir/bin
5099
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
5100
kde_java_includedir=no
5102
kde_java_includedir=$ac_java_dir/include
5107
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
5108
if test "x$kde_java_bindir" != "xno"; then
5110
dnl Look for libjvm.so
5111
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
5112
dnl Look for libgcj.so
5113
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
5114
dnl Look for libhpi.so and avoid green threads
5115
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
5117
dnl Now check everything's fine under there
5118
dnl the include dir is our flag for having the JDK
5119
if test -d "$kde_java_includedir"; then
5120
if test ! -x "$kde_java_bindir/javac"; then
5121
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
5123
if test ! -x "$kde_java_bindir/javah"; then
5124
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5126
if test ! -x "$kde_java_bindir/jar"; then
5127
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5129
if test ! -r "$kde_java_includedir/jni.h"; then
5130
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
5133
jni_includes="-I$kde_java_includedir"
5134
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
5135
dnl and under linux here..
5137
dnl not needed for gcj
5139
if test "x$kde_java_libgcjdir" = "x"; then
5140
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
5141
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
5142
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
5150
if test "x$kde_java_libgcjdir" = "x"; then
5151
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
5152
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
5155
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
5156
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
5160
if test ! -x "$kde_java_bindir/java"; then
5161
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
5164
dnl not needed for gcj compile
5166
if test "x$kde_java_libgcjdir" = "x"; then
5167
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
5168
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
5172
if test -n "$jni_includes"; then
5173
dnl Check for JNI version
5176
ac_cxxflags_safe="$CXXFLAGS"
5177
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
5183
#ifndef JNI_VERSION_1_2
5186
],[ kde_jni_works=yes ],
5187
[ kde_jni_works=no ])
5189
if test $kde_jni_works = no; then
5190
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
5191
You need to have Java Development Kit (JDK) version 1.2.
5193
Use --with-java to specify another location.
5194
Use --without-java to configure without java support.
5195
Or download a newer JDK and try again.
5196
See e.g. http://java.sun.com/products/jdk/1.2 ])
5199
CXXFLAGS="$ac_cxxflags_safe"
5202
dnl All tests ok, inform and subst the variables
5204
JAVAC=$kde_java_bindir/javac
5205
JAVAH=$kde_java_bindir/javah
5206
JAR=$kde_java_bindir/jar
5207
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5208
if test "x$kde_java_libgcjdir" = "x"; then
5209
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
5211
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
5213
AC_MSG_RESULT([java JDK in $kde_java_bindir])
5216
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5217
AC_MSG_RESULT([java JRE in $kde_java_bindir])
5219
elif test -d "/Library/Java/Home"; then
5220
kde_java_bindir="/Library/Java/Home/bin"
5221
jni_includes="-I/Library/Java/Home/include"
5223
JAVAC=$kde_java_bindir/javac
5224
JAVAH=$kde_java_bindir/javah
5225
JAR=$kde_java_bindir/jar
5226
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
5228
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
5229
AC_MSG_RESULT([Apple Java Framework])
5231
AC_MSG_RESULT([none found])
5238
AC_SUBST(jni_includes)
5240
# for backward compat
5241
kde_cv_java_includedir=$kde_java_includedir
5242
kde_cv_java_bindir=$kde_java_bindir
5245
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5246
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5247
dnl big packages, m4_foreach is dog-slow. So use our own version of
5248
dnl it. (matz@kde.org)
5249
m4_define([mm_foreach],
5250
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5251
m4_define([mm_car], [[$1]])
5252
m4_define([mm_car2], [[$@]])
5253
m4_define([_mm_foreach],
5254
[m4_if(m4_quote($2), [], [],
5255
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5256
mm_car2(m4_shift($2)),
5258
m4_define([AC_FOREACH],
5259
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5261
AC_DEFUN([KDE_NEED_FLEX],
5264
LIBS="$LIBS $USER_LDFLAGS"
5267
if test -z "$LEXLIB"; then
5268
AC_MSG_ERROR([You need to have flex installed.])
5273
AC_DEFUN([AC_PATH_QTOPIA],
5275
dnl TODO: use AC_CACHE_VAL
5277
if test -z "$1"; then
5282
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5283
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5284
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5287
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5288
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5290
AC_REQUIRE([AC_PATH_QT])
5292
AC_MSG_CHECKING([for Qtopia])
5295
AC_SUBST(LIB_QTOPIA)
5297
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5301
AC_ARG_WITH(qtopia-dir,
5302
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
5303
[ ac_qtopia_incdir="$withval"/include] )
5306
for dir in $kde_qtopia_dirs; do
5307
qtopia_incdirs="$qtopia_incdirs $dir/include"
5310
if test ! "$ac_qtopia_incdir" = "NO"; then
5311
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5315
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5316
ac_qtopia_incdir="$qtopia_incdir"
5318
if test -z "$qtopia_incdir"; then
5319
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5322
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5323
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5324
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5326
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5327
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5328
if test "$qtopia_ver" -lt "$qtopia_minver"; then
5329
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5336
ac_cxxflags_safe="$CXXFLAGS"
5337
ac_ldflags_safe="$LDFLAGS"
5338
ac_libs_safe="$LIBS"
5340
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5341
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5342
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5344
cat > conftest.$ac_ext <<EOF
5345
#include "confdefs.h"
5346
#include <qpe/qpeapplication.h>
5347
#include <qpe/version.h>
5349
int main( int argc, char **argv )
5351
QPEApplication app( argc, argv );
5356
if AC_TRY_EVAL(ac_link) && test -s conftest; then
5360
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5361
the end of config.log])
5364
CXXFLAGS="$ac_cxxflags_safe"
5365
LDFLAGS="$ac_ldflags_safe"
5366
LIBS="$ac_libs_safe"
5370
QTOPIA_INCLUDES="-I$qtopia_incdir"
5371
AC_SUBST(QTOPIA_INCLUDES)
5373
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5377
AC_DEFUN([KDE_INIT_DOXYGEN],
5379
AC_MSG_CHECKING([for Qt docs])
5381
if test "${with_qt_dir+set}" = set; then
5382
kde_qtdir="$with_qt_dir"
5385
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)
5386
AC_MSG_RESULT($QTDOCDIR)
5390
KDE_FIND_PATH(dot, DOT, [], [])
5391
if test -n "$DOT"; then
5396
AC_SUBST(KDE_HAVE_DOT)
5397
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5400
DOXYGEN_PROJECT_NAME="$1"
5401
DOXYGEN_PROJECT_NUMBER="$2"
5402
AC_SUBST(DOXYGEN_PROJECT_NAME)
5403
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5406
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5409
AC_SUBST(KDE_HAS_DOXYGEN)
5414
AC_DEFUN([AC_FIND_BZIP2],
5416
AC_MSG_CHECKING([for bzDecompress in libbz2])
5417
AC_CACHE_VAL(ac_cv_lib_bzip2,
5421
kde_save_LIBS="$LIBS"
5422
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5423
kde_save_CXXFLAGS="$CXXFLAGS"
5424
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
5430
[ bz_stream s; (void) bzDecompress(&s); ],
5431
eval "ac_cv_lib_bzip2='-lbz2'",
5432
eval "ac_cv_lib_bzip2=no")
5433
LIBS="$kde_save_LIBS"
5434
CXXFLAGS="$kde_save_CXXFLAGS"
5437
AC_MSG_RESULT($ac_cv_lib_bzip2)
5439
if test ! "$ac_cv_lib_bzip2" = no; then
5442
LIBBZ2="$ac_cv_lib_bzip2"
5449
KDE_CHECK_COMPILER_FLAG(shared, [
5450
ld_shared_flag="-shared"
5452
KDE_CHECK_COMPILER_FLAG(fPIC, [
5453
cxx_shared_flag="-fPIC"
5456
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5457
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5461
kde_save_LIBS="$LIBS"
5462
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5463
kde_save_CXXFLAGS="$CXXFLAGS"
5464
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5471
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5472
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5473
eval "ac_cv_lib_bzip2_prefix=no")
5474
LIBS="$kde_save_LIBS"
5475
CXXFLAGS="$kde_save_CXXFLAGS"
5479
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5481
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5484
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5487
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5488
dnl else, we just ignore this
5492
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5495
dnl ------------------------------------------------------------------------
5496
dnl Try to find the SSL headers and libraries.
5497
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5498
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5499
dnl ------------------------------------------------------------------------
5501
AC_DEFUN([KDE_CHECK_SSL],
5503
LIBSSL="-lssl -lcrypto"
5504
AC_REQUIRE([KDE_CHECK_LIB64])
5506
ac_ssl_includes=NO ac_ssl_libraries=NO
5509
AC_ARG_WITH(ssl-dir,
5510
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
5511
[ ac_ssl_includes="$withval"/include
5512
ac_ssl_libraries="$withval"/lib$kdelibsuff
5517
AC_HELP_STRING([--without-ssl],[disable SSL checks]),
5518
[want_ssl=$withval])
5520
if test $want_ssl = yes; then
5522
AC_MSG_CHECKING(for OpenSSL)
5524
AC_CACHE_VAL(ac_cv_have_ssl,
5525
[#try to guess OpenSSL locations
5527
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5528
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5529
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5530
ac_ssl_includes="$ssl_incdir"
5532
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"
5533
if test ! "$ac_ssl_libraries" = "NO"; then
5534
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5539
for dir in $ssl_libdirs; do
5540
try="ls -1 $dir/libssl*"
5541
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5544
ac_ssl_libraries="$ssl_libdir"
5546
ac_ldflags_safe="$LDFLAGS"
5547
ac_libs_safe="$LIBS"
5549
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5550
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5552
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5558
LDFLAGS="$ac_ldflags_safe"
5559
LIBS="$ac_libs_safe"
5561
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5569
eval "$ac_cv_have_ssl"
5571
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5573
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5574
AC_MSG_RESULT($ac_ssl_rsaref)
5576
AC_MSG_CHECKING([for easter eggs])
5577
AC_MSG_RESULT([none found])
5583
if test "$have_ssl" = yes; then
5584
AC_MSG_CHECKING(for OpenSSL version)
5585
dnl Check for SSL version
5586
AC_CACHE_VAL(ac_cv_ssl_version,
5589
cat >conftest.$ac_ext <<EOF
5590
#include <openssl/opensslv.h>
5594
#ifndef OPENSSL_VERSION_NUMBER
5595
printf("ssl_version=\\"error\\"\n");
5597
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5598
printf("ssl_version=\\"old\\"\n");
5600
printf("ssl_version=\\"ok\\"\n");
5606
ac_save_CPPFLAGS=$CPPFLAGS
5607
if test "$ac_ssl_includes" != "/usr/include"; then
5608
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
5611
if AC_TRY_EVAL(ac_link); then
5613
if eval `./conftest 2>&5`; then
5614
if test $ssl_version = error; then
5615
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5617
if test $ssl_version = old; then
5618
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5622
ac_cv_ssl_version="ssl_version=$ssl_version"
5624
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5625
Check config.log, and if you can't figure it out, send a mail to
5626
David Faure <faure@kde.org>, attaching your config.log])
5630
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5631
Check config.log, and if you can't figure it out, send a mail to
5632
David Faure <faure@kde.org>, attaching your config.log])
5634
CPPFLAGS=$ac_save_CPPFLAGS
5638
eval "$ac_cv_ssl_version"
5639
AC_MSG_RESULT($ssl_version)
5642
if test "$have_ssl" != yes; then
5645
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5646
ac_cv_have_ssl="have_ssl=yes \
5647
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5650
ssl_libraries="$ac_ssl_libraries"
5651
ssl_includes="$ac_ssl_includes"
5653
if test "$ac_ssl_rsaref" = yes; then
5654
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5657
if test $ssl_version = "old"; then
5658
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5664
if test "$ssl_includes" = "/usr/include"; then
5665
if test -f /usr/kerberos/include/krb5.h; then
5666
SSL_INCLUDES="-I/usr/kerberos/include"
5668
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
5669
SSL_INCLUDES="-I$ssl_includes"
5672
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
5675
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5678
AC_SUBST(SSL_INCLUDES)
5679
AC_SUBST(SSL_LDFLAGS)
5683
AC_DEFUN([KDE_CHECK_STRLCPY],
5685
AC_REQUIRE([AC_CHECK_STRLCAT])
5686
AC_REQUIRE([AC_CHECK_STRLCPY])
5687
AC_CHECK_SIZEOF(size_t)
5688
AC_CHECK_SIZEOF(unsigned long)
5690
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5692
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5695
],AC_MSG_RESULT([yes]),[
5698
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5699
does not apply. Please mail kde-devel@kde.org with a description of your system!
5704
AC_DEFUN([KDE_CHECK_BINUTILS],
5706
AC_MSG_CHECKING([if ld supports unversioned version maps])
5708
kde_save_LDFLAGS="$LDFLAGS"
5709
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5710
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5711
AC_TRY_LINK([int foo;],
5713
#ifdef __INTEL_COMPILER
5714
icc apparently does not support libtools version-info and version-script
5715
at the same time. Dunno where the bug is, but until somebody figured out,
5716
better disable the optional version scripts.
5720
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5721
LDFLAGS="$kde_save_LDFLAGS"
5723
AM_CONDITIONAL(include_VERSION_SCRIPT,
5724
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5726
AC_MSG_RESULT($kde_supports_versionmaps)
5729
AC_DEFUN([AM_PROG_OBJC],[
5730
AC_CHECK_PROGS(OBJC, gcc, gcc)
5731
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5732
if test "x${OBJCFLAGS-unset}" = xunset; then
5736
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5739
AC_DEFUN([KDE_CHECK_PERL],
5741
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
5742
AC_MSG_ERROR([No Perl found in your $PATH.
5743
We need perl to generate some code.])
5748
AC_DEFUN([KDE_CHECK_LARGEFILE],
5751
if test "$ac_cv_sys_file_offset_bits" != no; then
5752
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5755
if test "x$ac_cv_sys_large_files" != "xno"; then
5756
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
5761
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
5762
dnl which allows to search for libs that get installed into the KDE prefix.
5764
dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
5765
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
5766
dnl also defines KSTUFF_PKG_ERRORS on error
5767
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
5769
PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5770
if test "$prefix" != "$kde_libs_prefix"; then
5771
PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
5773
export PKG_CONFIG_PATH
5774
PKG_CHECK_MODULES($1,$2,$3,$4)
5777
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5779
# serial 47 AC_PROG_LIBTOOL
5782
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
5783
# -----------------------------------------------------------
5784
# If this macro is not defined by Autoconf, define it here.
5785
m4_ifdef([AC_PROVIDE_IFELSE],
5787
[m4_define([AC_PROVIDE_IFELSE],
5788
[m4_ifdef([AC_PROVIDE_$1],
5794
AC_DEFUN([AC_PROG_LIBTOOL],
5795
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5796
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5797
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5798
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5800
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5802
dnl And a similar setup for Fortran 77 support
5803
AC_PROVIDE_IFELSE([AC_PROG_F77],
5805
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5808
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5809
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5810
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5811
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5813
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5815
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5817
[ifdef([AC_PROG_GCJ],
5818
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5819
ifdef([A][M_PROG_GCJ],
5820
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5821
ifdef([LT_AC_PROG_GCJ],
5822
[define([LT_AC_PROG_GCJ],
5823
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5824
])])# AC_PROG_LIBTOOL
5829
AC_DEFUN([_AC_PROG_LIBTOOL],
5830
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5831
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5832
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
5833
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5835
# This can be used to rebuild libtool when needed
5836
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5838
# Always use our own libtool.
5839
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5840
AC_SUBST(LIBTOOL)dnl
5842
# Prevent multiple expansion
5843
define([AC_PROG_LIBTOOL], [])
5844
])# _AC_PROG_LIBTOOL
5849
AC_DEFUN([AC_LIBTOOL_SETUP],
5851
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5852
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5853
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5854
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5855
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5856
AC_REQUIRE([AC_PROG_CC])dnl
5857
AC_REQUIRE([AC_PROG_LD])dnl
5858
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5859
AC_REQUIRE([AC_PROG_NM])dnl
5861
AC_REQUIRE([AC_PROG_LN_S])dnl
5862
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5863
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5864
AC_REQUIRE([AC_OBJEXT])dnl
5865
AC_REQUIRE([AC_EXEEXT])dnl
5868
AC_LIBTOOL_SYS_MAX_CMD_LEN
5869
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5872
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5873
_LT_AC_PROG_ECHO_BACKSLASH
5877
# AIX sometimes has problems with the GCC collect2 program. For some
5878
# reason, if we set the COLLECT_NAMES environment variable, the problems
5879
# vanish in a puff of smoke.
5880
if test "X${COLLECT_NAMES+set}" != Xset; then
5882
export COLLECT_NAMES
5887
# Sed substitution that helps us do robust quoting. It backslashifies
5888
# metacharacters that are still active within double-quoted strings.
5889
Xsed='sed -e s/^X//'
5890
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5892
# Same as above, but do not quote variable references.
5893
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5895
# Sed substitution to delay expansion of an escaped shell variable in a
5896
# double_quote_subst'ed string.
5897
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5899
# Sed substitution to avoid accidental globbing in evaled expressions
5900
no_glob_subst='s/\*/\\\*/g'
5906
default_ofile=libtool
5907
can_build_shared=yes
5909
# All known linkers require a `.a' archive for static linking (except M$VC,
5910
# which needs '.lib').
5912
ltmain="$ac_aux_dir/ltmain.sh"
5913
ofile="$default_ofile"
5914
with_gnu_ld="$lt_cv_prog_gnu_ld"
5916
AC_CHECK_TOOL(AR, ar, false)
5917
AC_CHECK_TOOL(RANLIB, ranlib, :)
5918
AC_CHECK_TOOL(STRIP, strip, :)
5921
old_CFLAGS="$CFLAGS"
5923
# Set sane defaults for various variables
5924
test -z "$AR" && AR=ar
5925
test -z "$AR_FLAGS" && AR_FLAGS=cru
5926
test -z "$AS" && AS=as
5927
test -z "$CC" && CC=cc
5928
test -z "$LTCC" && LTCC=$CC
5929
test -z "$DLLTOOL" && DLLTOOL=dlltool
5930
test -z "$LD" && LD=ld
5931
test -z "$LN_S" && LN_S="ln -s"
5932
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5933
test -z "$NM" && NM=nm
5934
test -z "$SED" && SED=sed
5935
test -z "$OBJDUMP" && OBJDUMP=objdump
5936
test -z "$RANLIB" && RANLIB=:
5937
test -z "$STRIP" && STRIP=:
5938
test -z "$ac_objext" && ac_objext=o
5940
# Determine commands to create old-style static archives.
5941
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5942
old_postinstall_cmds='chmod 644 $oldlib'
5943
old_postuninstall_cmds=
5945
if test -n "$RANLIB"; then
5948
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5951
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5954
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5957
# Only perform the check for file, if the check method requires it
5958
case $deplibs_check_method in
5960
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5966
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5967
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
5968
enable_win32_dll=yes, enable_win32_dll=no)
5970
AC_ARG_ENABLE([libtool-lock],
5971
[AC_HELP_STRING([--disable-libtool-lock],
5972
[avoid locking (might break parallel builds)])])
5973
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5976
[AC_HELP_STRING([--with-pic],
5977
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5978
[pic_mode="$withval"],
5980
test -z "$pic_mode" && pic_mode=default
5982
# Use C for the default configuration in the libtool script
5984
AC_LIBTOOL_LANG_C_CONFIG
5986
])# AC_LIBTOOL_SETUP
5989
# _LT_AC_SYS_COMPILER
5990
# -------------------
5991
AC_DEFUN([_LT_AC_SYS_COMPILER],
5992
[AC_REQUIRE([AC_PROG_CC])dnl
5994
# If no C compiler was specified, use CC.
5997
# Allow CC to be a program name with arguments.
5999
])# _LT_AC_SYS_COMPILER
6002
# _LT_AC_SYS_LIBPATH_AIX
6003
# ----------------------
6004
# Links a minimal program and checks the executable
6005
# for the system default hardcoded library path. In most cases,
6006
# this is /usr/lib:/lib, but when the MPI compilers are used
6007
# the location of the communication and MPI libs are included too.
6008
# If we don't find anything, use the default library path according
6009
# to the aix ld manual.
6010
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
6011
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6012
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6014
# Check for a 64-bit object if we didn't find anything.
6015
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
6017
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6018
])# _LT_AC_SYS_LIBPATH_AIX
6021
# _LT_AC_SHELL_INIT(ARG)
6022
# ----------------------
6023
AC_DEFUN([_LT_AC_SHELL_INIT],
6024
[ifdef([AC_DIVERSION_NOTICE],
6025
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6026
[AC_DIVERT_PUSH(NOTICE)])
6029
])# _LT_AC_SHELL_INIT
6032
# _LT_AC_PROG_ECHO_BACKSLASH
6033
# --------------------------
6034
# Add some code to the start of the generated configure script which
6035
# will find an echo command which doesn't interpret backslashes.
6036
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6037
[_LT_AC_SHELL_INIT([
6038
# Check that we are running under the correct shell.
6039
SHELL=${CONFIG_SHELL-/bin/sh}
6043
# Remove one level of quotation (which was required for Make).
6044
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6049
if test "X[$]1" = X--no-reexec; then
6050
# Discard the --no-reexec flag, and continue.
6052
elif test "X[$]1" = X--fallback-echo; then
6053
# Avoid inline document here, it may be left over
6055
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
6056
# Yippee, $echo works!
6059
# Restart under the correct shell.
6060
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6063
if test "X[$]1" = X--fallback-echo; then
6064
# used as fallback echo
6072
# The HP-UX ksh and POSIX shell print the target directory to stdout
6074
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6076
if test -z "$ECHO"; then
6077
if test "X${echo_test_string+set}" != Xset; then
6078
# find a string as large as possible, as long as the shell can cope with it
6079
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6080
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6081
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6082
echo_test_string="`eval $cmd`" &&
6083
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6090
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6091
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6092
test "X$echo_testing_string" = "X$echo_test_string"; then
6095
# The Solaris, AIX, and Digital Unix default echo programs unquote
6096
# backslashes. This makes it impossible to quote backslashes using
6097
# echo "$something" | sed 's/\\/\\\\/g'
6099
# So, first we look for a working echo in the user's PATH.
6101
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6102
for dir in $PATH /usr/ucb; do
6104
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6105
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6106
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6107
test "X$echo_testing_string" = "X$echo_test_string"; then
6114
if test "X$echo" = Xecho; then
6115
# We didn't find a better echo, so look for alternatives.
6116
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6117
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6118
test "X$echo_testing_string" = "X$echo_test_string"; then
6119
# This shell has a builtin print -r that does the trick.
6121
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6122
test "X$CONFIG_SHELL" != X/bin/ksh; then
6123
# If we have ksh, try running configure again with it.
6124
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6125
export ORIGINAL_CONFIG_SHELL
6126
CONFIG_SHELL=/bin/ksh
6128
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6132
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6133
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6134
test "X$echo_testing_string" = "X$echo_test_string"; then
6135
# Cool, printf works
6137
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6138
test "X$echo_testing_string" = 'X\t' &&
6139
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6140
test "X$echo_testing_string" = "X$echo_test_string"; then
6141
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6143
SHELL="$CONFIG_SHELL"
6145
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6146
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6147
test "X$echo_testing_string" = 'X\t' &&
6148
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6149
test "X$echo_testing_string" = "X$echo_test_string"; then
6150
echo="$CONFIG_SHELL [$]0 --fallback-echo"
6152
# maybe with a smaller string...
6155
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6156
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6163
if test "$prev" != 'sed 50q "[$]0"'; then
6164
echo_test_string=`eval $prev`
6165
export echo_test_string
6166
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6168
# Oops. We lost completely, so just stick with echo.
6177
# Copy echo and quote the copy suitably for passing to libtool from
6178
# the Makefile, instead of quoting the original, which is used later.
6180
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6181
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6185
])])# _LT_AC_PROG_ECHO_BACKSLASH
6190
AC_DEFUN([_LT_AC_LOCK],
6191
[AC_ARG_ENABLE([libtool-lock],
6192
[AC_HELP_STRING([--disable-libtool-lock],
6193
[avoid locking (might break parallel builds)])])
6194
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6196
# Some flags need to be propagated to the compiler or linker for good
6200
# Find out which ABI we are using.
6201
echo 'int i;' > conftest.$ac_ext
6202
if AC_TRY_EVAL(ac_compile); then
6203
case `/usr/bin/file conftest.$ac_objext` in
6215
# Find out which ABI we are using.
6216
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6217
if AC_TRY_EVAL(ac_compile); then
6218
if test "$lt_cv_prog_gnu_ld" = yes; then
6219
case `/usr/bin/file conftest.$ac_objext` in
6221
LD="${LD-ld} -melf32bsmip"
6224
LD="${LD-ld} -melf32bmipn32"
6227
LD="${LD-ld} -melf64bmip"
6231
case `/usr/bin/file conftest.$ac_objext` in
6247
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6248
# Find out which ABI we are using.
6249
echo 'int i;' > conftest.$ac_ext
6250
if AC_TRY_EVAL(ac_compile); then
6251
case "`/usr/bin/file conftest.o`" in
6256
LD="${LD-ld} -m elf_i386"
6259
LD="${LD-ld} -m elf32ppclinux"
6262
LD="${LD-ld} -m elf_s390"
6265
LD="${LD-ld} -m elf32_sparc"
6273
LD="${LD-ld} -m elf_x86_64"
6275
ppc*-*linux*|powerpc*-*linux*)
6276
LD="${LD-ld} -m elf64ppc"
6279
LD="${LD-ld} -m elf64_s390"
6282
LD="${LD-ld} -m elf64_sparc"
6292
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
6293
SAVE_CFLAGS="$CFLAGS"
6294
CFLAGS="$CFLAGS -belf"
6295
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
6297
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6299
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6300
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6301
CFLAGS="$SAVE_CFLAGS"
6304
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
6305
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
6306
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
6307
AC_CHECK_TOOL(AS, as, false)
6308
AC_CHECK_TOOL(OBJDUMP, objdump, false)
6313
need_locks="$enable_libtool_lock"
6318
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6319
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6320
# ----------------------------------------------------------------
6321
# Check whether the given compiler option works
6322
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6323
[AC_REQUIRE([LT_AC_PROG_SED])
6324
AC_CACHE_CHECK([$1], [$2],
6326
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6327
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6328
lt_compiler_flag="$3"
6329
# Insert the option either (1) after the last *FLAGS variable, or
6330
# (2) before a word containing "conftest.", or (3) at the end.
6331
# Note that $ac_compile itself does not contain backslashes and begins
6332
# with a dollar sign (not a hyphen), so the echo should work correctly.
6333
# The option is referenced via a variable to avoid confusing sed.
6334
lt_compile=`echo "$ac_compile" | $SED \
6335
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6336
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6337
-e 's:$: $lt_compiler_flag:'`
6338
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6339
(eval "$lt_compile" 2>conftest.err)
6341
cat conftest.err >&AS_MESSAGE_LOG_FD
6342
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6343
if (exit $ac_status) && test -s "$ac_outfile"; then
6344
# The compiler can only warn and ignore the option if not recognized
6345
# So say no if there are warnings
6346
if test ! -s conftest.err; then
6353
if test x"[$]$2" = xyes; then
6354
ifelse([$5], , :, [$5])
6356
ifelse([$6], , :, [$6])
6358
])# AC_LIBTOOL_COMPILER_OPTION
6361
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6362
# [ACTION-SUCCESS], [ACTION-FAILURE])
6363
# ------------------------------------------------------------
6364
# Check whether the given compiler option works
6365
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6366
[AC_CACHE_CHECK([$1], [$2],
6368
save_LDFLAGS="$LDFLAGS"
6369
LDFLAGS="$LDFLAGS $3"
6370
printf "$lt_simple_link_test_code" > conftest.$ac_ext
6371
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6372
# The compiler can only warn and ignore the option if not recognized
6373
# So say no if there are warnings
6374
if test -s conftest.err; then
6375
# Append any errors to the config.log.
6376
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6382
LDFLAGS="$save_LDFLAGS"
6385
if test x"[$]$2" = xyes; then
6386
ifelse([$4], , :, [$4])
6388
ifelse([$5], , :, [$5])
6390
])# AC_LIBTOOL_LINKER_OPTION
6393
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6394
# --------------------------
6395
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6396
[# find the maximum length of command line arguments
6397
AC_MSG_CHECKING([the maximum length of command line arguments])
6398
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6404
# On DJGPP, this test can blow up pretty badly due to problems in libc
6405
# (any single argument exceeding 2000 bytes causes a buffer overrun
6406
# during glob expansion). Even if it were fixed, the result of this
6407
# check would be larger than it should be.
6408
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6412
# Under GNU Hurd, this test is not required because there is
6413
# no limit to the length of command line arguments.
6414
# Libtool will interpret -1 as no limit whatsoever
6415
lt_cv_sys_max_cmd_len=-1;
6419
# On Win9x/ME, this test blows up -- it succeeds, but takes
6420
# about 5 minutes as the teststring grows exponentially.
6421
# Worse, since 9x/ME are not pre-emptively multitasking,
6422
# you end up with a "frozen" computer, even though with patience
6423
# the test eventually succeeds (with a max line length of 256k).
6424
# Instead, let's just punt: use the minimum linelength reported by
6425
# all of the supported platforms: 8192 (on NT/2K/XP).
6426
lt_cv_sys_max_cmd_len=8192;
6430
# If test is not a shell built-in, we'll probably end up computing a
6431
# maximum length that is only half of the actual maximum length, but
6433
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6434
= "XX$testring") >/dev/null 2>&1 &&
6435
new_result=`expr "X$testring" : ".*" 2>&1` &&
6436
lt_cv_sys_max_cmd_len=$new_result &&
6437
test $i != 17 # 1/2 MB should be enough
6440
testring=$testring$testring
6443
# Add a significant safety factor because C++ compilers can tack on massive
6444
# amounts of additional arguments before passing them to the linker.
6445
# It appears as though 1/2 is a usable value.
6446
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6450
if test -n $lt_cv_sys_max_cmd_len ; then
6451
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6455
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6458
# _LT_AC_CHECK_DLFCN
6459
# --------------------
6460
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6461
[AC_CHECK_HEADERS(dlfcn.h)dnl
6462
])# _LT_AC_CHECK_DLFCN
6465
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6466
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6467
# ------------------------------------------------------------------
6468
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6469
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6470
if test "$cross_compiling" = yes; then :
6473
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6474
lt_status=$lt_dlunknown
6475
cat > conftest.$ac_ext <<EOF
6476
[#line __oline__ "configure"
6477
#include "confdefs.h"
6486
# define LT_DLGLOBAL RTLD_GLOBAL
6489
# define LT_DLGLOBAL DL_GLOBAL
6491
# define LT_DLGLOBAL 0
6495
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6496
find out it does not work in some platform. */
6497
#ifndef LT_DLLAZY_OR_NOW
6499
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6502
# define LT_DLLAZY_OR_NOW DL_LAZY
6505
# define LT_DLLAZY_OR_NOW RTLD_NOW
6508
# define LT_DLLAZY_OR_NOW DL_NOW
6510
# define LT_DLLAZY_OR_NOW 0
6518
extern "C" void exit (int);
6521
void fnord() { int i=42;}
6524
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6525
int status = $lt_dlunknown;
6529
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6530
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6531
/* dlclose (self); */
6537
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6538
(./conftest; exit; ) 2>/dev/null
6541
x$lt_dlno_uscore) $1 ;;
6542
x$lt_dlneed_uscore) $2 ;;
6543
x$lt_unknown|x*) $3 ;;
6546
# compilation failed
6551
])# _LT_AC_TRY_DLOPEN_SELF
6554
# AC_LIBTOOL_DLOPEN_SELF
6555
# -------------------
6556
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6557
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6558
if test "x$enable_dlopen" != xyes; then
6559
enable_dlopen=unknown
6560
enable_dlopen_self=unknown
6561
enable_dlopen_self_static=unknown
6568
lt_cv_dlopen="load_add_on"
6570
lt_cv_dlopen_self=yes
6574
lt_cv_dlopen="LoadLibrary"
6579
lt_cv_dlopen="dlopen"
6584
# if libdl is installed we need to link against it
6585
AC_CHECK_LIB([dl], [dlopen],
6586
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
6589
lt_cv_dlopen_self=yes
6594
AC_CHECK_FUNC([shl_load],
6595
[lt_cv_dlopen="shl_load"],
6596
[AC_CHECK_LIB([dld], [shl_load],
6597
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6598
[AC_CHECK_FUNC([dlopen],
6599
[lt_cv_dlopen="dlopen"],
6600
[AC_CHECK_LIB([dl], [dlopen],
6601
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6602
[AC_CHECK_LIB([svld], [dlopen],
6603
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6604
[AC_CHECK_LIB([dld], [dld_link],
6605
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6614
if test "x$lt_cv_dlopen" != xno; then
6620
case $lt_cv_dlopen in
6622
save_CPPFLAGS="$CPPFLAGS"
6623
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6625
save_LDFLAGS="$LDFLAGS"
6626
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6629
LIBS="$lt_cv_dlopen_libs $LIBS"
6631
AC_CACHE_CHECK([whether a program can dlopen itself],
6632
lt_cv_dlopen_self, [dnl
6633
_LT_AC_TRY_DLOPEN_SELF(
6634
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6635
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6638
if test "x$lt_cv_dlopen_self" = xyes; then
6639
LDFLAGS="$LDFLAGS $link_static_flag"
6640
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6641
lt_cv_dlopen_self_static, [dnl
6642
_LT_AC_TRY_DLOPEN_SELF(
6643
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6644
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6648
CPPFLAGS="$save_CPPFLAGS"
6649
LDFLAGS="$save_LDFLAGS"
6654
case $lt_cv_dlopen_self in
6655
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6656
*) enable_dlopen_self=unknown ;;
6659
case $lt_cv_dlopen_self_static in
6660
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6661
*) enable_dlopen_self_static=unknown ;;
6664
])# AC_LIBTOOL_DLOPEN_SELF
6667
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6668
# ---------------------------------
6669
# Check to see if options -c and -o are simultaneously supported by compiler
6670
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6671
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6672
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6673
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6674
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6675
$rm -r conftest 2>/dev/null
6679
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6681
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6682
# that will create temporary files in the current directory regardless of
6683
# the output directory. Thus, making CWD read-only will cause this test
6684
# to fail, enabling locking or at least warning the user not to do parallel
6688
lt_compiler_flag="-o out/conftest2.$ac_objext"
6689
# Insert the option either (1) after the last *FLAGS variable, or
6690
# (2) before a word containing "conftest.", or (3) at the end.
6691
# Note that $ac_compile itself does not contain backslashes and begins
6692
# with a dollar sign (not a hyphen), so the echo should work correctly.
6693
lt_compile=`echo "$ac_compile" | $SED \
6694
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
6695
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
6696
-e 's:$: $lt_compiler_flag:'`
6697
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
6698
(eval "$lt_compile" 2>out/conftest.err)
6700
cat out/conftest.err >&AS_MESSAGE_LOG_FD
6701
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
6702
if (exit $ac_status) && test -s out/conftest2.$ac_objext
6704
# The compiler can only warn and ignore the option if not recognized
6705
# So say no if there are warnings
6706
if test ! -s out/conftest.err; then
6707
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6717
])# AC_LIBTOOL_PROG_CC_C_O
6720
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6721
# -----------------------------------------
6722
# Check to see if we can do hard links to lock some files if needed
6723
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6724
[AC_REQUIRE([_LT_AC_LOCK])dnl
6726
hard_links="nottested"
6727
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6728
# do not overwrite the value of need_locks provided by the user
6729
AC_MSG_CHECKING([if we can lock with hard links])
6732
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6734
ln conftest.a conftest.b 2>&5 || hard_links=no
6735
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6736
AC_MSG_RESULT([$hard_links])
6737
if test "$hard_links" = no; then
6738
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6744
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6749
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6750
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6751
[rm -f .libs 2>/dev/null
6752
mkdir .libs 2>/dev/null
6753
if test -d .libs; then
6756
# MS-DOS does not allow filenames that begin with a dot.
6759
rmdir .libs 2>/dev/null])
6760
objdir=$lt_cv_objdir
6761
])# AC_LIBTOOL_OBJDIR
6764
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6765
# ----------------------------------------------
6766
# Check hardcoding attributes.
6767
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6768
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6769
_LT_AC_TAGVAR(hardcode_action, $1)=
6770
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6771
test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
6772
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
6774
# We can hardcode non-existant directories.
6775
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6776
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6777
# have to relink, otherwise we might link with an installed library
6778
# when we should be linking with a yet-to-be-installed one
6779
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6780
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6781
# Linking always hardcodes the temporary library directory.
6782
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6784
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6785
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6788
# We cannot hardcode anything, or else we can only hardcode existing
6790
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6792
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6794
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6795
# Fast installation is not supported
6796
enable_fast_install=no
6797
elif test "$shlibpath_overrides_runpath" = yes ||
6798
test "$enable_shared" = no; then
6799
# Fast installation is not necessary
6800
enable_fast_install=needless
6802
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6805
# AC_LIBTOOL_SYS_LIB_STRIP
6806
# ------------------------
6807
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6810
AC_MSG_CHECKING([whether stripping libraries is possible])
6811
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6812
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6813
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6814
AC_MSG_RESULT([yes])
6816
# FIXME - insert some real tests, host_os isn't really good enough
6819
if test -n "$STRIP" ; then
6820
striplib="$STRIP -x"
6821
AC_MSG_RESULT([yes])
6831
])# AC_LIBTOOL_SYS_LIB_STRIP
6834
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6835
# -----------------------------
6836
# PORTME Fill in your ld.so characteristics
6837
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6838
[AC_MSG_CHECKING([dynamic linker characteristics])
6840
libname_spec='lib$name'
6848
shlibpath_overrides_runpath=unknown
6850
dynamic_linker="$host_os ld.so"
6851
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6852
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6853
need_lib_prefix=unknown
6854
hardcode_into_libs=no
6856
# when you set need_version to no, make sure it does not cause -set_version
6857
# flags to be left without arguments
6858
need_version=unknown
6863
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6864
shlibpath_var=LIBPATH
6866
# AIX 3 has no versioning support, so we append a major version to the name.
6867
soname_spec='${libname}${release}${shared_ext}$major'
6874
hardcode_into_libs=yes
6875
if test "$host_cpu" = ia64; then
6876
# AIX 5 supports IA64
6877
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
6878
shlibpath_var=LD_LIBRARY_PATH
6880
# With GCC up to 2.95.x, collect2 would create an import file
6881
# for dependence libraries. The import file would start with
6882
# the line `#! .'. This would cause the generated library to
6883
# depend on `.', always an invalid library. This was fixed in
6884
# development snapshots of GCC prior to 3.0.
6886
aix4 | aix4.[[01]] | aix4.[[01]].*)
6887
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6889
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6896
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6897
# soname into executable. Probably we can add versioning support to
6898
# collect2, so additional links can be useful in future.
6899
if test "$aix_use_runtimelinking" = yes; then
6900
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6901
# instead of lib<name>.a to let people know that these are not
6902
# typical AIX shared libraries.
6903
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6905
# We preserve .a as extension for shared libraries through AIX4.2
6906
# and later when we are not doing run time linking.
6907
library_names_spec='${libname}${release}.a $libname.a'
6908
soname_spec='${libname}${release}${shared_ext}$major'
6910
shlibpath_var=LIBPATH
6915
library_names_spec='$libname.ixlibrary $libname.a'
6916
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6917
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6921
library_names_spec='${libname}${shared_ext}'
6922
dynamic_linker="$host_os ld.so"
6923
shlibpath_var=LIBRARY_PATH
6929
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6930
soname_spec='${libname}${release}${shared_ext}$major'
6931
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6932
shlibpath_var=LD_LIBRARY_PATH
6933
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6934
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6935
# the default ld.so.conf also contains /usr/contrib/lib and
6936
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6937
# libtool to hard-code these into programs
6940
cygwin* | mingw* | pw32*)
6941
version_type=windows
6946
case $GCC,$host_os in
6947
yes,cygwin* | yes,mingw* | yes,pw32*)
6948
library_names_spec='$libname.dll.a'
6949
# DLL is installed to $(libdir)/../bin by postinstall_cmds
6950
postinstall_cmds='base_file=`basename \${file}`~
6951
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
6952
dldir=$destdir/`dirname \$dlpath`~
6953
test -d \$dldir || mkdir -p \$dldir~
6954
$install_prog $dir/$dlname \$dldir/$dlname'
6955
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6956
dlpath=$dir/\$dldll~
6958
shlibpath_overrides_runpath=yes
6962
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
6963
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6964
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
6967
# MinGW DLLs use traditional 'lib' prefix
6968
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6969
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
6970
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
6971
# It is most probably a Windows format PATH printed by
6972
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6973
# path with ; separators, and with drive letters. We can handle the
6974
# drive letters (cygwin fileutils understands them), so leave them,
6975
# especially as we might pass files found there to a mingw objdump,
6976
# which wouldn't understand a cygwinified path. Ahh.
6977
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6979
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6983
# pw32 DLLs use 'pw' prefix rather than 'lib'
6984
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
6990
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6993
dynamic_linker='Win32 ld.exe'
6994
# FIXME: first we should search . and the directory the executable is in
6998
darwin* | rhapsody*)
6999
dynamic_linker="$host_os dyld"
7003
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
7004
soname_spec='${libname}${release}${major}$shared_ext'
7005
shlibpath_overrides_runpath=yes
7006
shlibpath_var=DYLD_LIBRARY_PATH
7007
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
7008
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
7009
if test "$GCC" = yes; then
7010
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
7012
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
7014
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
7021
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
7022
soname_spec='${libname}${release}${shared_ext}$major'
7023
shlibpath_var=LD_LIBRARY_PATH
7034
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
7035
soname_spec='${libname}${release}${shared_ext}$major'
7036
shlibpath_var=LD_LIBRARY_PATH
7037
shlibpath_overrides_runpath=no
7038
hardcode_into_libs=yes
7039
dynamic_linker='GNU ld.so'
7043
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7044
version_type=freebsd-$objformat
7045
case $version_type in
7047
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
7052
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
7056
shlibpath_var=LD_LIBRARY_PATH
7059
shlibpath_overrides_runpath=yes
7061
freebsd3.[01]* | freebsdelf3.[01]*)
7062
shlibpath_overrides_runpath=yes
7063
hardcode_into_libs=yes
7066
shlibpath_overrides_runpath=no
7067
hardcode_into_libs=yes
7076
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
7077
soname_spec='${libname}${release}${shared_ext}$major'
7078
shlibpath_var=LD_LIBRARY_PATH
7079
hardcode_into_libs=yes
7082
hpux9* | hpux10* | hpux11*)
7083
# Give a soname corresponding to the major version so that dld.sl refuses to
7084
# link against other versions.
7091
hardcode_into_libs=yes
7092
dynamic_linker="$host_os dld.so"
7093
shlibpath_var=LD_LIBRARY_PATH
7094
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7095
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7096
soname_spec='${libname}${release}${shared_ext}$major'
7097
if test "X$HPUX_IA64_MODE" = X32; then
7098
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
7100
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
7102
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7106
hardcode_into_libs=yes
7107
dynamic_linker="$host_os dld.sl"
7108
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
7109
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
7110
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7111
soname_spec='${libname}${release}${shared_ext}$major'
7112
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
7113
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
7117
dynamic_linker="$host_os dld.sl"
7118
shlibpath_var=SHLIB_PATH
7119
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7120
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7121
soname_spec='${libname}${release}${shared_ext}$major'
7124
# HP-UX runs *really* slowly unless shared libraries are mode 555.
7125
postinstall_cmds='chmod 555 $lib'
7128
irix5* | irix6* | nonstopux*)
7130
nonstopux*) version_type=nonstopux ;;
7132
if test "$lt_cv_prog_gnu_ld" = yes; then
7140
soname_spec='${libname}${release}${shared_ext}$major'
7141
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
7143
irix5* | nonstopux*)
7147
case $LD in # libtool.m4 will add one of these switches to LD
7148
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
7149
libsuff= shlibsuff= libmagic=32-bit;;
7150
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
7151
libsuff=32 shlibsuff=N32 libmagic=N32;;
7152
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
7153
libsuff=64 shlibsuff=64 libmagic=64-bit;;
7154
*) libsuff= shlibsuff= libmagic=never-match;;
7158
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7159
shlibpath_overrides_runpath=no
7160
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7161
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7162
hardcode_into_libs=yes
7165
# No shared lib support for Linux oldld, aout, or coff.
7166
linux*oldld* | linux*aout* | linux*coff*)
7170
# This must be Linux ELF.
7175
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7176
soname_spec='${libname}${release}${shared_ext}$major'
7177
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7179
if test "x$LINUX_64_MODE" = x64; then
7180
# Some platforms are per default 64-bit, so there's no /lib64
7181
if test -d /lib64; then
7185
shlibpath_var=LD_LIBRARY_PATH
7186
shlibpath_overrides_runpath=no
7187
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
7188
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
7189
# This implies no fast_install, which is unacceptable.
7190
# Some rework will be needed to allow for fast_install
7191
# before this can be enabled.
7192
hardcode_into_libs=yes
7194
# We used to test for /lib/ld.so.1 and disable shared libraries on
7195
# powerpc, because MkLinux only supported shared libraries with the
7196
# GNU dynamic linker. Since this was broken with cross compilers,
7197
# most powerpc-linux boxes support dynamic linking these days and
7198
# people can always --disable-shared, the test was removed, and we
7199
# assume the GNU/Linux dynamic linker is in use.
7200
dynamic_linker='GNU/Linux ld.so'
7207
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7208
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7209
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7210
dynamic_linker='NetBSD (a.out) ld.so'
7212
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
7213
soname_spec='${libname}${release}${shared_ext}$major'
7214
dynamic_linker='NetBSD ld.elf_so'
7216
shlibpath_var=LD_LIBRARY_PATH
7217
shlibpath_overrides_runpath=yes
7218
hardcode_into_libs=yes
7223
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7224
shlibpath_var=LD_LIBRARY_PATH
7225
shlibpath_overrides_runpath=yes
7232
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7233
soname_spec='${libname}${release}${shared_ext}$major'
7234
shlibpath_var=LD_LIBRARY_PATH
7235
shlibpath_overrides_runpath=yes
7242
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7243
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7244
shlibpath_var=LD_LIBRARY_PATH
7245
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7247
openbsd2.[[89]] | openbsd2.[[89]].*)
7248
shlibpath_overrides_runpath=no
7251
shlibpath_overrides_runpath=yes
7255
shlibpath_overrides_runpath=yes
7260
libname_spec='$name'
7263
library_names_spec='$libname${shared_ext} $libname.a'
7264
dynamic_linker='OS/2 ld.exe'
7265
shlibpath_var=LIBPATH
7268
osf3* | osf4* | osf5*)
7272
soname_spec='${libname}${release}${shared_ext}$major'
7273
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7274
shlibpath_var=LD_LIBRARY_PATH
7275
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7276
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7281
soname_spec='${libname}${release}${shared_ext}$major'
7282
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7283
shlibpath_var=LD_LIBRARY_PATH
7290
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7291
soname_spec='${libname}${release}${shared_ext}$major'
7292
shlibpath_var=LD_LIBRARY_PATH
7293
shlibpath_overrides_runpath=yes
7294
hardcode_into_libs=yes
7295
# ldd complains unless libraries are executable
7296
postinstall_cmds='chmod +x $lib'
7301
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
7302
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7303
shlibpath_var=LD_LIBRARY_PATH
7304
shlibpath_overrides_runpath=yes
7305
if test "$with_gnu_ld" = yes; then
7311
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7313
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7314
soname_spec='${libname}${release}${shared_ext}$major'
7315
shlibpath_var=LD_LIBRARY_PATH
7316
case $host_vendor in
7318
shlibpath_overrides_runpath=no
7320
export_dynamic_flag_spec='${wl}-Blargedynsym'
7321
runpath_var=LD_RUN_PATH
7329
shlibpath_overrides_runpath=no
7330
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
7336
if test -d /usr/nec ;then
7338
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
7339
soname_spec='$libname${shared_ext}.$major'
7340
shlibpath_var=LD_LIBRARY_PATH
7346
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
7347
soname_spec='${libname}${release}${shared_ext}$major'
7348
shlibpath_var=LD_LIBRARY_PATH
7355
AC_MSG_RESULT([$dynamic_linker])
7356
test "$dynamic_linker" = no && can_build_shared=no
7357
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
7362
AC_DEFUN([_LT_AC_TAGCONFIG],
7363
[AC_ARG_WITH([tags],
7364
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
7365
[include additional configurations @<:@automatic@:>@])],
7366
[tagnames="$withval"])
7368
if test -f "$ltmain" && test -n "$tagnames"; then
7369
if test ! -f "${ofile}"; then
7370
AC_MSG_WARN([output file `$ofile' does not exist])
7373
if test -z "$LTCC"; then
7374
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
7375
if test -z "$LTCC"; then
7376
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
7378
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
7382
# Extract list of available tagged configurations in $ofile.
7383
# Note that this assumes the entire list is on one line.
7384
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
7386
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7387
for tagname in $tagnames; do
7389
# Check whether tagname contains only valid characters
7390
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
7392
*) AC_MSG_ERROR([invalid tag name: $tagname])
7396
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
7398
AC_MSG_ERROR([tag name \"$tagname\" already exists])
7401
# Update the list of available tags.
7402
if test -n "$tagname"; then
7403
echo appending configuration tag \"$tagname\" to $ofile
7407
if test -n "$CXX" && test "X$CXX" != "Xno"; then
7408
AC_LIBTOOL_LANG_CXX_CONFIG
7415
if test -n "$F77" && test "X$F77" != "Xno"; then
7416
AC_LIBTOOL_LANG_F77_CONFIG
7423
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
7424
AC_LIBTOOL_LANG_GCJ_CONFIG
7431
AC_LIBTOOL_LANG_RC_CONFIG
7435
AC_MSG_ERROR([Unsupported tag name: $tagname])
7439
# Append the new tag name to the list of available tags.
7440
if test -n "$tagname" ; then
7441
available_tags="$available_tags $tagname"
7447
# Now substitute the updated list of available tags.
7448
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7449
mv "${ofile}T" "$ofile"
7453
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7456
])# _LT_AC_TAGCONFIG
7461
# enable checks for dlopen support
7462
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7463
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7464
])# AC_LIBTOOL_DLOPEN
7467
# AC_LIBTOOL_WIN32_DLL
7468
# --------------------
7469
# declare package support for building win32 dll's
7470
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7471
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7472
])# AC_LIBTOOL_WIN32_DLL
7475
# AC_ENABLE_SHARED([DEFAULT])
7476
# ---------------------------
7477
# implement the --enable-shared flag
7478
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7479
AC_DEFUN([AC_ENABLE_SHARED],
7480
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7481
AC_ARG_ENABLE([shared],
7482
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7483
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7484
[p=${PACKAGE-default}
7486
yes) enable_shared=yes ;;
7487
no) enable_shared=no ;;
7490
# Look at the argument we got. We use all the common list separators.
7491
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7492
for pkg in $enableval; do
7494
if test "X$pkg" = "X$p"; then
7501
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7502
])# AC_ENABLE_SHARED
7507
#- set the default shared flag to --disable-shared
7508
AC_DEFUN([AC_DISABLE_SHARED],
7509
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7510
AC_ENABLE_SHARED(no)
7511
])# AC_DISABLE_SHARED
7514
# AC_ENABLE_STATIC([DEFAULT])
7515
# ---------------------------
7516
# implement the --enable-static flag
7517
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7518
AC_DEFUN([AC_ENABLE_STATIC],
7519
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7520
AC_ARG_ENABLE([static],
7521
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7522
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7523
[p=${PACKAGE-default}
7525
yes) enable_static=yes ;;
7526
no) enable_static=no ;;
7529
# Look at the argument we got. We use all the common list separators.
7530
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7531
for pkg in $enableval; do
7533
if test "X$pkg" = "X$p"; then
7540
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7541
])# AC_ENABLE_STATIC
7546
# set the default static flag to --disable-static
7547
AC_DEFUN([AC_DISABLE_STATIC],
7548
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7549
AC_ENABLE_STATIC(no)
7550
])# AC_DISABLE_STATIC
7553
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7554
# ---------------------------------
7555
# implement the --enable-fast-install flag
7556
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7557
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7558
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7559
AC_ARG_ENABLE([fast-install],
7560
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7561
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7562
[p=${PACKAGE-default}
7564
yes) enable_fast_install=yes ;;
7565
no) enable_fast_install=no ;;
7567
enable_fast_install=no
7568
# Look at the argument we got. We use all the common list separators.
7569
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7570
for pkg in $enableval; do
7572
if test "X$pkg" = "X$p"; then
7573
enable_fast_install=yes
7579
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7580
])# AC_ENABLE_FAST_INSTALL
7583
# AC_DISABLE_FAST_INSTALL
7584
# -----------------------
7585
# set the default to --disable-fast-install
7586
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7587
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7588
AC_ENABLE_FAST_INSTALL(no)
7589
])# AC_DISABLE_FAST_INSTALL
7592
# AC_LIBTOOL_PICMODE([MODE])
7593
# --------------------------
7594
# implement the --with-pic flag
7595
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7596
AC_DEFUN([AC_LIBTOOL_PICMODE],
7597
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7598
pic_mode=ifelse($#,1,$1,default)
7599
])# AC_LIBTOOL_PICMODE
7604
# This is predefined starting with Autoconf 2.54, so this conditional
7605
# definition can be removed once we require Autoconf 2.54 or later.
7606
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
7607
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
7608
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1
7609
then ac_cv_prog_egrep='grep -E'
7610
else ac_cv_prog_egrep='egrep'
7612
EGREP=$ac_cv_prog_egrep
7617
# AC_PATH_TOOL_PREFIX
7618
# -------------------
7619
# find a file program which can recognise shared library
7620
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7621
[AC_REQUIRE([AC_PROG_EGREP])dnl
7622
AC_MSG_CHECKING([for $1])
7623
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7625
[[\\/*] | ?:[\\/]*])
7626
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7629
lt_save_MAGIC_CMD="$MAGIC_CMD"
7630
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7631
dnl $ac_dummy forces splitting on constant user-supplied paths.
7632
dnl POSIX.2 word splitting is done only on the output of word expansions,
7633
dnl not every word. This closes a longstanding sh security hole.
7634
ac_dummy="ifelse([$2], , $PATH, [$2])"
7635
for ac_dir in $ac_dummy; do
7637
test -z "$ac_dir" && ac_dir=.
7638
if test -f $ac_dir/$1; then
7639
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7640
if test -n "$file_magic_test_file"; then
7641
case $deplibs_check_method in
7643
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7644
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7645
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7646
$EGREP "$file_magic_regex" > /dev/null; then
7651
*** Warning: the command libtool uses to detect shared libraries,
7652
*** $file_magic_cmd, produces output that libtool cannot recognize.
7653
*** The result is that libtool may fail to recognize shared libraries
7654
*** as such. This will affect the creation of libtool libraries that
7655
*** depend on shared libraries, but programs linked with such libtool
7656
*** libraries will work regardless of this problem. Nevertheless, you
7657
*** may want to report the problem to your system manager and/or to
7658
*** bug-libtool@gnu.org
7668
MAGIC_CMD="$lt_save_MAGIC_CMD"
7671
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7672
if test -n "$MAGIC_CMD"; then
7673
AC_MSG_RESULT($MAGIC_CMD)
7677
])# AC_PATH_TOOL_PREFIX
7682
# find a file program which can recognise a shared library
7683
AC_DEFUN([AC_PATH_MAGIC],
7684
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7685
if test -z "$lt_cv_path_MAGIC_CMD"; then
7686
if test -n "$ac_tool_prefix"; then
7687
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7697
# find the pathname to the GNU or non-GNU linker
7698
AC_DEFUN([AC_PROG_LD],
7699
[AC_ARG_WITH([gnu-ld],
7700
[AC_HELP_STRING([--with-gnu-ld],
7701
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7702
[test "$withval" = no || with_gnu_ld=yes],
7704
AC_REQUIRE([LT_AC_PROG_SED])dnl
7705
AC_REQUIRE([AC_PROG_CC])dnl
7706
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7707
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7709
if test "$GCC" = yes; then
7710
# Check if gcc -print-prog-name=ld gives a path.
7711
AC_MSG_CHECKING([for ld used by $CC])
7714
# gcc leaves a trailing carriage return which upsets mingw
7715
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7717
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7720
# Accept absolute paths.
7721
[[\\/]]* | ?:[[\\/]]*)
7722
re_direlt='/[[^/]][[^/]]*/\.\./'
7723
# Canonicalize the pathname of ld
7724
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
7725
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7726
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
7728
test -z "$LD" && LD="$ac_prog"
7731
# If it fails, then pretend we aren't using GCC.
7735
# If it is relative, then search for the first ld in PATH.
7739
elif test "$with_gnu_ld" = yes; then
7740
AC_MSG_CHECKING([for GNU ld])
7742
AC_MSG_CHECKING([for non-GNU ld])
7744
AC_CACHE_VAL(lt_cv_path_LD,
7745
[if test -z "$LD"; then
7746
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7747
for ac_dir in $PATH; do
7749
test -z "$ac_dir" && ac_dir=.
7750
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7751
lt_cv_path_LD="$ac_dir/$ac_prog"
7752
# Check to see if the program is GNU ld. I'd rather use --version,
7753
# but apparently some GNU ld's only accept -v.
7754
# Break only if it was the GNU/non-GNU ld that we prefer.
7755
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7756
*GNU* | *'with BFD'*)
7757
test "$with_gnu_ld" != no && break
7760
test "$with_gnu_ld" != yes && break
7767
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7770
if test -n "$LD"; then
7775
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7782
AC_DEFUN([AC_PROG_LD_GNU],
7783
[AC_REQUIRE([AC_PROG_EGREP])dnl
7784
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7785
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7786
case `$LD -v 2>&1 </dev/null` in
7787
*GNU* | *'with BFD'*)
7788
lt_cv_prog_gnu_ld=yes
7791
lt_cv_prog_gnu_ld=no
7794
with_gnu_ld=$lt_cv_prog_gnu_ld
7798
# AC_PROG_LD_RELOAD_FLAG
7799
# ----------------------
7800
# find reload flag for linker
7801
# -- PORTME Some linkers may need a different reload flag.
7802
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7803
[AC_CACHE_CHECK([for $LD option to reload object files],
7804
lt_cv_ld_reload_flag,
7805
[lt_cv_ld_reload_flag='-r'])
7806
reload_flag=$lt_cv_ld_reload_flag
7807
case $reload_flag in
7809
*) reload_flag=" $reload_flag" ;;
7811
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7812
])# AC_PROG_LD_RELOAD_FLAG
7815
# AC_DEPLIBS_CHECK_METHOD
7816
# -----------------------
7817
# how to check for library dependencies
7818
# -- PORTME fill in with the dynamic library characteristics
7819
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7820
[AC_CACHE_CHECK([how to recognise dependent libraries],
7821
lt_cv_deplibs_check_method,
7822
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7823
lt_cv_file_magic_test_file=
7824
lt_cv_deplibs_check_method='unknown'
7825
# Need to set the preceding variable on all platforms that support
7826
# interlibrary dependencies.
7827
# 'none' -- dependencies not supported.
7828
# `unknown' -- same as none, but documents that we really don't know.
7829
# 'pass_all' -- all dependencies passed with no checks.
7830
# 'test_compile' -- check by making test program.
7831
# 'file_magic [[regex]]' -- check by looking for files in library path
7832
# which responds to the $file_magic_cmd with a given extended regex.
7833
# If you have `file' or equivalent on your system and you're not sure
7834
# whether `pass_all' will *always* work, you probably want this one.
7838
lt_cv_deplibs_check_method=pass_all
7842
lt_cv_deplibs_check_method=pass_all
7846
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7847
lt_cv_file_magic_cmd='/usr/bin/file -L'
7848
lt_cv_file_magic_test_file=/shlib/libc.so
7852
lt_cv_deplibs_check_method=pass_all
7856
# win32_libid is a shell function defined in ltmain.sh
7857
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7858
lt_cv_file_magic_cmd='win32_libid'
7861
darwin* | rhapsody*)
7862
# this will be overwritten by pass_all, but leave it in just in case
7863
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7864
lt_cv_file_magic_cmd='/usr/bin/file -L'
7866
rhapsody* | darwin1.[[012]])
7867
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7870
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7873
lt_cv_deplibs_check_method=pass_all
7877
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7880
# Not sure whether the presence of OpenBSD here was a mistake.
7881
# Let's accept both of them until this is cleared up.
7882
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7883
lt_cv_file_magic_cmd=/usr/bin/file
7884
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7888
lt_cv_deplibs_check_method=pass_all
7893
lt_cv_deplibs_check_method=pass_all
7896
hpux10.20* | hpux11*)
7897
lt_cv_file_magic_cmd=/usr/bin/file
7900
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7901
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7904
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
7905
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7908
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7909
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7914
irix5* | irix6* | nonstopux*)
7916
irix5* | nonstopux*)
7917
# this will be overridden with pass_all, but let us keep it just in case
7918
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7922
*-32|*"-32 ") libmagic=32-bit;;
7923
*-n32|*"-n32 ") libmagic=N32;;
7924
*-64|*"-64 ") libmagic=64-bit;;
7925
*) libmagic=never-match;;
7927
# this will be overridden with pass_all, but let us keep it just in case
7928
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7931
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7932
lt_cv_deplibs_check_method=pass_all
7935
# This must be Linux ELF.
7938
alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
7939
lt_cv_deplibs_check_method=pass_all ;;
7940
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7942
lt_cv_deplibs_check_method=pass_all ;;
7944
# glibc up to 2.1.1 does not perform some relocations on ARM
7945
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7947
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7951
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7952
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7954
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7959
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7960
lt_cv_file_magic_cmd=/usr/bin/file
7961
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7965
lt_cv_deplibs_check_method=unknown
7969
lt_cv_file_magic_cmd=/usr/bin/file
7970
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7971
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7972
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7974
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7978
osf3* | osf4* | osf5*)
7979
# this will be overridden with pass_all, but let us keep it just in case
7980
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7981
lt_cv_file_magic_test_file=/shlib/libc.so
7982
lt_cv_deplibs_check_method=pass_all
7986
lt_cv_deplibs_check_method=pass_all
7990
lt_cv_deplibs_check_method=pass_all
7991
lt_cv_file_magic_test_file=/lib/libc.so
7994
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7995
case $host_vendor in
7997
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
7998
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8001
lt_cv_deplibs_check_method=pass_all
8004
lt_cv_file_magic_cmd='/bin/file'
8005
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
8008
lt_cv_file_magic_cmd='/bin/file'
8009
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
8010
lt_cv_file_magic_test_file=/lib/libc.so
8013
lt_cv_deplibs_check_method=pass_all
8018
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
8019
lt_cv_deplibs_check_method=pass_all
8023
file_magic_cmd=$lt_cv_file_magic_cmd
8024
deplibs_check_method=$lt_cv_deplibs_check_method
8025
test -z "$deplibs_check_method" && deplibs_check_method=unknown
8026
])# AC_DEPLIBS_CHECK_METHOD
8031
# find the pathname to a BSD-compatible name lister
8032
AC_DEFUN([AC_PROG_NM],
8033
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
8034
[if test -n "$NM"; then
8035
# Let the user override the test.
8038
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8039
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
8041
test -z "$ac_dir" && ac_dir=.
8042
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
8043
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
8044
# Check to see if the nm accepts a BSD-compat flag.
8045
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
8046
# nm: unknown option "B" ignored
8047
# Tru64's nm complains that /dev/null is an invalid object file
8048
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
8049
*/dev/null* | *'Invalid file or object type'*)
8050
lt_cv_path_NM="$tmp_nm -B"
8054
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
8056
lt_cv_path_NM="$tmp_nm -p"
8060
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
8061
continue # so that we can try to find one that supports BSD flags
8068
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
8076
# check for math library
8077
AC_DEFUN([AC_CHECK_LIBM],
8078
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8081
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
8082
# These system don't have libm, or don't need it
8085
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
8086
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
8089
AC_CHECK_LIB(m, cos, LIBM="-lm")
8095
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
8096
# -----------------------------------
8097
# sets LIBLTDL to the link flags for the libltdl convenience library and
8098
# LTDLINCL to the include flags for the libltdl header and adds
8099
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
8100
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8101
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
8102
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
8103
# '${top_srcdir}/' (note the single quotes!). If your package is not
8104
# flat and you're not using automake, define top_builddir and
8105
# top_srcdir appropriately in the Makefiles.
8106
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
8107
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8108
case $enable_ltdl_convenience in
8109
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8110
"") enable_ltdl_convenience=yes
8111
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8113
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
8114
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8115
# For backwards non-gettext consistent compatibility...
8117
])# AC_LIBLTDL_CONVENIENCE
8120
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
8121
# -----------------------------------
8122
# sets LIBLTDL to the link flags for the libltdl installable library and
8123
# LTDLINCL to the include flags for the libltdl header and adds
8124
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
8125
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
8126
# DIRECTORY is not provided and an installed libltdl is not found, it is
8127
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
8128
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8129
# quotes!). If your package is not flat and you're not using automake,
8130
# define top_builddir and top_srcdir appropriately in the Makefiles.
8131
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
8132
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
8133
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
8134
AC_CHECK_LIB(ltdl, lt_dlinit,
8135
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
8136
[if test x"$enable_ltdl_install" = xno; then
8137
AC_MSG_WARN([libltdl not installed, but installation disabled])
8139
enable_ltdl_install=yes
8142
if test x"$enable_ltdl_install" = x"yes"; then
8143
ac_configure_args="$ac_configure_args --enable-ltdl-install"
8144
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
8145
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
8147
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8151
# For backwards non-gettext consistent compatibility...
8153
])# AC_LIBLTDL_INSTALLABLE
8158
# enable support for C++ libraries
8159
AC_DEFUN([AC_LIBTOOL_CXX],
8160
[AC_REQUIRE([_LT_AC_LANG_CXX])
8166
AC_DEFUN([_LT_AC_LANG_CXX],
8167
[AC_REQUIRE([AC_PROG_CXX])
8168
AC_REQUIRE([AC_PROG_CXXCPP])
8169
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
8175
# enable support for Fortran 77 libraries
8176
AC_DEFUN([AC_LIBTOOL_F77],
8177
[AC_REQUIRE([_LT_AC_LANG_F77])
8183
AC_DEFUN([_LT_AC_LANG_F77],
8184
[AC_REQUIRE([AC_PROG_F77])
8185
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
8191
# enable support for GCJ libraries
8192
AC_DEFUN([AC_LIBTOOL_GCJ],
8193
[AC_REQUIRE([_LT_AC_LANG_GCJ])
8199
AC_DEFUN([_LT_AC_LANG_GCJ],
8200
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
8201
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
8202
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
8203
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
8204
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
8205
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
8206
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
8212
# enable support for Windows resource files
8213
AC_DEFUN([AC_LIBTOOL_RC],
8214
[AC_REQUIRE([LT_AC_PROG_RC])
8215
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
8219
# AC_LIBTOOL_LANG_C_CONFIG
8220
# ------------------------
8221
# Ensure that the configuration vars for the C compiler are
8222
# suitably defined. Those variables are subsequently used by
8223
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8224
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
8225
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
8229
# Source file extension for C test sources.
8232
# Object file extension for compiled C test sources.
8234
_LT_AC_TAGVAR(objext, $1)=$objext
8236
# Code to be used in simple compile tests
8237
lt_simple_compile_test_code="int some_variable = 0;\n"
8239
# Code to be used in simple link tests
8240
lt_simple_link_test_code='int main(){return(0);}\n'
8245
# Check for any special shared library compilation flags.
8247
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
8248
if test "$GCC" = no; then
8251
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
8255
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
8256
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
8257
if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
8259
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
8260
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
8266
# Check to make sure the static flag actually works.
8268
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
8269
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
8270
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
8272
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
8275
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8276
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8277
AC_LIBTOOL_PROG_CC_C_O($1)
8278
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8279
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8280
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8281
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8282
AC_LIBTOOL_SYS_LIB_STRIP
8283
AC_LIBTOOL_DLOPEN_SELF($1)
8285
# Report which librarie types wil actually be built
8286
AC_MSG_CHECKING([if libtool supports shared libraries])
8287
AC_MSG_RESULT([$can_build_shared])
8289
AC_MSG_CHECKING([whether to build shared libraries])
8290
test "$can_build_shared" = "no" && enable_shared=no
8292
# On AIX, shared libraries and static libraries use the same namespace, and
8293
# are all built from PIC.
8296
test "$enable_shared" = yes && enable_static=no
8297
if test -n "$RANLIB"; then
8298
archive_cmds="$archive_cmds~\$RANLIB \$lib"
8299
postinstall_cmds='$RANLIB $lib'
8304
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8305
test "$enable_shared" = yes && enable_static=no
8308
darwin* | rhapsody*)
8309
if test "$GCC" = yes; then
8310
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8312
rhapsody* | darwin1.[[012]])
8313
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8316
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8317
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8319
case ${MACOSX_DEPLOYMENT_TARGET} in
8321
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8324
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8330
output_verbose_link_cmd='echo'
8331
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8332
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8333
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8334
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8335
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8336
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8337
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8338
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8339
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8340
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8342
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8346
AC_MSG_RESULT([$enable_shared])
8348
AC_MSG_CHECKING([whether to build static libraries])
8349
# Make sure either enable_shared or enable_static is yes.
8350
test "$enable_shared" = yes || enable_static=yes
8351
AC_MSG_RESULT([$enable_static])
8353
AC_LIBTOOL_CONFIG($1)
8357
])# AC_LIBTOOL_LANG_C_CONFIG
8360
# AC_LIBTOOL_LANG_CXX_CONFIG
8361
# --------------------------
8362
# Ensure that the configuration vars for the C compiler are
8363
# suitably defined. Those variables are subsequently used by
8364
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8365
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
8366
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
8368
AC_REQUIRE([AC_PROG_CXX])
8369
AC_REQUIRE([AC_PROG_CXXCPP])
8371
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8372
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
8373
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8374
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8375
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8376
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8377
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8378
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8379
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8380
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8381
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
8382
_LT_AC_TAGVAR(module_cmds, $1)=
8383
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
8384
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8385
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8386
_LT_AC_TAGVAR(no_undefined_flag, $1)=
8387
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8388
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8390
# Dependencies to place before and after the object being linked:
8391
_LT_AC_TAGVAR(predep_objects, $1)=
8392
_LT_AC_TAGVAR(postdep_objects, $1)=
8393
_LT_AC_TAGVAR(predeps, $1)=
8394
_LT_AC_TAGVAR(postdeps, $1)=
8395
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
8397
# Source file extension for C++ test sources.
8400
# Object file extension for compiled C++ test sources.
8402
_LT_AC_TAGVAR(objext, $1)=$objext
8404
# Code to be used in simple compile tests
8405
lt_simple_compile_test_code="int some_variable = 0;\n"
8407
# Code to be used in simple link tests
8408
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
8410
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8413
# Allow CC to be a program name with arguments.
8418
lt_save_with_gnu_ld=$with_gnu_ld
8419
lt_save_path_LD=$lt_cv_path_LD
8420
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8421
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8423
unset lt_cv_prog_gnu_ld
8425
if test -n "${lt_cv_path_LDCXX+set}"; then
8426
lt_cv_path_LD=$lt_cv_path_LDCXX
8430
test -z "${LDCXX+set}" || LD=$LDCXX
8433
_LT_AC_TAGVAR(compiler, $1)=$CC
8434
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
8436
# We don't want -fno-exception wen compiling C++ code, so set the
8437
# no_builtin_flag separately
8438
if test "$GXX" = yes; then
8439
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8441
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8444
if test "$GXX" = yes; then
8445
# Set up default GNU C++ configuration
8449
# Check if GNU C++ uses GNU ld as the underlying linker, since the
8450
# archiving commands below assume that GNU ld is being used.
8451
if test "$with_gnu_ld" = yes; then
8452
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8453
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8455
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8456
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8458
# If archive_cmds runs LD, not CC, wlarc should be empty
8459
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8460
# investigate it a little bit more. (MM)
8463
# ancient GNU ld didn't support --whole-archive et. al.
8464
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
8465
grep 'no-whole-archive' > /dev/null; then
8466
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8468
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8474
# A generic and very simple default shared library creation
8475
# command for GNU C++ for the case where it uses the native
8476
# linker, instead of GNU ld. If possible, this setting should
8477
# overridden to take advantage of the native linker features on
8478
# the platform it is being used on.
8479
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8482
# Commands to make compiler produce verbose output that lists
8483
# what "hidden" libraries, object files and flags are used when
8484
# linking a shared library.
8485
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8493
# PORTME: fill in a description of your system's C++ link characteristics
8494
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8495
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8498
# FIXME: insert proper C++ library support
8499
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8502
if test "$host_cpu" = ia64; then
8503
# On IA64, the linker does run time linking by default, so we don't
8504
# have to do anything special.
8505
aix_use_runtimelinking=no
8506
exp_sym_flag='-Bexport'
8509
# KDE requires run time linking. Make it the default.
8510
aix_use_runtimelinking=yes
8511
exp_sym_flag='-bexport'
8512
no_entry_flag='-bnoentry'
8515
# When large executables or shared objects are built, AIX ld can
8516
# have problems creating the table of contents. If linking a library
8517
# or program results in "error TOC overflow" add -mminimal-toc to
8518
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8519
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8521
_LT_AC_TAGVAR(archive_cmds, $1)=''
8522
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8523
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8524
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8526
if test "$GXX" = yes; then
8527
case $host_os in aix4.[012]|aix4.[012].*)
8528
# We only want to do this on AIX 4.2 and lower, the check
8529
# below for broken collect2 doesn't work under 4.3+
8530
collect2name=`${CC} -print-prog-name=collect2`
8531
if test -f "$collect2name" && \
8532
strings "$collect2name" | grep resolve_lib_name >/dev/null
8534
# We have reworked collect2
8535
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8537
# We have old collect2
8538
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8539
# It fails to find uninstalled libraries when the uninstalled
8540
# path is not listed in the libpath. Setting hardcode_minus_L
8541
# to unsupported forces relinking
8542
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8543
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8544
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8547
shared_flag='-shared'
8550
if test "$host_cpu" = ia64; then
8551
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8552
# chokes on -Wl,-G. The following line is correct:
8555
if test "$aix_use_runtimelinking" = yes; then
8556
shared_flag='-qmkshrobj ${wl}-G'
8558
shared_flag='-qmkshrobj'
8563
# Let the compiler handle the export list.
8564
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8565
if test "$aix_use_runtimelinking" = yes; then
8566
# Warning - without using the other runtime loading flags (-brtl),
8567
# -berok will link without error, but may produce a broken library.
8568
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8569
# Determine the default libpath from the value encoded in an empty executable.
8570
_LT_AC_SYS_LIBPATH_AIX
8571
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8573
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8574
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8576
if test "$host_cpu" = ia64; then
8577
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8578
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8579
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8581
# Determine the default libpath from the value encoded in an empty executable.
8582
_LT_AC_SYS_LIBPATH_AIX
8583
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8584
# Warning - without using the other run time loading flags,
8585
# -berok will link without error, but may produce a broken library.
8586
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8587
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8588
# -bexpall does not export symbols beginning with underscore (_)
8589
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8590
# Exported symbols can be pulled into shared objects from archives
8591
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8592
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8593
# This is similar to how AIX traditionally builds it's shared libraries.
8594
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8599
case $cc_basename in
8601
# FIXME: insert proper C++ library support
8602
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8607
cygwin* | mingw* | pw32*)
8608
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8609
# as there is no search path for DLLs.
8610
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8611
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8612
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8613
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8615
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8616
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8617
# If the export-symbols file already is a .def file (1st line
8618
# is EXPORTS), use it as is; otherwise, prepend...
8619
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8620
cp $export_symbols $output_objdir/$soname.def;
8622
echo EXPORTS > $output_objdir/$soname.def;
8623
cat $export_symbols >> $output_objdir/$soname.def;
8625
$CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8627
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8631
darwin* | rhapsody*)
8632
if test "$GXX" = yes; then
8633
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8635
rhapsody* | darwin1.[[012]])
8636
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8639
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8640
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8642
case ${MACOSX_DEPLOYMENT_TARGET} in
8644
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
8647
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
8653
lt_int_apple_cc_single_mod=no
8654
output_verbose_link_cmd='echo'
8655
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8656
lt_int_apple_cc_single_mod=yes
8658
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8659
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8661
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8663
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8665
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8666
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8667
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8669
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8671
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8672
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8673
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8674
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8675
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8676
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8678
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8683
case $cc_basename in
8685
# FIXME: insert proper C++ library support
8686
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8689
# Green Hills C++ Compiler
8690
# FIXME: insert proper C++ library support
8691
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8694
# FIXME: insert proper C++ library support
8695
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8700
# C++ shared libraries reported to be fairly broken before switch to ELF
8701
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8704
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8707
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8709
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8714
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8715
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8716
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8717
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8718
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8719
# but as the default
8720
# location of the library.
8722
case $cc_basename in
8724
# FIXME: insert proper C++ library support
8725
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8728
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8729
# Commands to make compiler produce verbose output that lists
8730
# what "hidden" libraries, object files and flags are used when
8731
# linking a shared library.
8733
# There doesn't appear to be a way to prevent this compiler from
8734
# explicitly linking system object files so we need to strip them
8735
# from the output so that they don't get included in the library
8737
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'
8740
if test "$GXX" = yes; then
8741
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8743
# FIXME: insert proper C++ library support
8744
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8750
if test $with_gnu_ld = no; then
8753
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8754
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8755
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8758
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8761
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8762
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8763
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8769
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8770
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8773
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8774
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8775
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8776
# but as the default
8777
# location of the library.
8780
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8781
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8782
# but as the default
8783
# location of the library.
8787
case $cc_basename in
8789
# FIXME: insert proper C++ library support
8790
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8795
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8798
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8801
# Commands to make compiler produce verbose output that lists
8802
# what "hidden" libraries, object files and flags are used when
8803
# linking a shared library.
8805
# There doesn't appear to be a way to prevent this compiler from
8806
# explicitly linking system object files so we need to strip them
8807
# from the output so that they don't get included in the library
8809
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'
8812
if test "$GXX" = yes; then
8813
if test $with_gnu_ld = no; then
8816
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8819
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8824
# FIXME: insert proper C++ library support
8825
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8831
case $cc_basename in
8834
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8836
# Archives containing C++ object files must be created using
8837
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8838
# necessary to make sure instantiated templates are included
8840
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8843
if test "$GXX" = yes; then
8844
if test "$with_gnu_ld" = no; then
8845
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8847
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8850
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8853
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8854
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8857
case $cc_basename in
8859
# Kuck and Associates, Inc. (KAI) C++ Compiler
8861
# KCC will only create a shared library if the output file
8862
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8863
# to its proper name (with version) after linking.
8864
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8865
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8866
# Commands to make compiler produce verbose output that lists
8867
# what "hidden" libraries, object files and flags are used when
8868
# linking a shared library.
8870
# There doesn't appear to be a way to prevent this compiler from
8871
# explicitly linking system object files so we need to strip them
8872
# from the output so that they don't get included in the library
8874
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'
8876
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8877
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8879
# Archives containing C++ object files must be created using
8880
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8881
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8886
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8887
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8888
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8889
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8890
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8891
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8895
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
8896
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8898
runpath_var=LD_RUN_PATH
8899
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8900
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8902
# Commands to make compiler produce verbose output that lists
8903
# what "hidden" libraries, object files and flags are used when
8904
# linking a shared library.
8906
# There doesn't appear to be a way to prevent this compiler from
8907
# explicitly linking system object files so we need to strip them
8908
# from the output so that they don't get included in the library
8910
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'
8915
# FIXME: insert proper C++ library support
8916
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8919
# FIXME: insert proper C++ library support
8920
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8923
case $cc_basename in
8925
# FIXME: insert proper C++ library support
8926
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8929
# FIXME: insert proper C++ library support
8930
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8935
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8936
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8938
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8939
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8940
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8942
# Workaround some broken pre-1.5 toolchains
8943
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8946
case $cc_basename in
8948
# Kuck and Associates, Inc. (KAI) C++ Compiler
8950
# KCC will only create a shared library if the output file
8951
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8952
# to its proper name (with version) after linking.
8953
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8955
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8956
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8958
# Archives containing C++ object files must be created using
8959
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8960
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8964
# Rational C++ 2.4.1
8965
# FIXME: insert proper C++ library support
8966
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8969
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8970
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8972
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8973
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8975
# Commands to make compiler produce verbose output that lists
8976
# what "hidden" libraries, object files and flags are used when
8977
# linking a shared library.
8979
# There doesn't appear to be a way to prevent this compiler from
8980
# explicitly linking system object files so we need to strip them
8981
# from the output so that they don't get included in the library
8983
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'
8986
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8987
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8988
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8990
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8991
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8993
# Commands to make compiler produce verbose output that lists
8994
# what "hidden" libraries, object files and flags are used when
8995
# linking a shared library.
8996
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
8999
# FIXME: insert proper C++ library support
9000
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9006
case $cc_basename in
9008
# Kuck and Associates, Inc. (KAI) C++ Compiler
9010
# KCC will only create a shared library if the output file
9011
# ends with ".so" (or ".sl" for HP-UX), so rename the library
9012
# to its proper name (with version) after linking.
9013
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
9015
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9016
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9018
# Archives containing C++ object files must be created using
9019
# the KAI C++ compiler.
9020
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
9023
# Rational C++ 2.4.1
9024
# FIXME: insert proper C++ library support
9025
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9028
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9029
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
9030
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9031
echo "-hidden">> $lib.exp~
9032
$CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
9035
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9036
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9038
# Commands to make compiler produce verbose output that lists
9039
# what "hidden" libraries, object files and flags are used when
9040
# linking a shared library.
9042
# There doesn't appear to be a way to prevent this compiler from
9043
# explicitly linking system object files so we need to strip them
9044
# from the output so that they don't get included in the library
9046
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'
9049
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9050
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9051
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
9053
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9054
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9056
# Commands to make compiler produce verbose output that lists
9057
# what "hidden" libraries, object files and flags are used when
9058
# linking a shared library.
9059
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
9062
# FIXME: insert proper C++ library support
9063
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9069
# FIXME: insert proper C++ library support
9070
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9073
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9074
case $cc_basename in
9076
# FIXME: insert proper C++ library support
9077
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9080
# FIXME: insert proper C++ library support
9081
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9086
case $cc_basename in
9089
# FIXME: insert proper C++ library support
9090
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9094
# FIXME: insert proper C++ library support
9095
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9098
# FIXME: insert proper C++ library support
9099
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9104
case $cc_basename in
9106
# Sun C++ 4.2, 5.x and Centerline C++
9107
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9108
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
9109
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9110
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9112
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9113
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9115
solaris2.[0-5] | solaris2.[0-5].*) ;;
9117
# The C++ compiler is used as linker so we must use $wl
9118
# flag to pass the commands to the underlying system
9120
# Supported since Solaris 2.6 (maybe 2.5.1?)
9121
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9124
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9126
# Commands to make compiler produce verbose output that lists
9127
# what "hidden" libraries, object files and flags are used when
9128
# linking a shared library.
9130
# There doesn't appear to be a way to prevent this compiler from
9131
# explicitly linking system object files so we need to strip them
9132
# from the output so that they don't get included in the library
9134
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'
9136
# Archives containing C++ object files must be created using
9137
# "CC -xar", where "CC" is the Sun C++ compiler. This is
9138
# necessary to make sure instantiated templates are included
9140
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9143
# Green Hills C++ Compiler
9144
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9146
# The C++ compiler must be used to create the archive.
9147
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9150
# GNU C++ compiler with Solaris linker
9151
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9152
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9153
if $CC --version | grep -v '^2\.7' > /dev/null; then
9154
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9155
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9156
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9158
# Commands to make compiler produce verbose output that lists
9159
# what "hidden" libraries, object files and flags are used when
9160
# linking a shared library.
9161
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9163
# g++ 2.7 appears to require `-G' NOT `-shared' on this
9165
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
9166
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9167
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
9169
# Commands to make compiler produce verbose output that lists
9170
# what "hidden" libraries, object files and flags are used when
9171
# linking a shared library.
9172
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
9175
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9180
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9181
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9184
case $cc_basename in
9186
# NonStop-UX NCC 3.20
9187
# FIXME: insert proper C++ library support
9188
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9191
# FIXME: insert proper C++ library support
9192
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9197
# FIXME: insert proper C++ library support
9198
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9201
# FIXME: insert proper C++ library support
9202
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9205
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9206
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9208
_LT_AC_TAGVAR(GCC, $1)="$GXX"
9209
_LT_AC_TAGVAR(LD, $1)="$LD"
9211
AC_LIBTOOL_POSTDEP_PREDEP($1)
9212
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9213
AC_LIBTOOL_PROG_CC_C_O($1)
9214
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9215
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9216
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9217
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9218
AC_LIBTOOL_SYS_LIB_STRIP
9219
AC_LIBTOOL_DLOPEN_SELF($1)
9221
AC_LIBTOOL_CONFIG($1)
9228
with_gnu_ldcxx=$with_gnu_ld
9229
with_gnu_ld=$lt_save_with_gnu_ld
9230
lt_cv_path_LDCXX=$lt_cv_path_LD
9231
lt_cv_path_LD=$lt_save_path_LD
9232
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9233
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9234
])# AC_LIBTOOL_LANG_CXX_CONFIG
9236
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
9237
# ------------------------
9238
# Figure out "hidden" library dependencies from verbose
9239
# compiler output when linking a shared library.
9240
# Parse the compiler output and extract the necessary
9241
# objects, libraries and library flags.
9242
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
9243
dnl we can't use the lt_simple_compile_test_code here,
9244
dnl because it contains code intended for an executable,
9245
dnl not a library. It's possible we should let each
9246
dnl tag define a new lt_????_link_test_code variable,
9247
dnl but it's only used here...
9248
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
9250
void foo (void) { a = 0; }
9252
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
9256
Foo (void) { a = 0; }
9261
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
9269
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
9272
public void bar (void) {
9278
dnl Parse the compiler output and extract the necessary
9279
dnl objects, libraries and library flags.
9280
if AC_TRY_EVAL(ac_compile); then
9281
# Parse the compiler output and extract the necessary
9282
# objects, libraries and library flags.
9284
# Sentinel used to keep track of whether or not we are before
9285
# the conftest object file.
9286
pre_test_object_deps_done=no
9288
# The `*' in the case matches for architectures that use `case' in
9289
# $output_verbose_cmd can trigger glob expansion during the loop
9290
# eval without this substitution.
9291
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
9293
for p in `eval $output_verbose_link_cmd`; do
9297
# Some compilers place space between "-{L,R}" and the path.
9300
|| test $p = "-R"; then
9307
if test "$pre_test_object_deps_done" = no; then
9310
# Internal compiler library paths should come after those
9311
# provided the user. The postdeps already come after the
9312
# user supplied libs so there is no need to process them.
9313
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
9314
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9316
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9319
# The "-l" case would never come before the object being
9320
# linked, so don't bother handling this case.
9323
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
9324
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
9326
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
9331
*.$objext|*.$libext)
9332
# This assumes that the test object file only shows up
9333
# once in the compiler output.
9334
if test "$p" = "conftest.$objext"; then
9335
pre_test_object_deps_done=yes
9339
if test "$pre_test_object_deps_done" = no; then
9340
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
9341
_LT_AC_TAGVAR(predep_objects, $1)="$p"
9343
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
9346
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
9347
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
9349
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
9354
*) ;; # Ignore the rest.
9362
echo "libtool.m4: error: problem compiling $1 test program"
9365
$rm -f confest.$objext
9367
case " $_LT_AC_TAGVAR(postdeps, $1) " in
9368
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9370
])# AC_LIBTOOL_POSTDEP_PREDEP
9372
# AC_LIBTOOL_LANG_F77_CONFIG
9373
# ------------------------
9374
# Ensure that the configuration vars for the C compiler are
9375
# suitably defined. Those variables are subsequently used by
9376
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9377
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
9378
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
9379
[AC_REQUIRE([AC_PROG_F77])
9380
AC_LANG_PUSH(Fortran 77)
9382
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9383
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9384
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9385
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9386
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9387
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9388
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9389
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9390
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9391
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9392
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
9393
_LT_AC_TAGVAR(module_cmds, $1)=
9394
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
9395
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9396
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9397
_LT_AC_TAGVAR(no_undefined_flag, $1)=
9398
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9399
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9401
# Source file extension for f77 test sources.
9404
# Object file extension for compiled f77 test sources.
9406
_LT_AC_TAGVAR(objext, $1)=$objext
9408
# Code to be used in simple compile tests
9409
lt_simple_compile_test_code=" subroutine t\n return\n end\n"
9411
# Code to be used in simple link tests
9412
lt_simple_link_test_code=" program t\n end\n"
9414
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9417
# Allow CC to be a program name with arguments.
9421
_LT_AC_TAGVAR(compiler, $1)=$CC
9422
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
9424
AC_MSG_CHECKING([if libtool supports shared libraries])
9425
AC_MSG_RESULT([$can_build_shared])
9427
AC_MSG_CHECKING([whether to build shared libraries])
9428
test "$can_build_shared" = "no" && enable_shared=no
9430
# On AIX, shared libraries and static libraries use the same namespace, and
9431
# are all built from PIC.
9434
test "$enable_shared" = yes && enable_static=no
9435
if test -n "$RANLIB"; then
9436
archive_cmds="$archive_cmds~\$RANLIB \$lib"
9437
postinstall_cmds='$RANLIB $lib'
9441
test "$enable_shared" = yes && enable_static=no
9444
AC_MSG_RESULT([$enable_shared])
9446
AC_MSG_CHECKING([whether to build static libraries])
9447
# Make sure either enable_shared or enable_static is yes.
9448
test "$enable_shared" = yes || enable_static=yes
9449
AC_MSG_RESULT([$enable_static])
9451
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9453
_LT_AC_TAGVAR(GCC, $1)="$G77"
9454
_LT_AC_TAGVAR(LD, $1)="$LD"
9456
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9457
AC_LIBTOOL_PROG_CC_C_O($1)
9458
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9459
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9460
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9461
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9462
AC_LIBTOOL_SYS_LIB_STRIP
9465
AC_LIBTOOL_CONFIG($1)
9469
])# AC_LIBTOOL_LANG_F77_CONFIG
9472
# AC_LIBTOOL_LANG_GCJ_CONFIG
9473
# --------------------------
9474
# Ensure that the configuration vars for the C compiler are
9475
# suitably defined. Those variables are subsequently used by
9476
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9477
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
9478
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
9481
# Source file extension for Java test sources.
9484
# Object file extension for compiled Java test sources.
9486
_LT_AC_TAGVAR(objext, $1)=$objext
9488
# Code to be used in simple compile tests
9489
lt_simple_compile_test_code="class foo {}\n"
9491
# Code to be used in simple link tests
9492
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
9494
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9497
# Allow CC to be a program name with arguments.
9501
_LT_AC_TAGVAR(compiler, $1)=$CC
9503
# GCJ did not exist at the time GCC didn't implicitly link libc in.
9504
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9506
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
9507
AC_LIBTOOL_PROG_COMPILER_PIC($1)
9508
AC_LIBTOOL_PROG_CC_C_O($1)
9509
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
9510
AC_LIBTOOL_PROG_LD_SHLIBS($1)
9511
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
9512
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
9513
AC_LIBTOOL_SYS_LIB_STRIP
9514
AC_LIBTOOL_DLOPEN_SELF($1)
9516
AC_LIBTOOL_CONFIG($1)
9520
])# AC_LIBTOOL_LANG_GCJ_CONFIG
9523
# AC_LIBTOOL_LANG_RC_CONFIG
9524
# --------------------------
9525
# Ensure that the configuration vars for the Windows resource compiler are
9526
# suitably defined. Those variables are subsequently used by
9527
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
9528
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
9529
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
9532
# Source file extension for RC test sources.
9535
# Object file extension for compiled RC test sources.
9537
_LT_AC_TAGVAR(objext, $1)=$objext
9539
# Code to be used in simple compile tests
9540
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
9542
# Code to be used in simple link tests
9543
lt_simple_link_test_code="$lt_simple_compile_test_code"
9545
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9548
# Allow CC to be a program name with arguments.
9552
_LT_AC_TAGVAR(compiler, $1)=$CC
9553
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9555
AC_LIBTOOL_CONFIG($1)
9559
])# AC_LIBTOOL_LANG_RC_CONFIG
9562
# AC_LIBTOOL_CONFIG([TAGNAME])
9563
# ----------------------------
9564
# If TAGNAME is not passed, then create an initial libtool script
9565
# with a default configuration from the untagged config vars. Otherwise
9566
# add code to config.status for appending the configuration named by
9567
# TAGNAME from the matching tagged config vars.
9568
AC_DEFUN([AC_LIBTOOL_CONFIG],
9569
[# The else clause should only fire when bootstrapping the
9570
# libtool distribution, otherwise you forgot to ship ltmain.sh
9571
# with your package, and you will get complaints that there are
9572
# no rules to generate ltmain.sh.
9573
if test -f "$ltmain"; then
9574
# See if we are running on zsh, and set the options which allow our commands through
9575
# without removal of \ escapes.
9576
if test -n "${ZSH_VERSION+set}" ; then
9577
setopt NO_GLOB_SUBST
9579
# Now quote all the things that may contain metacharacters while being
9580
# careful not to overquote the AC_SUBSTed values. We take copies of the
9581
# variables and quote the copies for generation of the libtool script.
9582
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
9583
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
9584
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
9585
deplibs_check_method reload_flag reload_cmds need_locks \
9586
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
9587
lt_cv_sys_global_symbol_to_c_name_address \
9588
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9589
old_postinstall_cmds old_postuninstall_cmds \
9590
_LT_AC_TAGVAR(compiler, $1) \
9591
_LT_AC_TAGVAR(CC, $1) \
9592
_LT_AC_TAGVAR(LD, $1) \
9593
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
9594
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
9595
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
9596
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
9597
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
9598
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
9599
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
9600
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
9601
_LT_AC_TAGVAR(old_archive_cmds, $1) \
9602
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
9603
_LT_AC_TAGVAR(predep_objects, $1) \
9604
_LT_AC_TAGVAR(postdep_objects, $1) \
9605
_LT_AC_TAGVAR(predeps, $1) \
9606
_LT_AC_TAGVAR(postdeps, $1) \
9607
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
9608
_LT_AC_TAGVAR(archive_cmds, $1) \
9609
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
9610
_LT_AC_TAGVAR(postinstall_cmds, $1) \
9611
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
9612
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
9613
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
9614
_LT_AC_TAGVAR(no_undefined_flag, $1) \
9615
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
9616
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
9617
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
9618
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
9619
_LT_AC_TAGVAR(hardcode_automatic, $1) \
9620
_LT_AC_TAGVAR(module_cmds, $1) \
9621
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
9622
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
9623
_LT_AC_TAGVAR(exclude_expsyms, $1) \
9624
_LT_AC_TAGVAR(include_expsyms, $1); do
9627
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
9628
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
9629
_LT_AC_TAGVAR(archive_cmds, $1) | \
9630
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
9631
_LT_AC_TAGVAR(module_cmds, $1) | \
9632
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \
9633
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
9634
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
9635
extract_expsyms_cmds | reload_cmds | finish_cmds | \
9636
postinstall_cmds | postuninstall_cmds | \
9637
old_postinstall_cmds | old_postuninstall_cmds | \
9638
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9639
# Double-quote double-evaled strings.
9640
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9643
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9649
*'\[$]0 --fallback-echo"')
9650
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
9655
[cfgfile="${ofile}T"
9656
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9658
AC_MSG_NOTICE([creating $ofile])],
9661
cat <<__EOF__ >> "$cfgfile"
9665
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9666
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9667
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
9669
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
9670
# Free Software Foundation, Inc.
9672
# This file is part of GNU Libtool:
9673
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9675
# This program is free software; you can redistribute it and/or modify
9676
# it under the terms of the GNU General Public License as published by
9677
# the Free Software Foundation; either version 2 of the License, or
9678
# (at your option) any later version.
9680
# This program is distributed in the hope that it will be useful, but
9681
# WITHOUT ANY WARRANTY; without even the implied warranty of
9682
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9683
# General Public License for more details.
9685
# You should have received a copy of the GNU General Public License
9686
# along with this program; if not, write to the Free Software
9687
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9689
# As a special exception to the GNU General Public License, if you
9690
# distribute this file as part of a program that contains a
9691
# configuration script generated by Autoconf, you may include it under
9692
# the same distribution terms that you use for the rest of that program.
9694
# A sed program that does not truncate output.
9697
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9698
Xsed="$SED -e s/^X//"
9700
# The HP-UX ksh and POSIX shell print the target directory to stdout
9702
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
9704
# The names of the tagged configurations supported by this script.
9707
# ### BEGIN LIBTOOL CONFIG],
9708
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
9710
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9712
# Shell to use when invoking shell scripts.
9715
# Whether or not to build shared libraries.
9716
build_libtool_libs=$enable_shared
9718
# Whether or not to build static libraries.
9719
build_old_libs=$enable_static
9721
# Whether or not to add -lc for building shared libraries.
9722
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
9724
# Whether or not to disallow shared libs when runtime libs are static
9725
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
9727
# Whether or not to optimize for fast installation.
9728
fast_install=$enable_fast_install
9731
host_alias=$host_alias
9734
# An echo program that does not interpret backslashes.
9739
AR_FLAGS=$lt_AR_FLAGS
9744
# A language-specific compiler.
9745
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
9747
# Is the compiler the GNU C compiler?
9748
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
9753
# The linker used to build libraries.
9754
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
9756
# Whether we need hard or soft links.
9759
# A BSD-compatible nm program.
9762
# A symbol stripping program
9765
# Used to examine libraries when file_magic_cmd begins "file"
9766
MAGIC_CMD=$MAGIC_CMD
9768
# Used on cygwin: DLL creation program.
9771
# Used on cygwin: object dumper.
9774
# Used on cygwin: assembler.
9777
# The name of the directory that contains temporary libtool files.
9780
# How to create reloadable object files.
9781
reload_flag=$lt_reload_flag
9782
reload_cmds=$lt_reload_cmds
9784
# How to pass a linker flag through the compiler.
9785
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9787
# Object file suffix (normally "o").
9790
# Old archive suffix (normally "a").
9793
# Shared library suffix (normally ".so").
9796
# Executable file suffix (normally "").
9799
# Additional compiler flags for building library objects.
9800
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
9803
# What is the maximum length of a command?
9804
max_cmd_len=$lt_cv_sys_max_cmd_len
9806
# Does compiler simultaneously support -c and -o options?
9807
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
9809
# Must we lock files when doing compilation ?
9810
need_locks=$lt_need_locks
9812
# Do we need the lib prefix for modules?
9813
need_lib_prefix=$need_lib_prefix
9815
# Do we need a version for libraries?
9816
need_version=$need_version
9818
# Whether dlopen is supported.
9819
dlopen_support=$enable_dlopen
9821
# Whether dlopen of programs is supported.
9822
dlopen_self=$enable_dlopen_self
9824
# Whether dlopen of statically linked programs is supported.
9825
dlopen_self_static=$enable_dlopen_self_static
9827
# Compiler flag to prevent dynamic linking.
9828
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9830
# Compiler flag to turn off builtin functions.
9831
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9833
# Compiler flag to allow reflexive dlopens.
9834
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9836
# Compiler flag to generate shared objects directly from archives.
9837
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9839
# Compiler flag to generate thread-safe objects.
9840
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9842
# Library versioning type.
9843
version_type=$version_type
9845
# Format of library name prefix.
9846
libname_spec=$lt_libname_spec
9848
# List of archive names. First name is the real one, the rest are links.
9849
# The last name is the one that the linker finds with -lNAME.
9850
library_names_spec=$lt_library_names_spec
9852
# The coded name of the library, if different from the real name.
9853
soname_spec=$lt_soname_spec
9855
# Commands used to build and install an old-style archive.
9857
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9858
old_postinstall_cmds=$lt_old_postinstall_cmds
9859
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9861
# Create an old-style archive from a shared archive.
9862
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9864
# Create a temporary old-style archive to link instead of a shared archive.
9865
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9867
# Commands used to build and install a shared archive.
9868
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9869
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9870
postinstall_cmds=$lt_postinstall_cmds
9871
postuninstall_cmds=$lt_postuninstall_cmds
9873
# Commands used to build a loadable module (assumed same as above if empty)
9874
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
9875
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
9877
# Commands to strip libraries.
9878
old_striplib=$lt_old_striplib
9879
striplib=$lt_striplib
9881
# Dependencies to place before the objects being linked to create a
9883
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9885
# Dependencies to place after the objects being linked to create a
9887
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9889
# Dependencies to place before the objects being linked to create a
9891
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9893
# Dependencies to place after the objects being linked to create a
9895
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9897
# The library search path used internally by the compiler when linking
9899
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9901
# Method to check whether dependent libraries are shared objects.
9902
deplibs_check_method=$lt_deplibs_check_method
9904
# Command to use when deplibs_check_method == file_magic.
9905
file_magic_cmd=$lt_file_magic_cmd
9907
# Flag that allows shared libraries with undefined symbols to be built.
9908
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9910
# Flag that forces no undefined symbols.
9911
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9913
# Commands used to finish a libtool library installation in a directory.
9914
finish_cmds=$lt_finish_cmds
9916
# Same as above, but a single script fragment to be evaled but not shown.
9917
finish_eval=$lt_finish_eval
9919
# Take the output of nm and produce a listing of raw symbols and C names.
9920
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9922
# Transform the output of nm in a proper C declaration
9923
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9925
# Transform the output of nm in a C name address pair
9926
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9928
# This is the shared library runtime path variable.
9929
runpath_var=$runpath_var
9931
# This is the shared library path variable.
9932
shlibpath_var=$shlibpath_var
9934
# Is shlibpath searched before the hard-coded library search path?
9935
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9937
# How to hardcode a shared library path into an executable.
9938
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9940
# Whether we should hardcode library paths into libraries.
9941
hardcode_into_libs=$hardcode_into_libs
9943
# Flag to hardcode \$libdir into a binary during linking.
9944
# This must work even if \$libdir does not exist.
9945
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9947
# If ld is used when linking, flag to hardcode \$libdir into
9948
# a binary during linking. This must work even if \$libdir does
9950
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
9952
# Whether we need a single -rpath flag with a separated argument.
9953
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9955
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
9957
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9959
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9961
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9963
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9964
# the resulting binary.
9965
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9967
# Set to yes if building a shared library automatically hardcodes DIR into the library
9968
# and all subsequent libraries and executables linked against it.
9969
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
9971
# Variables whose values should be saved in libtool wrapper scripts and
9972
# restored at relink time.
9973
variables_saved_for_relink="$variables_saved_for_relink"
9975
# Whether libtool must link a program against all its dependency libraries.
9976
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9978
# Compile-time system search path for libraries
9979
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9981
# Run-time system search path for libraries
9982
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9984
# Fix the shell variable \$srcfile for the compiler.
9985
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9987
# Set to yes if exported symbols are required.
9988
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9990
# The commands to list exported symbols.
9991
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9993
# The commands to extract the exported symbol list from a shared archive.
9994
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9996
# Symbols that should not be listed in the preloaded symbols.
9997
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9999
# Symbols that must always be exported.
10000
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
10003
[# ### END LIBTOOL CONFIG],
10004
[# ### END LIBTOOL TAG CONFIG: $tagname])
10011
cat <<\EOF >> "$cfgfile"
10013
# AIX sometimes has problems with the GCC collect2 program. For some
10014
# reason, if we set the COLLECT_NAMES environment variable, the problems
10015
# vanish in a puff of smoke.
10016
if test "X${COLLECT_NAMES+set}" != Xset; then
10018
export COLLECT_NAMES
10024
# We use sed instead of cat because bash on DJGPP gets confused if
10025
# if finds mixed CR/LF and LF-only lines. Since sed operates in
10026
# text mode, it properly converts lines to CR/LF. This bash problem
10027
# is reportedly fixed, but why not run on old versions too?
10028
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10030
mv -f "$cfgfile" "$ofile" || \
10031
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10035
# If there is no Makefile yet, we rely on a make rule to execute
10036
# `config.status --recheck' to rerun these tests and create the
10037
# libtool script then.
10038
test -f Makefile && make "$ltmain"
10040
])# AC_LIBTOOL_CONFIG
10043
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
10044
# -------------------------------------------
10045
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
10046
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
10048
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10050
if test "$GCC" = yes; then
10051
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10053
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
10054
lt_cv_prog_compiler_rtti_exceptions,
10055
[-fno-rtti -fno-exceptions], [],
10056
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
10058
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
10061
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10062
# ---------------------------------
10063
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
10064
[AC_REQUIRE([AC_CANONICAL_HOST])
10065
AC_REQUIRE([AC_PROG_NM])
10066
AC_REQUIRE([AC_OBJEXT])
10067
# Check for command to grab the raw symbol name followed by C symbol from nm.
10068
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
10069
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
10071
# These are sane defaults that work on at least a few old systems.
10072
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
10074
# Character class describing NM global symbol codes.
10075
symcode='[[BCDEGRST]]'
10077
# Regexp to match symbols that can be accessed directly from C.
10078
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
10080
# Transform the above into a raw symbol and a C symbol.
10081
symxfrm='\1 \2\3 \3'
10083
# Transform an extracted symbol line into a proper C declaration
10084
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
10086
# Transform an extracted symbol line into symbol name and symbol address
10087
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'"
10089
# Define system-specific variables.
10094
cygwin* | mingw* | pw32*)
10095
symcode='[[ABCDGISTW]]'
10097
hpux*) # Its linker distinguishes data from code symbols
10098
if test "$host_cpu" = ia64; then
10099
symcode='[[ABCDEGRST]]'
10101
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
10102
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'"
10104
irix* | nonstopux*)
10105
symcode='[[BCDEGRST]]'
10108
symcode='[[BCDEGQRST]]'
10114
symcode='[[DFNSTU]]'
10118
# Handle CRLF in mingw tool chain
10122
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
10126
# If we're using GNU nm, then use its standard symbol codes.
10127
case `$NM -V 2>&1` in
10128
*GNU* | *'with BFD'*)
10129
symcode='[[ABCDGISTW]]' ;;
10132
# Try without a prefix undercore, then with it.
10133
for ac_symprfx in "" "_"; do
10135
# Write the raw and C identifiers.
10136
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
10138
# Check to see that the pipe works correctly.
10142
cat > conftest.$ac_ext <<EOF
10147
void nm_test_func(){}
10151
int main(){nm_test_var='a';nm_test_func();return(0);}
10154
if AC_TRY_EVAL(ac_compile); then
10155
# Now try to grab the symbols.
10157
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
10158
# Try sorting and uniquifying the output.
10159
if sort "$nlist" | uniq > "$nlist"T; then
10160
mv -f "$nlist"T "$nlist"
10165
# Make sure that we snagged all the symbols we need.
10166
if grep ' nm_test_var$' "$nlist" >/dev/null; then
10167
if grep ' nm_test_func$' "$nlist" >/dev/null; then
10168
cat <<EOF > conftest.$ac_ext
10174
# Now generate the symbol file.
10175
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
10177
cat <<EOF >> conftest.$ac_ext
10178
#if defined (__STDC__) && __STDC__
10179
# define lt_ptr_t void *
10181
# define lt_ptr_t char *
10185
/* The mapping between symbol names and symbols. */
10190
lt_preloaded_symbols[[]] =
10193
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
10194
cat <<\EOF >> conftest.$ac_ext
10202
# Now try linking the two files.
10203
mv conftest.$ac_objext conftstm.$ac_objext
10204
lt_save_LIBS="$LIBS"
10205
lt_save_CFLAGS="$CFLAGS"
10206
LIBS="conftstm.$ac_objext"
10207
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
10208
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
10211
LIBS="$lt_save_LIBS"
10212
CFLAGS="$lt_save_CFLAGS"
10214
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
10217
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
10220
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
10223
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
10224
cat conftest.$ac_ext >&5
10226
rm -f conftest* conftst*
10228
# Do not use the global_symbol_pipe unless it works.
10229
if test "$pipe_works" = yes; then
10232
lt_cv_sys_global_symbol_pipe=
10236
if test -z "$lt_cv_sys_global_symbol_pipe"; then
10237
lt_cv_sys_global_symbol_to_cdecl=
10239
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
10240
AC_MSG_RESULT(failed)
10244
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10247
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
10248
# ---------------------------------------
10249
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
10250
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
10251
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10252
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
10254
AC_MSG_CHECKING([for $compiler option to produce PIC])
10255
ifelse([$1],[CXX],[
10256
# C++ specific cases for pic, static, wl, etc.
10257
if test "$GXX" = yes; then
10258
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10259
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10263
# All AIX code is PIC.
10264
if test "$host_cpu" = ia64; then
10265
# AIX 5 now supports IA64 processor
10266
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10270
# FIXME: we need at least 68020 code to build shared libraries, but
10271
# adding the `-m68020' flag to GCC prevents building anything better,
10273
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10275
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10276
# PIC is the default for these OSes.
10278
mingw* | os2* | pw32*)
10279
# This hack is so that the source file can tell whether it is being
10280
# built for inclusion in a dll (and should export symbols for example).
10281
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10283
darwin* | rhapsody*)
10284
# PIC is the default on this platform
10285
# Common symbols not allowed in MH_DYLIB files
10286
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10289
# DJGPP does not support shared libraries at all
10290
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10293
if test -d /usr/nec; then
10294
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10298
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10299
# not for PA HP-UX.
10300
case "$host_cpu" in
10304
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10309
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10315
# All AIX code is PIC.
10316
if test "$host_cpu" = ia64; then
10317
# AIX 5 now supports IA64 processor
10318
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10320
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10324
case $cc_basename in
10326
# Green Hills C++ Compiler
10327
# _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"
10332
case $cc_basename in
10334
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10337
# Green Hills C++ Compiler
10338
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10345
# FreeBSD uses GNU C++
10347
hpux9* | hpux10* | hpux11*)
10348
case $cc_basename in
10350
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10351
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10352
if test "$host_cpu" != ia64; then
10353
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10357
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10358
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
10359
case "$host_cpu" in
10364
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10372
irix5* | irix6* | nonstopux*)
10373
case $cc_basename in
10375
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10376
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10377
# CC pic flag -KPIC is the default.
10384
case $cc_basename in
10387
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10388
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10392
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10393
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10394
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10398
# Make sure the PIC flag is empty. It appears that all Alpha
10399
# Linux and Compaq Tru64 Unix objects are PIC.
10400
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10401
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10412
case $cc_basename in
10414
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
10422
osf3* | osf4* | osf5*)
10423
case $cc_basename in
10425
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
10428
# Rational C++ 2.4.1
10429
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10432
# Digital/Compaq C++
10433
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10434
# Make sure the PIC flag is empty. It appears that all Alpha
10435
# Linux and Compaq Tru64 Unix objects are PIC.
10436
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10437
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10446
case $cc_basename in
10448
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10455
case $cc_basename in
10457
# Sun C++ 4.2, 5.x and Centerline C++
10458
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10459
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10460
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10463
# Green Hills C++ Compiler
10464
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10471
case $cc_basename in
10474
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10475
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10479
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10486
case $cc_basename in
10488
# NonStop-UX NCC 3.20
10489
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10500
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10506
if test "$GCC" = yes; then
10507
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10508
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10512
# All AIX code is PIC.
10513
if test "$host_cpu" = ia64; then
10514
# AIX 5 now supports IA64 processor
10515
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10520
# FIXME: we need at least 68020 code to build shared libraries, but
10521
# adding the `-m68020' flag to GCC prevents building anything better,
10523
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
10526
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10527
# PIC is the default for these OSes.
10530
mingw* | pw32* | os2*)
10531
# This hack is so that the source file can tell whether it is being
10532
# built for inclusion in a dll (and should export symbols for example).
10533
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10536
darwin* | rhapsody*)
10537
# PIC is the default on this platform
10538
# Common symbols not allowed in MH_DYLIB files
10539
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
10543
# Just because we use GCC doesn't mean we suddenly get shared libraries
10544
# on systems that don't support them.
10545
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10550
if test -d /usr/nec; then
10551
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
10556
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10557
# not for PA HP-UX.
10558
case "$host_cpu" in
10563
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10569
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
10573
# PORTME Check for flag to pass linker flags through the system compiler.
10576
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10577
if test "$host_cpu" = ia64; then
10578
# AIX 5 now supports IA64 processor
10579
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10581
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
10585
mingw* | pw32* | os2*)
10586
# This hack is so that the source file can tell whether it is being
10587
# built for inclusion in a dll (and should export symbols for example).
10588
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
10591
hpux9* | hpux10* | hpux11*)
10592
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10593
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10594
# not for PA HP-UX.
10595
case "$host_cpu" in
10600
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
10603
# Is there a better lt_prog_compiler_static that works with the bundled CC?
10604
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
10607
irix5* | irix6* | nonstopux*)
10608
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10609
# PIC (with -KPIC) is the default.
10610
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10614
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10615
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10621
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10622
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10623
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
10626
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10627
# All Alpha code is PIC.
10628
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10633
osf3* | osf4* | osf5*)
10634
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10635
# All OSF/1 code is PIC.
10636
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
10640
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
10641
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
10645
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10646
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10647
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10651
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
10652
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
10653
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10656
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10657
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
10658
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
10659
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10663
if test -d /usr/nec ;then
10664
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
10665
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10670
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
10671
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
10675
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
10680
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
10683
# Check to make sure the PIC flag actually works.
10685
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
10686
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
10687
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
10688
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
10689
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
10691
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
10693
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10694
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
10697
# For platforms which do not support PIC, -DPIC is meaningless:
10699
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
10702
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
10708
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
10709
# ------------------------------------
10710
# See if the linker supports building shared libraries.
10711
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
10712
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10713
ifelse([$1],[CXX],[
10714
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10717
# If we're using GNU nm, then we don't want the "-C" option.
10718
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10719
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10720
_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'
10722
_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'
10726
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
10729
_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'
10732
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10737
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10738
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10739
_LT_AC_TAGVAR(archive_cmds, $1)=
10740
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
10741
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
10742
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
10743
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
10744
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10745
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
10746
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10747
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
10748
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10749
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10750
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10751
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10752
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
10753
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
10754
_LT_AC_TAGVAR(module_cmds, $1)=
10755
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
10756
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10757
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10758
# include_expsyms should be a list of space-separated symbols to be *always*
10759
# included in the symbol list
10760
_LT_AC_TAGVAR(include_expsyms, $1)=
10761
# exclude_expsyms can be an extended regexp of symbols to exclude
10762
# it will be wrapped by ` (' and `)$', so one must not match beginning or
10763
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10764
# as well as any symbol that contains `d'.
10765
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
10766
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10767
# platforms (ab)use it in PIC code, but their linkers get confused if
10768
# the symbol is explicitly referenced. Since portable code cannot
10769
# rely on this symbol name, it's probably fine to never include it in
10770
# preloaded symbol tables.
10771
extract_expsyms_cmds=
10774
cygwin* | mingw* | pw32*)
10775
# FIXME: the MSVC++ port hasn't been tested in a loooong time
10776
# When not using gcc, we currently assume that we are using
10777
# Microsoft Visual C++.
10778
if test "$GCC" != yes; then
10787
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10788
if test "$with_gnu_ld" = yes; then
10789
# If archive_cmds runs LD, not CC, wlarc should be empty
10792
# See if GNU ld supports shared libraries.
10794
aix3* | aix4* | aix5*)
10795
# On AIX/PPC, the GNU linker is very broken
10796
if test "$host_cpu" != ia64; then
10797
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10800
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
10801
*** to be unable to reliably create shared libraries on AIX.
10802
*** Therefore, libtool is disabling shared libraries support. If you
10803
*** really care for shared libraries, you may want to modify your PATH
10804
*** so that a non-GNU linker is found, and then restart.
10811
_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)'
10812
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10813
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10815
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
10816
# that the semantics of dynamic libraries on AmigaOS, at least up
10817
# to version 4, is to share data among multiple programs linked
10818
# with the same dynamic library. Since this doesn't match the
10819
# behavior of shared libraries on other platforms, we can't use
10821
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10825
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10826
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10827
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10828
# support --undefined. This deserves some investigation. FIXME
10829
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10831
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10835
cygwin* | mingw* | pw32*)
10836
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10837
# as there is no search path for DLLs.
10838
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10839
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10840
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10841
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10842
_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'
10844
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10845
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10846
# If the export-symbols file already is a .def file (1st line
10847
# is EXPORTS), use it as is; otherwise, prepend...
10848
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10849
cp $export_symbols $output_objdir/$soname.def;
10851
echo EXPORTS > $output_objdir/$soname.def;
10852
cat $export_symbols >> $output_objdir/$soname.def;
10854
$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10861
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10862
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10865
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10866
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10871
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
10872
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10875
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10876
*** create shared libraries on Solaris systems. Therefore, libtool
10877
*** is disabling shared libraries support. We urge you to upgrade GNU
10878
*** binutils to release 2.9.1 or newer. Another option is to modify
10879
*** your PATH or compiler configuration so that the native linker is
10880
*** used, and then restart.
10883
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10884
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10885
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10887
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10892
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10894
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10895
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10899
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10900
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10901
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10903
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10908
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10909
runpath_var=LD_RUN_PATH
10910
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10911
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10912
# ancient GNU ld didn't support --whole-archive et. al.
10913
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
10914
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10916
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10920
# PORTME fill in a description of your system's linker (not GNU ld)
10923
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10924
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10925
_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'
10926
# Note: this linker hardcodes the directories in LIBPATH if there
10927
# are no directories specified by -L.
10928
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10929
if test "$GCC" = yes && test -z "$link_static_flag"; then
10930
# Neither direct hardcoding nor static linking is supported with a
10932
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10937
if test "$host_cpu" = ia64; then
10938
# On IA64, the linker does run time linking by default, so we don't
10939
# have to do anything special.
10940
aix_use_runtimelinking=no
10941
exp_sym_flag='-Bexport'
10944
# If we're using GNU nm, then we don't want the "-C" option.
10945
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10946
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
10947
_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'
10949
_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'
10952
# KDE requires run time linking. Make it the default.
10953
aix_use_runtimelinking=yes
10954
exp_sym_flag='-bexport'
10955
no_entry_flag='-bnoentry'
10958
# When large executables or shared objects are built, AIX ld can
10959
# have problems creating the table of contents. If linking a library
10960
# or program results in "error TOC overflow" add -mminimal-toc to
10961
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10962
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10964
_LT_AC_TAGVAR(archive_cmds, $1)=''
10965
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10966
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10967
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10969
if test "$GCC" = yes; then
10970
case $host_os in aix4.[012]|aix4.[012].*)
10971
# We only want to do this on AIX 4.2 and lower, the check
10972
# below for broken collect2 doesn't work under 4.3+
10973
collect2name=`${CC} -print-prog-name=collect2`
10974
if test -f "$collect2name" && \
10975
strings "$collect2name" | grep resolve_lib_name >/dev/null
10977
# We have reworked collect2
10978
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10980
# We have old collect2
10981
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10982
# It fails to find uninstalled libraries when the uninstalled
10983
# path is not listed in the libpath. Setting hardcode_minus_L
10984
# to unsupported forces relinking
10985
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10986
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10987
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10990
shared_flag='-shared'
10993
if test "$host_cpu" = ia64; then
10994
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10995
# chokes on -Wl,-G. The following line is correct:
10998
if test "$aix_use_runtimelinking" = yes; then
10999
shared_flag='-qmkshrobj ${wl}-G'
11001
shared_flag='-qmkshrobj'
11006
# Let the compiler handle the export list.
11007
_LT_AC_TAGVAR(always_export_symbols, $1)=no
11008
if test "$aix_use_runtimelinking" = yes; then
11009
# Warning - without using the other runtime loading flags (-brtl),
11010
# -berok will link without error, but may produce a broken library.
11011
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
11012
# Determine the default libpath from the value encoded in an empty executable.
11013
_LT_AC_SYS_LIBPATH_AIX
11014
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11015
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
11016
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11018
if test "$host_cpu" = ia64; then
11019
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
11020
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
11021
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
11023
# Determine the default libpath from the value encoded in an empty executable.
11024
_LT_AC_SYS_LIBPATH_AIX
11025
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
11026
# Warning - without using the other run time loading flags,
11027
# -berok will link without error, but may produce a broken library.
11028
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
11029
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
11030
# -bexpall does not export symbols beginning with underscore (_)
11031
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
11032
# Exported symbols can be pulled into shared objects from archives
11033
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
11034
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11035
# This is similar to how AIX traditionally builds it's shared libraries.
11036
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11042
_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)'
11043
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11044
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11045
# see comment about different semantics on the GNU ld section
11046
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11050
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
11053
cygwin* | mingw* | pw32*)
11054
# When not using gcc, we currently assume that we are using
11055
# Microsoft Visual C++.
11056
# hardcode_libdir_flag_spec is actually meaningless, as there is
11057
# no search path for DLLs.
11058
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
11059
_LT_AC_TAGVAR(allow_undefined_flag, $1)=no
11060
# Tell ltmain to make .lib files, not .a files.
11062
# Tell ltmain to make .dll files, not .so files.
11064
# FIXME: Setting linknames here is a bad hack.
11065
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
11066
# The linker will automatically build a .lib file if we build a DLL.
11067
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
11068
# FIXME: Should let the user specify the lib program.
11069
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
11070
fix_srcfile_path='`cygpath -w "$srcfile"`'
11071
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
11074
darwin* | rhapsody*)
11075
if test "$GXX" = yes ; then
11076
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11078
rhapsody* | darwin1.[[012]])
11079
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
11082
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11083
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11085
case ${MACOSX_DEPLOYMENT_TARGET} in
11087
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
11090
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
11096
lt_int_apple_cc_single_mod=no
11097
output_verbose_link_cmd='echo'
11098
if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
11099
lt_int_apple_cc_single_mod=yes
11101
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11102
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
11104
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
11106
_LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
11107
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
11108
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11109
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11111
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11113
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11114
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11115
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
11116
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
11117
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
11118
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11120
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11125
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11126
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11127
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11131
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11134
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11135
# support. Future versions do this automatically, but an explicit c++rt0.o
11136
# does not break anything, and helps significantly (at the cost of a little
11139
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11140
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11141
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11142
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11145
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
11147
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11148
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11149
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11150
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11153
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11155
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
11156
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11157
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11158
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11162
if test "$GCC" = yes; then
11163
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11165
_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'
11167
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11168
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11169
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11171
# hardcode_minus_L: Not really in the search PATH,
11172
# but as the default location of the library.
11173
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11174
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11178
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
11179
case "$host_cpu" in
11181
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11184
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
11188
case "$host_cpu" in
11190
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
11193
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11197
if test "$with_gnu_ld" = no; then
11198
case "$host_cpu" in
11200
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11201
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
11202
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11203
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11204
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11207
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11208
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11209
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11211
# hardcode_minus_L: Not really in the search PATH,
11212
# but as the default location of the library.
11213
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11216
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
11217
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11218
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11219
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11221
# hardcode_minus_L: Not really in the search PATH,
11222
# but as the default location of the library.
11223
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11229
irix5* | irix6* | nonstopux*)
11230
if test "$GCC" = yes; then
11231
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11233
_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'
11234
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
11236
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11237
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11238
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11242
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11243
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11245
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11247
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11248
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11249
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11253
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11254
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11255
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11256
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11257
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11261
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11262
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11263
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11264
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11265
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11266
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
11269
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
11270
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11271
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11274
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
11275
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
11282
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11283
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11284
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
11285
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
11286
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
11290
if test "$GCC" = yes; then
11291
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11292
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11294
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11295
_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'
11297
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11298
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11301
osf4* | osf5*) # as osf3* with the addition of -msym flag
11302
if test "$GCC" = yes; then
11303
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
11304
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11305
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
11307
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
11308
_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'
11309
_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~
11310
$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'
11312
# Both c and cxx compiler support -rpath directly
11313
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
11315
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
11319
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11320
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11321
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
11322
runpath_var=LD_RUN_PATH
11323
hardcode_runpath_var=yes
11327
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11328
if test "$GCC" = yes; then
11329
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11330
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11331
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
11333
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11334
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11335
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11337
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
11338
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11340
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11341
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
11342
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
11344
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
11348
if test "x$host_vendor" = xsequent; then
11349
# Use $CC to link under sequent, because it throws in some extra .o
11350
# files that make .init and .fini sections work.
11351
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
11353
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11355
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11356
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11357
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
11358
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11362
case $host_vendor in
11364
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11365
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
11368
## LD is ld it makes a PLAMLIB
11369
## CC just makes a GrossModule.
11370
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11371
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
11372
_LT_AC_TAGVAR(hardcode_direct, $1)=no
11375
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11376
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
11379
runpath_var='LD_RUN_PATH'
11380
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11384
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11385
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11386
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
11390
if test -d /usr/nec; then
11391
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11392
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11393
runpath_var=LD_RUN_PATH
11394
hardcode_runpath_var=yes
11395
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
11400
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11401
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
11402
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
11403
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11404
hardcode_runpath_var=yes
11405
runpath_var=LD_RUN_PATH
11408
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
11409
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
11410
if test "$GCC" = yes; then
11411
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11413
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
11415
runpath_var='LD_RUN_PATH'
11416
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11420
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
11421
# $CC -shared without GNU ld will not create a library from C++
11422
# object files and a static libstdc++, better avoid it by now
11423
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
11424
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11425
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
11426
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
11427
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11428
runpath_var='LD_RUN_PATH'
11432
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11433
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
11434
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
11438
_LT_AC_TAGVAR(ld_shlibs, $1)=no
11443
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
11444
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
11446
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
11447
if test "$GCC" = yes; then
11448
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
11452
# Do we need to explicitly link libc?
11454
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
11456
# Assume -lc should be added
11457
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11459
if test "$enable_shared" = yes && test "$GCC" = yes; then
11460
case $_LT_AC_TAGVAR(archive_cmds, $1) in
11462
# FIXME: we may have to deal with multi-command sequences.
11465
# Test whether the compiler implicitly links with -lc since on some
11466
# systems, -lgcc has to come before -lc. If gcc already passes -lc
11467
# to ld, don't add -lc before -lgcc.
11468
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
11470
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
11472
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
11475
libobjs=conftest.$ac_objext
11477
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
11483
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
11484
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
11485
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
11487
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
11489
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
11491
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
11493
cat conftest.err 1>&5
11496
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
11502
])# AC_LIBTOOL_PROG_LD_SHLIBS
11505
# _LT_AC_FILE_LTDLL_C
11506
# -------------------
11507
# Be careful that the start marker always follows a newline.
11508
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
11509
# /* ltdll.c starts here */
11510
# #define WIN32_LEAN_AND_MEAN
11511
# #include <windows.h>
11512
# #undef WIN32_LEAN_AND_MEAN
11513
# #include <stdio.h>
11515
# #ifndef __CYGWIN__
11516
# # ifdef __CYGWIN32__
11517
# # define __CYGWIN__ __CYGWIN32__
11521
# #ifdef __cplusplus
11524
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
11525
# #ifdef __cplusplus
11529
# #ifdef __CYGWIN__
11530
# #include <cygwin/cygwin_dll.h>
11531
# DECLARE_CYGWIN_DLL( DllMain );
11533
# HINSTANCE __hDllInstance_base;
11536
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
11538
# __hDllInstance_base = hInst;
11541
# /* ltdll.c ends here */
11542
])# _LT_AC_FILE_LTDLL_C
11545
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
11546
# ---------------------------------
11547
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
11551
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
11552
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11553
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11554
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11555
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11556
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
11557
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
11559
# This is just to silence aclocal about the macro not being used
11560
ifelse([AC_DISABLE_FAST_INSTALL])
11562
AC_DEFUN([LT_AC_PROG_GCJ],
11563
[AC_CHECK_TOOL(GCJ, gcj, no)
11564
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
11568
AC_DEFUN([LT_AC_PROG_RC],
11569
[AC_CHECK_TOOL(RC, windres, no)
11572
# NOTE: This macro has been submitted for inclusion into #
11573
# GNU Autoconf as AC_PROG_SED. When it is available in #
11574
# a released version of Autoconf we should remove this #
11575
# macro and use it instead. #
11578
# Check for a fully-functional sed program, that truncates
11579
# as few characters as possible. Prefer GNU sed if found.
11580
AC_DEFUN([LT_AC_PROG_SED],
11581
[AC_MSG_CHECKING([for a sed that does not truncate output])
11582
AC_CACHE_VAL(lt_cv_path_SED,
11583
[# Loop through the user's path and test for sed and gsed.
11584
# Then use that list of sed's as ones to test for truncation.
11585
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11586
for as_dir in $PATH
11589
test -z "$as_dir" && as_dir=.
11590
for lt_ac_prog in sed gsed; do
11591
for ac_exec_ext in '' $ac_executable_extensions; do
11592
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11593
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11600
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11601
# along with /bin/sed that truncates output.
11602
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11603
test ! -f $lt_ac_sed && break
11604
cat /dev/null > conftest.in
11606
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11607
# Check for GNU sed and select it if it is found.
11608
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11609
lt_cv_path_SED=$lt_ac_sed
11613
cat conftest.in conftest.in >conftest.tmp
11614
mv conftest.tmp conftest.in
11615
cp conftest.in conftest.nl
11617
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11618
cmp -s conftest.out conftest.nl || break
11619
# 10000 chars as input seems more than enough
11620
test $lt_ac_count -gt 10 && break
11621
lt_ac_count=`expr $lt_ac_count + 1`
11622
if test $lt_ac_count -gt $lt_ac_max; then
11623
lt_ac_max=$lt_ac_count
11624
lt_cv_path_SED=$lt_ac_sed
11629
SED=$lt_cv_path_SED
11630
AC_MSG_RESULT([$SED])
11633
# AM_CONDITIONAL -*- Autoconf -*-
11635
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
11637
# This program is free software; you can redistribute it and/or modify
11638
# it under the terms of the GNU General Public License as published by
11639
# the Free Software Foundation; either version 2, or (at your option)
11640
# any later version.
11642
# This program is distributed in the hope that it will be useful,
11643
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11644
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11645
# GNU General Public License for more details.
11647
# You should have received a copy of the GNU General Public License
11648
# along with this program; if not, write to the Free Software
11649
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11656
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11657
# -------------------------------------
11658
# Define a conditional.
11659
AC_DEFUN([AM_CONDITIONAL],
11660
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
11661
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11662
AC_SUBST([$1_TRUE])
11663
AC_SUBST([$1_FALSE])
11671
AC_CONFIG_COMMANDS_PRE(
11672
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11673
AC_MSG_ERROR([conditional \"$1\" was never defined.
11674
Usually this means the macro was only invoked conditionally.])
11677
# Do all the work for Automake. -*- Autoconf -*-
11679
# This macro actually does too much some checks are only needed if
11680
# your package does certain things. But this isn't really a big deal.
11682
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
11683
# Free Software Foundation, Inc.
11685
# This program is free software; you can redistribute it and/or modify
11686
# it under the terms of the GNU General Public License as published by
11687
# the Free Software Foundation; either version 2, or (at your option)
11688
# any later version.
11690
# This program is distributed in the hope that it will be useful,
11691
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11692
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11693
# GNU General Public License for more details.
11695
# You should have received a copy of the GNU General Public License
11696
# along with this program; if not, write to the Free Software
11697
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11702
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11703
# written in clear, in which case automake, when reading aclocal.m4,
11704
# will think it sees a *use*, and therefore will trigger all it's
11705
# C support machinery. Also note that it means that autoscan, seeing
11706
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11711
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
11712
# the ones we care about.
11713
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
11715
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
11716
# AM_INIT_AUTOMAKE([OPTIONS])
11717
# -----------------------------------------------
11718
# The call with PACKAGE and VERSION arguments is the old style
11719
# call (pre autoconf-2.50), which is being phased out. PACKAGE
11720
# and VERSION should now be passed to AC_INIT and removed from
11721
# the call to AM_INIT_AUTOMAKE.
11722
# We support both call styles for the transition. After
11723
# the next Automake release, Autoconf can make the AC_INIT
11724
# arguments mandatory, and then we can depend on a new Autoconf
11725
# release and drop the old call support.
11726
AC_DEFUN([AM_INIT_AUTOMAKE],
11727
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
11728
AC_REQUIRE([AC_PROG_INSTALL])dnl
11729
# test to see if srcdir already configured
11730
if test "`cd $srcdir && pwd`" != "`pwd`" &&
11731
test -f $srcdir/config.status; then
11732
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
11735
# Define the identity of the package.
11736
dnl Distinguish between old-style and new-style calls.
11738
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
11739
AC_SUBST([PACKAGE], [$1])dnl
11740
AC_SUBST([VERSION], [$2])],
11741
[_AM_SET_OPTIONS([$1])dnl
11742
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
11743
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
11745
_AM_IF_OPTION([no-define],,
11746
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
11747
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
11749
# Some tools Automake needs.
11750
AC_REQUIRE([AM_SANITY_CHECK])dnl
11751
AC_REQUIRE([AC_ARG_PROGRAM])dnl
11752
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
11753
AM_MISSING_PROG(AUTOCONF, autoconf)
11754
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
11755
AM_MISSING_PROG(AUTOHEADER, autoheader)
11756
AM_MISSING_PROG(MAKEINFO, makeinfo)
11757
AM_MISSING_PROG(AMTAR, tar)
11759
AM_PROG_INSTALL_STRIP
11760
# We need awk for the "check" target. The system "awk" is bad on
11762
AC_REQUIRE([AC_PROG_AWK])dnl
11763
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
11765
_AM_IF_OPTION([no-dependencies],,
11766
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
11767
[_AM_DEPENDENCIES(CC)],
11768
[define([AC_PROG_][CC],
11769
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
11770
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
11771
[_AM_DEPENDENCIES(CXX)],
11772
[define([AC_PROG_][CXX],
11773
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11777
# Copyright 2002 Free Software Foundation, Inc.
11779
# This program is free software; you can redistribute it and/or modify
11780
# it under the terms of the GNU General Public License as published by
11781
# the Free Software Foundation; either version 2, or (at your option)
11782
# any later version.
11784
# This program is distributed in the hope that it will be useful,
11785
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11786
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11787
# GNU General Public License for more details.
11789
# You should have received a copy of the GNU General Public License
11790
# along with this program; if not, write to the Free Software
11791
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
11793
20
# AM_AUTOMAKE_VERSION(VERSION)
11794
21
# ----------------------------
11795
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
11796
23
# generated from the m4 files accompanying Automake X.Y.
11797
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
11799
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
11800
27
# -------------------------------
11801
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
11802
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
11803
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11804
[AM_AUTOMAKE_VERSION([1.6.3])])
11806
# Helper functions for option handling. -*- Autoconf -*-
11808
# Copyright 2001, 2002 Free Software Foundation, Inc.
11810
# This program is free software; you can redistribute it and/or modify
11811
# it under the terms of the GNU General Public License as published by
11812
# the Free Software Foundation; either version 2, or (at your option)
11813
# any later version.
11815
# This program is distributed in the hope that it will be useful,
11816
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11817
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11818
# GNU General Public License for more details.
11820
# You should have received a copy of the GNU General Public License
11821
# along with this program; if not, write to the Free Software
11822
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11827
# _AM_MANGLE_OPTION(NAME)
11828
# -----------------------
11829
AC_DEFUN([_AM_MANGLE_OPTION],
11830
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11832
# _AM_SET_OPTION(NAME)
11833
# ------------------------------
11834
# Set option NAME. Presently that only means defining a flag for this option.
11835
AC_DEFUN([_AM_SET_OPTION],
11836
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11838
# _AM_SET_OPTIONS(OPTIONS)
11839
# ----------------------------------
11840
# OPTIONS is a space-separated list of Automake options.
11841
AC_DEFUN([_AM_SET_OPTIONS],
11842
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11844
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11845
# -------------------------------------------
11846
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11847
AC_DEFUN([_AM_IF_OPTION],
11848
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11851
# Check to make sure that the build environment is sane.
11854
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
11856
# This program is free software; you can redistribute it and/or modify
11857
# it under the terms of the GNU General Public License as published by
11858
# the Free Software Foundation; either version 2, or (at your option)
11859
# any later version.
11861
# This program is distributed in the hope that it will be useful,
11862
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11863
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11864
# GNU General Public License for more details.
11866
# You should have received a copy of the GNU General Public License
11867
# along with this program; if not, write to the Free Software
11868
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11875
AC_DEFUN([AM_SANITY_CHECK],
11876
[AC_MSG_CHECKING([whether build environment is sane])
11879
echo timestamp > conftest.file
11880
# Do `set' in a subshell so we don't clobber the current shell's
11881
# arguments. Must try -L first in case configure is actually a
11882
# symlink; some systems play weird games with the mod time of symlinks
11883
# (eg FreeBSD returns the mod time of the symlink's containing
11886
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11887
if test "$[*]" = "X"; then
11889
set X `ls -t $srcdir/configure conftest.file`
11891
rm -f conftest.file
11892
if test "$[*]" != "X $srcdir/configure conftest.file" \
11893
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
11895
# If neither matched, then we have a broken ls. This can happen
11896
# if, for instance, CONFIG_SHELL is bash and it inherits a
11897
# broken ls alias from the environment. This has actually
11898
# happened. Such a system could not be considered "sane".
11899
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11900
alias in your environment])
11903
test "$[2]" = conftest.file
11909
AC_MSG_ERROR([newly created file is older than distributed files!
11910
Check your system clock])
11912
AC_MSG_RESULT(yes)])
11917
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
11919
# This program is free software; you can redistribute it and/or modify
11920
# it under the terms of the GNU General Public License as published by
11921
# the Free Software Foundation; either version 2, or (at your option)
11922
# any later version.
11924
# This program is distributed in the hope that it will be useful,
11925
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11926
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11927
# GNU General Public License for more details.
11929
# You should have received a copy of the GNU General Public License
11930
# along with this program; if not, write to the Free Software
11931
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11936
# AM_MISSING_PROG(NAME, PROGRAM)
11937
# ------------------------------
11938
AC_DEFUN([AM_MISSING_PROG],
11939
[AC_REQUIRE([AM_MISSING_HAS_RUN])
11940
$1=${$1-"${am_missing_run}$2"}
11944
# AM_MISSING_HAS_RUN
11945
# ------------------
11946
# Define MISSING if not defined so far and test if it supports --run.
11947
# If it does, set am_missing_run to use it, otherwise, to nothing.
11948
AC_DEFUN([AM_MISSING_HAS_RUN],
11949
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11950
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11951
# Use eval to expand $SHELL
11952
if eval "$MISSING --run true"; then
11953
am_missing_run="$MISSING --run "
11956
AC_MSG_WARN([`missing' script is too old or missing])
11960
# AM_AUX_DIR_EXPAND
11962
# Copyright 2001 Free Software Foundation, Inc.
11964
# This program is free software; you can redistribute it and/or modify
11965
# it under the terms of the GNU General Public License as published by
11966
# the Free Software Foundation; either version 2, or (at your option)
11967
# any later version.
11969
# This program is distributed in the hope that it will be useful,
11970
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11971
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11972
# GNU General Public License for more details.
11974
# You should have received a copy of the GNU General Public License
11975
# along with this program; if not, write to the Free Software
11976
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
11979
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11980
42
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to