1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
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.
41
dnl ------------------------------------------------------------------------
42
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
43
dnl thanks to Raja R Harinath.
44
dnl ------------------------------------------------------------------------
46
ifdef([_AC_PATH_X_XMKMF],[],
47
[AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
48
ifdef([AC_OUTPUT_SUBDIRS],[],
49
[AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
52
dnl Internal subroutine of AC_PATH_X.
53
dnl Set ac_x_includes and/or ac_x_libraries.
54
AC_DEFUN(KDE_PATH_X_DIRECT,
55
[if test "$ac_x_includes" = NO; then
56
# Guess where to find include files, by looking for this one X11 .h file.
57
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
59
# First, try using that file with no special directory specified.
60
AC_TRY_CPP([#include <$x_direct_test_include>],
61
[# We can compile using X headers with no special include directory.
63
[# Look for the header file in a standard set of common directories.
64
# Check X11 before X11Rn because it is often a symlink to the current release.
76
/usr/local/X11/include \
77
/usr/local/X11R6/include \
78
/usr/local/X11R5/include \
79
/usr/local/X11R4/include \
81
/usr/local/include/X11 \
82
/usr/local/include/X11R6 \
83
/usr/local/include/X11R5 \
84
/usr/local/include/X11R4 \
88
/usr/XFree86/include/X11 \
92
/usr/unsupported/include \
94
/usr/local/x11r5/include \
95
/usr/lpp/Xamples/include \
97
/usr/openwin/include \
98
/usr/openwin/share/include \
101
if test -r "$ac_dir/$x_direct_test_include"; then
102
ac_x_includes=$ac_dir
106
fi # $ac_x_includes = NO
108
if test "$ac_x_libraries" = NO; then
109
# Check for the libraries.
111
test -z "$x_direct_test_library" && x_direct_test_library=Xt
112
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
114
# See if we find them without any special options.
115
# Don't add to $LIBS permanently.
117
LIBS="-l$x_direct_test_library $LIBS"
118
AC_TRY_LINK(, [${x_direct_test_function}()],
119
[LIBS="$ac_save_LIBS"
120
# We can link X programs with no special library path.
122
[LIBS="$ac_save_LIBS"
123
# First see if replacing the include by lib works.
124
# Check X11 before X11Rn because it is often a symlink to the current release.
125
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
137
/usr/local/X11R6/lib \
138
/usr/local/X11R5/lib \
139
/usr/local/X11R4/lib \
142
/usr/local/lib/X11R6 \
143
/usr/local/lib/X11R5 \
144
/usr/local/lib/X11R4 \
148
/usr/XFree86/lib/X11 \
152
/usr/unsupported/lib \
154
/usr/local/x11r5/lib \
155
/usr/lpp/Xamples/lib \
159
/usr/openwin/share/lib \
162
dnl Don't even attempt the hair of trying to link an X program!
163
for ac_extension in a so sl; do
164
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
165
ac_x_libraries=$ac_dir
170
fi # $ac_x_libraries = NO
174
dnl ------------------------------------------------------------------------
175
dnl Find a file (or one of more files in a list of dirs)
176
dnl ------------------------------------------------------------------------
178
AC_DEFUN(AC_FIND_FILE,
185
echo "configure: __oline__: $i/$j" >&AC_FD_CC
186
if test -r "$i/$j"; then
187
echo "taking that" >&AC_FD_CC
195
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
196
dnl if-not-found, test-parameter)
197
AC_DEFUN(KDE_FIND_PATH,
199
AC_MSG_CHECKING([for $1])
200
if test -n "$$2"; then
203
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
205
AC_CACHE_VAL(kde_cv_path_$kde_cache,
217
if test -x "$dir/$1"; then
220
evalstr="$dir/$1 $5 2>&1 "
221
if eval $evalstr; then
222
kde_cv_path="$dir/$1"
226
kde_cv_path="$dir/$1"
232
eval "kde_cv_path_$kde_cache=$kde_cv_path"
236
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
240
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
241
AC_MSG_RESULT(not found)
244
AC_MSG_RESULT($kde_cv_path)
250
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
252
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
253
Please check whether you installed Qt correctly.
254
You need to have a running moc binary.
255
configure tried to run $ac_cv_path_moc and the test didn't
256
succeed. If configure shouldn't have tried this one, set
257
the environment variable MOC to the right one before running
262
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
264
AC_MSG_WARN([No Qt ui compiler (uic) found!
265
Please check whether you installed Qt correctly.
266
You need to have a running uic binary.
267
configure tried to run $ac_cv_path_uic and the test didn't
268
succeed. If configure shouldn't have tried this one, set
269
the environment variable UIC to the right one before running
275
AC_DEFUN(KDE_CHECK_UIC_FLAG,
277
AC_MSG_CHECKING([whether uic supports -$1 ])
278
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
279
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
281
cat >conftest.ui <<EOT
282
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
284
ac_uic_testrun="$UIC -$1 $2 conftest.ui >/dev/null"
285
if AC_TRY_EVAL(ac_uic_testrun); then
286
eval "kde_cv_prog_uic_$kde_cache=yes"
288
eval "kde_cv_prog_uic_$kde_cache=no"
293
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
305
dnl ------------------------------------------------------------------------
306
dnl Find the meta object compiler and the ui compiler in the PATH,
307
dnl in $QTDIR/bin, and some more usual places
308
dnl ------------------------------------------------------------------------
310
AC_DEFUN(AC_PATH_QT_MOC_UIC,
313
for dir in $kde_qt_dirs; do
314
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
316
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
317
if test ! "$ac_qt_bindir" = "NO"; then
318
qt_bindirs="$ac_qt_bindir $qt_bindirs"
321
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
322
if test -z "$UIC_NOT_NEEDED"; then
323
KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
324
if test -z "$UIC" ; then
325
KDE_UIC_ERROR_MESSAGE
327
elif test $kde_qtver = 3; then
328
KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
329
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
331
if test x$ac_uic_supports_libpath = xyes; then
332
UIC="$UIC -L \$(kde_widgetdir)"
334
if test x$ac_uic_supports_nounload = xyes; then
339
UIC="echo uic not available: "
346
if test $kde_qtver = 3; then
353
AC_DEFUN(KDE_1_CHECK_PATHS,
355
KDE_1_CHECK_PATH_HEADERS
359
if test -n "$USE_RPATH"; then
361
if test -n "$kde_libraries"; then
362
KDE_TEST_RPATH="-R $kde_libraries"
365
if test -n "$qt_libraries"; then
366
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
369
if test -n "$x_libraries"; then
370
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
373
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
376
AC_MSG_CHECKING([for KDE libraries installed])
377
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'
379
if AC_TRY_EVAL(ac_link) && test -s conftest; then
382
AC_MSG_ERROR([your system fails at linking a small KDE application!
383
Check, if your compiler is installed correctly and if you have used the
384
same compiler to compile Qt and kdelibs as you did use now.
385
For more details about this problem, look at the end of config.log.])
388
if eval `KDEDIR= ./conftest 2>&5`; then
394
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
395
kde_have_all_paths=yes
397
KDE_SET_PATHS($kde_result)
401
AC_DEFUN(KDE_SET_PATHS,
403
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
404
kde_htmldir=\"$kde_htmldir\" \
405
kde_appsdir=\"$kde_appsdir\" \
406
kde_icondir=\"$kde_icondir\" \
407
kde_sounddir=\"$kde_sounddir\" \
408
kde_datadir=\"$kde_datadir\" \
409
kde_locale=\"$kde_locale\" \
410
kde_cgidir=\"$kde_cgidir\" \
411
kde_confdir=\"$kde_confdir\" \
412
kde_mimedir=\"$kde_mimedir\" \
413
kde_toolbardir=\"$kde_toolbardir\" \
414
kde_wallpaperdir=\"$kde_wallpaperdir\" \
415
kde_templatesdir=\"$kde_templatesdir\" \
416
kde_bindir=\"$kde_bindir\" \
417
kde_servicesdir=\"$kde_servicesdir\" \
418
kde_servicetypesdir=\"$kde_servicetypesdir\" \
419
kde_moduledir=\"$kde_moduledir\" \
420
kde_styledir=\"$kde_styledir\" \
421
kde_widgetdir=\"$kde_widgetdir\" \
425
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
427
if test "$1" = "default"; then
429
if test -z "$kde_htmldir"; then
430
kde_htmldir='\${prefix}/share/doc/HTML'
432
if test -z "$kde_appsdir"; then
433
kde_appsdir='\${prefix}/share/applnk'
435
if test -z "$kde_icondir"; then
436
kde_icondir='\${prefix}/share/icons'
438
if test -z "$kde_sounddir"; then
439
kde_sounddir='\${prefix}/share/sounds'
441
if test -z "$kde_datadir"; then
442
kde_datadir='\${prefix}/share/apps'
444
if test -z "$kde_locale"; then
445
kde_locale='\${prefix}/share/locale'
447
if test -z "$kde_cgidir"; then
448
kde_cgidir='\${exec_prefix}/cgi-bin'
450
if test -z "$kde_confdir"; then
451
kde_confdir='\${prefix}/share/config'
453
if test -z "$kde_mimedir"; then
454
kde_mimedir='\${prefix}/share/mimelnk'
456
if test -z "$kde_toolbardir"; then
457
kde_toolbardir='\${prefix}/share/toolbar'
459
if test -z "$kde_wallpaperdir"; then
460
kde_wallpaperdir='\${prefix}/share/wallpapers'
462
if test -z "$kde_templatesdir"; then
463
kde_templatesdir='\${prefix}/share/templates'
465
if test -z "$kde_bindir"; then
466
kde_bindir='\${exec_prefix}/bin'
468
if test -z "$kde_servicesdir"; then
469
kde_servicesdir='\${prefix}/share/services'
471
if test -z "$kde_servicetypesdir"; then
472
kde_servicetypesdir='\${prefix}/share/servicetypes'
474
if test -z "$kde_moduledir"; then
475
if test "$kde_qtver" = "2"; then
476
kde_moduledir='\${libdir}/kde2'
478
kde_moduledir='\${libdir}/kde3'
481
if test -z "$kde_styledir"; then
482
kde_styledir='\${libdir}/kde3/plugins/styles'
484
if test -z "$kde_widgetdir"; then
485
kde_widgetdir='\${libdir}/kde3/plugins/designer'
488
KDE_SET_PATHS(defaults)
492
if test $kde_qtver = 1; then
493
AC_MSG_RESULT([compiling])
496
AC_MSG_ERROR([path checking not yet supported for KDE 2])
502
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
503
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
504
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
505
test -z "$kde_datadir" || test -z "$kde_locale" ||
506
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
507
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
508
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
509
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
510
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
511
test -z "$kde_styledir" || test -z "kde_widgetdir"
512
test "x$kde_have_all_paths" != "xyes"; then
513
kde_have_all_paths=no
517
AC_DEFUN(KDE_MISSING_PROG_ERROR,
519
AC_MSG_ERROR([The important program $1 was not found!
520
Please check whether you installed KDE correctly.
524
AC_DEFUN(KDE_MISSING_ARTS_ERROR,
526
AC_MSG_ERROR([The important program $1 was not found!
527
Please check whether you installed aRts correctly.
531
AC_DEFUN(KDE_SUBST_PROGRAMS,
534
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"
535
if test -n "$KDEDIRS"; then
538
for dir in $KDEDIRS; do
539
kde_default_bindirs="$dir/bin $kde_default_bindirs "
543
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
544
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
545
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
546
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
547
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
548
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
549
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
551
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
552
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
553
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
554
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
555
if test "$KDE_XSL_STYLESHEET" = "NO"; then
556
KDE_XSL_STYLESHEET=""
558
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
562
DCOP_DEPENDENCIES='$(DCOPIDL)'
564
AC_SUBST(DCOPIDL2CPP)
565
AC_SUBST(DCOP_DEPENDENCIES)
567
AC_SUBST(ARTSCCONFIG)
570
AC_SUBST(KDE_XSL_STYLESHEET)
572
if test -x "$KDECONFIG"; then # it can be "compiled"
573
kde_libs_prefix=`$KDECONFIG --prefix`
574
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
575
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
576
This means it has been moved since you installed it.
577
This won't work. Please recompile kdelibs for the new prefix.
580
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
582
kde_libs_prefix='$(prefix)'
583
kde_libs_htmldir='$(kde_htmldir)'
585
AC_SUBST(kde_libs_prefix)
586
AC_SUBST(kde_libs_htmldir)
589
AC_DEFUN(AC_CREATE_KFSSTND,
591
AC_REQUIRE([AC_CHECK_RPATH])
593
AC_MSG_CHECKING([for KDE paths])
596
AC_CACHE_VAL(kde_cv_all_paths,
598
KDE_SET_DEFAULT_PATHS($1)
601
eval "$kde_cv_all_paths"
602
KDE_CHECK_PATHS_FOR_COMPLETENESS
603
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
604
# wrong values were cached, may be, we can set better ones
606
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
607
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
608
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
609
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
613
KDE_SET_DEFAULT_PATHS($1)
614
eval "$kde_cv_all_paths"
615
KDE_CHECK_PATHS_FOR_COMPLETENESS
616
kde_result="$kde_result (cache overridden)"
618
if test "$kde_have_all_paths" = "no"; then
619
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
620
Since it had compiled and linked before, it must be a strange problem on your system.
621
Look at config.log for details. If you are not able to fix this, look at
622
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
623
(If you're using an egcs version on Linux, you may update binutils!)
627
AC_MSG_RESULT($kde_result)
636
AC_DEFUN(AC_SUBST_KFSSTND,
638
AC_SUBST(kde_htmldir)
639
AC_SUBST(kde_appsdir)
640
AC_SUBST(kde_icondir)
641
AC_SUBST(kde_sounddir)
642
AC_SUBST(kde_datadir)
644
AC_SUBST(kde_confdir)
645
AC_SUBST(kde_mimedir)
646
AC_SUBST(kde_wallpaperdir)
649
AC_SUBST(kde_templatesdir)
650
AC_SUBST(kde_servicesdir)
651
AC_SUBST(kde_servicetypesdir)
652
AC_SUBST(kde_moduledir)
653
AC_SUBST(kde_styledir)
654
AC_SUBST(kde_widgetdir)
655
if test "$kde_qtver" = 1; then
656
kde_minidir="$kde_icondir/mini"
658
# for KDE 1 - this breaks KDE2 apps using minidir, but
659
# that's the plan ;-/
660
kde_minidir="/dev/null"
662
dnl AC_SUBST(kde_minidir)
663
dnl AC_SUBST(kde_cgidir)
664
dnl AC_SUBST(kde_toolbardir)
667
AC_DEFUN(KDE_MISC_TESTS,
670
dnl Checks for libraries.
671
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
673
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
676
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
677
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
678
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
679
You should install libcrypt from another source or configure with PAM
684
if test $kde_have_crypt = yes; then
685
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
689
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
690
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
691
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
692
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
694
AC_CHECK_FUNC(inet_ntoa)
695
if test $ac_cv_func_inet_ntoa = no; then
696
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
698
AC_CHECK_FUNC(connect)
699
if test $ac_cv_func_connect = no; then
700
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
704
AC_CHECK_FUNC(remove)
705
if test $ac_cv_func_remove = no; then
706
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
709
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
710
AC_CHECK_FUNC(shmat, ,
711
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
713
# darwin needs this to initialize the environment
714
AC_CHECK_HEADERS(crt_externs.h)
715
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
717
# more headers that need to be explicitly included on darwin
718
AC_CHECK_HEADERS(sys/types.h stdint.h)
720
# darwin requires a poll emulation library
721
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
723
# CoreAudio framework
724
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
725
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
726
FRAMEWORK_COREAUDIO="-framework CoreAudio"
729
# Solaris 2.6 and others need -lresolv for res_init
730
AC_CHECK_FUNCS(res_init, , [
731
kde_libs_safe="$LIBS"
732
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
741
X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
742
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
748
AC_SUBST(FRAMEWORK_COREAUDIO)
749
LIBSOCKET="$X_EXTRA_LIBS"
752
AC_SUBST(X_EXTRA_LIBS)
753
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
756
case $host in dnl this *is* LynxOS specific
758
AC_MSG_CHECKING([LynxOS header file wrappers])
759
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
760
AC_MSG_RESULT(disabled)
761
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
769
dnl ------------------------------------------------------------------------
770
dnl Find the header files and libraries for X-Windows. Extended the
772
dnl ------------------------------------------------------------------------
776
AC_REQUIRE([KDE_MISC_TESTS])dnl
780
[ --enable-embedded link to Qt-embedded, don't use X],
781
kde_use_qt_emb=$enableval,
787
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
788
kde_use_qt_emb_palm=$enableval,
789
kde_use_qt_emb_palm=no
792
if test "$kde_use_qt_emb" = "no"; then
794
AC_MSG_CHECKING(for X)
797
AC_CACHE_VAL(kde_cv_have_x,
798
[# One or both of the vars are not set, and there is no cached value.
799
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
802
kde_x_includes=$x_includes
804
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
807
kde_x_libraries=$x_libraries
810
# below we use the standard autoconf calls
811
ac_x_libraries=$kde_x_libraries
812
ac_x_includes=$kde_x_includes
815
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
816
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
817
dnl location. The correct location is /usr/lib32 or an undefined value
818
dnl (the linker is smart enough to pick the correct default library).
819
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
820
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
821
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
822
dnl x_includes should be left alone.
830
if test -z "$ac_x_includes"; then
833
if test -z "$ac_x_libraries"; then
834
ac_x_libraries="/usr/lib"
837
#from now on we use our own again
839
# when the user already gave --x-includes, we ignore
840
# what the standard autoconf macros told us.
841
if test "$kde_x_includes" = NO; then
842
kde_x_includes=$ac_x_includes
845
# for --x-libraries too
846
if test "$kde_x_libraries" = NO; then
847
kde_x_libraries=$ac_x_libraries
850
if test "$kde_x_includes" = NO; then
851
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
854
if test "$kde_x_libraries" = NO; then
855
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
858
# Record where we found X for the cache.
859
kde_cv_have_x="have_x=yes \
860
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
863
eval "$kde_cv_have_x"
865
if test "$have_x" != yes; then
866
AC_MSG_RESULT($have_x)
869
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
872
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
874
x_includes="."; dnl better than nothing :-
876
x_includes=$kde_x_includes
877
X_INCLUDES="-I$x_includes"
880
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
882
x_libraries="/usr/lib"; dnl better than nothing :-
884
x_libraries=$kde_x_libraries
885
X_LDFLAGS="-L$x_libraries"
887
all_includes="$X_INCLUDES"
888
all_libraries="$X_LDFLAGS"
892
AC_SUBST(x_libraries)
895
# Check for libraries that X11R6 Xt/Xaw programs need.
896
ac_save_LDFLAGS="$LDFLAGS"
897
LDFLAGS="$LDFLAGS $X_LDFLAGS"
898
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
899
# check for ICE first), but we must link in the order -lSM -lICE or
900
# we get undefined symbols. So assume we have SM if we have ICE.
901
# These have to be linked with before -lX11, unlike the other
902
# libraries we check for below, so use a different variable.
903
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
904
AC_CHECK_LIB(ICE, IceConnectionNumber,
905
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
907
LDFLAGS="$ac_save_LDFLAGS"
911
LIB_X11='-lX11 $(LIBSOCKET)'
914
AC_MSG_CHECKING(for libXext)
915
AC_CACHE_VAL(kde_cv_have_libXext,
917
kde_ldflags_safe="$LDFLAGS"
918
kde_libs_safe="$LIBS"
920
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
921
LIBS="-lXext -lX11 $LIBSOCKET"
930
printf("hello Xext\n");
932
kde_cv_have_libXext=yes,
933
kde_cv_have_libXext=no
936
LDFLAGS=$kde_ldflags_safe
940
AC_MSG_RESULT($kde_cv_have_libXext)
942
if test "$kde_cv_have_libXext" = "no"; then
943
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
944
can't find it itself, we stop here assuming that make wouldn't find
948
AC_MSG_CHECKING(for Xinerama)
950
AC_ARG_WITH(xinerama,
951
[ --with-xinerama enable support for Xinerama ],
959
kde_save_LDFLAGS="$LDFLAGS"
960
kde_save_CFLAGS="$CFLAGS"
961
kde_save_LIBS="$LIBS"
962
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
963
CFLAGS="$CFLAGS -I$x_includes"
964
LIBS="-lXinerama -lXext"
966
if test "x$no_xinerama" = "xno"; then
968
AC_CACHE_VAL(ac_cv_have_xinerama,
970
AC_TRY_LINK([#include <X11/Xlib.h>
971
#include <X11/extensions/Xinerama.h>],
972
[XineramaIsActive(NULL);],
973
[ac_cv_have_xinerama="yes"],
974
[ac_cv_have_xinerama="no"])
977
ac_cv_have_xinerama=no;
980
AC_MSG_RESULT($ac_cv_have_xinerama)
984
if test "$ac_cv_have_xinerama" = "yes"; then
985
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
986
LIBXINERAMA="-lXinerama"
989
AC_SUBST(LIBXINERAMA)
991
LDFLAGS="$kde_save_LDFLAGS"
992
CFLAGS="$kde_save_CFLAGS"
993
LIBS="$kde_save_LIBS"
999
dnl We're using QT Embedded
1001
CXXFLAGS="$CXXFLAGS -fno-rtti"
1002
QTE_NORTTI="-fno-rtti -DQWS"
1011
AC_SUBST(X_PRE_LIBS)
1014
AC_SUBST(X_INCLUDES)
1016
AC_SUBST(x_includes)
1017
AC_SUBST(x_libraries)
1019
AC_SUBST(QTE_NORTTI)
1027
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1029
AC_REQUIRE([KDE_USE_QT])
1030
cat > conftest.$ac_ext <<EOF
1031
#include "confdefs.h"
1032
#include <qglobal.h>
1033
#include <qapplication.h>
1035
if test "$kde_qtver" = "2"; then
1036
cat >> conftest.$ac_ext <<EOF
1038
#include <qstring.h>
1042
if test $kde_qtsubver -gt 0; then
1043
cat >> conftest.$ac_ext <<EOF
1044
#include <qiconview.h>
1049
if test "$kde_qtver" = "3"; then
1050
cat >> conftest.$ac_ext <<EOF
1051
#include <qcursor.h>
1052
#include <qstylefactory.h>
1053
#include <private/qucomextra_p.h>
1057
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1058
cat >> conftest.$ac_ext <<EOF
1064
if test "$kde_qtver" = "2"; then
1065
cat >> conftest.$ac_ext <<EOF
1066
QStringList *t = new QStringList();
1069
if test $kde_qtsubver -gt 0; then
1070
cat >> conftest.$ac_ext <<EOF
1072
iv.setWordWrapIconText(false);
1074
s.setLatin1("Elvis is alive", 14);
1078
if test "$kde_qtver" = "3"; then
1079
cat >> conftest.$ac_ext <<EOF
1080
(void)QStyleFactory::create(QString::null);
1081
QCursor c(Qt::WhatsThisCursor);
1084
cat >> conftest.$ac_ext <<EOF
1090
AC_DEFUN(KDE_USE_QT,
1092
if test -z "$1"; then
1096
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1097
# following is the check if subversion isnļæ½t found in passed argument
1098
if test "$kde_qtsubver" = "$1"; then
1101
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1102
if test "$kde_qtver" = "1"; then
1107
if test -z "$2"; then
1108
if test "$kde_qtver" = "2"; then
1109
if test $kde_qtsubver -gt 0; then
1110
kde_qt_minversion=">= Qt 2.2.2"
1112
kde_qt_minversion=">= Qt 2.0.2"
1115
if test "$kde_qtver" = "3"; then
1116
kde_qt_minversion=">= Qt 3.0.3"
1118
if test "$kde_qtver" = "1"; then
1119
kde_qt_minversion=">= 1.42 and < 2.0"
1122
kde_qt_minversion=$2
1125
if test -z "$3"; then
1126
if test $kde_qtver = 3; then
1127
kde_qt_verstring="QT_VERSION >= 303"
1129
if test $kde_qtver = 2; then
1130
if test $kde_qtsubver -gt 0; then
1131
kde_qt_verstring="QT_VERSION >= 222"
1133
kde_qt_verstring="QT_VERSION >= 200"
1136
if test $kde_qtver = 1; then
1137
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1143
if test $kde_qtver = 3; then
1144
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
1146
if test $kde_qtver = 2; then
1147
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1149
if test $kde_qtver = 1; then
1150
kde_qt_dirs="$QTDIR /usr/lib/qt"
1154
AC_DEFUN(KDE_CHECK_QT_DIRECT,
1156
AC_REQUIRE([KDE_USE_QT])
1157
AC_MSG_CHECKING([if Qt compiles without flags])
1158
AC_CACHE_VAL(kde_cv_qt_direct,
1162
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1163
ac_LIBRARY_PATH="$LIBRARY_PATH"
1164
ac_cxxflags_safe="$CXXFLAGS"
1165
ac_ldflags_safe="$LDFLAGS"
1166
ac_libs_safe="$LIBS"
1168
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1169
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1170
if test "x$kde_use_qt_emb" != "xyes"; then
1171
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1173
LIBS="$LIBQT $LIBSOCKET"
1176
export LD_LIBRARY_PATH
1180
KDE_PRINT_QT_PROGRAM
1182
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1183
kde_cv_qt_direct="yes"
1185
kde_cv_qt_direct="no"
1186
echo "configure: failed program was:" >&AC_FD_CC
1187
cat conftest.$ac_ext >&AC_FD_CC
1191
CXXFLAGS="$ac_cxxflags_safe"
1192
LDFLAGS="$ac_ldflags_safe"
1193
LIBS="$ac_libs_safe"
1195
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1196
export LD_LIBRARY_PATH
1197
LIBRARY_PATH="$ac_LIBRARY_PATH"
1202
if test "$kde_cv_qt_direct" = "yes"; then
1211
dnl ------------------------------------------------------------------------
1212
dnl Try to find the Qt headers and libraries.
1213
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1214
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1215
dnl ------------------------------------------------------------------------
1217
AC_DEFUN(AC_PATH_QT_1_3,
1219
AC_REQUIRE([K_PATH_X])
1220
AC_REQUIRE([KDE_USE_QT])
1222
dnl ------------------------------------------------------------------------
1223
dnl Add configure flag to enable linking to MT version of Qt library.
1224
dnl ------------------------------------------------------------------------
1228
[ --disable-mt link to non-threaded Qt (deprecated)],
1229
kde_use_qt_mt=$enableval,
1231
if test $kde_qtver = 3; then
1241
dnl ------------------------------------------------------------------------
1242
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1243
dnl ------------------------------------------------------------------------
1247
if test "x$kde_use_qt_mt" = "xyes"; then
1249
if test "x$kde_use_threading" = "xyes"; then
1250
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1251
KDE_MT_LDFLAGS="$USE_THREADS"
1252
KDE_MT_LIBS="$LIBPTHREAD"
1257
AC_SUBST(KDE_MT_LDFLAGS)
1258
AC_SUBST(KDE_MT_LIBS)
1260
kde_qt_was_given=yes
1262
dnl ------------------------------------------------------------------------
1263
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1264
dnl ------------------------------------------------------------------------
1265
if test -z "$LIBQT_GLOB"; then
1266
if test "x$kde_use_qt_emb" = "xyes"; then
1267
LIBQT_GLOB="libqte.*"
1269
LIBQT_GLOB="libqt.*"
1273
if test -z "$LIBQT"; then
1274
dnl ------------------------------------------------------------
1275
dnl If we got --enable-embedded then adjust the Qt library name.
1276
dnl ------------------------------------------------------------
1277
if test "x$kde_use_qt_emb" = "xyes"; then
1283
kde_int_qt="-l$qtlib"
1289
if test -z "$LIBQPE"; then
1290
dnl ------------------------------------------------------------
1291
dnl If we got --enable-palmtop then add -lqpe to the link line
1292
dnl ------------------------------------------------------------
1293
if test "x$kde_use_qt_emb" = "xyes"; then
1294
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1304
dnl ------------------------------------------------------------------------
1305
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1306
dnl ------------------------------------------------------------------------
1308
if test "x$kde_use_qt_mt" = "xyes"; then
1309
if test -z "$LIBQT"; then
1311
kde_int_qt="-l$qtlib-mt"
1314
kde_int_qt="$qtlib-mt"
1316
LIBQT_GLOB="lib$qtlib-mt.*"
1317
USING_QT_MT="using -mt"
1322
if test $kde_qtver != 1; then
1324
AC_REQUIRE([AC_FIND_PNG])
1325
AC_REQUIRE([AC_FIND_JPEG])
1326
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1329
if test $kde_qtver = 3; then
1330
AC_REQUIRE([KDE_CHECK_LIBDL])
1331
LIBQT="$LIBQT $LIBDL"
1334
AC_MSG_CHECKING([for Qt])
1336
if test "x$kde_use_qt_emb" != "xyes"; then
1337
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1339
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1343
[ --with-qt-dir=DIR where the root of Qt is installed ],
1344
[ ac_qt_includes="$withval"/include
1345
ac_qt_libraries="$withval"/lib
1346
ac_qt_bindir="$withval"/bin
1349
AC_ARG_WITH(qt-includes,
1350
[ --with-qt-includes=DIR where the Qt includes are. ],
1352
ac_qt_includes="$withval"
1355
kde_qt_libs_given=no
1357
AC_ARG_WITH(qt-libraries,
1358
[ --with-qt-libraries=DIR where the Qt library is installed.],
1359
[ ac_qt_libraries="$withval"
1360
kde_qt_libs_given=yes
1363
AC_CACHE_VAL(ac_cv_have_qt,
1364
[#try to guess Qt locations
1367
for dir in $kde_qt_dirs; do
1368
qt_incdirs="$qt_incdirs $dir/include $dir"
1370
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 $x_includes"
1371
if test ! "$ac_qt_includes" = "NO"; then
1372
qt_incdirs="$ac_qt_includes $qt_incdirs"
1375
if test "$kde_qtver" != "1"; then
1376
kde_qt_header=qstyle.h
1378
kde_qt_header=qglobal.h
1381
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1382
ac_qt_includes="$qt_incdir"
1385
for dir in $kde_qt_dirs; do
1386
qt_libdirs="$qt_libdirs $dir/lib $dir"
1388
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1389
if test ! "$ac_qt_libraries" = "NO"; then
1390
qt_libdir=$ac_qt_libraries
1392
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1393
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1395
for dir in $qt_libdirs; do
1396
try="ls -1 $dir/${LIBQT_GLOB}"
1397
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1401
ac_qt_libraries="$qt_libdir"
1406
ac_cxxflags_safe="$CXXFLAGS"
1407
ac_ldflags_safe="$LDFLAGS"
1408
ac_libs_safe="$LIBS"
1410
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1411
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1412
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1414
KDE_PRINT_QT_PROGRAM
1416
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1419
echo "configure: failed program was:" >&AC_FD_CC
1420
cat conftest.$ac_ext >&AC_FD_CC
1421
ac_qt_libraries="NO"
1424
CXXFLAGS="$ac_cxxflags_safe"
1425
LDFLAGS="$ac_ldflags_safe"
1426
LIBS="$ac_libs_safe"
1429
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1430
ac_cv_have_qt="have_qt=no"
1433
if test "$ac_qt_includes" = NO; then
1434
if test "$ac_qt_libraries" = NO; then
1435
ac_qt_notfound="(headers and libraries)";
1437
ac_qt_notfound="(headers)";
1440
if test "x$kde_use_qt_mt" = "xyes"; then
1442
Make sure that you have compiled Qt with thread support!"
1443
ac_qt_notfound="(library $qtlib-mt)";
1445
ac_qt_notfound="(library $qtlib)";
1449
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1450
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1456
eval "$ac_cv_have_qt"
1458
if test "$have_qt" != yes; then
1459
AC_MSG_RESULT([$have_qt]);
1461
ac_cv_have_qt="have_qt=yes \
1462
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1463
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1465
qt_libraries="$ac_qt_libraries"
1466
qt_includes="$ac_qt_includes"
1469
if test ! "$kde_qt_libs_given" = "yes"; then
1470
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1473
AC_SUBST(qt_libraries)
1474
AC_SUBST(qt_includes)
1476
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1479
QT_INCLUDES="-I$qt_includes"
1480
all_includes="$QT_INCLUDES $all_includes"
1483
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1486
QT_LDFLAGS="-L$qt_libraries"
1487
all_libraries="$all_libraries $QT_LDFLAGS"
1489
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1491
AC_SUBST(QT_INCLUDES)
1492
AC_SUBST(QT_LDFLAGS)
1497
if test "x$kde_use_qt_emb" != "xyes"; then
1498
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1500
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
1502
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1510
AC_DEFUN(AC_PATH_QT,
1515
AC_DEFUN(KDE_CHECK_FINAL,
1517
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1518
kde_use_final=$enableval, kde_use_final=no)
1521
if test "x$kde_use_final" = "xyes"; then
1522
KDE_USE_FINAL_TRUE=""
1523
KDE_USE_FINAL_FALSE="#"
1525
KDE_USE_FINAL_TRUE="#"
1526
KDE_USE_FINAL_FALSE=""
1528
AC_SUBST(KDE_USE_FINAL_TRUE)
1529
AC_SUBST(KDE_USE_FINAL_FALSE)
1531
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1532
kde_use_closure=$enableval, kde_use_closure=yes)
1534
if test "x$kde_use_closure" = "xyes"; then
1535
KDE_USE_CLOSURE_TRUE=""
1536
KDE_USE_CLOSURE_FALSE="#"
1537
# CXXFLAGS="$CXXFLAGS $REPO"
1539
KDE_USE_CLOSURE_TRUE="#"
1540
KDE_USE_CLOSURE_FALSE=""
1542
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1543
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1546
dnl ------------------------------------------------------------------------
1547
dnl Now, the same with KDE
1548
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1549
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1550
dnl ------------------------------------------------------------------------
1552
AC_DEFUN(AC_BASE_PATH_KDE,
1555
AC_REQUIRE([AC_PATH_QT])dnl
1557
AC_MSG_CHECKING([for KDE])
1559
if test "${prefix}" != NONE; then
1560
kde_includes=${prefix}/include
1561
ac_kde_includes=$prefix/include
1563
if test "${exec_prefix}" != NONE; then
1564
kde_libraries=${libdir}
1565
ac_kde_libraries=$libdir
1567
kde_libraries=${prefix}/lib
1568
ac_kde_libraries=$prefix/lib
1577
AC_CACHE_VAL(ac_cv_have_kde,
1578
[#try to guess kde locations
1580
if test "$kde_qtver" = 1; then
1581
kde_check_header="ksock.h"
1582
kde_check_lib="libkdecore.la"
1584
kde_check_header="ksharedptr.h"
1585
kde_check_lib="libkio.la"
1588
if test -z "$1"; then
1590
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1591
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1592
kde_incdirs="$ac_kde_includes $kde_incdirs"
1593
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1594
ac_kde_includes="$kde_incdir"
1596
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1598
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1599
So, check this please and use another prefix!])
1602
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
1603
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
1604
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1605
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1606
ac_kde_libraries="$kde_libdir"
1608
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1610
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1611
So, check this please and use another prefix!])
1613
ac_kde_libraries="$kde_libdir"
1615
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
1616
ac_cv_have_kde="have_kde=no"
1618
ac_cv_have_kde="have_kde=yes \
1619
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1624
ac_cv_have_kde="have_kde=no"
1629
eval "$ac_cv_have_kde"
1631
if test "$have_kde" != "yes"; then
1632
if test "${prefix}" = NONE; then
1633
ac_kde_prefix="$ac_default_prefix"
1635
ac_kde_prefix="$prefix"
1637
if test "$exec_prefix" = NONE; then
1638
ac_kde_exec_prefix="$ac_kde_prefix"
1639
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1641
ac_kde_exec_prefix="$exec_prefix"
1642
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1645
kde_libraries="${libdir}"
1646
kde_includes=${ac_kde_prefix}/include
1649
ac_cv_have_kde="have_kde=yes \
1650
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1651
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1653
kde_libraries="$ac_kde_libraries"
1654
kde_includes="$ac_kde_includes"
1656
AC_SUBST(kde_libraries)
1657
AC_SUBST(kde_includes)
1659
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1662
KDE_INCLUDES="-I$kde_includes"
1663
all_includes="$KDE_INCLUDES $all_includes"
1666
KDE_LDFLAGS="-L$kde_libraries"
1667
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1668
all_libraries="$all_libraries $KDE_LDFLAGS"
1671
AC_SUBST(KDE_LDFLAGS)
1672
AC_SUBST(KDE_INCLUDES)
1674
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1676
all_libraries="$all_libraries $USER_LDFLAGS"
1677
all_includes="$all_includes $USER_INCLUDES"
1678
AC_SUBST(all_includes)
1679
AC_SUBST(all_libraries)
1684
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1686
AC_MSG_CHECKING(for extra includes)
1687
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1688
adds non standard include paths],
1689
kde_use_extra_includes="$withval",
1690
kde_use_extra_includes=NONE
1693
if test -n "$kde_use_extra_includes" && \
1694
test "$kde_use_extra_includes" != "NONE"; then
1698
for dir in $kde_use_extra_includes; do
1699
kde_extra_includes="$kde_extra_includes $dir"
1700
USER_INCLUDES="$USER_INCLUDES -I$dir"
1703
kde_use_extra_includes="added"
1705
kde_use_extra_includes="no"
1707
AC_SUBST(USER_INCLUDES)
1709
AC_MSG_RESULT($kde_use_extra_includes)
1712
AC_MSG_CHECKING(for extra libs)
1713
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1714
kde_use_extra_libs=$withval,
1715
kde_use_extra_libs=NONE
1717
if test -n "$kde_use_extra_libs" && \
1718
test "$kde_use_extra_libs" != "NONE"; then
1722
for dir in $kde_use_extra_libs; do
1723
kde_extra_libs="$kde_extra_libs $dir"
1724
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1725
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1728
kde_use_extra_libs="added"
1730
kde_use_extra_libs="no"
1733
AC_SUBST(USER_LDFLAGS)
1735
AC_MSG_RESULT($kde_use_extra_libs)
1739
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1741
AC_MSG_CHECKING([for KDE headers installed])
1744
cat > conftest.$ac_ext <<EOF
1746
# include <stdlib.h>
1749
#include "confdefs.h"
1753
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1754
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1755
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1756
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1757
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1758
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1759
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1760
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1761
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1762
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1763
printf("kde_wallpaperdir=\\"%s\\"\n",
1764
KApplication::kde_wallpaperdir().data());
1765
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1766
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1767
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1768
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1769
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1770
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1771
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1776
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1777
if AC_TRY_EVAL(ac_compile); then
1780
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1781
Check, if you installed the KDE header files correctly.
1782
For more details about this problem, look at the end of config.log.])
1788
AC_DEFUN(KDE_CHECK_KDEQTADDON,
1790
AC_MSG_CHECKING(for kde-qt-addon)
1791
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1793
kde_ldflags_safe="$LDFLAGS"
1794
kde_libs_safe="$LIBS"
1795
kde_cxxflags_safe="$CXXFLAGS"
1797
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1798
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1799
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1807
kde_cv_have_kdeqtaddon=yes,
1808
kde_cv_have_kdeqtaddon=no
1811
LDFLAGS=$kde_ldflags_safe
1813
CXXFLAGS=$kde_cxxflags_safe
1816
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1818
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1819
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1820
It is a separate package (and CVS module) named kde-qt-addon.])
1824
AC_DEFUN(KDE_CHECK_KIMGIO,
1826
AC_REQUIRE([AC_BASE_PATH_KDE])
1827
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1828
AC_REQUIRE([AC_FIND_TIFF])
1829
AC_REQUIRE([AC_FIND_JPEG])
1830
AC_REQUIRE([AC_FIND_PNG])
1831
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1833
if test "$1" = "existance"; then
1836
kde_save_LIBS="$LIBS"
1837
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1838
AC_CHECK_LIB(kimgio, kimgioRegister, [
1839
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1840
LIBS="$kde_save_LIBS"
1843
LIBKIMGIO_EXISTS=yes
1846
if test "$LIBKIMGIO_EXISTS" = "yes"; then
1847
LIB_KIMGIO='-lkimgio'
1851
AC_SUBST(LIB_KIMGIO)
1854
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1856
AC_REQUIRE([KDE_MISC_TESTS])
1857
AC_REQUIRE([KDE_CHECK_LIBDL])
1858
AC_REQUIRE([K_PATH_X])
1860
if test $kde_qtver = 3; then
1861
AC_SUBST(LIB_KDECORE, "-lkdecore")
1862
AC_SUBST(LIB_KDEUI, "-lkdeui")
1863
AC_SUBST(LIB_KIO, "-lkio")
1864
AC_SUBST(LIB_SMB, "-lsmb")
1865
AC_SUBST(LIB_KAB, "-lkab")
1866
AC_SUBST(LIB_KHTML, "-lkhtml")
1867
AC_SUBST(LIB_KSPELL, "-lkspell")
1868
AC_SUBST(LIB_KPARTS, "-lkparts")
1869
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1870
# these are for backward compatibility
1871
AC_SUBST(LIB_KSYCOCA, "-lkio")
1872
AC_SUBST(LIB_KFILE, "-lkio")
1873
elif test $kde_qtver = 2; then
1874
AC_SUBST(LIB_KDECORE, "-lkdecore")
1875
AC_SUBST(LIB_KDEUI, "-lkdeui")
1876
AC_SUBST(LIB_KIO, "-lkio")
1877
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
1878
AC_SUBST(LIB_SMB, "-lsmb")
1879
AC_SUBST(LIB_KFILE, "-lkfile")
1880
AC_SUBST(LIB_KAB, "-lkab")
1881
AC_SUBST(LIB_KHTML, "-lkhtml")
1882
AC_SUBST(LIB_KSPELL, "-lkspell")
1883
AC_SUBST(LIB_KPARTS, "-lkparts")
1884
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1886
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
1887
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
1888
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
1889
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
1890
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
1894
AC_DEFUN(AC_PATH_KDE,
1897
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
1899
if test "$enableval" = "no";
1900
then ac_use_path_checking="default"
1901
else ac_use_path_checking=""
1905
if test "$kde_qtver" = 1;
1906
then ac_use_path_checking=""
1907
else ac_use_path_checking="default"
1912
AC_CREATE_KFSSTND($ac_use_path_checking)
1915
KDE_CREATE_LIBS_ALIASES
1919
AC_DEFUN(AC_CHECK_SETENV,
1921
AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
1922
AC_CHECK_FUNCS([setenv unsetenv])
1925
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
1927
AC_MSG_CHECKING(for getdomainname)
1928
AC_CACHE_VAL(ac_cv_func_getdomainname,
1932
save_CXXFLAGS="$CXXFLAGS"
1933
kde_safe_LIBS="$LIBS"
1934
LIBS="$LIBS $X_EXTRA_LIBS"
1935
if test "$GCC" = "yes"; then
1936
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1944
getdomainname(buffer, 200);
1946
ac_cv_func_getdomainname=yes,
1947
ac_cv_func_getdomainname=no)
1948
CXXFLAGS="$save_CXXFLAGS"
1952
AC_MSG_RESULT($ac_cv_func_getdomainname)
1954
AC_MSG_CHECKING([if getdomainname needs custom prototype])
1955
AC_CACHE_VAL(ac_cv_proto_getdomainname,
1959
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1960
ac_cv_proto_getdomainname=no
1963
LIBS="$LIBS $X_EXTRA_LIBS"
1968
extern "C" int getdomainname (char *, int);
1972
getdomainname(buffer, 200);
1974
ac_cv_func_getdomainname=yes
1975
ac_cv_proto_getdomainname=yes,
1976
AC_MSG_RESULT([fatal error])
1977
AC_MSG_ERROR([getdomainname unavailable]))
1982
AC_MSG_RESULT($ac_cv_proto_getdomainname)
1984
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1985
AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
1987
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
1988
AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
1989
[Define if you have getdomainname prototype])
1994
AC_DEFUN(AC_CHECK_GETHOSTNAME,
1997
AC_MSG_CHECKING([for gethostname])
1998
AC_CACHE_VAL(ac_cv_func_gethostname,
2002
save_CXXFLAGS="$CXXFLAGS"
2003
if test "$GCC" = "yes"; then
2004
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2012
gethostname(buffer, 200);
2014
ac_cv_func_gethostname=yes,
2015
ac_cv_func_gethostname=no)
2016
CXXFLAGS="$save_CXXFLAGS"
2019
AC_MSG_RESULT($ac_cv_func_gethostname)
2021
AC_MSG_CHECKING([if gethostname needs custom prototype])
2022
AC_CACHE_VAL(ac_cv_proto_gethostname,
2026
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
2027
ac_cv_proto_gethostname=no
2033
extern "C" int gethostname (char *, int);
2037
gethostname(buffer, 200);
2039
ac_cv_func_gethostname=yes
2040
ac_cv_proto_gethostname=yes,
2041
AC_MSG_RESULT([fatal error])
2042
AC_MSG_ERROR(gethostname unavailable))
2046
AC_MSG_RESULT($ac_cv_proto_gethostname)
2048
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
2049
AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
2050
[Define if you have gethostname prototype])
2052
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
2053
AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
2057
AC_DEFUN(AC_CHECK_USLEEP,
2059
AC_MSG_CHECKING([for usleep])
2060
AC_CACHE_VAL(ac_cv_func_usleep,
2064
ac_libs_safe="$LIBS"
2065
LIBS="$LIBS $LIBUCB"
2073
ac_cv_func_usleep=yes,
2074
ac_cv_func_usleep=no)
2075
LIBS="$ac_libs_safe"
2078
AC_MSG_RESULT($ac_cv_func_usleep)
2079
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
2080
AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
2084
AC_DEFUN(AC_CHECK_RANDOM,
2086
AC_MSG_CHECKING([for random])
2087
AC_CACHE_VAL(ac_cv_func_random,
2091
ac_libs_safe="$LIBS"
2092
LIBS="$LIBS $LIBUCB"
2099
ac_cv_func_random=yes,
2100
ac_cv_func_random=no)
2101
LIBS="$ac_libs_safe"
2104
AC_MSG_RESULT($ac_cv_func_random)
2105
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
2106
AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
2110
AC_DEFUN(AC_FIND_GIF,
2111
[AC_MSG_CHECKING([for giflib])
2112
AC_CACHE_VAL(ac_cv_lib_gif,
2113
[ac_save_LIBS="$LIBS"
2114
if test "x$kde_use_qt_emb" != "xyes"; then
2115
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2117
LIBS="$all_libraries -lgif"
2124
int GifLastError(void);
2128
/* We use char because int might match the return type of a gcc2
2129
builtin and then its argument prototype would still apply. */
2131
[return GifLastError();],
2132
eval "ac_cv_lib_gif=yes",
2133
eval "ac_cv_lib_gif=no")
2134
LIBS="$ac_save_LIBS"
2136
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2138
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2140
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2144
AC_DEFUN(KDE_FIND_JPEG_HELPER,
2146
AC_MSG_CHECKING([for libjpeg$2])
2147
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2150
ac_save_LIBS="$LIBS"
2151
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2152
ac_save_CFLAGS="$CFLAGS"
2153
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2155
[/* Override any gcc2 internal prototype to avoid an error. */
2156
struct jpeg_decompress_struct;
2157
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2162
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2163
int version, size_t structsize);
2167
/* We use char because int might match the return type of a gcc2
2168
builtin and then its argument prototype would still apply. */
2170
[jpeg_CreateDecompress(0L, 0, 0);],
2171
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2172
eval "ac_cv_lib_jpeg_$1=no")
2173
LIBS="$ac_save_LIBS"
2174
CFLAGS="$ac_save_CFLAGS"
2177
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2178
LIBJPEG="$ac_cv_lib_jpeg_$1"
2179
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2187
AC_DEFUN(AC_FIND_JPEG,
2189
dnl first look for libraries
2190
KDE_FIND_JPEG_HELPER(6b, 6b,
2191
KDE_FIND_JPEG_HELPER(normal, [],
2198
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2199
dnl requires system dependent includes loaded before it)
2200
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2201
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2202
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2204
dnl if headers _and_ libraries are missing, this is no error, and we
2205
dnl continue with a warning (the user will get no jpeg support in khtml)
2206
dnl if only one is missing, it means a configuration error, but we still
2208
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2209
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2211
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2213
There is an installation error in jpeg support. You seem to have only one
2214
of either the headers _or_ the libraries installed. You may need to either
2215
provide correct --with-extra-... options, or the development package of
2216
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2217
Disabling JPEG support.
2220
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2229
AC_DEFUN(KDE_CHECK_QT_JPEG,
2231
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2232
AC_CACHE_VAL(kde_cv_qt_jpeg,
2236
ac_save_LIBS="$LIBS"
2237
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2238
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2239
ac_save_CXXFLAGS="$CXXFLAGS"
2240
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2242
[#include <qapplication.h>],
2246
QApplication app(argc, argv);],
2247
eval "kde_cv_qt_jpeg=no",
2248
eval "kde_cv_qt_jpeg=yes")
2249
LIBS="$ac_save_LIBS"
2250
CXXFLAGS="$ac_save_CXXFLAGS"
2254
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2256
LIBJPEG_QT='$(LIBJPEG)'
2264
AC_DEFUN(AC_FIND_ZLIB,
2266
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2267
AC_MSG_CHECKING([for libz])
2268
AC_CACHE_VAL(ac_cv_lib_z,
2271
kde_save_LIBS="$LIBS"
2272
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2273
kde_save_CFLAGS="$CFLAGS"
2274
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2279
[return (zlibVersion() == ZLIB_VERSION); ],
2280
eval "ac_cv_lib_z='-lz'",
2281
eval "ac_cv_lib_z=no")
2282
LIBS="$kde_save_LIBS"
2283
CFLAGS="$kde_save_CFLAGS"
2285
if test ! "$ac_cv_lib_z" = no; then
2286
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2289
AC_MSG_RESULT($ac_cv_lib_z)
2291
AC_MSG_ERROR(not found. Check your installation and look into config.log)
2297
AC_DEFUN(KDE_TRY_TIFFLIB,
2299
AC_MSG_CHECKING([for libtiff $1])
2301
AC_CACHE_VAL(kde_cv_libtiff_$1,
2305
kde_save_LIBS="$LIBS"
2306
if test "x$kde_use_qt_emb" != "xyes"; then
2307
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2309
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2311
kde_save_CXXFLAGS="$CXXFLAGS"
2312
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2318
[return (TIFFOpen( "", "r") == 0); ],
2320
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2322
kde_cv_libtiff_$1=no
2325
LIBS="$kde_save_LIBS"
2326
CXXFLAGS="$kde_save_CXXFLAGS"
2330
if test "$kde_cv_libtiff_$1" = "no"; then
2335
LIBTIFF="$kde_cv_libtiff_$1"
2337
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2343
AC_DEFUN(AC_FIND_TIFF,
2345
AC_REQUIRE([K_PATH_X])
2346
AC_REQUIRE([AC_FIND_ZLIB])
2347
AC_REQUIRE([AC_FIND_JPEG])
2348
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2350
KDE_TRY_TIFFLIB(tiff, [],
2351
KDE_TRY_TIFFLIB(tiff34))
2357
AC_DEFUN(AC_FIND_PNG,
2359
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2360
AC_REQUIRE([AC_FIND_ZLIB])
2361
AC_MSG_CHECKING([for libpng])
2362
AC_CACHE_VAL(ac_cv_lib_png,
2364
kde_save_LIBS="$LIBS"
2365
if test "x$kde_use_qt_emb" != "xyes"; then
2366
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2368
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2370
kde_save_CFLAGS="$CFLAGS"
2371
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2378
png_structp png_ptr = png_create_read_struct( /* image ptr */
2379
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2380
return( png_ptr != 0 );
2382
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2383
eval "ac_cv_lib_png=no"
2385
LIBS="$kde_save_LIBS"
2386
CFLAGS="$kde_save_CFLAGS"
2388
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2389
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2390
LIBPNG="$ac_cv_lib_png"
2392
AC_MSG_RESULT($ac_cv_lib_png)
2400
AC_DEFUN(AC_CHECK_BOOL,
2402
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2405
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2407
AC_MSG_CHECKING(if you need GNU extensions)
2408
AC_CACHE_VAL(ac_cv_gnu_extensions,
2410
cat > conftest.c << EOF
2411
#include <features.h>
2413
#ifdef __GNU_LIBRARY__
2418
if (eval "$ac_cpp conftest.c") 2>&5 |
2419
egrep "yes" >/dev/null 2>&1; then
2421
ac_cv_gnu_extensions=yes
2423
ac_cv_gnu_extensions=no
2427
AC_MSG_RESULT($ac_cv_gnu_extensions)
2428
if test "$ac_cv_gnu_extensions" = "yes"; then
2429
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2433
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2435
AC_MSG_CHECKING(whether $CXX supports -$1)
2436
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2437
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2441
save_CXXFLAGS="$CXXFLAGS"
2442
CXXFLAGS="$CXXFLAGS -$1"
2443
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2444
CXXFLAGS="$save_CXXFLAGS"
2447
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2458
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2459
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2460
dnl it's all white-space separated
2461
AC_DEFUN(AC_REMOVE_FORBIDDEN,
2464
if test -n "$__val"; then
2470
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2471
*) # Careful to not add spaces, where there were none, because otherwise
2472
# libtool gets confused, if we change e.g. CXX
2473
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2481
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2482
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2484
if test "x$kde_use_qt_emb" != "xyes"; then
2485
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2486
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2488
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2489
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2493
AC_DEFUN(AC_CHECK_COMPILERS,
2495
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2499
kde_use_debug_code="yes"
2500
kde_use_debug_define=no
2503
kde_use_debug_code="full"
2504
kde_use_debug_define=no
2507
kde_use_debug_code="no"
2508
kde_use_debug_define=yes
2512
[kde_use_debug_code="no"
2513
kde_use_debug_define=no
2516
dnl Just for configure --help
2517
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2519
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2521
if test $enableval = "no"; then
2522
kde_use_strict_options="no"
2524
kde_use_strict_options="yes"
2526
], [kde_use_strict_options="no"])
2528
AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2530
if test $enableval = "no"; then
2531
kde_use_warnings="no"
2533
kde_use_warnings="yes"
2535
], [kde_use_warnings="yes"])
2537
dnl enable warnings for debug build
2538
if test "$kde_use_debug_code" != "no"; then
2539
kde_use_warnings=yes
2542
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2543
[kde_use_profiling=$enableval],
2544
[kde_use_profiling="no"]
2547
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2554
if test "$GCC" = "yes"; then
2555
if test "$kde_use_debug_code" != "no"; then
2556
if test $kde_use_debug_code = "full"; then
2557
CFLAGS="-g3 $CFLAGS"
2559
CFLAGS="-g -O2 $CFLAGS"
2562
CFLAGS="-O2 $CFLAGS"
2566
if test "$kde_use_debug_define" = "yes"; then
2567
CFLAGS="-DNDEBUG $CFLAGS"
2572
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2573
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2576
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2580
CXXFLAGS=" $CXXFLAGS"
2584
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2585
if test "$kde_use_debug_code" != "no"; then
2586
if test "$CXX" = "KCC"; then
2587
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2589
if test "$kde_use_debug_code" = "full"; then
2590
CXXFLAGS="-g3 $CXXFLAGS"
2592
CXXFLAGS="-g -O2 $CXXFLAGS"
2595
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2597
dnl convenience compiler flags
2598
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2599
AC_SUBST(WOVERLOADED_VIRTUAL)
2601
if test "$CXX" = "KCC"; then
2602
CXXFLAGS="+K3 $CXXFLAGS"
2604
CXXFLAGS="-O2 $CXXFLAGS"
2609
if test "$kde_use_debug_define" = "yes"; then
2610
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2613
if test "$kde_use_profiling" = "yes"; then
2614
KDE_CHECK_COMPILER_FLAG(pg,
2616
CFLAGS="-pg $CFLAGS"
2617
CXXFLAGS="-pg $CXXFLAGS"
2621
if test "$kde_use_warnings" = "yes"; then
2622
if test "$GCC" = "yes"; then
2625
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2626
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
2629
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2630
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2631
KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
2632
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2633
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2637
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
2638
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2641
if test "$GXX" = "yes"; then
2642
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2643
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2644
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2646
if test "$CXX" = "KCC"; then
2647
dnl unfortunately we currently cannot disable exception support in KCC
2648
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2649
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2650
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2652
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2654
kde_use_pch=$enableval
2657
if test "$kde_use_pch" = "yes"; then
2658
dnl TODO: support --pch-dir!
2659
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2660
dnl the below works (but the dir must exist), but it's
2661
dnl useless for a whole package.
2662
dnl The are precompiled headers for each source file, so when compiling
2663
dnl from scratch, it doesn't make a difference, and they take up
2664
dnl around ~5Mb _per_ sourcefile.
2665
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2666
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2668
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2669
dnl all implementations that are defined inside the class {} declaration.
2670
dnl because of templates-compatibility with broken gcc compilers, this
2671
dnl can cause excessive inlining. This flag limits it to a sane level
2672
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2673
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2674
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2675
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2676
dnl Some source files are shared between multiple executables
2677
dnl (or libraries) and some of those need template instantiations.
2678
dnl In that case KCC needs to compile those sources with
2679
dnl --one_instantiation_per_object. To make it easy for us we compile
2680
dnl _all_ objects with that flag (--one_per is a shorthand).
2681
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2683
AC_SUBST(USE_EXCEPTIONS)
2684
dnl obsolete macro - provided to keep things going
2689
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2690
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2691
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2693
if test "$GXX" = yes; then
2694
libstdcpp=`$CXX -print-file-name=libstdc++.so`
2695
if test ! -f $libstdcpp; then
2696
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])
2702
AC_VALIDIFY_CXXFLAGS
2706
if test "$GCC" = yes; then
2711
AC_SUBST(NOOPT_CXXFLAGS)
2712
AC_SUBST(NOOPT_CFLAGS)
2716
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2719
AC_DEFUN(KDE_ADD_DEPENDENCIES,
2721
[A]M_DEPENDENCIES(CC)
2722
[A]M_DEPENDENCIES(CXX)
2725
dnl just a wrapper to clean up configure.in
2726
AC_DEFUN(KDE_PROG_LIBTOOL,
2728
AC_REQUIRE([AC_CHECK_COMPILERS])
2729
AC_REQUIRE([AC_ENABLE_SHARED])
2730
AC_REQUIRE([AC_ENABLE_STATIC])
2732
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
2743
LIBTOOL_SHELL="/bin/sh ./libtool"
2744
# LIBTOOL="$LIBTOOL --silent"
2745
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2746
AC_SUBST(KDE_PLUGIN)
2748
AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
2749
kde_use_objprelink=$enableval, kde_use_objprelink=no)
2750
if test "x$kde_use_objprelink" = "xyes"; then
2752
------------------------------------------------------------
2753
Configuration option --enable-objprelink is no longer useful.
2754
See http:://objprelink.sourceforge.net for details:
2755
1- Recent binutils are fast enough to do without objprelink.
2756
2- Newer versions of objprelink do not need this option.
2757
------------------------------------------------------------
2762
AC_DEFUN(KDE_CHECK_TYPES,
2763
[ AC_CHECK_SIZEOF(int, 4)dnl
2764
AC_CHECK_SIZEOF(long, 4)dnl
2765
AC_CHECK_SIZEOF(char *, 4)dnl
2766
AC_CHECK_SIZEOF(char, 1)dnl
2769
AC_DEFUN(KDE_DO_IT_ALL,
2773
AM_INIT_AUTOMAKE($1, $2)
2774
AM_DISABLE_LIBRARIES
2775
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
2782
AC_DEFUN(AC_CHECK_RPATH,
2784
AC_MSG_CHECKING(for rpath)
2785
AC_ARG_ENABLE(rpath,
2786
[ --disable-rpath do not use the rpath feature of ld],
2787
USE_RPATH=$enableval, USE_RPATH=yes)
2789
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
2791
KDE_RPATH="-R \$(kde_libraries)"
2793
if test -n "$qt_libraries"; then
2794
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
2796
dnl $x_libraries is set to /usr/lib in case
2797
if test -n "$X_LDFLAGS"; then
2798
KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
2800
if test -n "$KDE_EXTRA_RPATH"; then
2801
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
2804
AC_SUBST(KDE_EXTRA_RPATH)
2806
AC_MSG_RESULT($USE_RPATH)
2809
dnl Check for the type of the third argument of getsockname
2810
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
2811
AC_MSG_CHECKING(for socklen_t)
2812
AC_CACHE_VAL(ac_cv_socklen_t, [
2816
#include <sys/types.h>
2817
#include <sys/socket.h>
2820
getsockname(0,(struct sockaddr*)0, &a);
2822
ac_cv_socklen_t=socklen_t,
2824
#include <sys/types.h>
2825
#include <sys/socket.h>
2828
getsockname(0,(struct sockaddr*)0, &a);
2830
ac_cv_socklen_t=int,
2831
ac_cv_socklen_t=size_t
2837
AC_MSG_RESULT($ac_cv_socklen_t)
2838
if test "$ac_cv_socklen_t" != "socklen_t"; then
2839
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
2840
[Define the real type of socklen_t])
2842
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
2846
dnl This is a merge of some macros out of the gettext aclocal.m4
2847
dnl since we don't need anything, I took the things we need
2848
dnl the copyright for them is:
2850
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
2851
dnl This Makefile.in is free software; the Free Software Foundation
2852
dnl gives unlimited permission to copy and/or distribute it,
2853
dnl with or without modifications, as long as this notice is preserved.
2855
dnl This program is distributed in the hope that it will be useful,
2856
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
2857
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2858
dnl PARTICULAR PURPOSE.
2860
dnl for this file it is relicensed under LGPL
2862
AC_DEFUN(AM_KDE_WITH_NLS,
2864
dnl If we use NLS figure out what method
2866
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
2867
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
2868
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2870
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
2871
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
2878
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
2879
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
2881
dnl Test whether we really found GNU xgettext.
2882
if test "$XGETTEXT" != ":"; then
2883
dnl If it is no GNU xgettext we define it as : so that the
2884
dnl Makefiles still can work.
2885
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2889
[found xgettext programs is not GNU xgettext; ignore it])
2897
# Search path for a program which passes the given test.
2898
# Ulrich Drepper <drepper@cygnus.com>, 1996.
2901
# Stephan Kulow: I appended a _KDE against name conflicts
2903
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
2904
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2905
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
2906
[# Extract the first word of "$2", so it can be a program name with args.
2907
set dummy $2; ac_word=[$]2
2908
AC_MSG_CHECKING([for $ac_word])
2909
AC_CACHE_VAL(ac_cv_path_$1,
2912
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2915
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2916
for ac_dir in ifelse([$5], , $PATH, [$5]); do
2917
test -z "$ac_dir" && ac_dir=.
2918
if test -f $ac_dir/$ac_word; then
2920
ac_cv_path_$1="$ac_dir/$ac_word"
2926
dnl If no 4th arg is given, leave the cache variable unset,
2927
dnl so AC_PATH_PROGS will keep looking.
2928
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2933
if test -n "[$]$1"; then
2934
AC_MSG_RESULT([$]$1)
2942
# Check whether LC_MESSAGES is available in <locale.h>.
2943
# Ulrich Drepper <drepper@cygnus.com>, 1995.
2947
AC_DEFUN(AM_LC_MESSAGES,
2948
[if test $ac_cv_header_locale_h = yes; then
2949
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2950
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2951
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2952
if test $am_cv_val_LC_MESSAGES = yes; then
2953
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
2957
dnl From Jim Meyering.
2958
dnl FIXME: migrate into libit.
2960
AC_DEFUN([AM_FUNC_OBSTACK],
2961
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
2962
[AC_TRY_LINK([#include "obstack.h"],
2963
[struct obstack *mem;obstack_free(mem,(char *) 0)],
2964
am_cv_func_obstack=yes,
2965
am_cv_func_obstack=no)])
2966
if test $am_cv_func_obstack = yes; then
2967
AC_DEFINE(HAVE_OBSTACK)
2969
LIBOBJS="$LIBOBJS obstack.o"
2973
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
2974
dnl FIXME: Migrate into libit
2976
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
2977
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
2978
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
2979
am_cv_lib_error_at_line=yes,
2980
am_cv_lib_error_at_line=no)])
2981
if test $am_cv_lib_error_at_line = no; then
2982
LIBOBJS="$LIBOBJS error.o"
2984
AC_SUBST(LIBOBJS)dnl
2987
# Macro to add for using GNU gettext.
2988
# Ulrich Drepper <drepper@cygnus.com>, 1995.
2991
# Stephan Kulow: I put a KDE in it to avoid name conflicts
2993
AC_DEFUN(AM_KDE_GNU_GETTEXT,
2994
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2995
AC_REQUIRE([AC_PROG_RANLIB])dnl
2996
AC_REQUIRE([AC_HEADER_STDC])dnl
2997
AC_REQUIRE([AC_TYPE_OFF_T])dnl
2998
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
2999
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3000
AC_REQUIRE([AC_FUNC_MMAP])dnl
3001
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3002
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
3003
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
3004
__argz_count __argz_stringify __argz_next])
3006
AC_MSG_CHECKING(for stpcpy)
3007
AC_CACHE_VAL(kde_cv_func_stpcpy,
3009
kde_safe_cxxflags=$CXXFLAGS
3010
CXXFLAGS="-Wmissing-prototypes -Werror"
3018
stpcpy(buffer, buffer);
3020
kde_cv_func_stpcpy=yes,
3021
kde_cv_func_stpcpy=no)
3023
CXXFLAGS=$kde_safe_cxxflags
3025
AC_MSG_RESULT($kde_cv_func_stpcpy)
3026
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3027
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3032
if test "x$CATOBJEXT" != "x"; then
3033
if test "x$ALL_LINGUAS" = "x"; then
3036
AC_MSG_CHECKING(for catalogs to be installed)
3038
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3039
case "$ALL_LINGUAS" in
3040
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3043
LINGUAS=$NEW_LINGUAS
3044
AC_MSG_RESULT($LINGUAS)
3047
dnl Construct list of names of catalog files to be constructed.
3048
if test -n "$LINGUAS"; then
3049
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3055
AC_DEFUN(AC_HAVE_XPM,
3056
[AC_REQUIRE_CPP()dnl
3057
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3059
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3060
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3062
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3063
xpm_test=$withval, xpm_test="yes")
3064
if test "x$xpm_test" = xno; then
3067
AC_MSG_CHECKING(for XPM)
3068
AC_CACHE_VAL(ac_cv_have_xpm,
3071
ac_save_ldflags="$LDFLAGS"
3072
ac_save_cflags="$CFLAGS"
3073
if test "x$kde_use_qt_emb" != "xyes"; then
3074
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3076
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3078
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3079
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3080
AC_TRY_LINK([#include <X11/xpm.h>],[],
3081
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3082
LDFLAGS="$ac_save_ldflags"
3083
CFLAGS="$ac_save_cflags"
3086
if test "$ac_cv_have_xpm" = no; then
3092
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3093
if test "$XPM_LDFLAGS" = ""; then
3094
XPMLIB='-lXpm $(LIB_X11)'
3096
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3098
if test "$XPM_INCLUDE" = ""; then
3101
XPMINC="-I$XPM_INCLUDE"
3111
AC_DEFUN(AC_HAVE_DPMS,
3112
[AC_REQUIRE_CPP()dnl
3113
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3115
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3116
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3119
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3120
dpms_test=$withval, dpms_test="yes")
3121
if test "x$dpms_test" = xno; then
3124
AC_MSG_CHECKING(for DPMS)
3125
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3126
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3127
AC_CACHE_VAL(ac_cv_have_dpms,
3129
if test "x$kde_use_qt_emb" = "xyes"; then
3131
ac_cv_have_dpms="no"
3134
ac_save_ldflags="$LDFLAGS"
3135
ac_save_cflags="$CFLAGS"
3136
ac_save_libs="$LIBS"
3137
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3138
CFLAGS="$CFLAGS $X_INCLUDES"
3139
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3141
#include <X11/Xproto.h>
3143
#include <X11/Xlib.h>
3144
#include <X11/extensions/dpms.h>
3146
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3147
ac_cv_have_dpms="yes", [
3148
LDFLAGS="$ac_save_ldflags"
3149
CFLAGS="$ac_save_cflags"
3150
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3151
LIBS="$LIBS -lXdpms"
3152
CFLAGS="$CFLAGS $X_INCLUDES"
3153
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3155
#include <X11/Xproto.h>
3157
#include <X11/Xlib.h>
3158
#include <X11/extensions/dpms.h>
3160
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3162
ac_cv_have_dpms="-lXdpms"
3163
],ac_cv_have_dpms="no")
3165
LDFLAGS="$ac_save_ldflags"
3166
CFLAGS="$ac_save_cflags"
3167
LIBS="$ac_save_libs"
3171
if test "$ac_cv_have_dpms" = no; then
3177
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3178
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3181
if test "$DPMS_LDFLAGS" = ""; then
3182
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3184
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3186
if test "$DPMS_INCLUDE" = ""; then
3189
DPMSINC="-I$DPMS_INCLUDE"
3199
AC_DEFUN(AC_HAVE_GL,
3200
[AC_REQUIRE_CPP()dnl
3201
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3203
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3204
test -z "$GL_INCLUDE" && GL_INCLUDE=
3206
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3207
gl_test=$withval, gl_test="yes")
3208
if test "x$kde_use_qt_emb" = "xyes"; then
3209
# GL and Qt Embedded is a no-go for now.
3211
elif test "x$gl_test" = xno; then
3214
AC_MSG_CHECKING(for GL)
3215
AC_CACHE_VAL(ac_cv_have_gl,
3218
ac_save_ldflags="$LDFLAGS"
3219
ac_save_cflags="$CFLAGS"
3220
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3221
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3222
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3223
CFLAGS="$CFLAGS $X_INCLUDES"
3224
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3225
AC_TRY_LINK([#include <GL/gl.h>
3228
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3229
if test "x$ac_cv_have_gl" = "xno"; then
3230
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
3231
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3232
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3233
CFLAGS="$ac_save_cflags $X_INCLUDES"
3234
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3235
AC_TRY_LINK([#include <GL/gl.h>
3238
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3240
LDFLAGS="$ac_save_ldflags"
3241
CFLAGS="$ac_save_cflags"
3244
if test "$ac_cv_have_gl" = "no"; then
3250
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3251
if test "$GL_LDFLAGS" = ""; then
3252
if test "$ac_cv_have_gl" = "mesa"; then
3253
GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
3255
GLLIB='-lGL -lGLU $(LIB_X11)'
3258
if test "$ac_cv_have_gl" = "mesa"; then
3259
GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
3261
GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
3264
if test "$GL_INCLUDE" = ""; then
3267
GLINC="-I$GL_INCLUDE"
3269
AC_MSG_RESULT($ac_cv_have_gl)
3278
dnl shadow password and PAM magic - maintained by ossi@kde.org
3281
AC_REQUIRE([KDE_CHECK_LIBDL])
3284
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3285
[ if test "x$withval" = "xyes"; then
3288
elif test "x$withval" = "xno"; then
3292
pam_service=$withval
3294
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3296
AC_CACHE_VAL(ac_cv_path_pam,
3298
AC_CHECK_LIB(pam, pam_start,
3299
[ AC_CHECK_HEADER(security/pam_appl.h,
3303
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3306
eval "$ac_cv_path_pam"
3308
AC_MSG_CHECKING(for PAM)
3309
if test "x$use_pam" = xno; then
3314
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3315
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3317
dnl test whether struct pam_message is const (Linux) or not (Sun)
3318
AC_MSG_CHECKING(for const pam_message)
3319
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
3320
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
3321
[AC_MSG_RESULT([const: Linux-type PAM])],
3322
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3323
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3325
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3331
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3332
AC_DEFUN(DEF_PAM_SERVICE, [
3334
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3335
[ if test "x$use_pam" = xyes; then
3336
$3_PAM_SERVICE="$withval"
3338
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3339
You may want to enforce it by using --with-pam.])
3342
[ if test "x$use_pam" = xyes; then
3343
$3_PAM_SERVICE="$pam_service"
3346
if test -n "$$3_PAM_SERVICE"; then
3347
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3348
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3350
AC_SUBST($3_PAM_SERVICE)
3353
AC_DEFUN(KDE_SHADOWPASSWD, [
3354
AC_REQUIRE([KDE_PAM])
3356
AC_CHECK_LIB(shadow, getspent,
3357
[ LIBSHADOW="-lshadow"
3361
AC_CHECK_LIB(gen, getspent,
3365
[ AC_CHECK_FUNC(getspent,
3366
[ ac_use_shadow=yes ],
3367
[ ac_use_shadow=no ])
3373
AC_MSG_CHECKING([for shadow passwords])
3376
[ --with-shadow If you want shadow password support ],
3377
[ if test "x$withval" != "xno"; then
3383
use_shadow="$ac_use_shadow"
3386
if test "x$use_shadow" = xyes; then
3388
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3395
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3396
dnl this still applies, if we could use it indirectly through pam.
3397
if test "x$use_shadow" = xyes ||
3398
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3400
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3401
SETUIDFLAGS="-m 4755 -o root";;
3403
SETUIDFLAGS="-m 4755";;
3406
AC_SUBST(SETUIDFLAGS)
3410
AC_DEFUN(KDE_PASSWDLIBS, [
3411
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3412
AC_REQUIRE([KDE_PAM])
3413
AC_REQUIRE([KDE_SHADOWPASSWD])
3415
if test "x$use_pam" = "xyes"; then
3416
PASSWDLIBS="$PAMLIBS"
3418
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3421
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3422
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3423
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3424
dnl may need to read /etc/master.passwd).
3427
SETUIDFLAGS="-m 4755 -o root"
3433
AC_SUBST(PASSWDLIBS)
3436
AC_DEFUN(KDE_CHECK_LIBDL,
3438
AC_CHECK_LIB(dl, dlopen, [
3440
ac_cv_have_dlfcn=yes
3443
AC_CHECK_LIB(dld, shl_unload, [
3445
ac_cv_have_shload=yes
3451
AC_DEFUN(KDE_CHECK_DLOPEN,
3454
AC_CHECK_HEADERS(dlfcn.h dl.h)
3455
if test "$ac_cv_header_dlfcn_h" = "no"; then
3459
if test "$ac_cv_header_dl_h" = "no"; then
3460
ac_cv_have_shload=no
3463
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3465
AC_ARG_ENABLE(dlopen,
3466
[ --disable-dlopen link statically [default=no]] ,
3467
enable_dlopen=$enableval,
3470
# override the user's opinion, if we know it better ;)
3471
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3475
if test "$ac_cv_have_dlfcn" = "yes"; then
3476
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3479
if test "$ac_cv_have_shload" = "yes"; then
3480
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3483
if test "$enable_dlopen" = no ; then
3484
test -n "$1" && eval $1
3486
test -n "$2" && eval $2
3491
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3493
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3495
AC_MSG_CHECKING([dynamic loading])
3496
eval "`egrep '^build_libtool_libs=' libtool`"
3497
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3499
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3503
AC_MSG_RESULT($dynamic_loading)
3504
if test "$dynamic_loading" = "yes"; then
3511
AC_DEFUN(KDE_ADD_INCLUDES,
3513
if test -z "$1"; then
3514
test_include="Pix.h"
3519
AC_MSG_CHECKING([for libg++ ($test_include)])
3521
AC_CACHE_VAL(kde_cv_libgpp_includes,
3523
kde_cv_libgpp_includes=no
3529
/usr/unsupported/include \
3534
if test -r "$ac_dir/$test_include"; then
3535
kde_cv_libgpp_includes=$ac_dir
3541
AC_MSG_RESULT($kde_cv_libgpp_includes)
3542
if test "$kde_cv_libgpp_includes" != "no"; then
3543
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3549
AC_DEFUN(KDE_CHECK_MICO,
3551
AC_REQUIRE([KDE_CHECK_LIBDL])
3552
AC_REQUIRE([KDE_MISC_TESTS])
3553
AC_MSG_CHECKING(for MICO)
3555
if test -z "$MICODIR"; then
3556
kde_micodir=/usr/local
3558
kde_micodir="$MICODIR"
3561
AC_ARG_WITH(micodir,
3562
[ --with-micodir=micodir where mico is installed ],
3563
kde_micodir=$withval,
3564
kde_micodir=$kde_micodir
3567
AC_CACHE_VAL(kde_cv_mico_incdir,
3569
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3570
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3573
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3575
if test ! -r $kde_micodir/include/CORBA.h; then
3576
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3579
AC_MSG_RESULT($kde_micodir)
3581
MICO_INCLUDES=-I$kde_micodir/include
3582
AC_SUBST(MICO_INCLUDES)
3583
MICO_LDFLAGS=-L$kde_micodir/lib
3584
AC_SUBST(MICO_LDFLAGS)
3585
micodir=$kde_micodir
3588
AC_MSG_CHECKING([for MICO version])
3589
AC_CACHE_VAL(kde_cv_mico_version,
3592
cat >conftest.$ac_ext <<EOF
3594
#include <mico/version.h>
3597
printf("MICO_VERSION=%s\n",MICO_VERSION);
3601
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3602
if AC_TRY_EVAL(ac_compile); then
3603
if eval `./conftest 2>&5`; then
3604
kde_cv_mico_version=$MICO_VERSION
3606
AC_MSG_ERROR([your system is not able to execute a small application to
3607
find MICO version! Check $kde_micodir/include/mico/version.h])
3610
AC_MSG_ERROR([your system is not able to compile a small application to
3611
find MICO version! Check $kde_micodir/include/mico/version.h])
3615
dnl installed MICO version
3616
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3617
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3618
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3620
if test "x$1" = "x"; then
3626
dnl required MICO version
3627
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3628
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3629
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3631
if test "$mico_v_maj" -lt "$req_v_maj" || \
3632
( test "$mico_v_maj" -eq "$req_v_maj" && \
3633
test "$mico_v_mid" -lt "$req_v_mid" ) || \
3634
( test "$mico_v_mid" -eq "$req_v_mid" && \
3635
test "$mico_v_min" -lt "$req_v_min" )
3638
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3639
at least is required. You should upgrade MICO.])
3641
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3644
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3646
if test -z "$IDL"; then
3647
IDL='$(kde_bindir)/cuteidl'
3650
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3651
AC_SUBST(IDL_DEPENDENCIES)
3653
idldir="\$(includedir)/idl"
3658
AC_DEFUN(KDE_CHECK_MINI_STL,
3660
AC_REQUIRE([KDE_CHECK_MICO])
3662
AC_MSG_CHECKING(if we use mico's mini-STL)
3663
AC_CACHE_VAL(kde_cv_have_mini_stl,
3667
kde_save_cxxflags="$CXXFLAGS"
3668
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3671
#include <mico/config.h>
3674
#ifdef HAVE_MINI_STL
3678
kde_cv_have_mini_stl=no,
3679
kde_cv_have_mini_stl=yes)
3680
CXXFLAGS="$kde_save_cxxflags"
3684
if test "x$kde_cv_have_mini_stl" = "xyes"; then
3696
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3698
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3699
AC_SUBST(LIBPTHREAD)
3702
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3704
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3705
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3707
if test "$kde_use_kernthreads" = "yes"; then
3708
ac_save_CXXFLAGS="$CXXFLAGS"
3709
ac_save_CFLAGS="$CFLAGS"
3710
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3711
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3712
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3713
CXXFLAGS="$ac_save_CXXFLAGS"
3714
CFLAGS="$ac_save_CFLAGS"
3715
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3716
kde_use_kernthreads=no
3718
dnl Add proper -I and -l statements
3719
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3720
if test "x$LIBPTHREAD" = "x"; then
3721
kde_use_kernthreads=no
3723
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3728
if test -z "$LIBPTHREAD"; then
3729
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
3735
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3736
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3739
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3742
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3743
LIBPTHREAD="$LIBPTHREAD -lc_r"
3745
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3746
if test "$CXX" = "KCC"; then
3747
CXXFLAGS="$CXXFLAGS --thread_safe"
3748
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3754
AC_SUBST(USE_THREADS)
3755
AC_SUBST(LIBPTHREAD)
3758
AC_DEFUN(KDE_CHECK_THREADING,
3760
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3761
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3762
dnl default is yes if libpthread is found and no if no libpthread is available
3763
if test -z "$LIBPTHREAD"; then
3764
if test -z "$USE_THREADS"; then
3765
kde_check_threading_default=no
3767
kde_check_threading_default=yes
3770
kde_check_threading_default=yes
3772
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
3773
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3774
if test "x$kde_use_threading" = "xyes"; then
3775
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3779
AC_DEFUN(KDE_TRY_LINK_PYTHON,
3781
if test "$kde_python_link_found" = no; then
3783
if test "$1" = normal; then
3784
AC_MSG_CHECKING(if a Python application links)
3786
AC_MSG_CHECKING(if Python depends on $2)
3789
AC_CACHE_VAL(kde_cv_try_link_python_$1,
3793
kde_save_cflags="$CFLAGS"
3794
CFLAGS="$CFLAGS $PYTHONINC"
3795
kde_save_libs="$LIBS"
3796
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
3797
kde_save_ldflags="$LDFLAGS"
3798
LDFLAGS="$LDFLAGS $PYTHONLIB"
3804
PySys_SetArgv(1, 0);
3806
[kde_cv_try_link_python_$1=yes],
3807
[kde_cv_try_link_python_$1=no]
3809
CFLAGS="$kde_save_cflags"
3810
LIBS="$kde_save_libs"
3811
LDFLAGS="$kde_save_ldflags"
3814
if test "$kde_cv_try_link_python_$1" = "yes"; then
3816
kde_python_link_found=yes
3817
if test ! "$1" = normal; then
3818
LIBPYTHON="$LIBPYTHON $2"
3831
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
3833
AC_MSG_CHECKING([for Python directory])
3835
AC_CACHE_VAL(kde_cv_pythondir,
3837
if test -z "$PYTHONDIR"; then
3838
kde_cv_pythondir=/usr/local
3840
kde_cv_pythondir="$PYTHONDIR"
3844
AC_ARG_WITH(pythondir,
3845
[ --with-pythondir=pythondir use python installed in pythondir ],
3847
ac_python_dir=$withval
3848
], ac_python_dir=$kde_cv_pythondir
3851
AC_MSG_RESULT($ac_python_dir)
3854
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
3856
AC_REQUIRE([KDE_CHECK_LIBDL])
3857
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3858
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
3860
if test -z "$1"; then
3866
AC_MSG_CHECKING([for Python$version])
3868
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
3869
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
3870
if test ! -r $python_incdir/Python.h; then
3871
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
3872
python_incdir=$python_incdir/python$version
3873
if test ! -r $python_incdir/Python.h; then
3878
PYTHONINC=-I$python_incdir
3880
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3881
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
3882
if test ! -r $python_libdir/libpython$version.a; then
3883
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
3884
python_libdir=$python_libdir/python$version/config
3885
if test ! -r $python_libdir/libpython$version.a; then
3890
PYTHONLIB=-L$python_libdir
3891
kde_orig_LIBPYTHON=$LIBPYTHON
3892
if test -z "$LIBPYTHON"; then
3893
LIBPYTHON=-lpython$version
3896
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3897
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
3898
python_moddir=$python_moddir/python$version
3899
if test ! -r $python_moddir/copy.py; then
3903
PYTHONMODDIR=$python_moddir
3905
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
3907
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
3908
LIBPYTHON=$kde_orig_LIBPYTHON
3909
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
3910
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
3913
dnl Note: this test is very weak
3914
kde_python_link_found=no
3915
KDE_TRY_LINK_PYTHON(normal)
3916
KDE_TRY_LINK_PYTHON(m, -lm)
3917
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
3918
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
3919
KDE_TRY_LINK_PYTHON(db2, -ldb2)
3920
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
3921
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
3922
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
3923
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
3924
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
3925
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
3926
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
3927
[AC_MSG_WARN([it seems, Python depends on another library.
3928
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
3929
and contact the authors to let them know about this problem])
3932
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
3936
AC_SUBST(PYTHONMODDIR)
3937
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
3943
AC_DEFUN(KDE_CHECK_PYTHON,
3945
KDE_CHECK_PYTHON_INTERN("2.2",
3946
[KDE_CHECK_PYTHON_INTERN("2.1",
3947
[KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
3951
AC_DEFUN(KDE_CHECK_STL_SGI,
3953
AC_MSG_CHECKING([if STL implementation is SGI like])
3954
AC_CACHE_VAL(kde_cv_stl_type_sgi,
3958
using namespace std;
3960
string astring="Hallo Welt.";
3961
astring.erase(0, 6); // now astring is "Welt"
3963
], kde_cv_stl_type_sgi=yes,
3964
kde_cv_stl_type_sgi=no)
3967
AC_MSG_RESULT($kde_cv_stl_type_sgi)
3969
if test "$kde_cv_stl_type_sgi" = "yes"; then
3970
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
3974
AC_DEFUN(KDE_CHECK_STL_HP,
3976
AC_MSG_CHECKING([if STL implementation is HP like])
3977
AC_CACHE_VAL(kde_cv_stl_type_hp,
3981
using namespace std;
3983
string astring="Hello World";
3984
astring.remove(0, 6); // now astring is "World"
3986
], kde_cv_stl_type_hp=yes,
3987
kde_cv_stl_type_hp=no)
3989
AC_MSG_RESULT($kde_cv_stl_type_hp)
3991
if test "$kde_cv_stl_type_hp" = "yes"; then
3992
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
3996
AC_DEFUN(KDE_CHECK_STL,
4000
ac_save_CXXFLAGS="$CXXFLAGS"
4001
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4004
if test "$kde_cv_stl_type_sgi" = "no"; then
4007
if test "$kde_cv_stl_type_hp" = "no"; then
4008
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
4012
CXXFLAGS="$ac_save_CXXFLAGS"
4016
AC_DEFUN(AC_FIND_QIMGIO,
4017
[AC_REQUIRE([AC_FIND_JPEG])
4018
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4019
AC_MSG_CHECKING([for qimgio])
4020
AC_CACHE_VAL(ac_cv_lib_qimgio,
4024
ac_save_LIBS="$LIBS"
4025
ac_save_CXXFLAGS="$CXXFLAGS"
4026
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4027
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4030
#include <qimageio.h>
4031
#include <qstring.h>
4033
QString t = "hallo";
4038
ac_cv_lib_qimgio=yes,
4039
ac_cv_lib_qimgio=no,
4040
ac_cv_lib_qimgio=no)
4041
LIBS="$ac_save_LIBS"
4042
CXXFLAGS="$ac_save_CXXFLAGS"
4045
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4046
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4048
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4051
AC_MSG_RESULT(not found)
4055
AC_DEFUN(KDE_CHECK_ANSI,
4059
AC_DEFUN(KDE_CHECK_INSURE,
4061
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4063
if test $enableval = "no"; dnl
4064
then ac_use_insure="no"
4065
else ac_use_insure="yes"
4067
], [ac_use_insure="no"])
4069
AC_MSG_CHECKING(if we will use Insure++ to debug)
4070
AC_MSG_RESULT($ac_use_insure)
4071
if test "$ac_use_insure" = "yes"; dnl
4072
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4076
AC_DEFUN(AM_DISABLE_LIBRARIES,
4078
AC_PROVIDE([AM_ENABLE_STATIC])
4079
AC_PROVIDE([AM_ENABLE_SHARED])
4085
AC_DEFUN(AC_CHECK_UTMP_FILE,
4087
AC_MSG_CHECKING([for utmp file])
4089
AC_CACHE_VAL(kde_cv_utmp_file,
4100
if test -r "$ac_file"; then
4101
kde_cv_utmp_file=$ac_file
4107
if test "$kde_cv_utmp_file" != "no"; then
4108
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4110
AC_MSG_RESULT($kde_cv_utmp_file)
4113
AC_MSG_RESULT([non found])
4118
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4121
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4123
if test ! -s $srcdir/subdirs; then
4124
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4126
files=`cd $srcdir && ls -1`
4127
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4129
echo $i >> $srcdir/subdirs
4133
if test -s $srcdir/inst-apps; then
4134
ac_topsubdirs="`cat $srcdir/inst-apps`"
4136
ac_topsubdirs="`cat $srcdir/subdirs`"
4139
for i in $ac_topsubdirs; do
4140
AC_MSG_CHECKING([if $i should be compiled])
4141
if test -d $srcdir/$i; then
4143
for j in $DO_NOT_COMPILE; do
4144
if test $i = $j; then
4151
AC_MSG_RESULT($install_it)
4152
vari=`echo $i | sed -e 's,[[-+]],_,g'`
4153
if test $install_it = "yes"; then
4154
TOPSUBDIRS="$TOPSUBDIRS $i"
4155
eval "$vari""_SUBDIR_included=yes"
4157
eval "$vari""_SUBDIR_included=no"
4161
AC_SUBST(TOPSUBDIRS)
4164
AC_DEFUN(KDE_CHECK_NAMESPACES,
4166
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4180
int Foo::Bar::i = 1;
4183
AC_DEFINE(HAVE_NAMESPACES)
4190
AC_DEFUN(KDE_CHECK_NEWLIBS,
4195
dnl ------------------------------------------------------------------------
4196
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4197
dnl ------------------------------------------------------------------------
4199
AC_DEFUN(AC_CHECK_S_ISSOCK,
4201
AC_MSG_CHECKING(for S_ISSOCK)
4202
AC_CACHE_VAL(ac_cv_have_s_issock,
4208
#include <sys/stat.h>
4212
int b = S_ISSOCK( buff.st_mode );
4214
ac_cv_have_s_issock=yes,
4215
ac_cv_have_s_issock=no)
4218
AC_MSG_RESULT($ac_cv_have_s_issock)
4219
if test "$ac_cv_have_s_issock" = "yes"; then
4220
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4224
dnl ------------------------------------------------------------------------
4225
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4226
dnl ------------------------------------------------------------------------
4228
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4230
AC_MSG_CHECKING(for MAXPATHLEN)
4231
AC_CACHE_VAL(ac_cv_maxpathlen,
4234
cat > conftest.$ac_ext <<EOF
4236
# include <stdlib.h>
4239
#include <sys/param.h>
4241
#define MAXPATHLEN 1024
4244
KDE_HELLO MAXPATHLEN
4248
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4250
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4251
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4253
ac_cv_maxpathlen=1024
4259
AC_MSG_RESULT($ac_cv_maxpathlen)
4260
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4263
dnl -------------------------------------------------------------------------
4264
dnl See if the compiler supports a template repository bero@redhat.de
4265
dnl -------------------------------------------------------------------------
4266
AC_DEFUN(KDE_COMPILER_REPO,
4271
KDE_CHECK_COMPILER_FLAG(frepo,
4277
if test -z "$REPO"; then
4278
KDE_CHECK_COMPILER_FLAG(instances=explicit,
4280
REPO="-instances=explicit"
4281
NOREPO="-instances=extern"
4285
if test -n "$REPO"; then
4286
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
4287
[C++ compiler supports template repository])
4295
AC_DEFUN(KDE_CHECK_HEADER,
4298
kde_safe_cppflags=$CPPFLAGS
4299
CPPFLAGS="$CPPFLAGS $all_includes"
4301
AC_CHECK_HEADER($1, $2, $3)
4302
CPPFLAGS=$kde_safe_cppflags
4306
AC_DEFUN(KDE_CHECK_HEADERS,
4309
kde_safe_cppflags=$CPPFLAGS
4310
CPPFLAGS="$CPPFLAGS $all_includes"
4312
for k_header in $1; do
4313
AC_CHECK_HEADER($k_header, $2, $3)
4315
CPPFLAGS=$kde_safe_cppflags
4319
AC_DEFUN(KDE_FAST_CONFIGURE,
4321
dnl makes configure fast (needs perl)
4322
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4323
with_fast_perl=$enableval, with_fast_perl=yes)
4326
AC_DEFUN(KDE_CONF_FILES,
4329
if test -f $srcdir/configure.files ; then
4330
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4333
if test -n "$val" ; then
4335
CONF_FILES="$CONF_FILES $i"
4338
AC_SUBST(CONF_FILES)
4341
AC_DEFUN(KDE_SET_PREFIX,
4344
dnl make $KDEDIR the default for the installation
4345
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4347
if test "x$prefix" = "xNONE"; then
4348
prefix=$ac_default_prefix
4349
ac_configure_args="$ac_configure_args --prefix=$prefix"
4351
# And delete superflous '/' to make compares easier
4352
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4353
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4358
pushdef([AC_PROG_INSTALL],
4360
dnl our own version, testing for a -p flag
4361
popdef([AC_PROG_INSTALL])
4362
dnl as AC_PROG_INSTALL works as it works we first have
4363
dnl to save if the user didn't specify INSTALL, as the
4364
dnl autoconf one overwrites INSTALL and we have no chance to find
4366
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4367
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4368
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4371
if test -z "$kde_save_INSTALL_given" ; then
4372
# OK, user hasn't given any INSTALL, autoconf found one for us
4373
# now we test, if it supports the -p flag
4374
AC_MSG_CHECKING(for -p flag to install)
4375
rm -f confinst.$$.* > /dev/null 2>&1
4376
echo "Testtest" > confinst.$$.orig
4378
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4379
if test -f confinst.$$.new ; then
4380
# OK, -p seems to do no harm to install
4381
INSTALL="${INSTALL} -p"
4386
AC_MSG_RESULT($ac_res)
4388
dnl the following tries to resolve some signs and wonders coming up
4389
dnl with different autoconf/automake versions
4391
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4392
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4393
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4394
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4395
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4396
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4397
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4398
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4399
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4400
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4401
dnl automake (due to broken Makefile.am or whatever) to install programs,
4402
dnl and so does not see the -s flag in automake > 1.4
4403
dnl to clean up that mess we:
4404
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4405
dnl which cleans KDE's program with automake > 1.4;
4406
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4407
dnl with automake<=1.4
4408
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4409
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4411
dnl And to all this comes, that I even can't write in comments variable
4412
dnl names used by automake, because it is so stupid to think I wanted to
4413
dnl _use_ them, therefor I have written A_M_... instead of AM_
4414
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4416
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4417
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4419
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4420
INSTALL_SCRIPT='${INSTALL}'
4424
AC_DEFUN(KDE_LANG_CPLUSPLUS,
4426
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4427
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4430
pushdef([AC_LANG_CPLUSPLUS],
4431
[popdef([AC_LANG_CPLUSPLUS])
4435
AC_DEFUN(KDE_CHECK_LONG_LONG,
4437
AC_MSG_CHECKING(for long long)
4438
AC_CACHE_VAL(kde_cv_c_long_long,
4446
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4449
AC_MSG_RESULT($kde_cv_c_long_long)
4450
if test "$kde_cv_c_long_long" = yes; then
4451
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4455
AC_DEFUN(KDE_CHECK_LIB,
4457
kde_save_LDFLAGS="$LDFLAGS"
4458
dnl AC_CHECK_LIB modifies LIBS, so save it here
4459
kde_save_LIBS="$LIBS"
4460
LDFLAGS="$LDFLAGS $all_libraries"
4462
aix*) LDFLAGS="-brtl $LDFLAGS"
4463
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4466
AC_CHECK_LIB($1, $2, $3, $4, $5)
4467
LDFLAGS="$kde_save_LDFLAGS"
4468
LIBS="$kde_save_LIBS"
4474
AC_DEFUN(KDE_CHECK_INITGROUPS,
4476
AC_REQUIRE([AC_CANONICAL_HOST])
4477
AC_CHECK_FUNCS(initgroups)
4478
if test "x$ac_cv_func_initgroups" = "xyes"; then
4482
AC_MSG_CHECKING([for initgroups prototype])
4483
AC_CACHE_VAL(kde_cv_check_initgroups_proto,
4489
int x = initgroups(buffer,id);
4491
kde_cv_check_initgroups_proto=yes,
4492
kde_cv_check_initgroups_proto=no)
4494
AC_MSG_RESULT($kde_cv_check_initgroups_proto)
4498
kde_cv_check_initgroups_proto=yes
4502
kde_cv_check_initgroups_proto=no
4504
if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
4505
kde_check_initgroups_proto=1
4507
kde_check_initgroups_proto=0
4509
AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
4510
[initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
4513
AC_DEFUN(KDE_JAVA_PREFIX,
4516
base=`basename "$1"`
4517
list=`ls -1 $dir 2> /dev/null`
4518
for entry in $list; do
4519
if test -d $dir/$entry/bin; then
4522
javadirs="$javadirs $dir/$entry/bin"
4525
elif test -d $dir/$entry/jre/bin; then
4528
javadirs="$javadirs $dir/$entry/jre/bin"
4535
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4536
AC_DEFUN(KDE_CHECK_JAVA_DIR,
4540
[ --with-java=javadir use java installed in javadir, --without-java disables ],
4541
[ ac_java_dir=$withval
4545
AC_MSG_CHECKING([for Java])
4547
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4548
if test "x$ac_java_dir" = "xno"; then
4550
kde_java_includedir=no
4551
kde_java_libjvmdir=no
4552
kde_java_libhpidir=no
4554
if test "x$ac_java_dir" = "x"; then
4557
dnl No option set -> look in $PATH
4558
KDE_JAVA_PREFIX(/usr/j*dk*)
4559
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4560
KDE_JAVA_PREFIX(/opt/j*sdk*)
4561
KDE_JAVA_PREFIX(/usr/lib/java*)
4562
KDE_JAVA_PREFIX(/usr/java*)
4563
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4564
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4565
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4566
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4567
KDE_JAVA_PREFIX(/opt/java*)
4572
for dir in $PATH; do
4573
javadirs="$javadirs $dir"
4578
for dir in $javadirs; do
4579
if test ! -d $dir; then break; fi
4580
if test -x "$dir/java"; then
4581
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4582
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4583
jredirs="$jredirs $dir"
4590
for dir in $jredirs; do
4592
kde_java_bindir=$dir
4593
if test -x "$dir/javac"; then
4599
if test -n "$JAVAC"; then
4600
dnl this substitution might not work - well, we test for jni.h below
4601
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4603
kde_java_includedir=no
4606
dnl config option set
4607
kde_java_bindir=$ac_java_dir/bin
4608
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4609
kde_java_includedir=no
4611
kde_java_includedir=$ac_java_dir/include
4616
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4617
if test "x$kde_java_bindir" != "xno"; then
4619
dnl Look for libjvm.so
4620
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4621
dnl Look for libhpi.so and avoid green threads
4622
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | tail -n 1`
4624
dnl Now check everything's fine under there
4625
dnl the include dir is our flag for having the JDK
4626
if test -d "$kde_java_includedir"; then
4627
if test ! -x "$kde_java_bindir/javac"; then
4628
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4630
if test ! -x "$kde_java_bindir/javah"; then
4631
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4633
if test ! -x "$kde_java_bindir/jar"; then
4634
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4636
if test ! -r "$kde_java_includedir/jni.h"; then
4637
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4640
jni_includes="-I$kde_java_includedir"
4641
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4642
dnl and under linux here..
4643
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4644
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4651
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4652
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4655
if test ! -x "$kde_java_bindir/java"; then
4656
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4659
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4660
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4663
if test -n "$jni_includes"; then
4664
dnl Check for JNI version
4667
ac_cxxflags_safe="$CXXFLAGS"
4668
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4674
#ifndef JNI_VERSION_1_2
4677
],[ kde_jni_works=yes ],
4678
[ kde_jni_works=no ])
4680
if test $kde_jni_works = no; then
4681
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4682
You need to have Java Development Kit (JDK) version 1.2.
4684
Use --with-java to specify another location.
4685
Use --without-java to configure without java support.
4686
Or download a newer JDK and try again.
4687
See e.g. http://java.sun.com/products/jdk/1.2 ])
4690
CXXFLAGS="$ac_cxxflags_safe"
4693
dnl All tests ok, inform and subst the variables
4695
JAVAC=$kde_java_bindir/javac
4696
JAVAH=$kde_java_bindir/javah
4697
JAR=$kde_java_bindir/jar
4698
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4699
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4700
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4703
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4704
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4707
AC_MSG_RESULT([none found])
4714
AC_SUBST(jni_includes)
4716
# for backward compat
4717
kde_cv_java_includedir=$kde_java_includedir
4718
kde_cv_java_bindir=$kde_java_bindir
4721
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4722
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4723
dnl big packages, m4_foreach is dog-slow. So use our own version of
4724
dnl it. (matz@kde.org)
4725
m4_define([mm_foreach],
4726
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4727
m4_define([mm_car], [[$1]])
4728
m4_define([mm_car2], [[$@]])
4729
m4_define([_mm_foreach],
4730
[m4_if(m4_quote($2), [], [],
4731
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
4732
mm_car2(m4_shift($2)),
4734
m4_define([AC_FOREACH],
4735
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4737
AC_DEFUN(KDE_NEED_FLEX,
4740
LIBS="$LIBS $USER_LDFLAGS"
4743
if test -z "$LEXLIB"; then
4744
AC_MSG_ERROR([You need to have flex installed.])
4749
AC_DEFUN(AC_PATH_QTOPIA,
4751
dnl TODO: use AC_CACHE_VAL
4753
if test -z "$1"; then
4758
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4759
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4760
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4763
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4764
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4766
AC_REQUIRE([AC_PATH_QT])
4768
AC_MSG_CHECKING([for Qtopia])
4771
AC_SUBST(LIB_QTOPIA)
4773
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4777
AC_ARG_WITH(qtopia-dir,
4778
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
4779
[ ac_qtopia_incdir="$withval"/include] )
4782
for dir in $kde_qtopia_dirs; do
4783
qtopia_incdirs="$qtopia_incdirs $dir/include"
4786
if test ! "$ac_qtopia_incdir" = "NO"; then
4787
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4791
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4792
ac_qtopia_incdir="$qtopia_incdir"
4794
if test -z "$qtopia_incdir"; then
4795
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4798
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4799
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4800
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4802
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4803
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4804
if test "$qtopia_ver" -lt "$qtopia_minver"; then
4805
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4812
ac_cxxflags_safe="$CXXFLAGS"
4813
ac_ldflags_safe="$LDFLAGS"
4814
ac_libs_safe="$LIBS"
4816
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4817
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4818
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4820
cat > conftest.$ac_ext <<EOF
4821
#include "confdefs.h"
4822
#include <qpe/qpeapplication.h>
4823
#include <qpe/version.h>
4825
int main( int argc, char **argv )
4827
QPEApplication app( argc, argv );
4832
if AC_TRY_EVAL(ac_link) && test -s conftest; then
4836
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4837
the end of config.log])
4840
CXXFLAGS="$ac_cxxflags_safe"
4841
LDFLAGS="$ac_ldflags_safe"
4842
LIBS="$ac_libs_safe"
4846
QTOPIA_INCLUDES="-I$qtopia_incdir"
4847
AC_SUBST(QTOPIA_INCLUDES)
4849
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
4853
AC_DEFUN(KDE_INIT_DOXYGEN,
4855
AC_MSG_CHECKING([for Qt docs])
4857
if test "${with_qt_dir+set}" = set; then
4858
kde_qtdir="$with_qt_dir"
4861
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], QTDOCDIR)
4862
AC_MSG_RESULT($QTDOCDIR)
4866
KDE_FIND_PATH(dot, DOT, [], [])
4867
if test -n "$DOT"; then
4872
AC_SUBST(KDE_HAVE_DOT)
4873
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
4876
DOXYGEN_PROJECT_NAME="$1"
4877
DOXYGEN_PROJECT_NUMBER="$2"
4878
AC_SUBST(DOXYGEN_PROJECT_NAME)
4879
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
4882
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
4885
AC_SUBST(KDE_HAS_DOXYGEN)
4888
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
4890
# serial 47 AC_PROG_LIBTOOL
4894
AC_DEFUN([AC_PROG_LIBTOOL],
4895
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4896
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4897
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
4898
AC_PROVIDE_IFELSE([AC_PROG_CXX],
4900
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
4903
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
4904
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
4905
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
4906
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4908
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4910
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
4912
[ifdef([AC_PROG_GCJ],
4913
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
4914
ifdef([A][M_PROG_GCJ],
4915
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
4916
ifdef([LT_AC_PROG_GCJ],
4917
[define([LT_AC_PROG_GCJ],
4918
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
4919
])])# AC_PROG_LIBTOOL
4924
AC_DEFUN([_AC_PROG_LIBTOOL],
4925
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
4926
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
4927
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
4929
# This can be used to rebuild libtool when needed
4930
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
4932
# Always use our own libtool.
4933
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
4934
AC_SUBST(LIBTOOL)dnl
4936
# Prevent multiple expansion
4937
define([AC_PROG_LIBTOOL], [])
4938
])# _AC_PROG_LIBTOOL
4943
AC_DEFUN([AC_LIBTOOL_SETUP],
4945
AC_REQUIRE([AC_ENABLE_SHARED])dnl
4946
AC_REQUIRE([AC_ENABLE_STATIC])dnl
4947
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
4948
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4949
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4950
AC_REQUIRE([AC_PROG_CC])dnl
4951
AC_REQUIRE([AC_PROG_LD])dnl
4952
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
4953
AC_REQUIRE([AC_PROG_NM])dnl
4954
AC_REQUIRE([LT_AC_PROG_SED])dnl
4956
AC_REQUIRE([AC_PROG_LN_S])dnl
4957
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
4958
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
4959
AC_REQUIRE([AC_OBJEXT])dnl
4960
AC_REQUIRE([AC_EXEEXT])dnl
4963
AC_LIBTOOL_SYS_MAX_CMD_LEN
4964
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4967
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4968
_LT_AC_PROG_ECHO_BACKSLASH
4972
# AIX sometimes has problems with the GCC collect2 program. For some
4973
# reason, if we set the COLLECT_NAMES environment variable, the problems
4974
# vanish in a puff of smoke.
4975
if test "X${COLLECT_NAMES+set}" != Xset; then
4977
export COLLECT_NAMES
4982
# Sed substitution that helps us do robust quoting. It backslashifies
4983
# metacharacters that are still active within double-quoted strings.
4984
Xsed='sed -e s/^X//'
4985
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
4987
# Same as above, but do not quote variable references.
4988
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
4990
# Sed substitution to delay expansion of an escaped shell variable in a
4991
# double_quote_subst'ed string.
4992
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4994
# Sed substitution to avoid accidental globbing in evaled expressions
4995
no_glob_subst='s/\*/\\\*/g'
5001
default_ofile=libtool
5002
can_build_shared=yes
5004
# All known linkers require a `.a' archive for static linking (except M$VC,
5005
# which needs '.lib').
5007
ltmain="$ac_aux_dir/ltmain.sh"
5008
ofile="$default_ofile"
5009
with_gnu_ld="$lt_cv_prog_gnu_ld"
5011
AC_CHECK_TOOL(RANLIB, ranlib, :)
5012
AC_CHECK_TOOL(STRIP, strip, :)
5015
old_CFLAGS="$CFLAGS"
5017
# Set sane defaults for various variables
5018
test -z "$AR" && AR=ar
5019
test -z "$AR_FLAGS" && AR_FLAGS=cru
5020
test -z "$AS" && AS=as
5021
test -z "$CC" && CC=cc
5022
test -z "$LTCC" && LTCC=$CC
5023
test -z "$DLLTOOL" && DLLTOOL=dlltool
5024
test -z "$LD" && LD=ld
5025
test -z "$LN_S" && LN_S="ln -s"
5026
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5027
test -z "$NM" && NM=nm
5028
test -z "$SED" && SED=sed
5029
test -z "$OBJDUMP" && OBJDUMP=objdump
5030
test -z "$RANLIB" && RANLIB=:
5031
test -z "$STRIP" && STRIP=:
5032
test -z "$ac_objext" && ac_objext=o
5034
# Determine commands to create old-style static archives.
5035
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5036
old_postinstall_cmds='chmod 644 $oldlib'
5037
old_postuninstall_cmds=
5039
if test -n "$RANLIB"; then
5042
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5045
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5048
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5051
# Only perform the check for file, if the check method requires it
5052
case $deplibs_check_method in
5054
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5060
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5061
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5062
enable_win32_dll=yes, enable_win32_dll=no)
5064
AC_ARG_ENABLE([libtool-lock],
5065
[AC_HELP_STRING([--disable-libtool-lock],
5066
[avoid locking (might break parallel builds)])])
5067
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5070
[AC_HELP_STRING([--with-pic],
5071
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5072
[pic_mode="$withval"],
5074
test -z "$pic_mode" && pic_mode=default
5076
# Use C for the default configuration in the libtool script
5078
AC_LIBTOOL_LANG_C_CONFIG
5080
])# AC_LIBTOOL_SETUP
5083
# _LT_AC_SYS_COMPILER
5084
# -------------------
5085
AC_DEFUN([_LT_AC_SYS_COMPILER],
5086
[AC_REQUIRE([AC_PROG_CC])dnl
5088
# If no C compiler was specified, use CC.
5091
# Allow CC to be a program name with arguments.
5094
])# _LT_AC_SYS_COMPILER
5097
# _LT_AC_SYS_LIBPATH_AIX
5098
# ----------------------
5099
# Links a minimal program and checks the executable
5100
# for the system default hardcoded library path. In most cases,
5101
# this is /usr/lib:/lib, but when the MPI compilers are used
5102
# the location of the communication and MPI libs are included too.
5103
# If we don't find anything, use the default library path according
5104
# to the aix ld manual.
5105
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5106
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5107
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5109
# Check for a 64-bit object if we didn't find anything.
5110
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; }
5112
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5113
])# _LT_AC_SYS_LIBPATH_AIX
5116
# _LT_AC_PROG_ECHO_BACKSLASH
5117
# --------------------------
5118
# Add some code to the start of the generated configure script which
5119
# will find an echo command which doesn't interpret backslashes.
5120
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5121
[ifdef([AC_DIVERSION_NOTICE],
5122
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5123
[AC_DIVERT_PUSH(NOTICE)])
5125
# Check that we are running under the correct shell.
5126
SHELL=${CONFIG_SHELL-/bin/sh}
5130
# Remove one level of quotation (which was required for Make).
5131
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5136
if test "X[$]1" = X--no-reexec; then
5137
# Discard the --no-reexec flag, and continue.
5139
elif test "X[$]1" = X--fallback-echo; then
5140
# Avoid inline document here, it may be left over
5142
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5143
# Yippee, $echo works!
5146
# Restart under the correct shell.
5147
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5150
if test "X[$]1" = X--fallback-echo; then
5151
# used as fallback echo
5159
# The HP-UX ksh and POSIX shell print the target directory to stdout
5161
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5163
if test -z "$ECHO"; then
5164
if test "X${echo_test_string+set}" != Xset; then
5165
# find a string as large as possible, as long as the shell can cope with it
5166
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5167
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5168
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5169
echo_test_string="`eval $cmd`" &&
5170
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5177
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5178
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5179
test "X$echo_testing_string" = "X$echo_test_string"; then
5182
# The Solaris, AIX, and Digital Unix default echo programs unquote
5183
# backslashes. This makes it impossible to quote backslashes using
5184
# echo "$something" | sed 's/\\/\\\\/g'
5186
# So, first we look for a working echo in the user's PATH.
5188
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5189
for dir in $PATH /usr/ucb; do
5191
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5192
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5193
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5194
test "X$echo_testing_string" = "X$echo_test_string"; then
5201
if test "X$echo" = Xecho; then
5202
# We didn't find a better echo, so look for alternatives.
5203
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5204
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5205
test "X$echo_testing_string" = "X$echo_test_string"; then
5206
# This shell has a builtin print -r that does the trick.
5208
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5209
test "X$CONFIG_SHELL" != X/bin/ksh; then
5210
# If we have ksh, try running configure again with it.
5211
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5212
export ORIGINAL_CONFIG_SHELL
5213
CONFIG_SHELL=/bin/ksh
5215
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5219
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5220
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5221
test "X$echo_testing_string" = "X$echo_test_string"; then
5222
# Cool, printf works
5224
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5225
test "X$echo_testing_string" = 'X\t' &&
5226
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5227
test "X$echo_testing_string" = "X$echo_test_string"; then
5228
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5230
SHELL="$CONFIG_SHELL"
5232
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5233
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5234
test "X$echo_testing_string" = 'X\t' &&
5235
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5236
test "X$echo_testing_string" = "X$echo_test_string"; then
5237
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5239
# maybe with a smaller string...
5242
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5243
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5250
if test "$prev" != 'sed 50q "[$]0"'; then
5251
echo_test_string=`eval $prev`
5252
export echo_test_string
5253
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5255
# Oops. We lost completely, so just stick with echo.
5264
# Copy echo and quote the copy suitably for passing to libtool from
5265
# the Makefile, instead of quoting the original, which is used later.
5267
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5268
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5273
])# _LT_AC_PROG_ECHO_BACKSLASH
5278
AC_DEFUN([_LT_AC_LOCK],
5279
[AC_ARG_ENABLE([libtool-lock],
5280
[AC_HELP_STRING([--disable-libtool-lock],
5281
[avoid locking (might break parallel builds)])])
5282
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5284
# Some flags need to be propagated to the compiler or linker for good
5288
# Find out which ABI we are using.
5289
echo 'int i;' > conftest.$ac_ext
5290
if AC_TRY_EVAL(ac_compile); then
5291
case `/usr/bin/file conftest.$ac_objext` in
5303
# Find out which ABI we are using.
5304
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5305
if AC_TRY_EVAL(ac_compile); then
5306
case `/usr/bin/file conftest.$ac_objext` in
5322
# Test if the compiler is 64bit
5323
echo 'int i;' > conftest.$ac_ext
5324
if AC_TRY_EVAL(ac_compile); then
5325
case `/usr/bin/file conftest.$ac_objext` in
5338
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5339
SAVE_CFLAGS="$CFLAGS"
5340
CFLAGS="$CFLAGS -belf"
5341
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5343
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5345
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5346
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5347
CFLAGS="$SAVE_CFLAGS"
5350
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5351
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5352
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5353
AC_CHECK_TOOL(AS, as, false)
5354
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5356
# recent cygwin and mingw systems supply a stub DllMain which the user
5357
# can override, but on older systems we have to supply one
5358
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5360
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5361
DllMain (0, 0, 0);],
5362
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
5365
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5366
# old mingw systems require "-dll" to link a DLL, while more recent ones
5368
SAVE_CFLAGS="$CFLAGS"
5369
CFLAGS="$CFLAGS -mdll"
5370
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
5371
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
5372
CFLAGS="$SAVE_CFLAGS" ;;
5373
*-*-cygwin* | *-*-pw32*)
5374
# cygwin systems need to pass --dll to the linker, and not link
5375
# crt.o which will require a WinMain@16 definition.
5376
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5382
need_locks="$enable_libtool_lock"
5387
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5388
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5389
# ----------------------------------------------------------------
5390
# Check whether the given compiler option works
5391
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5392
[AC_CACHE_CHECK([$1], [$2],
5394
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5395
save_CFLAGS="$CFLAGS"
5397
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5398
if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
5399
# The compiler can only warn and ignore the option if not recognized
5400
# So say no if there are warnings
5401
if test -s conftest.err; then
5402
# Append any errors to the config.log.
5403
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5409
CFLAGS="$save_CFLAGS"
5412
if test x"[$]$2" = xyes; then
5413
ifelse([$5], , :, [$5])
5415
ifelse([$6], , :, [$6])
5417
])# AC_LIBTOOL_COMPILER_OPTION
5420
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5421
# [ACTION-SUCCESS], [ACTION-FAILURE])
5422
# ------------------------------------------------------------
5423
# Check whether the given compiler option works
5424
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5425
[AC_CACHE_CHECK([$1], [$2],
5427
save_LDFLAGS="$LDFLAGS"
5428
LDFLAGS="$LDFLAGS $3"
5429
echo "$lt_simple_link_test_code" > conftest.$ac_ext
5430
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5431
# The compiler can only warn and ignore the option if not recognized
5432
# So say no if there are warnings
5433
if test -s conftest.err; then
5434
# Append any errors to the config.log.
5435
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5441
LDFLAGS="$save_LDFLAGS"
5444
if test x"[$]$2" = xyes; then
5445
ifelse([$4], , :, [$4])
5447
ifelse([$5], , :, [$5])
5449
])# AC_LIBTOOL_LINKER_OPTION
5452
# AC_LIBTOOL_SYS_MAX_CMD_LEN
5453
# --------------------------
5454
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
5455
[# find the maximum length of command line arguments
5456
AC_MSG_CHECKING([the maximum length of command line arguments])
5457
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5463
# On DJGPP, this test can blow up pretty badly due to problems in libc
5464
# (any single argument exceeding 2000 bytes causes a buffer overrun
5465
# during glob expansion). Even if it were fixed, the result of this
5466
# check would be larger than it should be.
5467
lt_cv_sys_max_cmd_len=12288; # 12K is about right
5471
# Under GNU Hurd, this test is not required because there is
5472
# no limit to the length of command line arguments.
5473
# Libtool will interpret -1 as no limit whatsoever
5474
lt_cv_sys_max_cmd_len=-1;
5478
# If test is not a shell built-in, we'll probably end up computing a
5479
# maximum length that is only half of the actual maximum length, but
5481
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
5482
= "XX$testring") >/dev/null 2>&1 &&
5483
new_result=`expr "X$testring" : ".*" 2>&1` &&
5484
lt_cv_sys_max_cmd_len=$new_result &&
5485
test $i != 17 # 1/2 MB should be enough
5488
testring=$testring$testring
5491
# Add a significant safety factor because C++ compilers can tack on massive
5492
# amounts of additional arguments before passing them to the linker.
5493
# It appears as though 1/2 is a usable value.
5494
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5498
if test -n $lt_cv_sys_max_cmd_len ; then
5499
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
5503
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
5506
# _LT_AC_CHECK_DLFCN
5507
# --------------------
5508
AC_DEFUN([_LT_AC_CHECK_DLFCN],
5509
[AC_CHECK_HEADERS(dlfcn.h)dnl
5510
])# _LT_AC_CHECK_DLFCN
5513
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
5514
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
5515
# ------------------------------------------------------------------
5516
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
5517
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
5518
if test "$cross_compiling" = yes; then :
5521
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5522
lt_status=$lt_dlunknown
5523
cat > conftest.$ac_ext <<EOF
5524
[#line __oline__ "configure"
5525
#include "confdefs.h"
5534
# define LT_DLGLOBAL RTLD_GLOBAL
5537
# define LT_DLGLOBAL DL_GLOBAL
5539
# define LT_DLGLOBAL 0
5543
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5544
find out it does not work in some platform. */
5545
#ifndef LT_DLLAZY_OR_NOW
5547
# define LT_DLLAZY_OR_NOW RTLD_LAZY
5550
# define LT_DLLAZY_OR_NOW DL_LAZY
5553
# define LT_DLLAZY_OR_NOW RTLD_NOW
5556
# define LT_DLLAZY_OR_NOW DL_NOW
5558
# define LT_DLLAZY_OR_NOW 0
5566
extern "C" void exit (int);
5569
void fnord() { int i=42;}
5572
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5573
int status = $lt_dlunknown;
5577
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
5578
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
5579
/* dlclose (self); */
5585
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
5586
(./conftest; exit; ) 2>/dev/null
5589
x$lt_dlno_uscore) $1 ;;
5590
x$lt_dlneed_uscore) $2 ;;
5591
x$lt_unknown|x*) $3 ;;
5594
# compilation failed
5599
])# _LT_AC_TRY_DLOPEN_SELF
5602
# AC_LIBTOOL_DLOPEN_SELF
5603
# -------------------
5604
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
5605
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
5606
if test "x$enable_dlopen" != xyes; then
5607
enable_dlopen=unknown
5608
enable_dlopen_self=unknown
5609
enable_dlopen_self_static=unknown
5616
lt_cv_dlopen="load_add_on"
5618
lt_cv_dlopen_self=yes
5621
cygwin* | mingw* | pw32*)
5622
lt_cv_dlopen="LoadLibrary"
5627
AC_CHECK_FUNC([shl_load],
5628
[lt_cv_dlopen="shl_load"],
5629
[AC_CHECK_LIB([dld], [shl_load],
5630
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
5631
[AC_CHECK_FUNC([dlopen],
5632
[lt_cv_dlopen="dlopen"],
5633
[AC_CHECK_LIB([dl], [dlopen],
5634
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
5635
[AC_CHECK_LIB([svld], [dlopen],
5636
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
5637
[AC_CHECK_LIB([dld], [dld_link],
5638
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
5647
if test "x$lt_cv_dlopen" != xno; then
5653
case $lt_cv_dlopen in
5655
save_CPPFLAGS="$CPPFLAGS"
5656
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5658
save_LDFLAGS="$LDFLAGS"
5659
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5662
LIBS="$lt_cv_dlopen_libs $LIBS"
5664
AC_CACHE_CHECK([whether a program can dlopen itself],
5665
lt_cv_dlopen_self, [dnl
5666
_LT_AC_TRY_DLOPEN_SELF(
5667
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
5668
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
5671
if test "x$lt_cv_dlopen_self" = xyes; then
5672
LDFLAGS="$LDFLAGS $link_static_flag"
5673
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
5674
lt_cv_dlopen_self_static, [dnl
5675
_LT_AC_TRY_DLOPEN_SELF(
5676
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
5677
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
5681
CPPFLAGS="$save_CPPFLAGS"
5682
LDFLAGS="$save_LDFLAGS"
5687
case $lt_cv_dlopen_self in
5688
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
5689
*) enable_dlopen_self=unknown ;;
5692
case $lt_cv_dlopen_self_static in
5693
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
5694
*) enable_dlopen_self_static=unknown ;;
5697
])# AC_LIBTOOL_DLOPEN_SELF
5700
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
5701
# ---------------------------------
5702
# Check to see if options -c and -o are simultaneously supported by compiler
5703
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
5704
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5705
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
5706
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
5707
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
5708
$rm -r conftest 2>/dev/null
5712
ifelse([$1],[],[save_CFLAGS="$CFLAGS"
5713
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
5714
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
5715
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
5716
[$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
5717
GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
5718
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5720
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5721
# that will create temporary files in the current directory regardless of
5722
# the output directory. Thus, making CWD read-only will cause this test
5723
# to fail, enabling locking or at least warning the user not to do parallel
5727
if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
5729
# The compiler can only warn and ignore the option if not recognized
5730
# So say no if there are warnings
5731
if test -s out/conftest.err; then
5732
# Append any errors to the config.log.
5733
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
5735
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5738
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
5739
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
5740
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
5748
])# AC_LIBTOOL_PROG_CC_C_O
5751
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
5752
# -----------------------------------------
5753
# Check to see if we can do hard links to lock some files if needed
5754
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
5755
[AC_REQUIRE([_LT_AC_LOCK])dnl
5757
hard_links="nottested"
5758
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
5759
# do not overwrite the value of need_locks provided by the user
5760
AC_MSG_CHECKING([if we can lock with hard links])
5763
ln conftest.a conftest.b 2>/dev/null && hard_links=no
5765
ln conftest.a conftest.b 2>&5 || hard_links=no
5766
ln conftest.a conftest.b 2>/dev/null && hard_links=no
5767
AC_MSG_RESULT([$hard_links])
5768
if test "$hard_links" = no; then
5769
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
5775
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
5780
AC_DEFUN([AC_LIBTOOL_OBJDIR],
5781
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
5782
[rm -f .libs 2>/dev/null
5783
mkdir .libs 2>/dev/null
5784
if test -d .libs; then
5787
# MS-DOS does not allow filenames that begin with a dot.
5790
rmdir .libs 2>/dev/null])
5791
objdir=$lt_cv_objdir
5792
])# AC_LIBTOOL_OBJDIR
5795
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
5796
# ----------------------------------------------
5797
# Check hardcoding attributes.
5798
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
5799
[AC_MSG_CHECKING([how to hardcode library paths into programs])
5800
_LT_AC_TAGVAR(hardcode_action, $1)=
5801
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
5802
test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
5804
# We can hardcode non-existant directories.
5805
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
5806
# If the only mechanism to avoid hardcoding is shlibpath_var, we
5807
# have to relink, otherwise we might link with an installed library
5808
# when we should be linking with a yet-to-be-installed one
5809
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
5810
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
5811
# Linking always hardcodes the temporary library directory.
5812
_LT_AC_TAGVAR(hardcode_action, $1)=relink
5814
# We can link without hardcoding, and we can hardcode nonexisting dirs.
5815
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
5818
# We cannot hardcode anything, or else we can only hardcode existing
5820
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
5822
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
5824
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
5825
# Fast installation is not supported
5826
enable_fast_install=no
5827
elif test "$shlibpath_overrides_runpath" = yes ||
5828
test "$enable_shared" = no; then
5829
# Fast installation is not necessary
5830
enable_fast_install=needless
5832
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
5835
# AC_LIBTOOL_SYS_LIB_STRIP
5836
# ------------------------
5837
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
5840
AC_MSG_CHECKING([whether stripping libraries is possible])
5841
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5842
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5843
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5844
AC_MSG_RESULT([yes])
5848
])# AC_LIBTOOL_SYS_LIB_STRIP
5851
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
5852
# -----------------------------
5853
# PORTME Fill in your ld.so characteristics
5854
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
5855
[AC_MSG_CHECKING([dynamic linker characteristics])
5857
libname_spec='lib$name'
5864
shlibpath_overrides_runpath=unknown
5866
dynamic_linker="$host_os ld.so"
5867
sys_lib_dlsearch_path_spec="/lib /usr/lib"
5868
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5869
need_lib_prefix=unknown
5870
hardcode_into_libs=no
5872
# when you set need_version to no, make sure it does not cause -set_version
5873
# flags to be left without arguments
5874
need_version=unknown
5879
library_names_spec='${libname}${release}.so$versuffix $libname.a'
5880
shlibpath_var=LIBPATH
5882
# AIX 3 has no versioning support, so we append a major version to the name.
5883
soname_spec='${libname}${release}.so$major'
5888
if test "$host_cpu" = ia64; then
5889
# AIX 5 supports IA64
5890
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5891
shlibpath_var=LD_LIBRARY_PATH
5893
# With GCC up to 2.95.x, collect2 would create an import file
5894
# for dependence libraries. The import file would start with
5895
# the line `#! .'. This would cause the generated library to
5896
# depend on `.', always an invalid library. This was fixed in
5897
# development snapshots of GCC prior to 3.0.
5899
aix4 | aix4.[[01]] | aix4.[[01]].*)
5900
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5902
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5909
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
5910
# soname into executable. Probably we can add versioning support to
5911
# collect2, so additional links can be useful in future.
5912
if test "$aix_use_runtimelinking" = yes; then
5913
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
5914
# instead of lib<name>.a to let people know that these are not
5915
# typical AIX shared libraries.
5916
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5918
# We preserve .a as extension for shared libraries through AIX4.2
5919
# and later when we are not doing run time linking.
5920
library_names_spec='${libname}${release}.a $libname.a'
5921
soname_spec='${libname}${release}.so$major'
5923
shlibpath_var=LIBPATH
5928
library_names_spec='$libname.ixlibrary $libname.a'
5929
# Create ${libname}_ixlibrary.a entries in /sys/libs.
5930
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'
5934
library_names_spec='${libname}.so'
5935
dynamic_linker="$host_os ld.so"
5936
shlibpath_var=LIBRARY_PATH
5942
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5943
soname_spec='${libname}${release}.so$major'
5944
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5945
shlibpath_var=LD_LIBRARY_PATH
5946
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5947
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5948
# the default ld.so.conf also contains /usr/contrib/lib and
5949
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5950
# libtool to hard-code these into programs
5953
cygwin* | mingw* | pw32*)
5954
version_type=windows
5957
case $GCC,$host_os in
5959
library_names_spec='$libname.dll.a'
5960
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
5961
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
5962
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5963
dldir=$destdir/`dirname \$dlpath`~
5964
test -d \$dldir || mkdir -p \$dldir~
5965
$install_prog .libs/$dlname \$dldir/$dlname'
5966
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5967
dlpath=$dir/\$dldll~
5971
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
5972
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
5973
if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
5974
# It is most probably a Windows format PATH printed by
5975
# mingw gcc, but we are running on Cygwin. Gcc prints its search
5976
# path with ; separators, and with drive letters. We can handle the
5977
# drive letters (cygwin fileutils understands them), so leave them,
5978
# especially as we might pass files found there to a mingw objdump,
5979
# which wouldn't understand a cygwinified path. Ahh.
5980
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
5982
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
5986
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5989
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
5992
dynamic_linker='Win32 ld.exe'
5993
# FIXME: first we should search . and the directory the executable is in
5997
darwin* | rhapsody*)
5998
dynamic_linker="$host_os dyld"
6002
# FIXME: Relying on posixy $() will cause problems for
6003
# cross-compilation, but unfortunately the echo tests do not
6004
# yet detect zsh echo's removal of \ escapes.
6005
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6006
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6007
shlibpath_overrides_runpath=yes
6008
shlibpath_var=DYLD_LIBRARY_PATH
6015
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6016
soname_spec='${libname}${release}.so$major'
6017
shlibpath_var=LD_LIBRARY_PATH
6025
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6026
version_type=freebsd-$objformat
6027
case $version_type in
6029
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6034
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6038
shlibpath_var=LD_LIBRARY_PATH
6041
shlibpath_overrides_runpath=yes
6043
freebsd3.[01]* | freebsdelf3.[01]*)
6044
shlibpath_overrides_runpath=yes
6045
hardcode_into_libs=yes
6048
shlibpath_overrides_runpath=no
6049
hardcode_into_libs=yes
6058
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6059
soname_spec='${libname}${release}.so$major'
6060
shlibpath_var=LD_LIBRARY_PATH
6061
hardcode_into_libs=yes
6064
hpux9* | hpux10* | hpux11*)
6065
# Give a soname corresponding to the major version so that dld.sl refuses to
6066
# link against other versions.
6070
if test "$host_cpu" = ia64; then
6071
hardcode_into_libs=yes
6072
dynamic_linker="$host_os dld.so"
6073
shlibpath_var=LD_LIBRARY_PATH
6074
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6075
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6076
soname_spec='${libname}${release}.so$major'
6077
if test "X$HPUX_IA64_MODE" = X32; then
6078
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6080
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6082
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6084
dynamic_linker="$host_os dld.sl"
6085
shlibpath_var=SHLIB_PATH
6086
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6087
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6088
soname_spec='${libname}${release}.sl$major'
6090
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6091
postinstall_cmds='chmod 555 $lib'
6094
irix5* | irix6* | nonstopux*)
6096
nonstopux*) version_type=nonstopux ;;
6097
*) version_type=irix ;;
6101
soname_spec='${libname}${release}.so$major'
6102
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6104
irix5* | nonstopux*)
6108
case $LD in # libtool.m4 will add one of these switches to LD
6109
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6110
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6111
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6112
*) libsuff= shlibsuff= libmagic=never-match;;
6116
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6117
shlibpath_overrides_runpath=no
6118
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6119
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6122
# No shared lib support for Linux oldld, aout, or coff.
6123
linux*oldld* | linux*aout* | linux*coff*)
6127
# This must be Linux ELF.
6132
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6133
soname_spec='${libname}${release}.so$major'
6134
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6136
if test "x$LINUX_64_MODE" = x64; then
6137
# Some platforms are per default 64-bit, so there's no /lib64
6138
if test -d /lib64; then
6142
shlibpath_var=LD_LIBRARY_PATH
6143
shlibpath_overrides_runpath=no
6144
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6145
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6146
# This implies no fast_install, which is unacceptable.
6147
# Some rework will be needed to allow for fast_install
6148
# before this can be enabled.
6149
hardcode_into_libs=yes
6151
# We used to test for /lib/ld.so.1 and disable shared libraries on
6152
# powerpc, because MkLinux only supported shared libraries with the
6153
# GNU dynamic linker. Since this was broken with cross compilers,
6154
# most powerpc-linux boxes support dynamic linking these days and
6155
# people can always --disable-shared, the test was removed, and we
6156
# assume the GNU/Linux dynamic linker is in use.
6157
dynamic_linker='GNU/Linux ld.so'
6164
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6165
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6166
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6167
dynamic_linker='NetBSD (a.out) ld.so'
6169
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6170
soname_spec='${libname}${release}.so$major'
6171
dynamic_linker='NetBSD ld.elf_so'
6173
shlibpath_var=LD_LIBRARY_PATH
6174
shlibpath_overrides_runpath=yes
6175
hardcode_into_libs=yes
6180
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6181
shlibpath_var=LD_LIBRARY_PATH
6182
shlibpath_overrides_runpath=yes
6189
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6190
soname_spec='${libname}${release}.so$major'
6191
shlibpath_var=LD_LIBRARY_PATH
6192
shlibpath_overrides_runpath=yes
6199
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6200
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6201
shlibpath_var=LD_LIBRARY_PATH
6202
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6204
openbsd2.[[89]] | openbsd2.[[89]].*)
6205
shlibpath_overrides_runpath=no
6208
shlibpath_overrides_runpath=yes
6212
shlibpath_overrides_runpath=yes
6217
libname_spec='$name'
6219
library_names_spec='$libname.dll $libname.a'
6220
dynamic_linker='OS/2 ld.exe'
6221
shlibpath_var=LIBPATH
6224
osf3* | osf4* | osf5*)
6228
soname_spec='${libname}${release}.so'
6229
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6230
shlibpath_var=LD_LIBRARY_PATH
6231
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6232
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6237
soname_spec='${libname}${release}.so$major'
6238
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6239
shlibpath_var=LD_LIBRARY_PATH
6246
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6247
soname_spec='${libname}${release}.so$major'
6248
shlibpath_var=LD_LIBRARY_PATH
6249
shlibpath_overrides_runpath=yes
6250
hardcode_into_libs=yes
6251
# ldd complains unless libraries are executable
6252
postinstall_cmds='chmod +x $lib'
6257
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6258
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6259
shlibpath_var=LD_LIBRARY_PATH
6260
shlibpath_overrides_runpath=yes
6261
if test "$with_gnu_ld" = yes; then
6267
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6269
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6270
soname_spec='${libname}${release}.so$major'
6271
shlibpath_var=LD_LIBRARY_PATH
6272
case $host_vendor in
6274
shlibpath_overrides_runpath=no
6279
shlibpath_overrides_runpath=no
6280
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6286
if test -d /usr/nec ;then
6288
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6289
soname_spec='$libname.so.$major'
6290
shlibpath_var=LD_LIBRARY_PATH
6296
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6297
soname_spec='${libname}${release}.so$major'
6298
shlibpath_var=LD_LIBRARY_PATH
6305
AC_MSG_RESULT([$dynamic_linker])
6306
test "$dynamic_linker" = no && can_build_shared=no
6307
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6312
AC_DEFUN([_LT_AC_TAGCONFIG],
6313
[AC_ARG_WITH([tags],
6314
[AC_HELP_STRING([--with-tags=TAGS],
6315
[include additional configurations @<:@CXX,GCJ@:>@])],
6316
[tagnames="$withval"],
6319
mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6322
if test -f "$ltmain" && test -n "$tagnames"; then
6323
if test ! -f "${ofile}"; then
6324
AC_MSG_WARN([output file `$ofile' does not exist])
6327
if test -z "$LTCC"; then
6328
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6329
if test -z "$LTCC"; then
6330
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6332
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6336
# Extract list of available tagged configurations in $ofile.
6337
# Note that this assumes the entire list is on one line.
6338
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6340
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6341
for tagname in $tagnames; do
6343
# Check whether tagname contains only valid characters
6344
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6346
*) AC_MSG_ERROR([invalid tag name: $tagname])
6350
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6352
AC_MSG_ERROR([tag name \"$tagname\" already exists])
6355
# Update the list of available tags.
6356
if test -n "$tagname"; then
6357
echo appending configuration tag \"$tagname\" to $ofile
6361
AC_LIBTOOL_LANG_CXX_CONFIG
6365
AC_LIBTOOL_LANG_GCJ_CONFIG
6369
AC_LIBTOOL_LANG_RC_CONFIG
6373
AC_MSG_ERROR([Unsupported tag name: $tagname])
6377
# Append the new tag name to the list of available tags.
6378
available_tags="$available_tags $tagname"
6383
# Now substitute the updated list of available tags.
6384
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
6385
mv "${ofile}T" "$ofile"
6389
AC_MSG_ERROR([unable to update list of available tagged configurations.])
6392
])# _LT_AC_TAGCONFIG
6397
# enable checks for dlopen support
6398
AC_DEFUN([AC_LIBTOOL_DLOPEN],
6399
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
6400
])# AC_LIBTOOL_DLOPEN
6403
# AC_LIBTOOL_WIN32_DLL
6404
# --------------------
6405
# declare package support for building win32 dll's
6406
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
6407
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
6408
])# AC_LIBTOOL_WIN32_DLL
6411
# AC_ENABLE_SHARED([DEFAULT])
6412
# ---------------------------
6413
# implement the --enable-shared flag
6414
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6415
AC_DEFUN([AC_ENABLE_SHARED],
6416
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
6417
AC_ARG_ENABLE([shared],
6418
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
6419
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
6420
[p=${PACKAGE-default}
6422
yes) enable_shared=yes ;;
6423
no) enable_shared=no ;;
6426
# Look at the argument we got. We use all the common list separators.
6427
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6428
for pkg in $enableval; do
6430
if test "X$pkg" = "X$p"; then
6437
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
6438
])# AC_ENABLE_SHARED
6443
#- set the default shared flag to --disable-shared
6444
AC_DEFUN([AC_DISABLE_SHARED],
6445
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6446
AC_ENABLE_SHARED(no)
6447
])# AC_DISABLE_SHARED
6450
# AC_ENABLE_STATIC([DEFAULT])
6451
# ---------------------------
6452
# implement the --enable-static flag
6453
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6454
AC_DEFUN([AC_ENABLE_STATIC],
6455
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
6456
AC_ARG_ENABLE([static],
6457
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
6458
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
6459
[p=${PACKAGE-default}
6461
yes) enable_static=yes ;;
6462
no) enable_static=no ;;
6465
# Look at the argument we got. We use all the common list separators.
6466
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6467
for pkg in $enableval; do
6469
if test "X$pkg" = "X$p"; then
6476
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
6477
])# AC_ENABLE_STATIC
6482
# set the default static flag to --disable-static
6483
AC_DEFUN([AC_DISABLE_STATIC],
6484
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6485
AC_ENABLE_STATIC(no)
6486
])# AC_DISABLE_STATIC
6489
# AC_ENABLE_FAST_INSTALL([DEFAULT])
6490
# ---------------------------------
6491
# implement the --enable-fast-install flag
6492
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6493
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
6494
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
6495
AC_ARG_ENABLE([fast-install],
6496
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
6497
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
6498
[p=${PACKAGE-default}
6500
yes) enable_fast_install=yes ;;
6501
no) enable_fast_install=no ;;
6503
enable_fast_install=no
6504
# Look at the argument we got. We use all the common list separators.
6505
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6506
for pkg in $enableval; do
6508
if test "X$pkg" = "X$p"; then
6509
enable_fast_install=yes
6515
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
6516
])# AC_ENABLE_FAST_INSTALL
6519
# AC_DISABLE_FAST_INSTALL
6520
# -----------------------
6521
# set the default to --disable-fast-install
6522
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
6523
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6524
AC_ENABLE_FAST_INSTALL(no)
6525
])# AC_DISABLE_FAST_INSTALL
6528
# AC_LIBTOOL_PICMODE([MODE])
6529
# --------------------------
6530
# implement the --with-pic flag
6531
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
6532
AC_DEFUN([AC_LIBTOOL_PICMODE],
6533
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6534
pic_mode=ifelse($#,1,$1,default)
6535
])# AC_LIBTOOL_PICMODE
6538
# AC_PATH_TOOL_PREFIX
6539
# -------------------
6540
# find a file program which can recognise shared library
6541
AC_DEFUN([AC_PATH_TOOL_PREFIX],
6542
[AC_MSG_CHECKING([for $1])
6543
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6545
[[\\/*] | ?:[\\/]*])
6546
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6549
lt_save_MAGIC_CMD="$MAGIC_CMD"
6550
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6551
dnl $ac_dummy forces splitting on constant user-supplied paths.
6552
dnl POSIX.2 word splitting is done only on the output of word expansions,
6553
dnl not every word. This closes a longstanding sh security hole.
6554
ac_dummy="ifelse([$2], , $PATH, [$2])"
6555
for ac_dir in $ac_dummy; do
6557
test -z "$ac_dir" && ac_dir=.
6558
if test -f $ac_dir/$1; then
6559
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
6560
if test -n "$file_magic_test_file"; then
6561
case $deplibs_check_method in
6563
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
6564
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6565
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6566
egrep "$file_magic_regex" > /dev/null; then
6571
*** Warning: the command libtool uses to detect shared libraries,
6572
*** $file_magic_cmd, produces output that libtool cannot recognize.
6573
*** The result is that libtool may fail to recognize shared libraries
6574
*** as such. This will affect the creation of libtool libraries that
6575
*** depend on shared libraries, but programs linked with such libtool
6576
*** libraries will work regardless of this problem. Nevertheless, you
6577
*** may want to report the problem to your system manager and/or to
6578
*** bug-libtool@gnu.org
6588
MAGIC_CMD="$lt_save_MAGIC_CMD"
6591
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6592
if test -n "$MAGIC_CMD"; then
6593
AC_MSG_RESULT($MAGIC_CMD)
6597
])# AC_PATH_TOOL_PREFIX
6602
# find a file program which can recognise a shared library
6603
AC_DEFUN([AC_PATH_MAGIC],
6604
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6605
if test -z "$lt_cv_path_MAGIC_CMD"; then
6606
if test -n "$ac_tool_prefix"; then
6607
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6617
# find the path to the GNU or non-GNU linker
6618
AC_DEFUN([AC_PROG_LD],
6619
[AC_ARG_WITH([gnu-ld],
6620
[AC_HELP_STRING([--with-gnu-ld],
6621
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
6622
[test "$withval" = no || with_gnu_ld=yes],
6624
AC_REQUIRE([AC_PROG_CC])dnl
6625
AC_REQUIRE([AC_CANONICAL_HOST])dnl
6626
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6628
if test "$GCC" = yes; then
6629
# Check if gcc -print-prog-name=ld gives a path.
6630
AC_MSG_CHECKING([for ld used by GCC])
6633
# gcc leaves a trailing carriage return which upsets mingw
6634
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6636
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6639
# Accept absolute paths.
6640
[[\\/]]* | ?:[[\\/]]*)
6641
re_direlt='/[[^/]][[^/]]*/\.\./'
6642
# Canonicalize the path of ld
6643
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6644
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6645
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6647
test -z "$LD" && LD="$ac_prog"
6650
# If it fails, then pretend we aren't using GCC.
6654
# If it is relative, then search for the first ld in PATH.
6658
elif test "$with_gnu_ld" = yes; then
6659
AC_MSG_CHECKING([for GNU ld])
6661
AC_MSG_CHECKING([for non-GNU ld])
6663
AC_CACHE_VAL(lt_cv_path_LD,
6664
[if test -z "$LD"; then
6665
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6666
for ac_dir in $PATH; do
6668
test -z "$ac_dir" && ac_dir=.
6669
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6670
lt_cv_path_LD="$ac_dir/$ac_prog"
6671
# Check to see if the program is GNU ld. I'd rather use --version,
6672
# but apparently some GNU ld's only accept -v.
6673
# Break only if it was the GNU/non-GNU ld that we prefer.
6674
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6675
test "$with_gnu_ld" != no && break
6677
test "$with_gnu_ld" != yes && break
6683
lt_cv_path_LD="$LD" # Let the user override the test with a path.
6686
if test -n "$LD"; then
6691
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6698
AC_DEFUN([AC_PROG_LD_GNU],
6699
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6700
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
6701
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6702
lt_cv_prog_gnu_ld=yes
6704
lt_cv_prog_gnu_ld=no
6706
with_gnu_ld=$lt_cv_prog_gnu_ld
6710
# AC_PROG_LD_RELOAD_FLAG
6711
# ----------------------
6712
# find reload flag for linker
6713
# -- PORTME Some linkers may need a different reload flag.
6714
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
6715
[AC_CACHE_CHECK([for $LD option to reload object files],
6716
lt_cv_ld_reload_flag,
6717
[lt_cv_ld_reload_flag='-r'])
6718
reload_flag=$lt_cv_ld_reload_flag
6719
case $reload_flag in
6721
*) reload_flag=" $reload_flag" ;;
6723
reload_cmds='$LD$reload_flag -o $output$reload_objs'
6724
])# AC_PROG_LD_RELOAD_FLAG
6727
# AC_DEPLIBS_CHECK_METHOD
6728
# -----------------------
6729
# how to check for library dependencies
6730
# -- PORTME fill in with the dynamic library characteristics
6731
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
6732
[AC_CACHE_CHECK([how to recognise dependant libraries],
6733
lt_cv_deplibs_check_method,
6734
[lt_cv_file_magic_cmd='$MAGIC_CMD'
6735
lt_cv_file_magic_test_file=
6736
lt_cv_deplibs_check_method='unknown'
6737
# Need to set the preceding variable on all platforms that support
6738
# interlibrary dependencies.
6739
# 'none' -- dependencies not supported.
6740
# `unknown' -- same as none, but documents that we really don't know.
6741
# 'pass_all' -- all dependencies passed with no checks.
6742
# 'test_compile' -- check by making test program.
6743
# 'file_magic [[regex]]' -- check by looking for files in library path
6744
# which responds to the $file_magic_cmd with a given egrep regex.
6745
# If you have `file' or equivalent on your system and you're not sure
6746
# whether `pass_all' will *always* work, you probably want this one.
6750
lt_cv_deplibs_check_method=pass_all
6754
lt_cv_deplibs_check_method=pass_all
6758
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6759
lt_cv_file_magic_cmd='/usr/bin/file -L'
6760
lt_cv_file_magic_test_file=/shlib/libc.so
6763
cygwin* | mingw* | pw32*)
6764
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6765
lt_cv_file_magic_cmd='$OBJDUMP -f'
6768
darwin* | rhapsody*)
6769
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
6770
lt_cv_file_magic_cmd='/usr/bin/file -L'
6772
rhapsody* | darwin1.[[012]])
6773
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
6776
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
6782
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6785
# Not sure whether the presence of OpenBSD here was a mistake.
6786
# Let's accept both of them until this is cleared up.
6787
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
6788
lt_cv_file_magic_cmd=/usr/bin/file
6789
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6793
lt_cv_deplibs_check_method=pass_all
6798
lt_cv_deplibs_check_method=pass_all
6801
hpux10.20* | hpux11*)
6802
lt_cv_file_magic_cmd=/usr/bin/file
6803
if test "$host_cpu" = ia64; then
6804
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
6805
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6807
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
6808
lt_cv_file_magic_test_file=/usr/lib/libc.sl
6812
irix5* | irix6* | nonstopux*)
6814
irix5* | nonstopux*)
6815
# this will be overridden with pass_all, but let us keep it just in case
6816
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
6820
*-32|*"-32 ") libmagic=32-bit;;
6821
*-n32|*"-n32 ") libmagic=N32;;
6822
*-64|*"-64 ") libmagic=64-bit;;
6823
*) libmagic=never-match;;
6825
# this will be overridden with pass_all, but let us keep it just in case
6826
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
6829
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
6830
lt_cv_deplibs_check_method=pass_all
6833
# This must be Linux ELF.
6836
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
6837
lt_cv_deplibs_check_method=pass_all ;;
6839
# glibc up to 2.1.1 does not perform some relocations on ARM
6840
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
6842
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
6846
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6847
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
6849
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
6854
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6855
lt_cv_file_magic_cmd=/usr/bin/file
6856
lt_cv_file_magic_test_file=/usr/lib/libnls.so
6860
lt_cv_deplibs_check_method=unknown
6864
lt_cv_file_magic_cmd=/usr/bin/file
6865
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6866
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6867
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
6869
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
6873
osf3* | osf4* | osf5*)
6874
# this will be overridden with pass_all, but let us keep it just in case
6875
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
6876
lt_cv_file_magic_test_file=/shlib/libc.so
6877
lt_cv_deplibs_check_method=pass_all
6881
lt_cv_deplibs_check_method=pass_all
6885
lt_cv_deplibs_check_method=pass_all
6886
lt_cv_file_magic_test_file=/lib/libc.so
6889
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6890
case $host_vendor in
6892
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]]'
6893
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6896
lt_cv_deplibs_check_method=pass_all
6899
lt_cv_file_magic_cmd='/bin/file'
6900
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
6903
lt_cv_file_magic_cmd='/bin/file'
6904
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
6905
lt_cv_file_magic_test_file=/lib/libc.so
6910
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
6911
lt_cv_deplibs_check_method=pass_all
6915
file_magic_cmd=$lt_cv_file_magic_cmd
6916
deplibs_check_method=$lt_cv_deplibs_check_method
6917
test -z "$deplibs_check_method" && deplibs_check_method=unknown
6918
])# AC_DEPLIBS_CHECK_METHOD
6923
# find the path to a BSD-compatible name lister
6924
AC_DEFUN([AC_PROG_NM],
6925
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
6926
[if test -n "$NM"; then
6927
# Let the user override the test.
6930
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6931
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6933
test -z "$ac_dir" && ac_dir=.
6934
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6935
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6936
# Check to see if the nm accepts a BSD-compat flag.
6937
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
6938
# nm: unknown option "B" ignored
6939
# Tru64's nm complains that /dev/null is an invalid object file
6940
if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
6941
lt_cv_path_NM="$tmp_nm -B"
6943
elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
6944
lt_cv_path_NM="$tmp_nm -p"
6947
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6948
continue # so that we can try to find one that supports BSD flags
6953
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6961
# check for math library
6962
AC_DEFUN([AC_CHECK_LIBM],
6963
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6966
*-*-beos* | *-*-cygwin* | *-*-pw32*)
6967
# These system don't have libm
6970
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
6971
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
6974
AC_CHECK_LIB(m, main, LIBM="-lm")
6980
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
6981
# -----------------------------------
6982
# sets LIBLTDL to the link flags for the libltdl convenience library and
6983
# LTDLINCL to the include flags for the libltdl header and adds
6984
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
6985
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
6986
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
6987
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
6988
# '${top_srcdir}/' (note the single quotes!). If your package is not
6989
# flat and you're not using automake, define top_builddir and
6990
# top_srcdir appropriately in the Makefiles.
6991
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
6992
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6993
case $enable_ltdl_convenience in
6994
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
6995
"") enable_ltdl_convenience=yes
6996
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
6998
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
6999
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7000
# For backwards non-gettext consistent compatibility...
7002
])# AC_LIBLTDL_CONVENIENCE
7005
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7006
# -----------------------------------
7007
# sets LIBLTDL to the link flags for the libltdl installable library and
7008
# LTDLINCL to the include flags for the libltdl header and adds
7009
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7010
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7011
# DIRECTORY is not provided and an installed libltdl is not found, it is
7012
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7013
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7014
# quotes!). If your package is not flat and you're not using automake,
7015
# define top_builddir and top_srcdir appropriately in the Makefiles.
7016
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7017
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7018
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7019
AC_CHECK_LIB(ltdl, main,
7020
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7021
[if test x"$enable_ltdl_install" = xno; then
7022
AC_MSG_WARN([libltdl not installed, but installation disabled])
7024
enable_ltdl_install=yes
7027
if test x"$enable_ltdl_install" = x"yes"; then
7028
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7029
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7030
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7032
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7036
# For backwards non-gettext consistent compatibility...
7038
])# AC_LIBLTDL_INSTALLABLE
7041
# If this macro is not defined by Autoconf, define it here.
7042
ifdef([AC_PROVIDE_IFELSE],
7044
[define([AC_PROVIDE_IFELSE],
7045
[ifdef([AC_PROVIDE_$1],
7051
# enable support for C++ libraries
7052
AC_DEFUN([AC_LIBTOOL_CXX],
7053
[AC_REQUIRE([_LT_AC_LANG_CXX])
7059
AC_DEFUN([_LT_AC_LANG_CXX],
7060
[AC_REQUIRE([AC_PROG_CXX])
7061
AC_REQUIRE([AC_PROG_CXXCPP])
7067
# enable support for GCJ libraries
7068
AC_DEFUN([AC_LIBTOOL_GCJ],
7069
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7075
AC_DEFUN([_LT_AC_LANG_GCJ],
7076
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7077
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7078
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7079
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7080
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7081
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7087
# enable support for Windows resource files
7088
AC_DEFUN([AC_LIBTOOL_RC],
7089
[AC_REQUIRE([AC_PROG_RC])
7093
# AC_LIBTOOL_LANG_C_CONFIG
7094
# ------------------------
7095
# Ensure that the configuration vars for the C compiler are
7096
# suitably defined. Those variables are subsequently used by
7097
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7098
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7099
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7103
# Source file extension for C test sources.
7106
# Object file extension for compiled C test sources.
7108
_LT_AC_TAGVAR(objext, $1)=$objext
7110
# Code to be used in simple compile tests
7111
lt_simple_compile_test_code="int some_variable = 0;"
7113
# Code to be used in simple link tests
7114
lt_simple_link_test_code='main(){return(0);}'
7119
# Check for any special shared library compilation flags.
7121
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7122
if test "$GCC" = no; then
7125
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7129
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7130
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7131
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7133
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7134
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7140
# Check to make sure the static flag actually works.
7142
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7143
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7144
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7146
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7149
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7150
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7151
AC_LIBTOOL_PROG_CC_C_O($1)
7152
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7153
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7154
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7155
AC_LIBTOOL_SYS_LIB_STRIP
7156
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7157
AC_LIBTOOL_DLOPEN_SELF($1)
7159
# Report which librarie types wil actually be built
7160
AC_MSG_CHECKING([if libtool supports shared libraries])
7161
AC_MSG_RESULT([$can_build_shared])
7163
AC_MSG_CHECKING([whether to build shared libraries])
7164
test "$can_build_shared" = "no" && enable_shared=no
7166
# On AIX, shared libraries and static libraries use the same namespace, and
7167
# are all built from PIC.
7170
test "$enable_shared" = yes && enable_static=no
7171
if test -n "$RANLIB"; then
7172
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7173
postinstall_cmds='$RANLIB $lib'
7178
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7179
test "$enable_shared" = yes && enable_static=no
7183
AC_MSG_RESULT([$enable_shared])
7185
AC_MSG_CHECKING([whether to build static libraries])
7186
# Make sure either enable_shared or enable_static is yes.
7187
test "$enable_shared" = yes || enable_static=yes
7188
AC_MSG_RESULT([$enable_static])
7190
AC_LIBTOOL_CONFIG($1)
7194
])# AC_LIBTOOL_LANG_C_CONFIG
7197
# AC_LIBTOOL_LANG_CXX_CONFIG
7198
# --------------------------
7199
# Ensure that the configuration vars for the C compiler are
7200
# suitably defined. Those variables are subsequently used by
7201
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7202
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7203
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7205
AC_REQUIRE([AC_PROG_CXX])
7206
AC_REQUIRE([AC_PROG_CXXCPP])
7208
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7209
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7210
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7211
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7212
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7213
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7214
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7215
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7216
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7217
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7218
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7219
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7220
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7222
# Dependencies to place before and after the object being linked:
7223
_LT_AC_TAGVAR(predep_objects, $1)=
7224
_LT_AC_TAGVAR(postdep_objects, $1)=
7225
_LT_AC_TAGVAR(predeps, $1)=
7226
_LT_AC_TAGVAR(postdeps, $1)=
7227
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7229
# Source file extension for C test sources.
7232
# Object file extension for compiled C test sources.
7234
_LT_AC_TAGVAR(objext, $1)=$objext
7236
# Code to be used in simple compile tests
7237
lt_simple_compile_test_code="int some_variable = 0;"
7239
# Code to be used in simple link tests
7240
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7242
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7245
# Allow CC to be a program name with arguments.
7250
_LT_AC_TAGVAR(compiler, $1)=$CC
7251
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7253
# We don't want -fno-exception wen compiling C++ code, so set the
7254
# no_builtin_flag separately
7255
if test "$GXX" = yes; then
7256
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7258
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7261
if test "$GXX" = yes; then
7262
# Set up default GNU C++ configuration
7264
# Check if GNU C++ uses GNU ld as the underlying linker, since the
7265
# archiving commands below assume that GNU ld is being used.
7266
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7267
egrep 'GNU ld' > /dev/null; then
7270
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7271
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7273
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7274
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7276
# If archive_cmds runs LD, not CC, wlarc should be empty
7277
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7278
# investigate it a little bit more. (MM)
7281
# ancient GNU ld didn't support --whole-archive et. al.
7282
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7283
egrep 'no-whole-archive' > /dev/null; then
7284
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7286
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7292
# A generic and very simple default shared library creation
7293
# command for GNU C++ for the case where it uses the native
7294
# linker, instead of GNU ld. If possible, this setting should
7295
# overridden to take advantage of the native linker features on
7296
# the platform it is being used on.
7297
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7300
# Commands to make compiler produce verbose output that lists
7301
# what "hidden" libraries, object files and flags are used when
7302
# linking a shared library.
7303
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7311
# PORTME: fill in a description of your system's C++ link characteristics
7312
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7313
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7316
# FIXME: insert proper C++ library support
7317
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7320
if test "$host_cpu" = ia64; then
7321
# On IA64, the linker does run time linking by default, so we don't
7322
# have to do anything special.
7323
aix_use_runtimelinking=no
7324
exp_sym_flag='-Bexport'
7327
# KDE requires run time linking. Make it the default.
7328
aix_use_runtimelinking=yes
7329
exp_sym_flag='-bexport'
7330
no_entry_flag='-bnoentry'
7333
# When large executables or shared objects are built, AIX ld can
7334
# have problems creating the table of contents. If linking a library
7335
# or program results in "error TOC overflow" add -mminimal-toc to
7336
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7337
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7339
_LT_AC_TAGVAR(archive_cmds, $1)=''
7340
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7341
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7342
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7344
if test "$GXX" = yes; then
7345
case $host_os in aix4.[012]|aix4.[012].*)
7346
# We only want to do this on AIX 4.2 and lower, the check
7347
# below for broken collect2 doesn't work under 4.3+
7348
collect2name=`${CC} -print-prog-name=collect2`
7349
if test -f "$collect2name" && \
7350
strings "$collect2name" | grep resolve_lib_name >/dev/null
7352
# We have reworked collect2
7353
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7355
# We have old collect2
7356
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7357
# It fails to find uninstalled libraries when the uninstalled
7358
# path is not listed in the libpath. Setting hardcode_minus_L
7359
# to unsupported forces relinking
7360
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7361
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7362
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7365
shared_flag='-shared'
7368
if test "$host_cpu" = ia64; then
7369
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7370
# chokes on -Wl,-G. The following line is correct:
7373
if test "$aix_use_runtimelinking" = yes; then
7374
shared_flag='-qmkshrobj ${wl}-G'
7376
shared_flag='-qmkshrobj'
7381
# Let the compiler handle the export list.
7382
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7383
if test "$aix_use_runtimelinking" = yes; then
7384
# Warning - without using the other runtime loading flags (-brtl),
7385
# -berok will link without error, but may produce a broken library.
7386
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7387
# Determine the default libpath from the value encoded in an empty executable.
7388
_LT_AC_SYS_LIBPATH_AIX
7389
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7391
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
7392
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7394
if test "$host_cpu" = ia64; then
7395
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7396
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7397
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7399
# Determine the default libpath from the value encoded in an empty executable.
7400
_LT_AC_SYS_LIBPATH_AIX
7401
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7402
# Warning - without using the other run time loading flags,
7403
# -berok will link without error, but may produce a broken library.
7404
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7405
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7406
# -bexpall does not export symbols beginning with underscore (_)
7407
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7408
# Exported symbols can be pulled into shared objects from archives
7409
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7410
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7411
# This is similar to how AIX traditionally builds it's shared libraries.
7412
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7417
case $cc_basename in
7419
# FIXME: insert proper C++ library support
7420
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7425
case $cc_basename in
7427
# FIXME: insert proper C++ library support
7428
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7431
# Green Hills C++ Compiler
7432
# FIXME: insert proper C++ library support
7433
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7436
# FIXME: insert proper C++ library support
7437
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7442
# C++ shared libraries reported to be fairly broken before switch to ELF
7443
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7446
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7449
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7451
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7456
if test $with_gnu_ld = no; then
7457
if test "$host_cpu" = ia64; then
7458
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7460
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7461
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7462
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7465
if test "$host_cpu" = ia64; then
7466
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7467
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7469
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7471
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7472
# but as the default
7473
# location of the library.
7475
case $cc_basename in
7477
# FIXME: insert proper C++ library support
7478
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7483
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7486
if test "$host_cpu" = ia64; then
7487
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
7489
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7493
# Commands to make compiler produce verbose output that lists
7494
# what "hidden" libraries, object files and flags are used when
7495
# linking a shared library.
7497
# There doesn't appear to be a way to prevent this compiler from
7498
# explicitly linking system object files so we need to strip them
7499
# from the output so that they don't get included in the library
7501
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'
7504
if test "$GXX" = yes; then
7505
if test $with_gnu_ld = no; then
7508
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7511
if test "$host_cpu" = ia64; then
7512
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
7514
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7520
# FIXME: insert proper C++ library support
7521
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7527
case $cc_basename in
7530
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
7532
# Archives containing C++ object files must be created using
7533
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
7534
# necessary to make sure instantiated templates are included
7536
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7539
if test "$GXX" = yes; then
7540
if test "$with_gnu_ld" = no; then
7541
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
7543
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
7546
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7549
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7550
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7553
case $cc_basename in
7555
# Kuck and Associates, Inc. (KAI) C++ Compiler
7557
# KCC will only create a shared library if the output file
7558
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7559
# to its proper name (with version) after linking.
7560
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7561
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7563
# Commands to make compiler produce verbose output that lists
7564
# what "hidden" libraries, object files and flags are used when
7565
# linking a shared library.
7567
# There doesn't appear to be a way to prevent this compiler from
7568
# explicitly linking system object files so we need to strip them
7569
# from the output so that they don't get included in the library
7571
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
7573
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
7574
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7576
# Archives containing C++ object files must be created using
7577
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
7578
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7582
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7583
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7585
runpath_var=LD_RUN_PATH
7586
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7587
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7589
# Commands to make compiler produce verbose output that lists
7590
# what "hidden" libraries, object files and flags are used when
7591
# linking a shared library.
7593
# There doesn't appear to be a way to prevent this compiler from
7594
# explicitly linking system object files so we need to strip them
7595
# from the output so that they don't get included in the library
7597
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'
7602
# FIXME: insert proper C++ library support
7603
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7606
# FIXME: insert proper C++ library support
7607
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7610
case $cc_basename in
7612
# FIXME: insert proper C++ library support
7613
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7616
# FIXME: insert proper C++ library support
7617
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7622
# NetBSD uses g++ - do we need to do anything?
7625
case $cc_basename in
7627
# Kuck and Associates, Inc. (KAI) C++ Compiler
7629
# KCC will only create a shared library if the output file
7630
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7631
# to its proper name (with version) after linking.
7632
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7634
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7635
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7637
# Archives containing C++ object files must be created using
7638
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
7639
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7643
# Rational C++ 2.4.1
7644
# FIXME: insert proper C++ library support
7645
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7648
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7649
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
7651
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7652
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7654
# Commands to make compiler produce verbose output that lists
7655
# what "hidden" libraries, object files and flags are used when
7656
# linking a shared library.
7658
# There doesn't appear to be a way to prevent this compiler from
7659
# explicitly linking system object files so we need to strip them
7660
# from the output so that they don't get included in the library
7662
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'
7665
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7666
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7667
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
7669
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7670
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7672
# Commands to make compiler produce verbose output that lists
7673
# what "hidden" libraries, object files and flags are used when
7674
# linking a shared library.
7675
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7678
# FIXME: insert proper C++ library support
7679
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7685
case $cc_basename in
7687
# Kuck and Associates, Inc. (KAI) C++ Compiler
7689
# KCC will only create a shared library if the output file
7690
# ends with ".so" (or ".sl" for HP-UX), so rename the library
7691
# to its proper name (with version) after linking.
7692
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7694
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7695
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7697
# Archives containing C++ object files must be created using
7698
# the KAI C++ compiler.
7699
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
7702
# Rational C++ 2.4.1
7703
# FIXME: insert proper C++ library support
7704
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7707
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7708
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
7709
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
7710
echo "-hidden">> $lib.exp~
7711
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
7714
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7715
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7717
# Commands to make compiler produce verbose output that lists
7718
# what "hidden" libraries, object files and flags are used when
7719
# linking a shared library.
7721
# There doesn't appear to be a way to prevent this compiler from
7722
# explicitly linking system object files so we need to strip them
7723
# from the output so that they don't get included in the library
7725
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'
7728
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7729
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7730
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
7732
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7733
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7735
# Commands to make compiler produce verbose output that lists
7736
# what "hidden" libraries, object files and flags are used when
7737
# linking a shared library.
7738
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7741
# FIXME: insert proper C++ library support
7742
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7748
# FIXME: insert proper C++ library support
7749
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7752
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7753
case $cc_basename in
7755
# FIXME: insert proper C++ library support
7756
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7759
# FIXME: insert proper C++ library support
7760
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7765
case $cc_basename in
7768
# FIXME: insert proper C++ library support
7769
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7773
# FIXME: insert proper C++ library support
7774
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7777
# FIXME: insert proper C++ library support
7778
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7783
case $cc_basename in
7785
# Sun C++ 4.2, 5.x and Centerline C++
7786
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7787
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7788
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7789
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
7791
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7792
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7794
solaris2.[0-5] | solaris2.[0-5].*) ;;
7796
# The C++ compiler is used as linker so we must use $wl
7797
# flag to pass the commands to the underlying system
7799
# Supported since Solaris 2.6 (maybe 2.5.1?)
7800
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7803
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7805
# Commands to make compiler produce verbose output that lists
7806
# what "hidden" libraries, object files and flags are used when
7807
# linking a shared library.
7809
# There doesn't appear to be a way to prevent this compiler from
7810
# explicitly linking system object files so we need to strip them
7811
# from the output so that they don't get included in the library
7813
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
7815
# Archives containing C++ object files must be created using
7816
# "CC -xar", where "CC" is the Sun C++ compiler. This is
7817
# necessary to make sure instantiated templates are included
7819
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7822
# Green Hills C++ Compiler
7823
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7825
# The C++ compiler must be used to create the archive.
7826
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7829
# GNU C++ compiler with Solaris linker
7830
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7831
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7832
if $CC --version | egrep -v '^2\.7' > /dev/null; then
7833
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
7834
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7835
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
7837
# Commands to make compiler produce verbose output that lists
7838
# what "hidden" libraries, object files and flags are used when
7839
# linking a shared library.
7840
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
7842
# g++ 2.7 appears to require `-G' NOT `-shared' on this
7844
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
7845
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7846
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
7848
# Commands to make compiler produce verbose output that lists
7849
# what "hidden" libraries, object files and flags are used when
7850
# linking a shared library.
7851
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
7854
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7859
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7860
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7863
case $cc_basename in
7865
# NonStop-UX NCC 3.20
7866
# FIXME: insert proper C++ library support
7867
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7870
# FIXME: insert proper C++ library support
7871
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7876
# FIXME: insert proper C++ library support
7877
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7880
# FIXME: insert proper C++ library support
7881
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7884
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7885
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7887
# Figure out "hidden" C++ library dependencies from verbose
7888
# compiler output whening linking a shared library.
7889
cat > conftest.$ac_ext <<EOF
7893
Foo (void) { a = 0; }
7900
if AC_TRY_EVAL(ac_compile); then
7901
# Parse the compiler output and extract the necessary
7902
# objects, libraries and library flags.
7904
# Sentinel used to keep track of whether or not we are before
7905
# the conftest object file.
7906
pre_test_object_deps_done=no
7908
# The `*' in the case matches for architectures that use `case' in
7909
# $output_verbose_cmd can trigger glob expansion during the loop
7910
# eval without this substitution.
7911
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
7913
for p in `eval $output_verbose_link_cmd`; do
7917
# Some compilers place space between "-{L,R}" and the path.
7920
|| test $p = "-R"; then
7927
if test "$pre_test_object_deps_done" = no; then
7930
# Internal compiler library paths should come after those
7931
# provided the user. The postdeps already come after the
7932
# user supplied libs so there is no need to process them.
7933
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
7934
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7936
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7939
# The "-l" case would never come before the object being
7940
# linked, so don't bother handling this case.
7943
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
7944
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
7946
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
7951
*.$objext|*.$libext)
7952
# This assumes that the test object file only shows up
7953
# once in the compiler output.
7954
if test "$p" = "conftest.$objext"; then
7955
pre_test_object_deps_done=yes
7959
if test "$pre_test_object_deps_done" = no; then
7960
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
7961
_LT_AC_TAGVAR(predep_objects, $1)="$p"
7963
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
7966
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
7967
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
7969
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
7974
*) ;; # Ignore the rest.
7982
echo "libtool.m4: error: problem compiling C++ test program"
7985
$rm -f confest.$objext
7987
case " $_LT_AC_TAGVAR(postdeps, $1) " in
7988
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7989
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
7992
_LT_AC_TAGVAR(GCC, $1)="$GXX"
7993
_LT_AC_TAGVAR(LD, $1)="$LD"
7995
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7996
AC_LIBTOOL_PROG_CC_C_O($1)
7997
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7998
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7999
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8000
AC_LIBTOOL_SYS_LIB_STRIP
8001
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8002
AC_LIBTOOL_DLOPEN_SELF($1)
8004
AC_LIBTOOL_CONFIG($1)
8008
])# AC_LIBTOOL_LANG_CXX_CONFIG
8011
# AC_LIBTOOL_LANG_GCJ_CONFIG
8012
# --------------------------
8013
# Ensure that the configuration vars for the C compiler are
8014
# suitably defined. Those variables are subsequently used by
8015
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8016
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8017
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8020
# Source file extension for C test sources.
8023
# Object file extension for compiled C test sources.
8025
_LT_AC_TAGVAR(objext, $1)=$objext
8027
# Code to be used in simple compile tests
8028
lt_simple_compile_test_code="class foo {}"
8030
# Code to be used in simple link tests
8031
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8033
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8036
# Allow CC to be a program name with arguments.
8041
_LT_AC_TAGVAR(compiler, $1)=$CC
8043
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8044
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8046
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8047
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8048
AC_LIBTOOL_PROG_CC_C_O($1)
8049
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8050
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8051
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8052
AC_LIBTOOL_SYS_LIB_STRIP
8053
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8054
AC_LIBTOOL_DLOPEN_SELF($1)
8056
AC_LIBTOOL_CONFIG($1)
8060
])# AC_LIBTOOL_LANG_GCJ_CONFIG
8063
# AC_LIBTOOL_LANG_RC_CONFIG
8064
# --------------------------
8065
# Ensure that the configuration vars for the Windows resource compiler are
8066
# suitably defined. Those variables are subsequently used by
8067
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8068
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8069
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8072
# Source file extension for RC test sources.
8075
# Object file extension for compiled RC test sources.
8077
_LT_AC_TAGVAR(objext, $1)=$objext
8079
# Code to be used in simple compile tests
8080
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8082
# Code to be used in simple link tests
8083
lt_simple_link_test_code="$lt_simple_compile_test_code"
8085
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8088
# Allow CC to be a program name with arguments.
8093
_LT_AC_TAGVAR(compiler, $1)=$CC
8094
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8096
AC_LIBTOOL_CONFIG($1)
8100
])# AC_LIBTOOL_LANG_RC_CONFIG
8103
# AC_LIBTOOL_CONFIG([TAGNAME])
8104
# ----------------------------
8105
# If TAGNAME is not passed, then create an initial libtool script
8106
# with a default configuration from the untagged config vars. Otherwise
8107
# add code to config.status for appending the configuration named by
8108
# TAGNAME from the matching tagged config vars.
8109
AC_DEFUN([AC_LIBTOOL_CONFIG],
8110
[# The else clause should only fire when bootstrapping the
8111
# libtool distribution, otherwise you forgot to ship ltmain.sh
8112
# with your package, and you will get complaints that there are
8113
# no rules to generate ltmain.sh.
8114
if test -f "$ltmain"; then
8115
# Now quote all the things that may contain metacharacters while being
8116
# careful not to overquote the AC_SUBSTed values. We take copies of the
8117
# variables and quote the copies for generation of the libtool script.
8118
for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8119
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8120
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8121
deplibs_check_method reload_flag reload_cmds need_locks \
8122
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8123
lt_cv_sys_global_symbol_to_c_name_address \
8124
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8125
old_postinstall_cmds old_postuninstall_cmds \
8126
_LT_AC_TAGVAR(compiler, $1) \
8127
_LT_AC_TAGVAR(CC, $1) \
8128
_LT_AC_TAGVAR(LD, $1) \
8129
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8130
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8131
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8132
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8133
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8134
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8135
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8136
_LT_AC_TAGVAR(old_archive_cmds, $1) \
8137
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8138
_LT_AC_TAGVAR(predep_objects, $1) \
8139
_LT_AC_TAGVAR(postdep_objects, $1) \
8140
_LT_AC_TAGVAR(predeps, $1) \
8141
_LT_AC_TAGVAR(postdeps, $1) \
8142
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8143
_LT_AC_TAGVAR(archive_cmds, $1) \
8144
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8145
_LT_AC_TAGVAR(postinstall_cmds, $1) \
8146
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
8147
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8148
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
8149
_LT_AC_TAGVAR(no_undefined_flag, $1) \
8150
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
8151
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8152
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8153
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8154
_LT_AC_TAGVAR(exclude_expsyms, $1) \
8155
_LT_AC_TAGVAR(include_expsyms, $1); do
8158
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
8159
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8160
_LT_AC_TAGVAR(archive_cmds, $1) | \
8161
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8162
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8163
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8164
extract_expsyms_cmds | reload_cmds | finish_cmds | \
8165
postinstall_cmds | postuninstall_cmds | \
8166
old_postinstall_cmds | old_postuninstall_cmds | \
8167
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8168
# Double-quote double-evaled strings.
8169
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8172
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8178
*'\[$]0 --fallback-echo"')
8179
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8184
[cfgfile="${ofile}T"
8185
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8187
AC_MSG_NOTICE([creating $ofile])],
8190
cat <<__EOF__ >> "$cfgfile"
8194
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8195
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8196
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
8198
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8199
# Free Software Foundation, Inc.
8201
# This file is part of GNU Libtool:
8202
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8204
# This program is free software; you can redistribute it and/or modify
8205
# it under the terms of the GNU General Public License as published by
8206
# the Free Software Foundation; either version 2 of the License, or
8207
# (at your option) any later version.
8209
# This program is distributed in the hope that it will be useful, but
8210
# WITHOUT ANY WARRANTY; without even the implied warranty of
8211
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8212
# General Public License for more details.
8214
# You should have received a copy of the GNU General Public License
8215
# along with this program; if not, write to the Free Software
8216
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8218
# As a special exception to the GNU General Public License, if you
8219
# distribute this file as part of a program that contains a
8220
# configuration script generated by Autoconf, you may include it under
8221
# the same distribution terms that you use for the rest of that program.
8223
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
8224
Xsed="sed -e s/^X//"
8226
# The HP-UX ksh and POSIX shell print the target directory to stdout
8228
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8230
# The names of the tagged configurations supported by this script.
8233
# ### BEGIN LIBTOOL CONFIG],
8234
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8236
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8238
# Shell to use when invoking shell scripts.
8241
# Whether or not to build shared libraries.
8242
build_libtool_libs=$enable_shared
8244
# Whether or not to build static libraries.
8245
build_old_libs=$enable_static
8247
# Whether or not to add -lc for building shared libraries.
8248
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8250
# Whether or not to optimize for fast installation.
8251
fast_install=$enable_fast_install
8254
host_alias=$host_alias
8257
# An echo program that does not interpret backslashes.
8262
AR_FLAGS=$lt_AR_FLAGS
8267
# A language-specific compiler.
8268
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8270
# Is the compiler the GNU C compiler?
8271
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8273
# The linker used to build libraries.
8274
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8276
# Whether we need hard or soft links.
8279
# A BSD-compatible nm program.
8282
# A sed program that does not truncate output.
8285
# A symbol stripping program
8288
# Used to examine libraries when file_magic_cmd begins "file"
8289
MAGIC_CMD=$MAGIC_CMD
8291
# Used on cygwin: DLL creation program.
8294
# Used on cygwin: object dumper.
8297
# Used on cygwin: assembler.
8300
# The name of the directory that contains temporary libtool files.
8303
# How to create reloadable object files.
8304
reload_flag=$lt_reload_flag
8305
reload_cmds=$lt_reload_cmds
8307
# How to pass a linker flag through the compiler.
8308
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8310
# Object file suffix (normally "o").
8313
# Old archive suffix (normally "a").
8316
# Executable file suffix (normally "").
8319
# Additional compiler flags for building library objects.
8320
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8323
# What is the maximum length of a command?
8324
max_cmd_len=$lt_cv_sys_max_cmd_len
8326
# Does compiler simultaneously support -c and -o options?
8327
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8329
# Must we lock files when doing compilation ?
8330
need_locks=$lt_need_locks
8332
# Do we need the lib prefix for modules?
8333
need_lib_prefix=$need_lib_prefix
8335
# Do we need a version for libraries?
8336
need_version=$need_version
8338
# Whether dlopen is supported.
8339
dlopen_support=$enable_dlopen
8341
# Whether dlopen of programs is supported.
8342
dlopen_self=$enable_dlopen_self
8344
# Whether dlopen of statically linked programs is supported.
8345
dlopen_self_static=$enable_dlopen_self_static
8347
# Compiler flag to prevent dynamic linking.
8348
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
8350
# Compiler flag to turn off builtin functions.
8351
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
8353
# Compiler flag to allow reflexive dlopens.
8354
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
8356
# Compiler flag to generate shared objects directly from archives.
8357
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
8359
# Compiler flag to generate thread-safe objects.
8360
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
8362
# Library versioning type.
8363
version_type=$version_type
8365
# Format of library name prefix.
8366
libname_spec=$lt_libname_spec
8368
# List of archive names. First name is the real one, the rest are links.
8369
# The last name is the one that the linker finds with -lNAME.
8370
library_names_spec=$lt_library_names_spec
8372
# The coded name of the library, if different from the real name.
8373
soname_spec=$lt_soname_spec
8375
# Commands used to build and install an old-style archive.
8377
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
8378
old_postinstall_cmds=$lt_old_postinstall_cmds
8379
old_postuninstall_cmds=$lt_old_postuninstall_cmds
8381
# Create an old-style archive from a shared archive.
8382
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
8384
# Create a temporary old-style archive to link instead of a shared archive.
8385
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
8387
# Commands used to build and install a shared archive.
8388
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
8389
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
8390
postinstall_cmds=$lt_postinstall_cmds
8391
postuninstall_cmds=$lt_postuninstall_cmds
8393
# Commands to strip libraries.
8394
old_striplib=$lt_old_striplib
8395
striplib=$lt_striplib
8397
# Dependencies to place before the objects being linked to create a
8399
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
8401
# Dependencies to place after the objects being linked to create a
8403
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
8405
# Dependencies to place before the objects being linked to create a
8407
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
8409
# Dependencies to place after the objects being linked to create a
8411
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
8413
# The library search path used internally by the compiler when linking
8415
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
8417
# Method to check whether dependent libraries are shared objects.
8418
deplibs_check_method=$lt_deplibs_check_method
8420
# Command to use when deplibs_check_method == file_magic.
8421
file_magic_cmd=$lt_file_magic_cmd
8423
# Flag that allows shared libraries with undefined symbols to be built.
8424
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
8426
# Flag that forces no undefined symbols.
8427
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
8429
# Commands used to finish a libtool library installation in a directory.
8430
finish_cmds=$lt_finish_cmds
8432
# Same as above, but a single script fragment to be evaled but not shown.
8433
finish_eval=$lt_finish_eval
8435
# Take the output of nm and produce a listing of raw symbols and C names.
8436
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
8438
# Transform the output of nm in a proper C declaration
8439
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
8441
# Transform the output of nm in a C name address pair
8442
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
8444
# This is the shared library runtime path variable.
8445
runpath_var=$runpath_var
8447
# This is the shared library path variable.
8448
shlibpath_var=$shlibpath_var
8450
# Is shlibpath searched before the hard-coded library search path?
8451
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
8453
# How to hardcode a shared library path into an executable.
8454
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
8456
# Whether we should hardcode library paths into libraries.
8457
hardcode_into_libs=$hardcode_into_libs
8459
# Flag to hardcode \$libdir into a binary during linking.
8460
# This must work even if \$libdir does not exist.
8461
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
8463
# Whether we need a single -rpath flag with a separated argument.
8464
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
8466
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
8468
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
8470
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
8472
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
8474
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
8475
# the resulting binary.
8476
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
8478
# Variables whose values should be saved in libtool wrapper scripts and
8479
# restored at relink time.
8480
variables_saved_for_relink="$variables_saved_for_relink"
8482
# Whether libtool must link a program against all its dependency libraries.
8483
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
8485
# Compile-time system search path for libraries
8486
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
8488
# Run-time system search path for libraries
8489
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
8491
# Fix the shell variable \$srcfile for the compiler.
8492
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
8494
# Set to yes if exported symbols are required.
8495
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
8497
# The commands to list exported symbols.
8498
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
8500
# The commands to extract the exported symbol list from a shared archive.
8501
extract_expsyms_cmds=$lt_extract_expsyms_cmds
8503
# Symbols that should not be listed in the preloaded symbols.
8504
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
8506
# Symbols that must always be exported.
8507
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
8510
[# ### END LIBTOOL CONFIG],
8511
[# ### END LIBTOOL TAG CONFIG: $tagname])
8518
cat <<\EOF >> "$cfgfile"
8520
# AIX sometimes has problems with the GCC collect2 program. For some
8521
# reason, if we set the COLLECT_NAMES environment variable, the problems
8522
# vanish in a puff of smoke.
8523
if test "X${COLLECT_NAMES+set}" != Xset; then
8525
export COLLECT_NAMES
8530
cygwin* | mingw* | pw32* | os2*)
8531
cat <<'EOF' >> "$cfgfile"
8532
# This is a source program that is used to create dlls on Windows
8533
# Don't remove nor modify the starting and closing comments
8535
# This is a source program that is used to create import libraries
8536
# on Windows for dlls which lack them. Don't remove nor modify the
8537
# starting and closing comments
8538
_LT_AC_FILE_IMPGEN_C
8543
# We use sed instead of cat because bash on DJGPP gets confused if
8544
# if finds mixed CR/LF and LF-only lines. Since sed operates in
8545
# text mode, it properly converts lines to CR/LF. This bash problem
8546
# is reportedly fixed, but why not run on old versions too?
8547
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
8549
mv -f "$cfgfile" "$ofile" || \
8550
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
8554
# If there is no Makefile yet, we rely on a make rule to execute
8555
# `config.status --recheck' to rerun these tests and create the
8556
# libtool script then.
8557
test -f Makefile && make "$ltmain"
8559
])# AC_LIBTOOL_CONFIG
8562
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
8563
# -------------------------------------------
8564
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
8565
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
8567
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8569
if test "$GCC" = yes; then
8570
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8572
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
8573
lt_cv_prog_compiler_rtti_exceptions,
8574
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
8575
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
8577
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
8580
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
8581
# ---------------------------------
8582
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
8583
[AC_REQUIRE([AC_CANONICAL_HOST])
8584
AC_REQUIRE([AC_PROG_NM])
8585
AC_REQUIRE([AC_OBJEXT])
8586
# Check for command to grab the raw symbol name followed by C symbol from nm.
8587
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
8588
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
8590
# These are sane defaults that work on at least a few old systems.
8591
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
8593
# Character class describing NM global symbol codes.
8594
symcode='[[BCDEGRST]]'
8596
# Regexp to match symbols that can be accessed directly from C.
8597
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
8599
# Transform the above into a raw symbol and a C symbol.
8600
symxfrm='\1 \2\3 \3'
8602
# Transform an extracted symbol line into a proper C declaration
8603
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
8605
# Transform an extracted symbol line into symbol name and symbol address
8606
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'"
8608
# Define system-specific variables.
8613
cygwin* | mingw* | pw32*)
8614
symcode='[[ABCDGISTW]]'
8616
hpux*) # Its linker distinguishes data from code symbols
8617
if test "$host_cpu" = ia64; then
8618
symcode='[[ABCDEGRST]]'
8620
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
8621
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'"
8624
symcode='[[BCDEGRST]]'
8630
symcode='[[DFNSTU]]'
8634
# Handle CRLF in mingw tool chain
8638
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8642
# If we're using GNU nm, then use its standard symbol codes.
8643
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
8644
symcode='[[ABCDGISTW]]'
8647
# Try without a prefix undercore, then with it.
8648
for ac_symprfx in "" "_"; do
8650
# Write the raw and C identifiers.
8651
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
8653
# Check to see that the pipe works correctly.
8657
cat > conftest.$ac_ext <<EOF
8662
void nm_test_func(){}
8666
int main(){nm_test_var='a';nm_test_func();return(0);}
8669
if AC_TRY_EVAL(ac_compile); then
8670
# Now try to grab the symbols.
8672
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
8673
# Try sorting and uniquifying the output.
8674
if sort "$nlist" | uniq > "$nlist"T; then
8675
mv -f "$nlist"T "$nlist"
8680
# Make sure that we snagged all the symbols we need.
8681
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
8682
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
8683
cat <<EOF > conftest.$ac_ext
8689
# Now generate the symbol file.
8690
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
8692
cat <<EOF >> conftest.$ac_ext
8693
#if defined (__STDC__) && __STDC__
8694
# define lt_ptr_t void *
8696
# define lt_ptr_t char *
8700
/* The mapping between symbol names and symbols. */
8705
lt_preloaded_symbols[[]] =
8708
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
8709
cat <<\EOF >> conftest.$ac_ext
8717
# Now try linking the two files.
8718
mv conftest.$ac_objext conftstm.$ac_objext
8719
lt_save_LIBS="$LIBS"
8720
lt_save_CFLAGS="$CFLAGS"
8721
LIBS="conftstm.$ac_objext"
8722
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
8723
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
8726
LIBS="$lt_save_LIBS"
8727
CFLAGS="$lt_save_CFLAGS"
8729
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
8732
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
8735
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8738
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
8739
cat conftest.$ac_ext >&5
8741
rm -f conftest* conftst*
8743
# Do not use the global_symbol_pipe unless it works.
8744
if test "$pipe_works" = yes; then
8747
lt_cv_sys_global_symbol_pipe=
8751
if test -z "$lt_cv_sys_global_symbol_pipe"; then
8752
lt_cv_sys_global_symbol_to_cdecl=
8754
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8755
AC_MSG_RESULT(failed)
8759
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
8762
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
8763
# ---------------------------------------
8764
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
8765
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
8766
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8767
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
8769
AC_MSG_CHECKING([for $compiler option to produce PIC])
8771
# C++ specific cases for pic, static, wl, etc.
8772
if test "$GXX" = yes; then
8773
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8774
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
8778
# All AIX code is PIC.
8779
if test "$host_cpu" = ia64; then
8780
# AIX 5 now supports IA64 processor
8781
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8785
# FIXME: we need at least 68020 code to build shared libraries, but
8786
# adding the `-m68020' flag to GCC prevents building anything better,
8788
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
8790
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8791
# PIC is the default for these OSes.
8793
cygwin* | mingw* | os2*)
8794
# This hack is so that the source file can tell whether it is being
8795
# built for inclusion in a dll (and should export symbols for example).
8796
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
8798
darwin* | rhapsody*)
8799
# PIC is the default on this platform
8800
# Common symbols not allowed in MH_DYLIB files
8801
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8804
# DJGPP does not support shared libraries at all
8805
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8808
if test -d /usr/nec; then
8809
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8813
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
8814
if test "$host_cpu" != ia64; then
8815
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8819
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8825
# All AIX code is PIC.
8826
if test "$host_cpu" = ia64; then
8827
# AIX 5 now supports IA64 processor
8828
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8830
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8834
case $cc_basename in
8836
# Green Hills C++ Compiler
8837
# _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"
8842
case $cc_basename in
8844
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8847
# Green Hills C++ Compiler
8848
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8855
# FreeBSD uses GNU C++
8857
hpux9* | hpux10* | hpux11*)
8858
case $cc_basename in
8860
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8861
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
8862
if test "$host_cpu" != ia64; then
8863
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8867
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8868
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
8869
if test "$host_cpu" != ia64; then
8870
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8877
irix5* | irix6* | nonstopux*)
8878
case $cc_basename in
8880
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8881
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8882
# CC pic flag -KPIC is the default.
8889
case $cc_basename in
8892
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8893
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8897
# Make sure the PIC flag is empty. It appears that all Alpha
8898
# Linux and Compaq Tru64 Unix objects are PIC.
8899
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8900
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8911
case $cc_basename in
8913
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
8921
osf3* | osf4* | osf5*)
8922
case $cc_basename in
8924
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8927
# Rational C++ 2.4.1
8928
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8931
# Digital/Compaq C++
8932
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8933
# Make sure the PIC flag is empty. It appears that all Alpha
8934
# Linux and Compaq Tru64 Unix objects are PIC.
8935
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8936
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8945
case $cc_basename in
8947
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8954
case $cc_basename in
8956
# Sun C++ 4.2, 5.x and Centerline C++
8957
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8958
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8959
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8962
# Green Hills C++ Compiler
8963
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8970
case $cc_basename in
8973
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8974
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8978
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8985
case $cc_basename in
8987
# NonStop-UX NCC 3.20
8988
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8999
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9005
if test "$GCC" = yes; then
9006
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9007
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9011
# All AIX code is PIC.
9012
if test "$host_cpu" = ia64; then
9013
# AIX 5 now supports IA64 processor
9014
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9019
# FIXME: we need at least 68020 code to build shared libraries, but
9020
# adding the `-m68020' flag to GCC prevents building anything better,
9022
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9025
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9026
# PIC is the default for these OSes.
9029
cygwin* | mingw* | pw32* | os2*)
9030
# This hack is so that the source file can tell whether it is being
9031
# built for inclusion in a dll (and should export symbols for example).
9032
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9035
darwin* | rhapsody*)
9036
# PIC is the default on this platform
9037
# Common symbols not allowed in MH_DYLIB files
9038
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9042
# Just because we use GCC doesn't mean we suddenly get shared libraries
9043
# on systems that don't support them.
9044
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9049
if test -d /usr/nec; then
9050
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9055
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9056
if test "$host_cpu" != ia64; then
9057
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9062
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9066
# PORTME Check for flag to pass linker flags through the system compiler.
9069
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9070
if test "$host_cpu" = ia64; then
9071
# AIX 5 now supports IA64 processor
9072
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9074
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9078
cygwin* | mingw* | pw32* | os2*)
9079
# This hack is so that the source file can tell whether it is being
9080
# built for inclusion in a dll (and should export symbols for example).
9081
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9084
hpux9* | hpux10* | hpux11*)
9085
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9086
if test "$host_cpu" != ia64; then
9087
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9089
# Is there a better lt_prog_compiler_static that works with the bundled CC?
9090
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9093
irix5* | irix6* | nonstopux*)
9094
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9095
# PIC (with -KPIC) is the default.
9096
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9100
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9101
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9104
osf3* | osf4* | osf5*)
9105
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9106
# All OSF/1 code is PIC.
9107
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9111
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9112
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9116
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9117
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9118
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9122
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9123
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9124
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9127
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9128
if test "x$host_vendor" = xsni; then
9129
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9131
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9133
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9134
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9138
if test -d /usr/nec ;then
9139
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9140
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9145
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9146
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9150
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9155
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9158
# Check to make sure the PIC flag actually works.
9160
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9161
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9162
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9163
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9164
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9166
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9168
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9169
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9172
# For platforms which do not support PIC, -DPIC is meaningless:
9174
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9177
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9183
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9184
# ------------------------------------
9185
# See if the linker supports building shared libraries.
9186
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9187
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9189
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9192
# If we're using GNU nm, then we don't want the "-C" option.
9193
# -C means demangle to AIX nm, but means don't demangle with GNU nm
9194
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9195
_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'
9197
_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'
9200
cygwin* | mingw* | pw32*)
9201
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9204
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9209
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9211
_LT_AC_TAGVAR(archive_cmds, $1)=
9212
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9213
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9214
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9215
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9216
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9217
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9218
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9219
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9220
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9221
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9222
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9223
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9224
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9225
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9226
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9227
# include_expsyms should be a list of space-separated symbols to be *always*
9228
# included in the symbol list
9229
_LT_AC_TAGVAR(include_expsyms, $1)=
9230
# exclude_expsyms can be an egrep regular expression of symbols to exclude
9231
# it will be wrapped by ` (' and `)$', so one must not match beginning or
9232
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9233
# as well as any symbol that contains `d'.
9234
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9235
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9236
# platforms (ab)use it in PIC code, but their linkers get confused if
9237
# the symbol is explicitly referenced. Since portable code cannot
9238
# rely on this symbol name, it's probably fine to never include it in
9239
# preloaded symbol tables.
9240
extract_expsyms_cmds=
9243
cygwin* | mingw* | pw32*)
9244
# FIXME: the MSVC++ port hasn't been tested in a loooong time
9245
# When not using gcc, we currently assume that we are using
9246
# Microsoft Visual C++.
9247
if test "$GCC" != yes; then
9256
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
9257
if test "$with_gnu_ld" = yes; then
9258
# If archive_cmds runs LD, not CC, wlarc should be empty
9261
# See if GNU ld supports shared libraries.
9263
aix3* | aix4* | aix5*)
9264
# On AIX/PPC, the GNU linker is very broken
9265
if test "$host_cpu" != ia64; then
9266
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9269
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
9270
*** to be unable to reliably create shared libraries on AIX.
9271
*** Therefore, libtool is disabling shared libraries support. If you
9272
*** really care for shared libraries, you may want to modify your PATH
9273
*** so that a non-GNU linker is found, and then restart.
9280
_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)'
9281
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9282
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9284
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9285
# that the semantics of dynamic libraries on AmigaOS, at least up
9286
# to version 4, is to share data among multiple programs linked
9287
# with the same dynamic library. Since this doesn't match the
9288
# behavior of shared libraries on other platforms, we can't use
9290
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9294
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9295
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9296
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9297
# support --undefined. This deserves some investigation. FIXME
9298
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9300
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9304
cygwin* | mingw* | pw32*)
9305
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9306
# no search path for DLLs.
9307
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9308
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9309
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9311
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9312
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9313
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9314
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9315
else $CC -o impgen impgen.c ; fi)~
9316
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9318
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9320
# cygwin and mingw dlls have different entry points and sets of symbols
9322
# FIXME: what about values for MSVC?
9323
dll_entry=__cygwin_dll_entry@12
9324
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9328
dll_entry=_DllMainCRTStartup@12
9329
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
9333
# mingw and cygwin differ, and it's simplest to just exclude the union
9334
# of the two symbol sets.
9335
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
9337
# recent cygwin and mingw systems supply a stub DllMain which the user
9338
# can override, but on older systems we have to supply one (in ltdll.c)
9339
if test "x$lt_cv_need_dllmain" = "xyes"; then
9340
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
9341
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
9342
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
9348
# Extract the symbol export list from an `--export-all' def file,
9349
# then regenerate the def file from the symbol export list, so that
9350
# the compiled dll only exports the symbol export list.
9351
# Be careful not to strip the DATA tag left by newer dlltools.
9352
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
9353
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
9354
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
9356
# If the export-symbols file already is a .def file (1st line
9357
# is EXPORTS), use it as is.
9358
# If DATA tags from a recent dlltool are present, honour them!
9359
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
9360
cp $export_symbols $output_objdir/$soname-def;
9362
echo EXPORTS > $output_objdir/$soname-def;
9364
cat $export_symbols | while read symbol; do
9367
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
9368
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
9370
_lt_hint=`expr 1 + \$_lt_hint`;
9374
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
9375
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
9376
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
9377
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
9378
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
9382
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9383
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9386
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9387
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9392
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
9393
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9396
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9397
*** create shared libraries on Solaris systems. Therefore, libtool
9398
*** is disabling shared libraries support. We urge you to upgrade GNU
9399
*** binutils to release 2.9.1 or newer. Another option is to modify
9400
*** your PATH or compiler configuration so that the native linker is
9401
*** used, and then restart.
9404
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9405
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9406
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9408
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9413
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9415
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9416
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9420
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9421
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9422
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9424
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9429
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
9430
runpath_var=LD_RUN_PATH
9431
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9432
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9434
cygwin* | mingw* | pw32*)
9435
# dlltool doesn't understand --whole-archive et. al.
9436
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9439
# ancient GNU ld didn't support --whole-archive et. al.
9440
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
9441
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9443
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9449
# PORTME fill in a description of your system's linker (not GNU ld)
9452
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9453
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9454
_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'
9455
# Note: this linker hardcodes the directories in LIBPATH if there
9456
# are no directories specified by -L.
9457
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9458
if test "$GCC" = yes && test -z "$link_static_flag"; then
9459
# Neither direct hardcoding nor static linking is supported with a
9461
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
9466
if test "$host_cpu" = ia64; then
9467
# On IA64, the linker does run time linking by default, so we don't
9468
# have to do anything special.
9469
aix_use_runtimelinking=no
9470
exp_sym_flag='-Bexport'
9473
# If we're using GNU nm, then we don't want the "-C" option.
9474
# -C means demangle to AIX nm, but means don't demangle with GNU nm
9475
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9476
_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'
9478
_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'
9481
# KDE requires run time linking. Make it the default.
9482
aix_use_runtimelinking=yes
9483
exp_sym_flag='-bexport'
9484
no_entry_flag='-bnoentry'
9487
# When large executables or shared objects are built, AIX ld can
9488
# have problems creating the table of contents. If linking a library
9489
# or program results in "error TOC overflow" add -mminimal-toc to
9490
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
9491
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9493
_LT_AC_TAGVAR(archive_cmds, $1)=''
9494
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9495
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
9496
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9498
if test "$GCC" = yes; then
9499
case $host_os in aix4.[012]|aix4.[012].*)
9500
# We only want to do this on AIX 4.2 and lower, the check
9501
# below for broken collect2 doesn't work under 4.3+
9502
collect2name=`${CC} -print-prog-name=collect2`
9503
if test -f "$collect2name" && \
9504
strings "$collect2name" | grep resolve_lib_name >/dev/null
9506
# We have reworked collect2
9507
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9509
# We have old collect2
9510
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
9511
# It fails to find uninstalled libraries when the uninstalled
9512
# path is not listed in the libpath. Setting hardcode_minus_L
9513
# to unsupported forces relinking
9514
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9515
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9516
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9519
shared_flag='-shared'
9522
if test "$host_cpu" = ia64; then
9523
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9524
# chokes on -Wl,-G. The following line is correct:
9527
if test "$aix_use_runtimelinking" = yes; then
9528
shared_flag='-qmkshrobj ${wl}-G'
9530
shared_flag='-qmkshrobj'
9535
# Let the compiler handle the export list.
9536
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9537
if test "$aix_use_runtimelinking" = yes; then
9538
# Warning - without using the other runtime loading flags (-brtl),
9539
# -berok will link without error, but may produce a broken library.
9540
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
9541
# Determine the default libpath from the value encoded in an empty executable.
9542
_LT_AC_SYS_LIBPATH_AIX
9543
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
9544
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
9545
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
9547
if test "$host_cpu" = ia64; then
9548
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
9549
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
9550
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
9552
# Determine the default libpath from the value encoded in an empty executable.
9553
_LT_AC_SYS_LIBPATH_AIX
9554
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
9555
# Warning - without using the other run time loading flags,
9556
# -berok will link without error, but may produce a broken library.
9557
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
9558
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
9559
# -bexpall does not export symbols beginning with underscore (_)
9560
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9561
# Exported symbols can be pulled into shared objects from archives
9562
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
9563
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9564
# This is similar to how AIX traditionally builds it's shared libraries.
9565
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
9571
_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)'
9572
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9573
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9574
# see comment about different semantics on the GNU ld section
9575
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9579
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
9582
cygwin* | mingw* | pw32*)
9583
# When not using gcc, we currently assume that we are using
9584
# Microsoft Visual C++.
9585
# hardcode_libdir_flag_spec is actually meaningless, as there is
9586
# no search path for DLLs.
9587
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9588
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9589
# Tell ltmain to make .lib files, not .a files.
9591
# FIXME: Setting linknames here is a bad hack.
9592
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
9593
# The linker will automatically build a .lib file if we build a DLL.
9594
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
9595
# FIXME: Should let the user specify the lib program.
9596
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
9597
fix_srcfile_path='`cygpath -w "$srcfile"`'
9600
darwin* | rhapsody*)
9602
rhapsody* | darwin1.[[012]])
9603
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
9606
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
9610
# FIXME: Relying on posixy $() will cause problems for
9611
# cross-compilation, but unfortunately the echo tests do not
9612
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
9613
# `"' quotes if we put them in here... so don't!
9614
_LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
9615
# We need to add '_' to the symbols in $export_symbols first
9616
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
9617
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9618
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9619
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
9623
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9624
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9625
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9629
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9632
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9633
# support. Future versions do this automatically, but an explicit c++rt0.o
9634
# does not break anything, and helps significantly (at the cost of a little
9637
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9638
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9639
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9640
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9643
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
9645
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9646
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9647
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9648
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9651
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9653
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9654
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9655
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9656
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9659
hpux9* | hpux10* | hpux11*)
9660
if test "$GCC" = yes; then
9663
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9666
if test "$host_cpu" = ia64; then
9667
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9669
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9676
_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'
9679
if test "$host_cpu" = ia64; then
9680
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9682
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9687
if test "$host_cpu" = ia64; then
9688
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9689
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9690
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9692
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9693
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9694
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9696
# hardcode_minus_L: Not really in the search PATH,
9697
# but as the default location of the library.
9698
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9699
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9702
irix5* | irix6* | nonstopux*)
9703
if test "$GCC" = yes; then
9704
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9706
_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'
9708
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9709
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9710
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9714
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9715
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9717
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9719
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9720
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9721
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9725
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9726
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9727
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9728
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9729
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9733
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9734
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9736
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9737
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
9738
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9739
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9742
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
9743
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9744
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9747
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
9748
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9755
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9756
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9757
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9758
_LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9759
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9763
if test "$GCC" = yes; then
9764
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9765
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9767
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9768
_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'
9770
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9771
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9774
osf4* | osf5*) # as osf3* with the addition of -msym flag
9775
if test "$GCC" = yes; then
9776
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9777
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9778
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9780
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9781
_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'
9782
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9783
$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'
9785
# Both c and cxx compiler support -rpath directly
9786
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9788
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
9792
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9793
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9794
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9795
runpath_var=LD_RUN_PATH
9796
hardcode_runpath_var=yes
9800
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
9801
if test "$GCC" = yes; then
9802
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9803
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9804
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9806
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9807
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9808
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9810
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9811
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9813
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9814
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
9815
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
9817
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
9821
if test "x$host_vendor" = xsequent; then
9822
# Use $CC to link under sequent, because it throws in some extra .o
9823
# files that make .init and .fini sections work.
9824
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9826
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9828
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9829
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9830
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9831
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9835
if test "x$host_vendor" = xsni; then
9836
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
9837
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9839
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9840
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9842
runpath_var='LD_RUN_PATH'
9843
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9847
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9848
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9849
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9853
if test -d /usr/nec; then
9854
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9855
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9856
runpath_var=LD_RUN_PATH
9857
hardcode_runpath_var=yes
9858
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
9863
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9864
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9865
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9866
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9867
hardcode_runpath_var=yes
9868
runpath_var=LD_RUN_PATH
9871
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
9872
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
9873
if test "$GCC" = yes; then
9874
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9876
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9878
runpath_var='LD_RUN_PATH'
9879
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9883
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
9884
# $CC -shared without GNU ld will not create a library from C++
9885
# object files and a static libstdc++, better avoid it by now
9886
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9887
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9888
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9889
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9890
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9891
runpath_var='LD_RUN_PATH'
9895
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9896
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9897
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9901
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9906
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
9907
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9909
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9910
if test "$GCC" = yes; then
9911
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9915
# Do we need to explicitly link libc?
9917
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9918
if test "$enable_shared" = yes && test "$GCC" = yes; then
9919
case $_LT_AC_TAGVAR(archive_cmds, $1) in
9921
# FIXME: we may have to deal with multi-command sequences.
9924
# Test whether the compiler implicitly links with -lc since on some
9925
# systems, -lgcc has to come before -lc. If gcc already passes -lc
9926
# to ld, don't add -lc before -lgcc.
9927
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
9929
echo 'static int dummy;' > conftest.$ac_ext
9931
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9934
libobjs=conftest.$ac_objext
9936
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
9942
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
9943
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9944
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
9946
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
9948
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
9950
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9952
cat conftest.err 1>&5
9955
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
9959
])# AC_LIBTOOL_PROG_LD_SHLIBS
9962
# _LT_AC_FILE_LTDLL_C
9963
# -------------------
9964
# Be careful that the start marker always follows a newline.
9965
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
9966
# /* ltdll.c starts here */
9967
# #define WIN32_LEAN_AND_MEAN
9968
# #include <windows.h>
9969
# #undef WIN32_LEAN_AND_MEAN
9970
# #include <stdio.h>
9972
# #ifndef __CYGWIN__
9973
# # ifdef __CYGWIN32__
9974
# # define __CYGWIN__ __CYGWIN32__
9978
# #ifdef __cplusplus
9981
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
9982
# #ifdef __cplusplus
9987
# #include <cygwin/cygwin_dll.h>
9988
# DECLARE_CYGWIN_DLL( DllMain );
9990
# HINSTANCE __hDllInstance_base;
9993
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
9995
# __hDllInstance_base = hInst;
9998
# /* ltdll.c ends here */
9999
])# _LT_AC_FILE_LTDLL_C
10002
# _LT_AC_FILE_IMPGEN_C
10003
# --------------------
10004
# Be careful that the start marker always follows a newline.
10005
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10006
# /* impgen.c starts here */
10007
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10009
# This file is part of GNU libtool.
10011
# This program is free software; you can redistribute it and/or modify
10012
# it under the terms of the GNU General Public License as published by
10013
# the Free Software Foundation; either version 2 of the License, or
10014
# (at your option) any later version.
10016
# This program is distributed in the hope that it will be useful,
10017
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10018
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10019
# GNU General Public License for more details.
10021
# You should have received a copy of the GNU General Public License
10022
# along with this program; if not, write to the Free Software
10023
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10026
# #include <stdio.h> /* for printf() */
10027
# #include <unistd.h> /* for open(), lseek(), read() */
10028
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
10029
# #include <string.h> /* for strdup() */
10031
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
10033
# #define O_BINARY 0
10036
# static unsigned int
10037
# pe_get16 (fd, offset)
10041
# unsigned char b[2];
10042
# lseek (fd, offset, SEEK_SET);
10044
# return b[0] + (b[1]<<8);
10047
# static unsigned int
10048
# pe_get32 (fd, offset)
10052
# unsigned char b[4];
10053
# lseek (fd, offset, SEEK_SET);
10055
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10058
# static unsigned int
10062
# unsigned char *b = ptr;
10063
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10067
# main (argc, argv)
10072
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10073
# unsigned long export_rva, export_size, nsections, secptr, expptr;
10074
# unsigned long name_rvas, nexp;
10075
# unsigned char *expdata, *erva;
10076
# char *filename, *dll_name;
10078
# filename = argv[1];
10080
# dll = open(filename, O_RDONLY|O_BINARY);
10084
# dll_name = filename;
10086
# for (i=0; filename[i]; i++)
10087
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
10088
# dll_name = filename + i +1;
10090
# pe_header_offset = pe_get32 (dll, 0x3c);
10091
# opthdr_ofs = pe_header_offset + 4 + 20;
10092
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
10094
# if (num_entries < 1) /* no exports */
10097
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
10098
# export_size = pe_get32 (dll, opthdr_ofs + 100);
10099
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10100
# secptr = (pe_header_offset + 4 + 20 +
10101
# pe_get16 (dll, pe_header_offset + 4 + 16));
10104
# for (i = 0; i < nsections; i++)
10107
# unsigned long secptr1 = secptr + 40 * i;
10108
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10109
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10110
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10111
# lseek(dll, secptr1, SEEK_SET);
10112
# read(dll, sname, 8);
10113
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
10115
# expptr = fptr + (export_rva - vaddr);
10116
# if (export_rva + export_size > vaddr + vsize)
10117
# export_size = vsize - (export_rva - vaddr);
10122
# expdata = (unsigned char*)malloc(export_size);
10123
# lseek (dll, expptr, SEEK_SET);
10124
# read (dll, expdata, export_size);
10125
# erva = expdata - export_rva;
10127
# nexp = pe_as32 (expdata+24);
10128
# name_rvas = pe_as32 (expdata+32);
10130
# printf ("EXPORTS\n");
10131
# for (i = 0; i<nexp; i++)
10133
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10134
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10139
# /* impgen.c ends here */
10140
])# _LT_AC_FILE_IMPGEN_C
10142
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10143
# ---------------------------------
10144
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10148
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
10149
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10150
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10151
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10152
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10153
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
10154
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
10156
# This is just to silence aclocal about the macro not being used
10157
ifelse([AC_DISABLE_FAST_INSTALL])
10159
AC_DEFUN([LT_AC_PROG_GCJ],
10160
[AC_CHECK_TOOL(GCJ, gcj, no)
10161
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10165
AC_DEFUN([LT_AC_PROG_RC],
10166
[AC_CHECK_TOOL(RC, windres, no)
10169
# NOTE: This macro has been submitted for inclusion into #
10170
# GNU Autoconf as AC_PROG_SED. When it is available in #
10171
# a released version of Autoconf we should remove this #
10172
# macro and use it instead. #
10175
# Check for a fully-functional sed program, that truncates
10176
# as few characters as possible. Prefer GNU sed if found.
10177
AC_DEFUN([LT_AC_PROG_SED],
10178
[AC_MSG_CHECKING([for a sed that does not truncate output])
10179
AC_CACHE_VAL(lt_cv_path_SED,
10180
[# Loop through the user's path and test for sed and gsed.
10181
# Then use that list of sed's as ones to test for truncation.
10182
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183
for as_dir in $PATH
10186
test -z "$as_dir" && as_dir=.
10187
for ac_prog in sed gsed; do
10188
for ac_exec_ext in '' $ac_executable_extensions; do
10189
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10190
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10196
# Create a temporary directory, and hook for its removal unless debugging.
10199
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10200
trap '{ (exit 1); exit 1; }' 1 2 13 15
10203
# Create a (secure) tmp directory for tmp files.
10206
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10207
test -n "$tmp" && test -d "$tmp"
10210
tmp=$TMPDIR/sed$$-$RANDOM
10211
(umask 077 && mkdir $tmp)
10214
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10215
{ (exit 1); exit 1; }
10219
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10220
# along with /bin/sed that truncates output.
10221
for _sed in $_sed_list /usr/xpg4/bin/sed; do
10222
test ! -f ${_sed} && break
10223
cat /dev/null > "$tmp/sed.in"
10225
echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10226
# Check for GNU sed and select it if it is found.
10227
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10228
lt_cv_path_SED=${_sed}
10232
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10233
mv "$tmp/sed.tmp" "$tmp/sed.in"
10234
cp "$tmp/sed.in" "$tmp/sed.nl"
10235
echo >>"$tmp/sed.nl"
10236
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10237
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10238
# 10000 chars as input seems more than enough
10239
test $_count -gt 10 && break
10240
_count=`expr $_count + 1`
10241
if test $_count -gt $_max; then
10243
lt_cv_path_SED=$_sed
10249
AC_MSG_RESULT([$SED])
10252
# Do all the work for Automake. -*- Autoconf -*-
10254
# This macro actually does too much some checks are only needed if
10255
# your package does certain things. But this isn't really a big deal.
10257
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
10258
# Free Software Foundation, Inc.
10260
# This program is free software; you can redistribute it and/or modify
10261
# it under the terms of the GNU General Public License as published by
10262
# the Free Software Foundation; either version 2, or (at your option)
10263
# any later version.
10265
# This program is distributed in the hope that it will be useful,
10266
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10267
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10268
# GNU General Public License for more details.
10270
# You should have received a copy of the GNU General Public License
10271
# along with this program; if not, write to the Free Software
10272
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10277
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10278
# written in clear, in which case automake, when reading aclocal.m4,
10279
# will think it sees a *use*, and therefore will trigger all it's
10280
# C support machinery. Also note that it means that autoscan, seeing
10281
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10286
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
10287
# the ones we care about.
10288
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10290
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10291
# AM_INIT_AUTOMAKE([OPTIONS])
10292
# -----------------------------------------------
10293
# The call with PACKAGE and VERSION arguments is the old style
10294
# call (pre autoconf-2.50), which is being phased out. PACKAGE
10295
# and VERSION should now be passed to AC_INIT and removed from
10296
# the call to AM_INIT_AUTOMAKE.
10297
# We support both call styles for the transition. After
10298
# the next Automake release, Autoconf can make the AC_INIT
10299
# arguments mandatory, and then we can depend on a new Autoconf
10300
# release and drop the old call support.
10301
AC_DEFUN([AM_INIT_AUTOMAKE],
10302
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10303
AC_REQUIRE([AC_PROG_INSTALL])dnl
10304
# test to see if srcdir already configured
10305
if test "`cd $srcdir && pwd`" != "`pwd`" &&
10306
test -f $srcdir/config.status; then
10307
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10310
# Define the identity of the package.
10311
dnl Distinguish between old-style and new-style calls.
10313
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10314
AC_SUBST([PACKAGE], [$1])dnl
10315
AC_SUBST([VERSION], [$2])],
10316
[_AM_SET_OPTIONS([$1])dnl
10317
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
10318
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
10320
_AM_IF_OPTION([no-define],,
10321
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10322
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10324
# Some tools Automake needs.
10325
AC_REQUIRE([AM_SANITY_CHECK])dnl
10326
AC_REQUIRE([AC_ARG_PROGRAM])dnl
10327
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10328
AM_MISSING_PROG(AUTOCONF, autoconf)
10329
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10330
AM_MISSING_PROG(AUTOHEADER, autoheader)
10331
AM_MISSING_PROG(MAKEINFO, makeinfo)
10332
AM_MISSING_PROG(AMTAR, tar)
10334
AM_PROG_INSTALL_STRIP
10335
# We need awk for the "check" target. The system "awk" is bad on
10337
AC_REQUIRE([AC_PROG_AWK])dnl
10338
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10340
_AM_IF_OPTION([no-dependencies],,
10341
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
10342
[_AM_DEPENDENCIES(CC)],
10343
[define([AC_PROG_][CC],
10344
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
10345
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
10346
[_AM_DEPENDENCIES(CXX)],
10347
[define([AC_PROG_][CXX],
10348
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10352
# Copyright 2002 Free Software Foundation, Inc.
10354
# This program is free software; you can redistribute it and/or modify
10355
# it under the terms of the GNU General Public License as published by
10356
# the Free Software Foundation; either version 2, or (at your option)
10357
# any later version.
10359
# This program is distributed in the hope that it will be useful,
10360
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10361
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10362
# GNU General Public License for more details.
10364
# You should have received a copy of the GNU General Public License
10365
# along with this program; if not, write to the Free Software
10366
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10368
# AM_AUTOMAKE_VERSION(VERSION)
10369
# ----------------------------
10370
# Automake X.Y traces this macro to ensure aclocal.m4 has been
10371
# generated from the m4 files accompanying Automake X.Y.
10372
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
10374
# AM_SET_CURRENT_AUTOMAKE_VERSION
10375
# -------------------------------
10376
# Call AM_AUTOMAKE_VERSION so it can be traced.
10377
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
10378
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10379
[AM_AUTOMAKE_VERSION([1.6.3])])
10381
# Helper functions for option handling. -*- Autoconf -*-
10383
# Copyright 2001, 2002 Free Software Foundation, Inc.
10385
# This program is free software; you can redistribute it and/or modify
10386
# it under the terms of the GNU General Public License as published by
10387
# the Free Software Foundation; either version 2, or (at your option)
10388
# any later version.
10390
# This program is distributed in the hope that it will be useful,
10391
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10392
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10393
# GNU General Public License for more details.
10395
# You should have received a copy of the GNU General Public License
10396
# along with this program; if not, write to the Free Software
10397
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10402
# _AM_MANGLE_OPTION(NAME)
10403
# -----------------------
10404
AC_DEFUN([_AM_MANGLE_OPTION],
10405
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10407
# _AM_SET_OPTION(NAME)
10408
# ------------------------------
10409
# Set option NAME. Presently that only means defining a flag for this option.
10410
AC_DEFUN([_AM_SET_OPTION],
10411
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10413
# _AM_SET_OPTIONS(OPTIONS)
10414
# ----------------------------------
10415
# OPTIONS is a space-separated list of Automake options.
10416
AC_DEFUN([_AM_SET_OPTIONS],
10417
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10419
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10420
# -------------------------------------------
10421
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10422
AC_DEFUN([_AM_IF_OPTION],
10423
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10426
# Check to make sure that the build environment is sane.
10429
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
10431
# This program is free software; you can redistribute it and/or modify
10432
# it under the terms of the GNU General Public License as published by
10433
# the Free Software Foundation; either version 2, or (at your option)
10434
# any later version.
10436
# This program is distributed in the hope that it will be useful,
10437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10439
# GNU General Public License for more details.
10441
# You should have received a copy of the GNU General Public License
10442
# along with this program; if not, write to the Free Software
10443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10450
AC_DEFUN([AM_SANITY_CHECK],
10451
[AC_MSG_CHECKING([whether build environment is sane])
10454
echo timestamp > conftest.file
10455
# Do `set' in a subshell so we don't clobber the current shell's
10456
# arguments. Must try -L first in case configure is actually a
10457
# symlink; some systems play weird games with the mod time of symlinks
10458
# (eg FreeBSD returns the mod time of the symlink's containing
10461
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
10462
if test "$[*]" = "X"; then
10464
set X `ls -t $srcdir/configure conftest.file`
10466
rm -f conftest.file
10467
if test "$[*]" != "X $srcdir/configure conftest.file" \
10468
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
10470
# If neither matched, then we have a broken ls. This can happen
10471
# if, for instance, CONFIG_SHELL is bash and it inherits a
10472
# broken ls alias from the environment. This has actually
10473
# happened. Such a system could not be considered "sane".
10474
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10475
alias in your environment])
10478
test "$[2]" = conftest.file
10484
AC_MSG_ERROR([newly created file is older than distributed files!
10485
Check your system clock])
10487
AC_MSG_RESULT(yes)])
10492
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
10494
# This program is free software; you can redistribute it and/or modify
10495
# it under the terms of the GNU General Public License as published by
10496
# the Free Software Foundation; either version 2, or (at your option)
10497
# any later version.
10499
# This program is distributed in the hope that it will be useful,
10500
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10501
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10502
# GNU General Public License for more details.
10504
# You should have received a copy of the GNU General Public License
10505
# along with this program; if not, write to the Free Software
10506
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10511
# AM_MISSING_PROG(NAME, PROGRAM)
10512
# ------------------------------
10513
AC_DEFUN([AM_MISSING_PROG],
10514
[AC_REQUIRE([AM_MISSING_HAS_RUN])
10515
$1=${$1-"${am_missing_run}$2"}
10519
# AM_MISSING_HAS_RUN
10520
# ------------------
10521
# Define MISSING if not defined so far and test if it supports --run.
10522
# If it does, set am_missing_run to use it, otherwise, to nothing.
10523
AC_DEFUN([AM_MISSING_HAS_RUN],
10524
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10525
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
10526
# Use eval to expand $SHELL
10527
if eval "$MISSING --run true"; then
10528
am_missing_run="$MISSING --run "
10531
AC_MSG_WARN([`missing' script is too old or missing])
10535
# AM_AUX_DIR_EXPAND
10537
# Copyright 2001 Free Software Foundation, Inc.
10539
# This program is free software; you can redistribute it and/or modify
10540
# it under the terms of the GNU General Public License as published by
10541
# the Free Software Foundation; either version 2, or (at your option)
10542
# any later version.
10544
# This program is distributed in the hope that it will be useful,
10545
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10546
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10547
# GNU General Public License for more details.
10549
# You should have received a copy of the GNU General Public License
10550
# along with this program; if not, write to the Free Software
10551
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10554
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10555
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
10556
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10558
# Of course, Automake must honor this variable whenever it calls a
10559
# tool from the auxiliary directory. The problem is that $srcdir (and
10560
# therefore $ac_aux_dir as well) can be either absolute or relative,
10561
# depending on how configure is run. This is pretty annoying, since
10562
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
10563
# source directory, any form will work fine, but in subdirectories a
10564
# relative path needs to be adjusted first.
10566
# $ac_aux_dir/missing
10567
# fails when called from a subdirectory if $ac_aux_dir is relative
10568
# $top_srcdir/$ac_aux_dir/missing
10569
# fails if $ac_aux_dir is absolute,
10570
# fails when called from a subdirectory in a VPATH build with
10571
# a relative $ac_aux_dir
10573
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10574
# are both prefixed by $srcdir. In an in-source build this is usually
10575
# harmless because $srcdir is `.', but things will broke when you
10576
# start a VPATH build or use an absolute $srcdir.
10578
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10579
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
10580
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10581
# and then we would define $MISSING as
10582
# MISSING="\${SHELL} $am_aux_dir/missing"
10583
# This will work as long as MISSING is not called from configure, because
10584
# unfortunately $(top_srcdir) has no meaning in configure.
10585
# However there are other variables, like CC, which are often used in
10586
# configure, and could therefore not use this "fixed" $ac_aux_dir.
10588
# Another solution, used here, is to always expand $ac_aux_dir to an
10589
# absolute PATH. The drawback is that using absolute paths prevent a
10590
# configured tree to be moved without reconfiguration.
10592
# Rely on autoconf to set up CDPATH properly.
10595
AC_DEFUN([AM_AUX_DIR_EXPAND], [
10596
# expand $ac_aux_dir to an absolute path
10597
am_aux_dir=`cd $ac_aux_dir && pwd`
10600
# AM_PROG_INSTALL_SH
10601
# ------------------
10602
# Define $install_sh.
10604
# Copyright 2001 Free Software Foundation, Inc.
10606
# This program is free software; you can redistribute it and/or modify
10607
# it under the terms of the GNU General Public License as published by
10608
# the Free Software Foundation; either version 2, or (at your option)
10609
# any later version.
10611
# This program is distributed in the hope that it will be useful,
10612
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10613
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10614
# GNU General Public License for more details.
10616
# You should have received a copy of the GNU General Public License
10617
# along with this program; if not, write to the Free Software
10618
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10621
AC_DEFUN([AM_PROG_INSTALL_SH],
10622
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10623
install_sh=${install_sh-"$am_aux_dir/install-sh"}
10624
AC_SUBST(install_sh)])
10626
# AM_PROG_INSTALL_STRIP
10628
# Copyright 2001 Free Software Foundation, Inc.
10630
# This program is free software; you can redistribute it and/or modify
10631
# it under the terms of the GNU General Public License as published by
10632
# the Free Software Foundation; either version 2, or (at your option)
10633
# any later version.
10635
# This program is distributed in the hope that it will be useful,
10636
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10637
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10638
# GNU General Public License for more details.
10640
# You should have received a copy of the GNU General Public License
10641
# along with this program; if not, write to the Free Software
10642
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10645
# One issue with vendor `install' (even GNU) is that you can't
10646
# specify the program used to strip binaries. This is especially
10647
# annoying in cross-compiling environments, where the build's strip
10648
# is unlikely to handle the host's binaries.
10649
# Fortunately install-sh will honor a STRIPPROG variable, so we
10650
# always use install-sh in `make install-strip', and initialize
10651
# STRIPPROG with the value of the STRIP variable (set by the user).
10652
AC_DEFUN([AM_PROG_INSTALL_STRIP],
10653
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10654
# Installed binaries are usually stripped using `strip' when the user
10655
# run `make install-strip'. However `strip' might not be the right
10656
# tool to use in cross-compilation environments, therefore Automake
10657
# will honor the `STRIP' environment variable to overrule this program.
10658
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10659
if test "$cross_compiling" != no; then
10660
AC_CHECK_TOOL([STRIP], [strip], :)
10662
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
10663
AC_SUBST([INSTALL_STRIP_PROGRAM])])
10665
# serial 4 -*- Autoconf -*-
10667
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
10669
# This program is free software; you can redistribute it and/or modify
10670
# it under the terms of the GNU General Public License as published by
10671
# the Free Software Foundation; either version 2, or (at your option)
10672
# any later version.
10674
# This program is distributed in the hope that it will be useful,
10675
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10676
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10677
# GNU General Public License for more details.
10679
# You should have received a copy of the GNU General Public License
10680
# along with this program; if not, write to the Free Software
10681
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10685
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10686
# written in clear, in which case automake, when reading aclocal.m4,
10687
# will think it sees a *use*, and therefore will trigger all it's
10688
# C support machinery. Also note that it means that autoscan, seeing
10689
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10693
# _AM_DEPENDENCIES(NAME)
10694
# ----------------------
10695
# See how the compiler implements dependency checking.
10696
# NAME is "CC", "CXX", "GCJ", or "OBJC".
10697
# We try a few techniques and use that to set a single cache variable.
10699
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10700
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10701
# dependency, and given that the user is not expected to run this macro,
10702
# just rely on AC_PROG_CC.
10703
AC_DEFUN([_AM_DEPENDENCIES],
10704
[AC_REQUIRE([AM_SET_DEPDIR])dnl
10705
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10706
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10707
AC_REQUIRE([AM_DEP_TRACK])dnl
10709
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
10710
[$1], CXX, [depcc="$CXX" am_compiler_list=],
10711
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10712
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
10713
[depcc="$$1" am_compiler_list=])
10715
AC_CACHE_CHECK([dependency style of $depcc],
10716
[am_cv_$1_dependencies_compiler_type],
10717
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10718
# We make a subdir and do the tests there. Otherwise we can end up
10719
# making bogus files that we don't know about and never remove. For
10720
# instance it was reported that on HP-UX the gcc test will end up
10721
# making a dummy file named `D' -- because `-MD' means `put the output
10724
# Copy depcomp to subdir because otherwise we won't find it if we're
10725
# using a relative directory.
10726
cp "$am_depcomp" conftest.dir
10729
am_cv_$1_dependencies_compiler_type=none
10730
if test "$am_compiler_list" = ""; then
10731
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10733
for depmode in $am_compiler_list; do
10734
# We need to recreate these files for each test, as the compiler may
10735
# overwrite some of them when testing with obscure command lines.
10736
# This happens at least with the AIX C compiler.
10737
echo '#include "conftest.h"' > conftest.c
10738
echo 'int i;' > conftest.h
10739
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
10743
# after this tag, mechanisms are not by side-effect, so they'll
10744
# only be used when explicitly requested
10745
if test "x$enable_dependency_tracking" = xyes; then
10753
# We check with `-c' and `-o' for the sake of the "dashmstdout"
10754
# mode. It turns out that the SunPro C++ compiler does not properly
10755
# handle `-M -o', and we need to detect this.
10756
if depmode=$depmode \
10757
source=conftest.c object=conftest.o \
10758
depfile=conftest.Po tmpdepfile=conftest.TPo \
10759
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
10760
grep conftest.h conftest.Po > /dev/null 2>&1 &&
10761
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10762
am_cv_$1_dependencies_compiler_type=$depmode
10768
rm -rf conftest.dir
10770
am_cv_$1_dependencies_compiler_type=none
10773
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10779
# Choose a directory name for dependency files.
10780
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
10781
AC_DEFUN([AM_SET_DEPDIR],
10782
[rm -f .deps 2>/dev/null
10783
mkdir .deps 2>/dev/null
10784
if test -d .deps; then
10787
# MS-DOS does not allow filenames that begin with a dot.
10790
rmdir .deps 2>/dev/null
10797
AC_DEFUN([AM_DEP_TRACK],
10798
[AC_ARG_ENABLE(dependency-tracking,
10799
[ --disable-dependency-tracking Speeds up one-time builds
10800
--enable-dependency-tracking Do not reject slow dependency extractors])
10801
if test "x$enable_dependency_tracking" != xno; then
10802
am_depcomp="$ac_aux_dir/depcomp"
10805
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10806
AC_SUBST([AMDEPBACKSLASH])
10809
# Generate code to set up dependency tracking. -*- Autoconf -*-
10811
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
10813
# This program is free software; you can redistribute it and/or modify
10814
# it under the terms of the GNU General Public License as published by
10815
# the Free Software Foundation; either version 2, or (at your option)
10816
# any later version.
10818
# This program is distributed in the hope that it will be useful,
10819
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10820
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10821
# GNU General Public License for more details.
10823
# You should have received a copy of the GNU General Public License
10824
# along with this program; if not, write to the Free Software
10825
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10830
# _AM_OUTPUT_DEPENDENCY_COMMANDS
10831
# ------------------------------
10832
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10833
[for mf in $CONFIG_FILES; do
10834
# Strip MF so we end up with the name of the file.
10835
mf=`echo "$mf" | sed -e 's/:.*$//'`
10836
# Check whether this is an Automake generated Makefile or not.
10837
# We used to match only the files named `Makefile.in', but
10838
# some people rename them; so instead we look at the file content.
10839
# Grep'ing the first line is not enough: some people post-process
10840
# each Makefile.in and add a new line on top of each file to say so.
10841
# So let's grep whole file.
10842
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
10843
dirpart=`AS_DIRNAME("$mf")`
10847
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
10848
# Extract the definition of DEP_FILES from the Makefile without
10850
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
10851
test -z "$DEPDIR" && continue
10852
# When using ansi2knr, U may be empty or an underscore; expand it
10853
U=`sed -n -e '/^U = / s///p' < "$mf"`
10854
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
10855
# We invoke sed twice because it is the simplest approach to
10856
# changing $(DEPDIR) to its actual value in the expansion.
10857
for file in `sed -n -e '
10858
/^DEP_FILES = .*\\\\$/ {
10867
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
10868
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10869
# Make sure the directory exists.
10870
test -f "$dirpart/$file" && continue
10871
fdir=`AS_DIRNAME(["$file"])`
10872
AS_MKDIR_P([$dirpart/$fdir])
10873
# echo "creating $dirpart/$file"
10874
echo '# dummy' > "$dirpart/$file"
10877
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10880
# AM_OUTPUT_DEPENDENCY_COMMANDS
10881
# -----------------------------
10882
# This macro should only be invoked once -- use via AC_REQUIRE.
10884
# This code is only required when automatic dependency tracking
10885
# is enabled. FIXME. This creates each `.P' file that we will
10886
# need in order to bootstrap the dependency handling code.
10887
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10888
[AC_CONFIG_COMMANDS([depfiles],
10889
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10890
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10893
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
10895
# This program is free software; you can redistribute it and/or modify
10896
# it under the terms of the GNU General Public License as published by
10897
# the Free Software Foundation; either version 2, or (at your option)
10898
# any later version.
10900
# This program is distributed in the hope that it will be useful,
10901
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10902
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10903
# GNU General Public License for more details.
10905
# You should have received a copy of the GNU General Public License
10906
# along with this program; if not, write to the Free Software
10907
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10912
# AM_MAKE_INCLUDE()
10913
# -----------------
10914
# Check to see how make treats includes.
10915
AC_DEFUN([AM_MAKE_INCLUDE],
10916
[am_make=${MAKE-make}
10917
cat > confinc << 'END'
10921
# If we don't find an include directive, just comment out the code.
10922
AC_MSG_CHECKING([for style of include used by $am_make])
10926
# First try GNU make style include.
10927
echo "include confinc" > confmf
10928
# We grep out `Entering directory' and `Leaving directory'
10929
# messages which can occur if `w' ends up in MAKEFLAGS.
10930
# In particular we don't look at `^make:' because GNU make might
10931
# be invoked under some other name (usually "gmake"), in which
10932
# case it prints its new name instead of `make'.
10933
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
10934
am__include=include
10938
# Now try BSD make style include.
10939
if test "$am__include" = "#"; then
10940
echo '.include "confinc"' > confmf
10941
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
10942
am__include=.include
10947
AC_SUBST(am__include)
10948
AC_SUBST(am__quote)
10949
AC_MSG_RESULT($_am_result)
10950
rm -f confinc confmf
10953
# AM_CONDITIONAL -*- Autoconf -*-
10955
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
10957
# This program is free software; you can redistribute it and/or modify
10958
# it under the terms of the GNU General Public License as published by
10959
# the Free Software Foundation; either version 2, or (at your option)
10960
# any later version.
10962
# This program is distributed in the hope that it will be useful,
10963
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10964
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10965
# GNU General Public License for more details.
10967
# You should have received a copy of the GNU General Public License
10968
# along with this program; if not, write to the Free Software
10969
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10976
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10977
# -------------------------------------
10978
# Define a conditional.
10979
AC_DEFUN([AM_CONDITIONAL],
10980
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
10981
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10982
AC_SUBST([$1_TRUE])
10983
AC_SUBST([$1_FALSE])
10991
AC_CONFIG_COMMANDS_PRE(
10992
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10993
AC_MSG_ERROR([conditional \"$1\" was never defined.
10994
Usually this means the macro was only invoked conditionally.])
10998
# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
11000
# This program is free software; you can redistribute it and/or modify
11001
# it under the terms of the GNU General Public License as published by
11002
# the Free Software Foundation; either version 2, or (at your option)
11003
# any later version.
11005
# This program is distributed in the hope that it will be useful,
11006
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11007
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11008
# GNU General Public License for more details.
11010
# You should have received a copy of the GNU General Public License
11011
# along with this program; if not, write to the Free Software
11012
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11021
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
11022
# "missing" invocation, for better error output.
11023
AC_DEFUN([AM_PROG_LEX],
11024
[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
11025
AC_REQUIRE([AC_PROG_LEX])dnl
11026
if test "$LEX" = :; then
11027
LEX=${am_missing_run}flex
11030
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
11032
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
11034
# This program is free software; you can redistribute it and/or modify
11035
# it under the terms of the GNU General Public License as published by
11036
# the Free Software Foundation; either version 2, or (at your option)
11037
# any later version.
11039
# This program is distributed in the hope that it will be useful,
11040
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11041
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11042
# GNU General Public License for more details.
11044
# You should have received a copy of the GNU General Public License
11045
# along with this program; if not, write to the Free Software
11046
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11053
# When config.status generates a header, we must update the stamp-h file.
11054
# This file resides in the same directory as the config header
11055
# that is generated. We must strip everything past the first ":",
11056
# and everything past the last "/".
11058
# _AM_DIRNAME(PATH)
11059
# -----------------
11060
# Like AS_DIRNAME, only do it during macro expansion
11061
AC_DEFUN([_AM_DIRNAME],
11062
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
11063
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
11064
m4_if(regexp([$1], [^/.*]), -1,
11066
patsubst([$1], [^\(/\).*], [\1])),
11067
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
11068
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
11072
# The stamp files are numbered to have different names.
11073
# We could number them on a directory basis, but that's additional
11074
# complications, let's have a unique counter.
11075
m4_define([_AM_STAMP_Count], [0])
11078
# _AM_STAMP(HEADER)
11079
# -----------------
11080
# The name of the stamp file for HEADER.
11081
AC_DEFUN([_AM_STAMP],
11082
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
11083
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
11084
[:.*])))/stamp-h[]_AM_STAMP_Count])
11087
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
11088
# ------------------------------------------------------------
11089
# We used to try to get a real timestamp in stamp-h. But the fear is that
11090
# that will cause unnecessary cvs conflicts.
11091
AC_DEFUN([_AM_CONFIG_HEADER],
11092
[# Add the stamp file to the list of files AC keeps track of,
11093
# along with our hook.
11094
AC_CONFIG_HEADERS([$1],
11095
[# update the timestamp
11096
echo 'timestamp for $1' >"_AM_STAMP([$1])"
11099
])# _AM_CONFIG_HEADER
11102
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
11103
# --------------------------------------------------------------
11104
AC_DEFUN([AM_CONFIG_HEADER],
11105
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
11106
])# AM_CONFIG_HEADER