11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
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,
56
AC_REQUIRE([KDE_CHECK_LIB64])
58
if test "$ac_x_includes" = NO; then
59
# Guess where to find include files, by looking for this one X11 .h file.
60
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
62
# First, try using that file with no special directory specified.
63
AC_TRY_CPP([#include <$x_direct_test_include>],
64
[# We can compile using X headers with no special include directory.
66
[# Look for the header file in a standard set of common directories.
67
# Check X11 before X11Rn because it is often a symlink to the current release.
79
/usr/local/X11/include \
80
/usr/local/X11R6/include \
81
/usr/local/X11R5/include \
82
/usr/local/X11R4/include \
84
/usr/local/include/X11 \
85
/usr/local/include/X11R6 \
86
/usr/local/include/X11R5 \
87
/usr/local/include/X11R4 \
91
/usr/XFree86/include/X11 \
95
/usr/unsupported/include \
97
/usr/local/x11r5/include \
98
/usr/lpp/Xamples/include \
100
/usr/openwin/include \
101
/usr/openwin/share/include \
104
if test -r "$ac_dir/$x_direct_test_include"; then
105
ac_x_includes=$ac_dir
109
fi # $ac_x_includes = NO
111
if test "$ac_x_libraries" = NO; then
112
# Check for the libraries.
114
test -z "$x_direct_test_library" && x_direct_test_library=Xt
115
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
117
# See if we find them without any special options.
118
# Don't add to $LIBS permanently.
120
LIBS="-l$x_direct_test_library $LIBS"
121
AC_TRY_LINK(, [${x_direct_test_function}()],
122
[LIBS="$ac_save_LIBS"
123
# We can link X programs with no special library path.
125
[LIBS="$ac_save_LIBS"
126
# First see if replacing the include by lib works.
127
# Check X11 before X11Rn because it is often a symlink to the current release.
128
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
129
/usr/X11/lib${kdelibsuff} \
130
/usr/X11R6/lib${kdelibsuff} \
131
/usr/X11R5/lib${kdelibsuff} \
132
/usr/X11R4/lib${kdelibsuff} \
134
/usr/lib${kdelibsuff}/X11 \
135
/usr/lib${kdelibsuff}/X11R6 \
136
/usr/lib${kdelibsuff}/X11R5 \
137
/usr/lib${kdelibsuff}/X11R4 \
139
/usr/local/X11/lib${kdelibsuff} \
140
/usr/local/X11R6/lib${kdelibsuff} \
141
/usr/local/X11R5/lib${kdelibsuff} \
142
/usr/local/X11R4/lib${kdelibsuff} \
144
/usr/local/lib${kdelibsuff}/X11 \
145
/usr/local/lib${kdelibsuff}/X11R6 \
146
/usr/local/lib${kdelibsuff}/X11R5 \
147
/usr/local/lib${kdelibsuff}/X11R4 \
149
/usr/X386/lib${kdelibsuff} \
150
/usr/x386/lib${kdelibsuff} \
151
/usr/XFree86/lib${kdelibsuff}/X11 \
153
/usr/lib${kdelibsuff} \
154
/usr/local/lib${kdelibsuff} \
155
/usr/unsupported/lib${kdelibsuff} \
156
/usr/athena/lib${kdelibsuff} \
157
/usr/local/x11r5/lib${kdelibsuff} \
158
/usr/lpp/Xamples/lib${kdelibsuff} \
159
/lib/usr/lib${kdelibsuff}/X11 \
161
/usr/openwin/lib${kdelibsuff} \
162
/usr/openwin/share/lib${kdelibsuff} \
165
dnl Don't even attempt the hair of trying to link an X program!
166
for ac_extension in a so sl; do
167
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
168
ac_x_libraries=$ac_dir
173
fi # $ac_x_libraries = NO
177
dnl ------------------------------------------------------------------------
178
dnl Find a file (or one of more files in a list of dirs)
179
dnl ------------------------------------------------------------------------
181
AC_DEFUN(AC_FIND_FILE,
188
echo "configure: __oline__: $i/$j" >&AC_FD_CC
189
if test -r "$i/$j"; then
190
echo "taking that" >&AC_FD_CC
198
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
199
dnl if-not-found, test-parameter)
200
AC_DEFUN(KDE_FIND_PATH,
202
AC_MSG_CHECKING([for $1])
203
if test -n "$$2"; then
206
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
208
AC_CACHE_VAL(kde_cv_path_$kde_cache,
220
if test -x "$dir/$1"; then
223
evalstr="$dir/$1 $5 2>&1 "
224
if eval $evalstr; then
225
kde_cv_path="$dir/$1"
229
kde_cv_path="$dir/$1"
235
eval "kde_cv_path_$kde_cache=$kde_cv_path"
239
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
243
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
244
AC_MSG_RESULT(not found)
247
AC_MSG_RESULT($kde_cv_path)
253
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
255
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
256
Please check whether you installed Qt correctly.
257
You need to have a running moc binary.
258
configure tried to run $ac_cv_path_moc and the test didn't
259
succeed. If configure shouldn't have tried this one, set
260
the environment variable MOC to the right one before running
265
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
267
AC_MSG_WARN([No Qt ui compiler (uic) found!
268
Please check whether you installed Qt correctly.
269
You need to have a running uic binary.
270
configure tried to run $ac_cv_path_uic and the test didn't
271
succeed. If configure shouldn't have tried this one, set
272
the environment variable UIC to the right one before running
278
AC_DEFUN(KDE_CHECK_UIC_FLAG,
280
AC_MSG_CHECKING([whether uic supports -$1 ])
281
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
282
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
284
cat >conftest.ui <<EOT
285
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
287
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
288
if AC_TRY_EVAL(ac_uic_testrun); then
289
eval "kde_cv_prog_uic_$kde_cache=yes"
291
eval "kde_cv_prog_uic_$kde_cache=no"
296
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
308
dnl ------------------------------------------------------------------------
309
dnl Find the meta object compiler and the ui compiler in the PATH,
310
dnl in $QTDIR/bin, and some more usual places
311
dnl ------------------------------------------------------------------------
313
AC_DEFUN(AC_PATH_QT_MOC_UIC,
316
for dir in $kde_qt_dirs; do
317
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
319
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
320
if test ! "$ac_qt_bindir" = "NO"; then
321
qt_bindirs="$ac_qt_bindir $qt_bindirs"
324
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
325
if test -z "$UIC_NOT_NEEDED"; then
326
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
327
if test -z "$UIC_PATH" ; then
328
KDE_UIC_ERROR_MESSAGE
330
elif test $kde_qtver = 3; then
331
KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
332
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
335
if test x$ac_uic_supports_libpath = xyes; then
336
UIC="$UIC -L \$(kde_widgetdir)"
338
if test x$ac_uic_supports_nounload = xyes; then
343
UIC="echo uic not available: "
350
if test $kde_qtver = 3; then
357
AC_DEFUN(KDE_1_CHECK_PATHS,
359
KDE_1_CHECK_PATH_HEADERS
363
if test -n "$USE_RPATH"; then
365
if test -n "$kde_libraries"; then
366
KDE_TEST_RPATH="-R $kde_libraries"
369
if test -n "$qt_libraries"; then
370
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
373
if test -n "$x_libraries"; then
374
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
377
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
380
AC_MSG_CHECKING([for KDE libraries installed])
381
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'
383
if AC_TRY_EVAL(ac_link) && test -s conftest; then
386
AC_MSG_ERROR([your system fails at linking a small KDE application!
387
Check, if your compiler is installed correctly and if you have used the
388
same compiler to compile Qt and kdelibs as you did use now.
389
For more details about this problem, look at the end of config.log.])
392
if eval `KDEDIR= ./conftest 2>&5`; then
398
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
399
kde_have_all_paths=yes
401
KDE_SET_PATHS($kde_result)
405
AC_DEFUN(KDE_SET_PATHS,
407
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
408
kde_htmldir=\"$kde_htmldir\" \
409
kde_appsdir=\"$kde_appsdir\" \
410
kde_icondir=\"$kde_icondir\" \
411
kde_sounddir=\"$kde_sounddir\" \
412
kde_datadir=\"$kde_datadir\" \
413
kde_locale=\"$kde_locale\" \
414
kde_cgidir=\"$kde_cgidir\" \
415
kde_confdir=\"$kde_confdir\" \
416
kde_mimedir=\"$kde_mimedir\" \
417
kde_toolbardir=\"$kde_toolbardir\" \
418
kde_wallpaperdir=\"$kde_wallpaperdir\" \
419
kde_templatesdir=\"$kde_templatesdir\" \
420
kde_bindir=\"$kde_bindir\" \
421
kde_servicesdir=\"$kde_servicesdir\" \
422
kde_servicetypesdir=\"$kde_servicetypesdir\" \
423
kde_moduledir=\"$kde_moduledir\" \
424
kde_styledir=\"$kde_styledir\" \
425
kde_widgetdir=\"$kde_widgetdir\" \
429
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
431
if test "$1" = "default"; then
433
if test -z "$kde_htmldir"; then
434
kde_htmldir='\${prefix}/share/doc/HTML'
436
if test -z "$kde_appsdir"; then
437
kde_appsdir='\${prefix}/share/applnk'
439
if test -z "$kde_icondir"; then
440
kde_icondir='\${prefix}/share/icons'
442
if test -z "$kde_sounddir"; then
443
kde_sounddir='\${prefix}/share/sounds'
445
if test -z "$kde_datadir"; then
446
kde_datadir='\${prefix}/share/apps'
448
if test -z "$kde_locale"; then
449
kde_locale='\${prefix}/share/locale'
451
if test -z "$kde_cgidir"; then
452
kde_cgidir='\${exec_prefix}/cgi-bin'
454
if test -z "$kde_confdir"; then
455
kde_confdir='\${prefix}/share/config'
457
if test -z "$kde_mimedir"; then
458
kde_mimedir='\${prefix}/share/mimelnk'
460
if test -z "$kde_toolbardir"; then
461
kde_toolbardir='\${prefix}/share/toolbar'
463
if test -z "$kde_wallpaperdir"; then
464
kde_wallpaperdir='\${prefix}/share/wallpapers'
466
if test -z "$kde_templatesdir"; then
467
kde_templatesdir='\${prefix}/share/templates'
469
if test -z "$kde_bindir"; then
470
kde_bindir='\${exec_prefix}/bin'
472
if test -z "$kde_servicesdir"; then
473
kde_servicesdir='\${prefix}/share/services'
475
if test -z "$kde_servicetypesdir"; then
476
kde_servicetypesdir='\${prefix}/share/servicetypes'
478
if test -z "$kde_moduledir"; then
479
if test "$kde_qtver" = "2"; then
480
kde_moduledir='\${libdir}/kde2'
482
kde_moduledir='\${libdir}/kde3'
485
if test -z "$kde_styledir"; then
486
kde_styledir='\${libdir}/kde3/plugins/styles'
488
if test -z "$kde_widgetdir"; then
489
kde_widgetdir='\${libdir}/kde3/plugins/designer'
492
KDE_SET_PATHS(defaults)
496
if test $kde_qtver = 1; then
497
AC_MSG_RESULT([compiling])
500
AC_MSG_ERROR([path checking not yet supported for KDE 2])
506
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
507
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
508
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
509
test -z "$kde_datadir" || test -z "$kde_locale" ||
510
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
511
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
512
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
513
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
514
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
515
test -z "$kde_styledir" || test -z "kde_widgetdir"
516
test "x$kde_have_all_paths" != "xyes"; then
517
kde_have_all_paths=no
521
AC_DEFUN(KDE_MISSING_PROG_ERROR,
523
AC_MSG_ERROR([The important program $1 was not found!
524
Please check whether you installed KDE correctly.
528
AC_DEFUN(KDE_MISSING_ARTS_ERROR,
530
AC_MSG_ERROR([The important program $1 was not found!
531
Please check whether you installed aRts correctly.
535
AC_DEFUN(KDE_SUBST_PROGRAMS,
538
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"
539
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
540
if test -n "$KDEDIRS"; then
543
for dir in $KDEDIRS; do
544
kde_default_bindirs="$dir/bin $kde_default_bindirs "
548
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
549
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
550
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
551
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
552
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
553
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
554
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
556
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
557
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
558
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
559
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
560
if test "$KDE_XSL_STYLESHEET" = "NO"; then
561
KDE_XSL_STYLESHEET=""
563
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
567
DCOP_DEPENDENCIES='$(DCOPIDL)'
569
AC_SUBST(DCOPIDL2CPP)
570
AC_SUBST(DCOP_DEPENDENCIES)
572
AC_SUBST(ARTSCCONFIG)
575
AC_SUBST(KDE_XSL_STYLESHEET)
577
if test -x "$KDECONFIG"; then # it can be "compiled"
578
kde_libs_prefix=`$KDECONFIG --prefix`
579
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
580
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
581
This means it has been moved since you installed it.
582
This won't work. Please recompile kdelibs for the new prefix.
585
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
587
kde_libs_prefix='$(prefix)'
588
kde_libs_htmldir='$(kde_htmldir)'
590
AC_SUBST(kde_libs_prefix)
591
AC_SUBST(kde_libs_htmldir)
594
AC_DEFUN(AC_CREATE_KFSSTND,
596
AC_REQUIRE([AC_CHECK_RPATH])
598
AC_MSG_CHECKING([for KDE paths])
601
AC_CACHE_VAL(kde_cv_all_paths,
603
KDE_SET_DEFAULT_PATHS($1)
606
eval "$kde_cv_all_paths"
607
KDE_CHECK_PATHS_FOR_COMPLETENESS
608
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
609
# wrong values were cached, may be, we can set better ones
611
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
612
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
613
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
614
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
618
KDE_SET_DEFAULT_PATHS($1)
619
eval "$kde_cv_all_paths"
620
KDE_CHECK_PATHS_FOR_COMPLETENESS
621
kde_result="$kde_result (cache overridden)"
623
if test "$kde_have_all_paths" = "no"; then
624
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
625
Since it had compiled and linked before, it must be a strange problem on your system.
626
Look at config.log for details. If you are not able to fix this, look at
627
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
628
(If you're using an egcs version on Linux, you may update binutils!)
632
AC_MSG_RESULT($kde_result)
641
AC_DEFUN(AC_SUBST_KFSSTND,
643
AC_SUBST(kde_htmldir)
644
AC_SUBST(kde_appsdir)
645
AC_SUBST(kde_icondir)
646
AC_SUBST(kde_sounddir)
647
AC_SUBST(kde_datadir)
649
AC_SUBST(kde_confdir)
650
AC_SUBST(kde_mimedir)
651
AC_SUBST(kde_wallpaperdir)
654
AC_SUBST(kde_templatesdir)
655
AC_SUBST(kde_servicesdir)
656
AC_SUBST(kde_servicetypesdir)
657
AC_SUBST(kde_moduledir)
658
AC_SUBST(kde_styledir)
659
AC_SUBST(kde_widgetdir)
660
if test "$kde_qtver" = 1; then
661
kde_minidir="$kde_icondir/mini"
663
# for KDE 1 - this breaks KDE2 apps using minidir, but
664
# that's the plan ;-/
665
kde_minidir="/dev/null"
667
dnl AC_SUBST(kde_minidir)
668
dnl AC_SUBST(kde_cgidir)
669
dnl AC_SUBST(kde_toolbardir)
672
AC_DEFUN(KDE_MISC_TESTS,
675
dnl Checks for libraries.
676
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
678
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
681
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
682
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
683
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
684
You should install libcrypt from another source or configure with PAM
689
if test $kde_have_crypt = yes; then
690
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
694
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
695
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
696
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
697
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
699
AC_CHECK_FUNC(inet_ntoa)
700
if test $ac_cv_func_inet_ntoa = no; then
701
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
703
AC_CHECK_FUNC(connect)
704
if test $ac_cv_func_connect = no; then
705
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
709
AC_CHECK_FUNC(remove)
710
if test $ac_cv_func_remove = no; then
711
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
714
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
715
AC_CHECK_FUNC(shmat, ,
716
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
718
# darwin needs this to initialize the environment
719
AC_CHECK_HEADERS(crt_externs.h)
720
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
722
# more headers that need to be explicitly included on darwin
723
AC_CHECK_HEADERS(sys/types.h stdint.h)
725
# darwin requires a poll emulation library
726
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
728
# CoreAudio framework
729
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
730
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
731
FRAMEWORK_COREAUDIO="-framework CoreAudio"
736
AC_SUBST(FRAMEWORK_COREAUDIO)
737
LIBSOCKET="$X_EXTRA_LIBS"
739
AC_SUBST(X_EXTRA_LIBS)
740
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
743
case $host in dnl this *is* LynxOS specific
745
AC_MSG_CHECKING([LynxOS header file wrappers])
746
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
747
AC_MSG_RESULT(disabled)
748
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
755
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
758
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
759
* that defines bzero.
767
AC_CHECK_FUNCS([vsnprintf snprintf])
771
* On HP-UX, the declaration of vsnprintf() is needed every time !
774
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
784
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
788
int snprintf(char *str, size_t n, char const *fmt, ...);
794
dnl ------------------------------------------------------------------------
795
dnl Find the header files and libraries for X-Windows. Extended the
797
dnl ------------------------------------------------------------------------
801
AC_REQUIRE([KDE_MISC_TESTS])dnl
802
AC_REQUIRE([KDE_CHECK_LIB64])
806
[ --enable-embedded link to Qt-embedded, don't use X],
807
kde_use_qt_emb=$enableval,
813
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
814
kde_use_qt_emb_palm=$enableval,
815
kde_use_qt_emb_palm=no
818
if test "$kde_use_qt_emb" = "no"; then
820
AC_MSG_CHECKING(for X)
823
AC_CACHE_VAL(kde_cv_have_x,
824
[# One or both of the vars are not set, and there is no cached value.
825
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
828
kde_x_includes=$x_includes
830
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
833
kde_x_libraries=$x_libraries
836
# below we use the standard autoconf calls
837
ac_x_libraries=$kde_x_libraries
838
ac_x_includes=$kde_x_includes
841
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
842
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
843
dnl location. The correct location is /usr/lib32 or an undefined value
844
dnl (the linker is smart enough to pick the correct default library).
845
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
846
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
847
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
848
dnl x_includes should be left alone.
856
if test -z "$ac_x_includes"; then
859
if test -z "$ac_x_libraries"; then
860
ac_x_libraries="/usr/lib${kdelibsuff}"
863
#from now on we use our own again
865
# when the user already gave --x-includes, we ignore
866
# what the standard autoconf macros told us.
867
if test "$kde_x_includes" = NO; then
868
kde_x_includes=$ac_x_includes
871
# for --x-libraries too
872
if test "$kde_x_libraries" = NO; then
873
kde_x_libraries=$ac_x_libraries
876
if test "$kde_x_includes" = NO; then
877
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
880
if test "$kde_x_libraries" = NO; then
881
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
884
# Record where we found X for the cache.
885
kde_cv_have_x="have_x=yes \
886
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
889
eval "$kde_cv_have_x"
891
if test "$have_x" != yes; then
892
AC_MSG_RESULT($have_x)
895
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
898
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
900
x_includes="."; dnl better than nothing :-
902
x_includes=$kde_x_includes
903
X_INCLUDES="-I$x_includes"
906
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
908
x_libraries="/usr/lib"; dnl better than nothing :-
910
x_libraries=$kde_x_libraries
911
X_LDFLAGS="-L$x_libraries"
913
all_includes="$X_INCLUDES"
914
all_libraries="$X_LDFLAGS"
918
AC_SUBST(x_libraries)
921
# Check for libraries that X11R6 Xt/Xaw programs need.
922
ac_save_LDFLAGS="$LDFLAGS"
923
LDFLAGS="$LDFLAGS $X_LDFLAGS"
924
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
925
# check for ICE first), but we must link in the order -lSM -lICE or
926
# we get undefined symbols. So assume we have SM if we have ICE.
927
# These have to be linked with before -lX11, unlike the other
928
# libraries we check for below, so use a different variable.
929
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
930
AC_CHECK_LIB(ICE, IceConnectionNumber,
931
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
933
LDFLAGS="$ac_save_LDFLAGS"
937
LIB_X11='-lX11 $(LIBSOCKET)'
940
AC_MSG_CHECKING(for libXext)
941
AC_CACHE_VAL(kde_cv_have_libXext,
943
kde_ldflags_safe="$LDFLAGS"
944
kde_libs_safe="$LIBS"
946
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
947
LIBS="-lXext -lX11 $LIBSOCKET"
956
printf("hello Xext\n");
958
kde_cv_have_libXext=yes,
959
kde_cv_have_libXext=no
962
LDFLAGS=$kde_ldflags_safe
966
AC_MSG_RESULT($kde_cv_have_libXext)
968
if test "$kde_cv_have_libXext" = "no"; then
969
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
970
can't find it itself, we stop here assuming that make wouldn't find
974
AC_MSG_CHECKING(for Xinerama)
976
AC_ARG_WITH(xinerama,
977
[ --with-xinerama enable support for Xinerama ],
985
kde_save_LDFLAGS="$LDFLAGS"
986
kde_save_CFLAGS="$CFLAGS"
987
kde_save_LIBS="$LIBS"
988
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
989
CFLAGS="$CFLAGS -I$x_includes"
990
LIBS="-lXinerama -lXext"
992
if test "x$no_xinerama" = "xno"; then
994
AC_CACHE_VAL(ac_cv_have_xinerama,
996
AC_TRY_LINK([#include <X11/Xlib.h>
997
#include <X11/extensions/Xinerama.h>],
998
[XineramaIsActive(NULL);],
999
[ac_cv_have_xinerama="yes"],
1000
[ac_cv_have_xinerama="no"])
1003
ac_cv_have_xinerama=no;
1006
AC_MSG_RESULT($ac_cv_have_xinerama)
1010
if test "$ac_cv_have_xinerama" = "yes"; then
1011
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
1012
LIBXINERAMA="-lXinerama"
1015
AC_SUBST(LIBXINERAMA)
1017
LDFLAGS="$kde_save_LDFLAGS"
1018
CFLAGS="$kde_save_CFLAGS"
1019
LIBS="$kde_save_LIBS"
1025
dnl We're using QT Embedded
1027
CXXFLAGS="$CXXFLAGS -fno-rtti"
1028
QTE_NORTTI="-fno-rtti -DQWS"
1037
AC_SUBST(X_PRE_LIBS)
1040
AC_SUBST(X_INCLUDES)
1042
AC_SUBST(x_includes)
1043
AC_SUBST(x_libraries)
1045
AC_SUBST(QTE_NORTTI)
1053
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1055
AC_REQUIRE([KDE_USE_QT])
1056
cat > conftest.$ac_ext <<EOF
1057
#include "confdefs.h"
1058
#include <qglobal.h>
1059
#include <qapplication.h>
1061
if test "$kde_qtver" = "2"; then
1062
cat >> conftest.$ac_ext <<EOF
1064
#include <qstring.h>
1068
if test $kde_qtsubver -gt 0; then
1069
cat >> conftest.$ac_ext <<EOF
1070
#if QT_VERSION < 210
1077
if test "$kde_qtver" = "3"; then
1078
cat >> conftest.$ac_ext <<EOF
1079
#include <qcursor.h>
1080
#include <qstylefactory.h>
1081
#include <private/qucomextra_p.h>
1085
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1086
cat >> conftest.$ac_ext <<EOF
1092
if test "$kde_qtver" = "2"; then
1093
cat >> conftest.$ac_ext <<EOF
1094
QStringList *t = new QStringList();
1097
if test $kde_qtsubver -gt 0; then
1098
cat >> conftest.$ac_ext <<EOF
1100
s.setLatin1("Elvis is alive", 14);
1104
if test "$kde_qtver" = "3"; then
1105
cat >> conftest.$ac_ext <<EOF
1106
(void)QStyleFactory::create(QString::null);
1107
QCursor c(Qt::WhatsThisCursor);
1110
cat >> conftest.$ac_ext <<EOF
1116
AC_DEFUN(KDE_USE_QT,
1118
if test -z "$1"; then
1119
# Current default Qt version: 3.1
1123
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1124
# following is the check if subversion isnt found in passed argument
1125
if test "$kde_qtsubver" = "$1"; then
1128
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1129
if test "$kde_qtver" = "1"; then
1134
if test -z "$2"; then
1135
if test "$kde_qtver" = "2"; then
1136
if test $kde_qtsubver -gt 0; then
1137
kde_qt_minversion=">= Qt 2.2.2"
1139
kde_qt_minversion=">= Qt 2.0.2"
1142
if test "$kde_qtver" = "3"; then
1143
if test $kde_qtsubver -gt 0; then
1144
kde_qt_minversion=">= Qt 3.1.0"
1146
kde_qt_minversion=">= Qt 3.0"
1149
if test "$kde_qtver" = "1"; then
1150
kde_qt_minversion=">= 1.42 and < 2.0"
1153
kde_qt_minversion=$2
1156
if test -z "$3"; then
1157
if test $kde_qtver = 3; then
1158
if test $kde_qtsubver -gt 0; then
1159
kde_qt_verstring="QT_VERSION >= 0x030100"
1161
kde_qt_verstring="QT_VERSION >= 300"
1164
if test $kde_qtver = 2; then
1165
if test $kde_qtsubver -gt 0; then
1166
kde_qt_verstring="QT_VERSION >= 222"
1168
kde_qt_verstring="QT_VERSION >= 200"
1171
if test $kde_qtver = 1; then
1172
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1178
if test $kde_qtver = 3; then
1179
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1181
if test $kde_qtver = 2; then
1182
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1184
if test $kde_qtver = 1; then
1185
kde_qt_dirs="$QTDIR /usr/lib/qt"
1189
AC_DEFUN(KDE_CHECK_QT_DIRECT,
1191
AC_REQUIRE([KDE_USE_QT])
1192
AC_MSG_CHECKING([if Qt compiles without flags])
1193
AC_CACHE_VAL(kde_cv_qt_direct,
1197
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1198
ac_LIBRARY_PATH="$LIBRARY_PATH"
1199
ac_cxxflags_safe="$CXXFLAGS"
1200
ac_ldflags_safe="$LDFLAGS"
1201
ac_libs_safe="$LIBS"
1203
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1204
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1205
if test "x$kde_use_qt_emb" != "xyes"; then
1206
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1208
LIBS="$LIBQT $LIBSOCKET"
1211
export LD_LIBRARY_PATH
1215
KDE_PRINT_QT_PROGRAM
1217
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1218
kde_cv_qt_direct="yes"
1220
kde_cv_qt_direct="no"
1221
echo "configure: failed program was:" >&AC_FD_CC
1222
cat conftest.$ac_ext >&AC_FD_CC
1226
CXXFLAGS="$ac_cxxflags_safe"
1227
LDFLAGS="$ac_ldflags_safe"
1228
LIBS="$ac_libs_safe"
1230
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1231
export LD_LIBRARY_PATH
1232
LIBRARY_PATH="$ac_LIBRARY_PATH"
1237
if test "$kde_cv_qt_direct" = "yes"; then
1246
dnl ------------------------------------------------------------------------
1247
dnl Try to find the Qt headers and libraries.
1248
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1249
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1250
dnl ------------------------------------------------------------------------
1252
AC_DEFUN(AC_PATH_QT_1_3,
1254
AC_REQUIRE([K_PATH_X])
1255
AC_REQUIRE([KDE_USE_QT])
1256
AC_REQUIRE([KDE_CHECK_LIB64])
1258
dnl ------------------------------------------------------------------------
1259
dnl Add configure flag to enable linking to MT version of Qt library.
1260
dnl ------------------------------------------------------------------------
1264
[ --disable-mt link to non-threaded Qt (deprecated)],
1265
kde_use_qt_mt=$enableval,
1267
if test $kde_qtver = 3; then
1277
dnl ------------------------------------------------------------------------
1278
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1279
dnl ------------------------------------------------------------------------
1283
if test "x$kde_use_qt_mt" = "xyes"; then
1285
if test "x$kde_use_threading" = "xyes"; then
1286
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1287
KDE_MT_LDFLAGS="$USE_THREADS"
1288
KDE_MT_LIBS="$LIBPTHREAD"
1293
AC_SUBST(KDE_MT_LDFLAGS)
1294
AC_SUBST(KDE_MT_LIBS)
1296
kde_qt_was_given=yes
1298
dnl ------------------------------------------------------------------------
1299
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1300
dnl ------------------------------------------------------------------------
1301
if test -z "$LIBQT_GLOB"; then
1302
if test "x$kde_use_qt_emb" = "xyes"; then
1303
LIBQT_GLOB="libqte.*"
1305
LIBQT_GLOB="libqt.*"
1309
if test -z "$LIBQT"; then
1310
dnl ------------------------------------------------------------
1311
dnl If we got --enable-embedded then adjust the Qt library name.
1312
dnl ------------------------------------------------------------
1313
if test "x$kde_use_qt_emb" = "xyes"; then
1319
kde_int_qt="-l$qtlib"
1325
if test -z "$LIBQPE"; then
1326
dnl ------------------------------------------------------------
1327
dnl If we got --enable-palmtop then add -lqpe to the link line
1328
dnl ------------------------------------------------------------
1329
if test "x$kde_use_qt_emb" = "xyes"; then
1330
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1340
dnl ------------------------------------------------------------------------
1341
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1342
dnl ------------------------------------------------------------------------
1344
if test "x$kde_use_qt_mt" = "xyes"; then
1345
if test -z "$LIBQT"; then
1347
kde_int_qt="-l$qtlib-mt"
1350
kde_int_qt="$qtlib-mt"
1352
LIBQT_GLOB="lib$qtlib-mt.*"
1353
USING_QT_MT="using -mt"
1358
if test $kde_qtver != 1; then
1360
AC_REQUIRE([AC_FIND_PNG])
1361
AC_REQUIRE([AC_FIND_JPEG])
1362
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1365
if test $kde_qtver = 3; then
1366
AC_REQUIRE([KDE_CHECK_LIBDL])
1367
LIBQT="$LIBQT $LIBDL"
1370
AC_MSG_CHECKING([for Qt])
1372
if test "x$kde_use_qt_emb" != "xyes"; then
1373
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1375
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1379
[ --with-qt-dir=DIR where the root of Qt is installed ],
1380
[ ac_qt_includes="$withval"/include
1381
ac_qt_libraries="$withval"/lib${kdelibsuff}
1382
ac_qt_bindir="$withval"/bin
1385
AC_ARG_WITH(qt-includes,
1386
[ --with-qt-includes=DIR where the Qt includes are. ],
1388
ac_qt_includes="$withval"
1391
kde_qt_libs_given=no
1393
AC_ARG_WITH(qt-libraries,
1394
[ --with-qt-libraries=DIR where the Qt library is installed.],
1395
[ ac_qt_libraries="$withval"
1396
kde_qt_libs_given=yes
1399
AC_CACHE_VAL(ac_cv_have_qt,
1400
[#try to guess Qt locations
1403
for dir in $kde_qt_dirs; do
1404
qt_incdirs="$qt_incdirs $dir/include $dir"
1406
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"
1407
if test ! "$ac_qt_includes" = "NO"; then
1408
qt_incdirs="$ac_qt_includes $qt_incdirs"
1411
if test "$kde_qtver" != "1"; then
1412
kde_qt_header=qstyle.h
1414
kde_qt_header=qglobal.h
1417
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1418
ac_qt_includes="$qt_incdir"
1421
for dir in $kde_qt_dirs; do
1422
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1424
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1425
if test ! "$ac_qt_libraries" = "NO"; then
1426
qt_libdir=$ac_qt_libraries
1428
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1429
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1431
for dir in $qt_libdirs; do
1432
try="ls -1 $dir/${LIBQT_GLOB}"
1433
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1437
ac_qt_libraries="$qt_libdir"
1442
ac_cxxflags_safe="$CXXFLAGS"
1443
ac_ldflags_safe="$LDFLAGS"
1444
ac_libs_safe="$LIBS"
1446
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1447
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1448
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1450
KDE_PRINT_QT_PROGRAM
1452
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1455
echo "configure: failed program was:" >&AC_FD_CC
1456
cat conftest.$ac_ext >&AC_FD_CC
1457
ac_qt_libraries="NO"
1460
CXXFLAGS="$ac_cxxflags_safe"
1461
LDFLAGS="$ac_ldflags_safe"
1462
LIBS="$ac_libs_safe"
1465
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1466
ac_cv_have_qt="have_qt=no"
1469
if test "$ac_qt_includes" = NO; then
1470
if test "$ac_qt_libraries" = NO; then
1471
ac_qt_notfound="(headers and libraries)";
1473
ac_qt_notfound="(headers)";
1476
if test "x$kde_use_qt_mt" = "xyes"; then
1478
Make sure that you have compiled Qt with thread support!"
1479
ac_qt_notfound="(library $qtlib-mt)";
1481
ac_qt_notfound="(library $qtlib)";
1485
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1486
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1492
eval "$ac_cv_have_qt"
1494
if test "$have_qt" != yes; then
1495
AC_MSG_RESULT([$have_qt]);
1497
ac_cv_have_qt="have_qt=yes \
1498
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1499
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1501
qt_libraries="$ac_qt_libraries"
1502
qt_includes="$ac_qt_includes"
1505
if test ! "$kde_qt_libs_given" = "yes"; then
1506
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1509
AC_SUBST(qt_libraries)
1510
AC_SUBST(qt_includes)
1512
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1515
QT_INCLUDES="-I$qt_includes"
1516
all_includes="$QT_INCLUDES $all_includes"
1519
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1522
QT_LDFLAGS="-L$qt_libraries"
1523
all_libraries="$all_libraries $QT_LDFLAGS"
1525
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1527
AC_SUBST(QT_INCLUDES)
1528
AC_SUBST(QT_LDFLAGS)
1533
if test "x$kde_use_qt_emb" != "xyes"; then
1534
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1536
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)'
1538
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1546
AC_DEFUN(AC_PATH_QT,
1551
AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
1553
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1555
if test x$ac_uic_supports_libpath = xyes; then
1557
AC_MSG_CHECKING([if UIC has KDE plugins available])
1558
AC_CACHE_VAL(kde_cv_uic_plugins,
1560
cat > actest.ui << EOF
1561
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1562
<class>NewConnectionDialog</class>
1563
<widget class="QDialog">
1564
<widget class="KLineEdit">
1565
<property name="name">
1566
<cstring>testInput</cstring>
1575
kde_cv_uic_plugins=no
1576
kde_line="$UIC_PATH -L $kde_widgetdir"
1577
if test x$ac_uic_supports_nounload = xyes; then
1578
kde_line="$kde_line -nounload"
1580
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1581
if AC_TRY_EVAL(kde_line); then
1582
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1583
kde_cv_uic_plugins=yes
1586
rm -f actest.ui actest.cpp
1589
if test "$kde_cv_uic_plugins" = yes; then
1590
AC_MSG_RESULT([yes])
1592
AC_MSG_ERROR([not found - you need to install kdelibs first.])
1597
AC_DEFUN(KDE_CHECK_FINAL,
1599
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1600
kde_use_final=$enableval, kde_use_final=no)
1603
if test "x$kde_use_final" = "xyes"; then
1604
KDE_USE_FINAL_TRUE=""
1605
KDE_USE_FINAL_FALSE="#"
1607
KDE_USE_FINAL_TRUE="#"
1608
KDE_USE_FINAL_FALSE=""
1610
AC_SUBST(KDE_USE_FINAL_TRUE)
1611
AC_SUBST(KDE_USE_FINAL_FALSE)
1613
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1614
kde_use_closure=$enableval, kde_use_closure=yes)
1616
if test "x$kde_use_closure" = "xyes"; then
1617
KDE_USE_CLOSURE_TRUE=""
1618
KDE_USE_CLOSURE_FALSE="#"
1619
# CXXFLAGS="$CXXFLAGS $REPO"
1621
KDE_USE_CLOSURE_TRUE="#"
1622
KDE_USE_CLOSURE_FALSE=""
1624
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1625
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1628
dnl ------------------------------------------------------------------------
1629
dnl Now, the same with KDE
1630
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1631
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1632
dnl ------------------------------------------------------------------------
1634
AC_DEFUN(AC_BASE_PATH_KDE,
1637
AC_REQUIRE([AC_PATH_QT])dnl
1638
AC_REQUIRE([KDE_CHECK_LIB64])
1641
AC_MSG_CHECKING([for KDE])
1643
if test "${prefix}" != NONE; then
1644
kde_includes=${prefix}/include
1645
ac_kde_includes=$prefix/include
1647
if test "${exec_prefix}" != NONE; then
1648
kde_libraries=${libdir}
1649
ac_kde_libraries=$libdir
1650
if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
1651
ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
1654
kde_libraries=${prefix}/lib${kdelibsuff}
1655
ac_kde_libraries=$prefix/lib${kdelibsuff}
1664
AC_CACHE_VAL(ac_cv_have_kde,
1665
[#try to guess kde locations
1667
if test "$kde_qtver" = 1; then
1668
kde_check_header="ksock.h"
1669
kde_check_lib="libkdecore.la"
1671
kde_check_header="ksharedptr.h"
1672
kde_check_lib="libkio.la"
1675
if test -z "$1"; then
1677
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"
1678
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1679
kde_incdirs="$ac_kde_includes $kde_incdirs"
1680
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1681
ac_kde_includes="$kde_incdir"
1683
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1685
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1686
So, check this please and use another prefix!])
1689
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1690
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1691
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1692
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1693
ac_kde_libraries="$kde_libdir"
1696
dnl this might be somewhere else
1697
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1699
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1701
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1702
So, check this please and use another prefix!])
1705
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1707
I can't find the designer plugins. These are required and should have been installed
1711
if test -n "$kde_widgetdir"; then
1712
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1716
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1717
ac_cv_have_kde="have_kde=no"
1719
ac_cv_have_kde="have_kde=yes \
1720
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1725
ac_cv_have_kde="have_kde=no"
1730
eval "$ac_cv_have_kde"
1732
if test "$have_kde" != "yes"; then
1733
if test "${prefix}" = NONE; then
1734
ac_kde_prefix="$ac_default_prefix"
1736
ac_kde_prefix="$prefix"
1738
if test "$exec_prefix" = NONE; then
1739
ac_kde_exec_prefix="$ac_kde_prefix"
1740
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1742
ac_kde_exec_prefix="$exec_prefix"
1743
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1746
kde_libraries="${libdir}"
1747
kde_includes=${ac_kde_prefix}/include
1750
ac_cv_have_kde="have_kde=yes \
1751
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1752
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1754
kde_libraries="$ac_kde_libraries"
1755
kde_includes="$ac_kde_includes"
1757
AC_SUBST(kde_libraries)
1758
AC_SUBST(kde_includes)
1760
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1763
KDE_INCLUDES="-I$kde_includes"
1764
all_includes="$KDE_INCLUDES $all_includes"
1767
KDE_LDFLAGS="-L$kde_libraries"
1768
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1769
all_libraries="$all_libraries $KDE_LDFLAGS"
1772
AC_SUBST(KDE_LDFLAGS)
1773
AC_SUBST(KDE_INCLUDES)
1775
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1777
all_libraries="$all_libraries $USER_LDFLAGS"
1778
all_includes="$all_includes $USER_INCLUDES"
1779
AC_SUBST(all_includes)
1780
AC_SUBST(all_libraries)
1782
if test -z "$1"; then
1783
KDE_CHECK_UIC_PLUGINS
1786
ac_kde_libraries="$kde_libdir"
1793
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1795
AC_MSG_CHECKING(for extra includes)
1796
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1797
adds non standard include paths],
1798
kde_use_extra_includes="$withval",
1799
kde_use_extra_includes=NONE
1802
if test -n "$kde_use_extra_includes" && \
1803
test "$kde_use_extra_includes" != "NONE"; then
1807
for dir in $kde_use_extra_includes; do
1808
kde_extra_includes="$kde_extra_includes $dir"
1809
USER_INCLUDES="$USER_INCLUDES -I$dir"
1812
kde_use_extra_includes="added"
1814
kde_use_extra_includes="no"
1816
AC_SUBST(USER_INCLUDES)
1818
AC_MSG_RESULT($kde_use_extra_includes)
1821
AC_MSG_CHECKING(for extra libs)
1822
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1823
kde_use_extra_libs=$withval,
1824
kde_use_extra_libs=NONE
1826
if test -n "$kde_use_extra_libs" && \
1827
test "$kde_use_extra_libs" != "NONE"; then
1831
for dir in $kde_use_extra_libs; do
1832
kde_extra_libs="$kde_extra_libs $dir"
1833
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1834
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1837
kde_use_extra_libs="added"
1839
kde_use_extra_libs="no"
1842
AC_SUBST(USER_LDFLAGS)
1844
AC_MSG_RESULT($kde_use_extra_libs)
1848
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1850
AC_MSG_CHECKING([for KDE headers installed])
1853
cat > conftest.$ac_ext <<EOF
1855
# include <stdlib.h>
1858
#include "confdefs.h"
1862
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1863
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1864
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1865
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1866
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1867
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1868
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1869
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1870
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1871
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1872
printf("kde_wallpaperdir=\\"%s\\"\n",
1873
KApplication::kde_wallpaperdir().data());
1874
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1875
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1876
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1877
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1878
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1879
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1880
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1885
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1886
if AC_TRY_EVAL(ac_compile); then
1889
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1890
Check, if you installed the KDE header files correctly.
1891
For more details about this problem, look at the end of config.log.])
1897
AC_DEFUN(KDE_CHECK_KDEQTADDON,
1899
AC_MSG_CHECKING(for kde-qt-addon)
1900
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1902
kde_ldflags_safe="$LDFLAGS"
1903
kde_libs_safe="$LIBS"
1904
kde_cxxflags_safe="$CXXFLAGS"
1906
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1907
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1908
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1916
kde_cv_have_kdeqtaddon=yes,
1917
kde_cv_have_kdeqtaddon=no
1920
LDFLAGS=$kde_ldflags_safe
1922
CXXFLAGS=$kde_cxxflags_safe
1925
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1927
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1928
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1929
It is a separate package (and CVS module) named kde-qt-addon.])
1933
AC_DEFUN(KDE_CHECK_KIMGIO,
1935
AC_REQUIRE([AC_BASE_PATH_KDE])
1936
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1937
AC_REQUIRE([AC_FIND_TIFF])
1938
AC_REQUIRE([AC_FIND_JPEG])
1939
AC_REQUIRE([AC_FIND_PNG])
1940
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1942
if test "$1" = "existance"; then
1945
kde_save_LIBS="$LIBS"
1946
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1947
AC_CHECK_LIB(kimgio, kimgioRegister, [
1948
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1949
LIBS="$kde_save_LIBS"
1952
LIBKIMGIO_EXISTS=yes
1955
if test "$LIBKIMGIO_EXISTS" = "yes"; then
1956
LIB_KIMGIO='-lkimgio'
1960
AC_SUBST(LIB_KIMGIO)
1963
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1965
AC_REQUIRE([KDE_MISC_TESTS])
1966
AC_REQUIRE([KDE_CHECK_LIBDL])
1967
AC_REQUIRE([K_PATH_X])
1969
if test $kde_qtver = 3; then
1970
AC_SUBST(LIB_KDECORE, "-lkdecore")
1971
AC_SUBST(LIB_KDEUI, "-lkdeui")
1972
AC_SUBST(LIB_KIO, "-lkio")
1973
AC_SUBST(LIB_SMB, "-lsmb")
1974
AC_SUBST(LIB_KAB, "-lkab")
1975
AC_SUBST(LIB_KABC, "-lkabc")
1976
AC_SUBST(LIB_KHTML, "-lkhtml")
1977
AC_SUBST(LIB_KSPELL, "-lkspell")
1978
AC_SUBST(LIB_KPARTS, "-lkparts")
1979
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1980
# these are for backward compatibility
1981
AC_SUBST(LIB_KSYCOCA, "-lkio")
1982
AC_SUBST(LIB_KFILE, "-lkio")
1983
elif test $kde_qtver = 2; then
1984
AC_SUBST(LIB_KDECORE, "-lkdecore")
1985
AC_SUBST(LIB_KDEUI, "-lkdeui")
1986
AC_SUBST(LIB_KIO, "-lkio")
1987
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
1988
AC_SUBST(LIB_SMB, "-lsmb")
1989
AC_SUBST(LIB_KFILE, "-lkfile")
1990
AC_SUBST(LIB_KAB, "-lkab")
1991
AC_SUBST(LIB_KHTML, "-lkhtml")
1992
AC_SUBST(LIB_KSPELL, "-lkspell")
1993
AC_SUBST(LIB_KPARTS, "-lkparts")
1994
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1996
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
1997
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
1998
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
1999
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2000
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2004
AC_DEFUN(AC_PATH_KDE,
2007
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
2009
if test "$enableval" = "no";
2010
then ac_use_path_checking="default"
2011
else ac_use_path_checking=""
2015
if test "$kde_qtver" = 1;
2016
then ac_use_path_checking=""
2017
else ac_use_path_checking="default"
2022
AC_CREATE_KFSSTND($ac_use_path_checking)
2025
KDE_CREATE_LIBS_ALIASES
2028
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2029
AC_DEFUN(KDE_CHECK_FUNC_EXT,
2031
AC_MSG_CHECKING(for $1)
2032
AC_CACHE_VAL(kde_cv_func_$1,
2036
save_CXXFLAGS="$CXXFLAGS"
2037
kde_safe_LIBS="$LIBS"
2038
LIBS="$LIBS $X_EXTRA_LIBS"
2039
if test "$GXX" = "yes"; then
2040
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2050
CXXFLAGS="$save_CXXFLAGS"
2055
AC_MSG_RESULT($kde_cv_func_$1)
2057
AC_MSG_CHECKING([if $1 needs custom prototype])
2058
AC_CACHE_VAL(kde_cv_proto_$1,
2060
if test "x$kde_cv_func_$1" = xyes; then
2064
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2065
kde_cv_proto_$1="yes - in libkdefakes"
2068
kde_cv_proto_$1=unknown
2073
if test "x$kde_cv_proto_$1" = xunknown; then
2078
LIBS="$LIBS $X_EXTRA_LIBS"
2087
[ kde_cv_func_$1=yes
2088
kde_cv_proto_$1=yes ],
2089
[kde_cv_proto_$1="$1 unavailable"]
2095
AC_MSG_RESULT($kde_cv_proto_$1)
2097
if test "x$kde_cv_func_$1" = xyes; then
2098
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2101
if test "x$kde_cv_proto_$1" = xno; then
2102
AC_DEFINE(HAVE_$5_PROTO, 1,
2103
[Define if you have the $1 prototype])
2106
AH_VERBATIM([_HAVE_$5_PROTO],
2108
#if !defined(HAVE_$5_PROTO)
2117
AC_DEFUN(AC_CHECK_SETENV,
2119
KDE_CHECK_FUNC_EXT(setenv, [
2122
[setenv("VAR", "VALUE", 1);],
2123
[int setenv (const char *, const char *, int)],
2127
AC_DEFUN(AC_CHECK_UNSETENV,
2129
KDE_CHECK_FUNC_EXT(unsetenv, [
2133
[void unsetenv (const char *)],
2137
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
2139
KDE_CHECK_FUNC_EXT(getdomainname, [
2145
getdomainname(buffer, 200);
2147
[int getdomainname (char *, unsigned int)],
2151
AC_DEFUN(AC_CHECK_GETHOSTNAME,
2153
KDE_CHECK_FUNC_EXT(gethostname, [
2159
gethostname(buffer, 200);
2161
[int gethostname (char *, unsigned int)],
2165
AC_DEFUN(AC_CHECK_USLEEP,
2167
KDE_CHECK_FUNC_EXT(usleep, [
2173
[int usleep (unsigned int)],
2178
AC_DEFUN(AC_CHECK_RANDOM,
2180
KDE_CHECK_FUNC_EXT(random, [
2186
[long int random(void)],
2189
KDE_CHECK_FUNC_EXT(srandom, [
2195
[void srandom(unsigned int)],
2200
AC_DEFUN(AC_CHECK_INITGROUPS,
2202
KDE_CHECK_FUNC_EXT(initgroups, [
2203
#include <sys/types.h>
2209
initgroups(buffer, 27);
2211
[int initgroups(const char *, gid_t)],
2215
AC_DEFUN(AC_CHECK_MKSTEMP,
2217
KDE_CHECK_FUNC_EXT(mkstemp, [
2221
mkstemp("/tmp/aaaXXXXXX");
2223
[int mkstemp(char *)],
2227
AC_DEFUN(AC_CHECK_MKSTEMPS,
2229
KDE_CHECK_FUNC_EXT(mkstemps, [
2234
mkstemps("/tmp/aaaXXXXXX", 6);
2236
[int mkstemps(char *, int)],
2240
AC_DEFUN(AC_CHECK_RES_INIT,
2242
AC_MSG_CHECKING([if res_init needs -lresolv])
2243
kde_libs_safe="$LIBS"
2244
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2247
#include <sys/types.h>
2248
#include <netinet/in.h>
2249
#include <arpa/nameser.h>
2256
LIBRESOLV="-lresolv"
2258
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2260
[ AC_MSG_RESULT(no) ]
2262
LIBS="$kde_libs_safe"
2265
AC_MSG_CHECKING([if res_init is available])
2268
#include <sys/types.h>
2269
#include <netinet/in.h>
2270
#include <arpa/nameser.h>
2278
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2280
[ AC_MSG_RESULT(no) ]
2284
AC_DEFUN(AC_CHECK_STRLCPY,
2286
KDE_CHECK_FUNC_EXT(strlcpy, [
2290
strlcpy(buf, "KDE function test", sizeof(buf));
2292
[unsigned long strlcpy(char*, const char*, unsigned long)],
2296
AC_DEFUN(AC_CHECK_STRLCAT,
2298
KDE_CHECK_FUNC_EXT(strlcat, [
2303
strlcat(buf, "KDE function test", sizeof(buf));
2305
[unsigned long strlcat(char*, const char*, unsigned long)],
2309
AC_DEFUN(AC_FIND_GIF,
2310
[AC_MSG_CHECKING([for giflib])
2311
AC_CACHE_VAL(ac_cv_lib_gif,
2312
[ac_save_LIBS="$LIBS"
2313
if test "x$kde_use_qt_emb" != "xyes"; then
2314
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2316
LIBS="$all_libraries -lgif"
2323
int GifLastError(void);
2327
/* We use char because int might match the return type of a gcc2
2328
builtin and then its argument prototype would still apply. */
2330
[return GifLastError();],
2331
eval "ac_cv_lib_gif=yes",
2332
eval "ac_cv_lib_gif=no")
2333
LIBS="$ac_save_LIBS"
2335
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2337
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2339
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2343
AC_DEFUN(KDE_FIND_JPEG_HELPER,
2345
AC_MSG_CHECKING([for libjpeg$2])
2346
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2349
ac_save_LIBS="$LIBS"
2350
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2351
ac_save_CFLAGS="$CFLAGS"
2352
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2354
[/* Override any gcc2 internal prototype to avoid an error. */
2355
struct jpeg_decompress_struct;
2356
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2361
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2362
int version, size_t structsize);
2366
/* We use char because int might match the return type of a gcc2
2367
builtin and then its argument prototype would still apply. */
2369
[jpeg_CreateDecompress(0L, 0, 0);],
2370
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2371
eval "ac_cv_lib_jpeg_$1=no")
2372
LIBS="$ac_save_LIBS"
2373
CFLAGS="$ac_save_CFLAGS"
2376
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2377
LIBJPEG="$ac_cv_lib_jpeg_$1"
2378
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2386
AC_DEFUN(AC_FIND_JPEG,
2388
dnl first look for libraries
2389
KDE_FIND_JPEG_HELPER(6b, 6b,
2390
KDE_FIND_JPEG_HELPER(normal, [],
2397
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2398
dnl requires system dependent includes loaded before it)
2399
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2400
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2401
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2403
dnl if headers _and_ libraries are missing, this is no error, and we
2404
dnl continue with a warning (the user will get no jpeg support in khtml)
2405
dnl if only one is missing, it means a configuration error, but we still
2407
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2408
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2410
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2412
There is an installation error in jpeg support. You seem to have only one
2413
of either the headers _or_ the libraries installed. You may need to either
2414
provide correct --with-extra-... options, or the development package of
2415
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2416
Disabling JPEG support.
2419
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2426
AH_VERBATIM(_AC_CHECK_JPEG,
2428
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2429
* headers and I'm too lazy to write a configure test as long as only
2430
* unixware is related
2433
#define HAVE_BOOLEAN
2438
AC_DEFUN(KDE_CHECK_QT_JPEG,
2440
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2441
AC_CACHE_VAL(kde_cv_qt_jpeg,
2445
ac_save_LIBS="$LIBS"
2446
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2447
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2448
ac_save_CXXFLAGS="$CXXFLAGS"
2449
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2451
[#include <qapplication.h>],
2455
QApplication app(argc, argv);],
2456
eval "kde_cv_qt_jpeg=no",
2457
eval "kde_cv_qt_jpeg=yes")
2458
LIBS="$ac_save_LIBS"
2459
CXXFLAGS="$ac_save_CXXFLAGS"
2463
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2465
LIBJPEG_QT='$(LIBJPEG)'
2473
AC_DEFUN(AC_FIND_ZLIB,
2475
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2476
AC_MSG_CHECKING([for libz])
2477
AC_CACHE_VAL(ac_cv_lib_z,
2480
kde_save_LIBS="$LIBS"
2481
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2482
kde_save_CFLAGS="$CFLAGS"
2483
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2488
[return (zlibVersion() == ZLIB_VERSION); ],
2489
eval "ac_cv_lib_z='-lz'",
2490
eval "ac_cv_lib_z=no")
2491
LIBS="$kde_save_LIBS"
2492
CFLAGS="$kde_save_CFLAGS"
2494
if test ! "$ac_cv_lib_z" = no; then
2495
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2498
AC_MSG_RESULT($ac_cv_lib_z)
2500
AC_MSG_ERROR(not found. Check your installation and look into config.log)
2506
AC_DEFUN(KDE_TRY_TIFFLIB,
2508
AC_MSG_CHECKING([for libtiff $1])
2510
AC_CACHE_VAL(kde_cv_libtiff_$1,
2514
kde_save_LIBS="$LIBS"
2515
if test "x$kde_use_qt_emb" != "xyes"; then
2516
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2518
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2520
kde_save_CXXFLAGS="$CXXFLAGS"
2521
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2527
[return (TIFFOpen( "", "r") == 0); ],
2529
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2531
kde_cv_libtiff_$1=no
2534
LIBS="$kde_save_LIBS"
2535
CXXFLAGS="$kde_save_CXXFLAGS"
2539
if test "$kde_cv_libtiff_$1" = "no"; then
2544
LIBTIFF="$kde_cv_libtiff_$1"
2546
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2552
AC_DEFUN(AC_FIND_TIFF,
2554
AC_REQUIRE([K_PATH_X])
2555
AC_REQUIRE([AC_FIND_ZLIB])
2556
AC_REQUIRE([AC_FIND_JPEG])
2557
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2559
KDE_TRY_TIFFLIB(tiff, [],
2560
KDE_TRY_TIFFLIB(tiff34))
2566
AC_DEFUN(AC_FIND_PNG,
2568
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2569
AC_REQUIRE([AC_FIND_ZLIB])
2570
AC_MSG_CHECKING([for libpng])
2571
AC_CACHE_VAL(ac_cv_lib_png,
2573
kde_save_LIBS="$LIBS"
2574
if test "x$kde_use_qt_emb" != "xyes"; then
2575
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2577
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2579
kde_save_CFLAGS="$CFLAGS"
2580
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2587
png_structp png_ptr = png_create_read_struct( /* image ptr */
2588
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2589
return( png_ptr != 0 );
2591
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2592
eval "ac_cv_lib_png=no"
2594
LIBS="$kde_save_LIBS"
2595
CFLAGS="$kde_save_CFLAGS"
2597
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2598
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2599
LIBPNG="$ac_cv_lib_png"
2601
AC_MSG_RESULT($ac_cv_lib_png)
2609
AC_DEFUN(AC_CHECK_BOOL,
2611
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2614
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2616
AC_MSG_CHECKING(if you need GNU extensions)
2617
AC_CACHE_VAL(ac_cv_gnu_extensions,
2619
cat > conftest.c << EOF
2620
#include <features.h>
2622
#ifdef __GNU_LIBRARY__
2627
if (eval "$ac_cpp conftest.c") 2>&5 |
2628
egrep "yes" >/dev/null 2>&1; then
2630
ac_cv_gnu_extensions=yes
2632
ac_cv_gnu_extensions=no
2636
AC_MSG_RESULT($ac_cv_gnu_extensions)
2637
if test "$ac_cv_gnu_extensions" = "yes"; then
2638
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2642
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2644
AC_MSG_CHECKING(whether $CXX supports -$1)
2645
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2646
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2650
save_CXXFLAGS="$CXXFLAGS"
2651
CXXFLAGS="$CXXFLAGS -$1"
2652
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2653
CXXFLAGS="$save_CXXFLAGS"
2656
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2667
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2668
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2669
dnl it's all white-space separated
2670
AC_DEFUN(AC_REMOVE_FORBIDDEN,
2673
if test -n "$__val"; then
2679
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2680
*) # Careful to not add spaces, where there were none, because otherwise
2681
# libtool gets confused, if we change e.g. CXX
2682
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2690
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2691
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2693
if test "x$kde_use_qt_emb" != "xyes"; then
2694
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2695
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2697
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2698
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2702
AC_DEFUN(AC_CHECK_COMPILERS,
2704
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2708
kde_use_debug_code="yes"
2709
kde_use_debug_define=no
2712
kde_use_debug_code="full"
2713
kde_use_debug_define=no
2716
kde_use_debug_code="no"
2717
kde_use_debug_define=yes
2721
[kde_use_debug_code="no"
2722
kde_use_debug_define=no
2725
dnl Just for configure --help
2726
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2728
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2730
if test $enableval = "no"; then
2731
kde_use_strict_options="no"
2733
kde_use_strict_options="yes"
2735
], [kde_use_strict_options="no"])
2737
AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2739
if test $enableval = "no"; then
2740
kde_use_warnings="no"
2742
kde_use_warnings="yes"
2744
], [kde_use_warnings="yes"])
2746
dnl enable warnings for debug build
2747
if test "$kde_use_debug_code" != "no"; then
2748
kde_use_warnings=yes
2751
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2752
[kde_use_profiling=$enableval],
2753
[kde_use_profiling="no"]
2756
AC_ARG_ENABLE(gcov,[ --enable-gcov enables gcov test coverage support [default=no]],
2757
[kde_use_gcov=$enableval],
2761
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2768
if test "$GCC" = "yes"; then
2769
if test "$kde_use_debug_code" != "no"; then
2770
if test $kde_use_debug_code = "full" || test $kde_use_gcov = "yes"; then
2771
CFLAGS="-g3 $CFLAGS"
2773
CFLAGS="-g -O2 $CFLAGS"
2776
CFLAGS="-O2 $CFLAGS"
2780
if test "$kde_use_debug_define" = "yes"; then
2781
CFLAGS="-DNDEBUG $CFLAGS"
2786
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2787
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2790
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2794
CXXFLAGS=" $CXXFLAGS"
2798
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2799
if test "$kde_use_debug_code" != "no"; then
2800
if test "$CXX" = "KCC"; then
2801
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2803
if test "$kde_use_debug_code" = "full"; then
2804
CXXFLAGS="-g3 $CXXFLAGS"
2806
CXXFLAGS="-g -O2 $CXXFLAGS"
2809
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2811
dnl convenience compiler flags
2812
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2813
AC_SUBST(WOVERLOADED_VIRTUAL)
2815
if test "$CXX" = "KCC"; then
2816
CXXFLAGS="+K3 $CXXFLAGS"
2818
CXXFLAGS="-O2 $CXXFLAGS"
2823
if test "$kde_use_debug_define" = "yes"; then
2824
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2827
if test "$kde_use_profiling" = "yes"; then
2828
KDE_CHECK_COMPILER_FLAG(pg,
2830
CFLAGS="-pg $CFLAGS"
2831
CXXFLAGS="-pg $CXXFLAGS"
2835
if test "$kde_use_gcov" = "yes"; then
2836
KDE_CHECK_COMPILER_FLAG(fprofile-arcs,
2838
CFLAGS="-fprofile-arcs -ftest-coverage $CFLAGS"
2839
CXXFLAGS="-fprofile-arcs -ftest-coverage $CXXFLAGS"
2843
if test "$kde_use_warnings" = "yes"; then
2844
if test "$GCC" = "yes"; then
2847
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2848
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
2851
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2852
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2853
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2854
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2858
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
2859
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2862
if test "$GXX" = "yes"; then
2863
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2864
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2865
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2867
if test "$CXX" = "KCC"; then
2868
dnl unfortunately we currently cannot disable exception support in KCC
2869
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2870
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2871
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2873
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2875
kde_use_pch=$enableval
2878
if test "$kde_use_pch" = "yes"; then
2879
dnl TODO: support --pch-dir!
2880
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2881
dnl the below works (but the dir must exist), but it's
2882
dnl useless for a whole package.
2883
dnl The are precompiled headers for each source file, so when compiling
2884
dnl from scratch, it doesn't make a difference, and they take up
2885
dnl around ~5Mb _per_ sourcefile.
2886
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2887
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2889
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2890
dnl all implementations that are defined inside the class {} declaration.
2891
dnl because of templates-compatibility with broken gcc compilers, this
2892
dnl can cause excessive inlining. This flag limits it to a sane level
2893
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2894
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2895
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2896
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2897
dnl Some source files are shared between multiple executables
2898
dnl (or libraries) and some of those need template instantiations.
2899
dnl In that case KCC needs to compile those sources with
2900
dnl --one_instantiation_per_object. To make it easy for us we compile
2901
dnl _all_ objects with that flag (--one_per is a shorthand).
2902
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2904
AC_SUBST(USE_EXCEPTIONS)
2905
dnl obsolete macro - provided to keep things going
2910
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2911
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2912
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2914
if test "$GXX" = yes; then
2915
libstdcpp=`$CXX -print-file-name=libstdc++.so`
2916
if test ! -f $libstdcpp; then
2917
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])
2923
AC_VALIDIFY_CXXFLAGS
2927
if test "$GCC" = yes; then
2932
AC_SUBST(NOOPT_CXXFLAGS)
2933
AC_SUBST(NOOPT_CFLAGS)
2937
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2940
AC_DEFUN(KDE_ADD_DEPENDENCIES,
2942
[A]M_DEPENDENCIES(CC)
2943
[A]M_DEPENDENCIES(CXX)
2946
dnl just a wrapper to clean up configure.in
2947
AC_DEFUN(KDE_PROG_LIBTOOL,
2949
AC_REQUIRE([AC_CHECK_COMPILERS])
2950
AC_REQUIRE([AC_ENABLE_SHARED])
2951
AC_REQUIRE([AC_ENABLE_STATIC])
2953
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
2954
AC_REQUIRE([KDE_CHECK_LIB64])
2965
LIBTOOL_SHELL="/bin/sh ./libtool"
2966
# LIBTOOL="$LIBTOOL --silent"
2967
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2968
AC_SUBST(KDE_PLUGIN)
2970
AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
2971
kde_use_objprelink=$enableval, kde_use_objprelink=no)
2972
if test "x$kde_use_objprelink" = "xyes"; then
2974
------------------------------------------------------------
2975
Configuration option --enable-objprelink is no longer useful.
2976
See http:://objprelink.sourceforge.net for details:
2977
1- Recent binutils are fast enough to do without objprelink.
2978
2- Newer versions of objprelink do not need this option.
2979
------------------------------------------------------------
2984
AC_DEFUN(KDE_CHECK_LIB64,
2987
AC_ARG_ENABLE(libsuffix,
2988
AC_HELP_STRING([--enable-libsuffix],
2989
[/lib directory suffix (64,32,none[=default])]),
2990
kdelibsuff=$enableval)
2991
# TODO: add an auto case that compiles a little C app to check
2992
# where the glibc is
2993
if test "$kdelibsuff" = "none"; then
2996
if test -z "$kdelibsuff"; then
2997
AC_MSG_RESULT([not using lib directory suffix])
2998
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3000
if test "$libdir" = '${exec_prefix}/lib'; then
3001
libdir="$libdir${kdelibsuff}"
3002
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3004
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3005
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3009
AC_DEFUN(KDE_CHECK_TYPES,
3010
[ AC_CHECK_SIZEOF(int, 4)dnl
3011
AC_CHECK_SIZEOF(long, 4)dnl
3012
AC_CHECK_SIZEOF(char *, 4)dnl
3013
AC_CHECK_SIZEOF(char, 1)dnl
3016
AC_DEFUN(KDE_DO_IT_ALL,
3020
AM_INIT_AUTOMAKE($1, $2)
3021
AM_DISABLE_LIBRARIES
3022
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3029
AC_DEFUN(AC_CHECK_RPATH,
3031
AC_MSG_CHECKING(for rpath)
3032
AC_ARG_ENABLE(rpath,
3033
[ --disable-rpath do not use the rpath feature of ld],
3034
USE_RPATH=$enableval, USE_RPATH=yes)
3036
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3038
KDE_RPATH="-R \$(kde_libraries)"
3040
if test -n "$qt_libraries"; then
3041
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3043
dnl $x_libraries is set to /usr/lib in case
3044
if test -n "$X_LDFLAGS"; then
3045
X_RPATH="-R \$(x_libraries)"
3046
KDE_RPATH="$KDE_RPATH $X_RPATH"
3048
if test -n "$KDE_EXTRA_RPATH"; then
3049
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3052
AC_SUBST(KDE_EXTRA_RPATH)
3055
AC_MSG_RESULT($USE_RPATH)
3058
dnl Check for the type of the third argument of getsockname
3059
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
3060
AC_MSG_CHECKING(for socklen_t)
3061
AC_CACHE_VAL(ac_cv_socklen_t, [
3065
#include <sys/types.h>
3066
#include <sys/socket.h>
3069
getsockname(0,(struct sockaddr*)0, &a);
3071
ac_cv_socklen_t=socklen_t,
3073
#include <sys/types.h>
3074
#include <sys/socket.h>
3077
getsockname(0,(struct sockaddr*)0, &a);
3079
ac_cv_socklen_t=int,
3080
ac_cv_socklen_t=size_t
3086
AC_MSG_RESULT($ac_cv_socklen_t)
3087
if test "$ac_cv_socklen_t" != "socklen_t"; then
3088
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3089
[Define the real type of socklen_t])
3091
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3095
dnl This is a merge of some macros out of the gettext aclocal.m4
3096
dnl since we don't need anything, I took the things we need
3097
dnl the copyright for them is:
3099
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3100
dnl This Makefile.in is free software; the Free Software Foundation
3101
dnl gives unlimited permission to copy and/or distribute it,
3102
dnl with or without modifications, as long as this notice is preserved.
3104
dnl This program is distributed in the hope that it will be useful,
3105
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3106
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3107
dnl PARTICULAR PURPOSE.
3109
dnl for this file it is relicensed under LGPL
3111
AC_DEFUN(AM_KDE_WITH_NLS,
3113
dnl If we use NLS figure out what method
3115
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3116
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3117
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3119
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3120
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3127
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3128
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3130
dnl Test whether we really found GNU xgettext.
3131
if test "$XGETTEXT" != ":"; then
3132
dnl If it is no GNU xgettext we define it as : so that the
3133
dnl Makefiles still can work.
3134
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3138
[found xgettext programs is not GNU xgettext; ignore it])
3146
# Search path for a program which passes the given test.
3147
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3150
# Stephan Kulow: I appended a _KDE against name conflicts
3152
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3153
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3154
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
3155
[# Extract the first word of "$2", so it can be a program name with args.
3156
set dummy $2; ac_word=[$]2
3157
AC_MSG_CHECKING([for $ac_word])
3158
AC_CACHE_VAL(ac_cv_path_$1,
3161
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3164
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3165
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3166
test -z "$ac_dir" && ac_dir=.
3167
if test -f $ac_dir/$ac_word; then
3169
ac_cv_path_$1="$ac_dir/$ac_word"
3175
dnl If no 4th arg is given, leave the cache variable unset,
3176
dnl so AC_PATH_PROGS will keep looking.
3177
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3182
if test -n "[$]$1"; then
3183
AC_MSG_RESULT([$]$1)
3191
# Check whether LC_MESSAGES is available in <locale.h>.
3192
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3196
AC_DEFUN(AM_LC_MESSAGES,
3197
[if test $ac_cv_header_locale_h = yes; then
3198
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3199
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3200
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3201
if test $am_cv_val_LC_MESSAGES = yes; then
3202
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3206
dnl From Jim Meyering.
3207
dnl FIXME: migrate into libit.
3209
AC_DEFUN([AM_FUNC_OBSTACK],
3210
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3211
[AC_TRY_LINK([#include "obstack.h"],
3212
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3213
am_cv_func_obstack=yes,
3214
am_cv_func_obstack=no)])
3215
if test $am_cv_func_obstack = yes; then
3216
AC_DEFINE(HAVE_OBSTACK)
3218
LIBOBJS="$LIBOBJS obstack.o"
3222
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3223
dnl FIXME: Migrate into libit
3225
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3226
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3227
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3228
am_cv_lib_error_at_line=yes,
3229
am_cv_lib_error_at_line=no)])
3230
if test $am_cv_lib_error_at_line = no; then
3231
LIBOBJS="$LIBOBJS error.o"
3233
AC_SUBST(LIBOBJS)dnl
3236
# Macro to add for using GNU gettext.
3237
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3240
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3242
AC_DEFUN(AM_KDE_GNU_GETTEXT,
3243
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3244
AC_REQUIRE([AC_PROG_RANLIB])dnl
3245
AC_REQUIRE([AC_HEADER_STDC])dnl
3246
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3247
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3248
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3249
AC_REQUIRE([AC_FUNC_MMAP])dnl
3250
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3251
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3252
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3253
__argz_count __argz_stringify __argz_next])
3255
AC_MSG_CHECKING(for stpcpy)
3256
AC_CACHE_VAL(kde_cv_func_stpcpy,
3258
kde_safe_cxxflags=$CXXFLAGS
3267
stpcpy(buffer, buffer);
3269
kde_cv_func_stpcpy=yes,
3270
kde_cv_func_stpcpy=no)
3272
CXXFLAGS=$kde_safe_cxxflags
3274
AC_MSG_RESULT($kde_cv_func_stpcpy)
3275
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3276
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3281
if test "x$CATOBJEXT" != "x"; then
3282
if test "x$ALL_LINGUAS" = "x"; then
3285
AC_MSG_CHECKING(for catalogs to be installed)
3287
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3288
case "$ALL_LINGUAS" in
3289
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3292
LINGUAS=$NEW_LINGUAS
3293
AC_MSG_RESULT($LINGUAS)
3296
dnl Construct list of names of catalog files to be constructed.
3297
if test -n "$LINGUAS"; then
3298
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3304
AC_DEFUN(AC_HAVE_XPM,
3305
[AC_REQUIRE_CPP()dnl
3306
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3308
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3309
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3311
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3312
xpm_test=$withval, xpm_test="yes")
3313
if test "x$xpm_test" = xno; then
3316
AC_MSG_CHECKING(for XPM)
3317
AC_CACHE_VAL(ac_cv_have_xpm,
3320
ac_save_ldflags="$LDFLAGS"
3321
ac_save_cflags="$CFLAGS"
3322
if test "x$kde_use_qt_emb" != "xyes"; then
3323
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3325
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3327
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3328
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3329
AC_TRY_LINK([#include <X11/xpm.h>],[],
3330
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3331
LDFLAGS="$ac_save_ldflags"
3332
CFLAGS="$ac_save_cflags"
3335
if test "$ac_cv_have_xpm" = no; then
3341
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3342
if test "$XPM_LDFLAGS" = ""; then
3343
XPMLIB='-lXpm $(LIB_X11)'
3345
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3347
if test "$XPM_INCLUDE" = ""; then
3350
XPMINC="-I$XPM_INCLUDE"
3360
AC_DEFUN(AC_HAVE_DPMS,
3361
[AC_REQUIRE_CPP()dnl
3362
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3364
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3365
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3368
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3369
dpms_test=$withval, dpms_test="yes")
3370
if test "x$dpms_test" = xno; then
3373
AC_MSG_CHECKING(for DPMS)
3374
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3375
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3376
AC_CACHE_VAL(ac_cv_have_dpms,
3378
if test "x$kde_use_qt_emb" = "xyes"; then
3380
ac_cv_have_dpms="no"
3383
ac_save_ldflags="$LDFLAGS"
3384
ac_save_cflags="$CFLAGS"
3385
ac_save_libs="$LIBS"
3386
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3387
CFLAGS="$CFLAGS $X_INCLUDES"
3388
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3390
#include <X11/Xproto.h>
3392
#include <X11/Xlib.h>
3393
#include <X11/extensions/dpms.h>
3395
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3396
ac_cv_have_dpms="yes", [
3397
LDFLAGS="$ac_save_ldflags"
3398
CFLAGS="$ac_save_cflags"
3399
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3400
LIBS="$LIBS -lXdpms"
3401
CFLAGS="$CFLAGS $X_INCLUDES"
3402
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3404
#include <X11/Xproto.h>
3406
#include <X11/Xlib.h>
3407
#include <X11/extensions/dpms.h>
3409
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3411
ac_cv_have_dpms="-lXdpms"
3412
],ac_cv_have_dpms="no")
3414
LDFLAGS="$ac_save_ldflags"
3415
CFLAGS="$ac_save_cflags"
3416
LIBS="$ac_save_libs"
3420
if test "$ac_cv_have_dpms" = no; then
3426
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3427
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3430
if test "$DPMS_LDFLAGS" = ""; then
3431
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3433
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3435
if test "$DPMS_INCLUDE" = ""; then
3438
DPMSINC="-I$DPMS_INCLUDE"
3448
AC_DEFUN(AC_HAVE_GL,
3449
[AC_REQUIRE_CPP()dnl
3450
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3452
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3453
test -z "$GL_INCLUDE" && GL_INCLUDE=
3455
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3456
gl_test=$withval, gl_test="yes")
3457
if test "x$kde_use_qt_emb" = "xyes"; then
3458
# GL and Qt Embedded is a no-go for now.
3460
elif test "x$gl_test" = xno; then
3463
AC_MSG_CHECKING(for GL)
3464
AC_CACHE_VAL(ac_cv_have_gl,
3468
ac_save_ldflags="$LDFLAGS"
3469
ac_save_cxxflags="$CXXFLAGS"
3470
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3471
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3472
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3473
CXXFLAGS="$CFLAGS $X_INCLUDES"
3474
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3475
AC_TRY_LINK([#include <GL/gl.h>
3478
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3479
if test "x$ac_cv_have_gl" = "xno"; then
3480
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3481
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3482
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3483
CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3484
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3485
AC_TRY_LINK([#include <GL/gl.h>
3488
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3491
LDFLAGS="$ac_save_ldflags"
3492
CXXFLAGS="$ac_save_cxxflags"
3495
if test "$ac_cv_have_gl" = "no"; then
3501
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3502
if test "$GL_LDFLAGS" = ""; then
3503
if test "$ac_cv_have_gl" = "mesa"; then
3504
GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3506
GLLIB='-lGLU -lGL $(LIB_X11)'
3509
if test "$ac_cv_have_gl" = "mesa"; then
3510
GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3512
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3515
if test "$GL_INCLUDE" = ""; then
3518
GLINC="-I$GL_INCLUDE"
3520
AC_MSG_RESULT($ac_cv_have_gl)
3529
dnl shadow password and PAM magic - maintained by ossi@kde.org
3532
AC_REQUIRE([KDE_CHECK_LIBDL])
3535
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3536
[ if test "x$withval" = "xyes"; then
3539
elif test "x$withval" = "xno"; then
3543
pam_service=$withval
3545
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3547
AC_CACHE_VAL(ac_cv_path_pam,
3549
AC_CHECK_LIB(pam, pam_start,
3550
[ AC_CHECK_HEADER(security/pam_appl.h,
3554
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3557
eval "$ac_cv_path_pam"
3559
AC_MSG_CHECKING(for PAM)
3560
if test "x$use_pam" = xno; then
3565
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3566
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3568
dnl test whether struct pam_message is const (Linux) or not (Sun)
3569
AC_MSG_CHECKING(for const pam_message)
3570
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
3571
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
3572
[AC_MSG_RESULT([const: Linux-type PAM])],
3573
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3574
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3576
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3582
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3583
AC_DEFUN(DEF_PAM_SERVICE, [
3585
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3586
[ if test "x$use_pam" = xyes; then
3587
$3_PAM_SERVICE="$withval"
3589
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3590
You may want to enforce it by using --with-pam.])
3593
[ if test "x$use_pam" = xyes; then
3594
$3_PAM_SERVICE="$pam_service"
3597
if test -n "$$3_PAM_SERVICE"; then
3598
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3599
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3601
AC_SUBST($3_PAM_SERVICE)
3604
AC_DEFUN(KDE_SHADOWPASSWD, [
3605
AC_REQUIRE([KDE_PAM])
3607
AC_CHECK_LIB(shadow, getspent,
3608
[ LIBSHADOW="-lshadow"
3612
AC_CHECK_LIB(gen, getspent,
3616
[ AC_CHECK_FUNC(getspent,
3617
[ ac_use_shadow=yes ],
3618
[ ac_use_shadow=no ])
3624
AC_MSG_CHECKING([for shadow passwords])
3627
[ --with-shadow If you want shadow password support ],
3628
[ if test "x$withval" != "xno"; then
3634
use_shadow="$ac_use_shadow"
3637
if test "x$use_shadow" = xyes; then
3639
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3646
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3647
dnl this still applies, if we could use it indirectly through pam.
3648
if test "x$use_shadow" = xyes ||
3649
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3651
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3652
SETUIDFLAGS="-m 4755 -o root";;
3654
SETUIDFLAGS="-m 4755";;
3657
AC_SUBST(SETUIDFLAGS)
3661
AC_DEFUN(KDE_PASSWDLIBS, [
3662
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3663
AC_REQUIRE([KDE_PAM])
3664
AC_REQUIRE([KDE_SHADOWPASSWD])
3666
if test "x$use_pam" = "xyes"; then
3667
PASSWDLIBS="$PAMLIBS"
3669
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3672
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3673
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3674
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3675
dnl may need to read /etc/master.passwd).
3678
SETUIDFLAGS="-m 4755 -o root"
3684
AC_SUBST(PASSWDLIBS)
3687
AC_DEFUN(KDE_CHECK_LIBDL,
3689
AC_CHECK_LIB(dl, dlopen, [
3691
ac_cv_have_dlfcn=yes
3694
AC_CHECK_LIB(dld, shl_unload, [
3696
ac_cv_have_shload=yes
3702
AC_DEFUN(KDE_CHECK_DLOPEN,
3705
AC_CHECK_HEADERS(dlfcn.h dl.h)
3706
if test "$ac_cv_header_dlfcn_h" = "no"; then
3710
if test "$ac_cv_header_dl_h" = "no"; then
3711
ac_cv_have_shload=no
3714
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3716
AC_ARG_ENABLE(dlopen,
3717
[ --disable-dlopen link statically [default=no]] ,
3718
enable_dlopen=$enableval,
3721
# override the user's opinion, if we know it better ;)
3722
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3726
if test "$ac_cv_have_dlfcn" = "yes"; then
3727
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3730
if test "$ac_cv_have_shload" = "yes"; then
3731
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3734
if test "$enable_dlopen" = no ; then
3735
test -n "$1" && eval $1
3737
test -n "$2" && eval $2
3742
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3744
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3746
AC_MSG_CHECKING([dynamic loading])
3747
eval "`egrep '^build_libtool_libs=' libtool`"
3748
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3750
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3754
AC_MSG_RESULT($dynamic_loading)
3755
if test "$dynamic_loading" = "yes"; then
3762
AC_DEFUN(KDE_ADD_INCLUDES,
3764
if test -z "$1"; then
3765
test_include="Pix.h"
3770
AC_MSG_CHECKING([for libg++ ($test_include)])
3772
AC_CACHE_VAL(kde_cv_libgpp_includes,
3774
kde_cv_libgpp_includes=no
3780
/usr/unsupported/include \
3785
if test -r "$ac_dir/$test_include"; then
3786
kde_cv_libgpp_includes=$ac_dir
3792
AC_MSG_RESULT($kde_cv_libgpp_includes)
3793
if test "$kde_cv_libgpp_includes" != "no"; then
3794
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3800
AC_DEFUN(KDE_CHECK_MICO,
3802
AC_REQUIRE([KDE_CHECK_LIBDL])
3803
AC_REQUIRE([KDE_MISC_TESTS])
3804
AC_MSG_CHECKING(for MICO)
3806
if test -z "$MICODIR"; then
3807
kde_micodir=/usr/local
3809
kde_micodir="$MICODIR"
3812
AC_ARG_WITH(micodir,
3813
[ --with-micodir=micodir where mico is installed ],
3814
kde_micodir=$withval,
3815
kde_micodir=$kde_micodir
3818
AC_CACHE_VAL(kde_cv_mico_incdir,
3820
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3821
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3824
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3826
if test ! -r $kde_micodir/include/CORBA.h; then
3827
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3830
AC_MSG_RESULT($kde_micodir)
3832
MICO_INCLUDES=-I$kde_micodir/include
3833
AC_SUBST(MICO_INCLUDES)
3834
MICO_LDFLAGS=-L$kde_micodir/lib
3835
AC_SUBST(MICO_LDFLAGS)
3836
micodir=$kde_micodir
3839
AC_MSG_CHECKING([for MICO version])
3840
AC_CACHE_VAL(kde_cv_mico_version,
3843
cat >conftest.$ac_ext <<EOF
3845
#include <mico/version.h>
3848
printf("MICO_VERSION=%s\n",MICO_VERSION);
3852
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3853
if AC_TRY_EVAL(ac_compile); then
3854
if eval `./conftest 2>&5`; then
3855
kde_cv_mico_version=$MICO_VERSION
3857
AC_MSG_ERROR([your system is not able to execute a small application to
3858
find MICO version! Check $kde_micodir/include/mico/version.h])
3861
AC_MSG_ERROR([your system is not able to compile a small application to
3862
find MICO version! Check $kde_micodir/include/mico/version.h])
3866
dnl installed MICO version
3867
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3868
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3869
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3871
if test "x$1" = "x"; then
3877
dnl required MICO version
3878
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3879
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3880
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3882
if test "$mico_v_maj" -lt "$req_v_maj" || \
3883
( test "$mico_v_maj" -eq "$req_v_maj" && \
3884
test "$mico_v_mid" -lt "$req_v_mid" ) || \
3885
( test "$mico_v_mid" -eq "$req_v_mid" && \
3886
test "$mico_v_min" -lt "$req_v_min" )
3889
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3890
at least is required. You should upgrade MICO.])
3892
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3895
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3897
if test -z "$IDL"; then
3898
IDL='$(kde_bindir)/cuteidl'
3901
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3902
AC_SUBST(IDL_DEPENDENCIES)
3904
idldir="\$(includedir)/idl"
3909
AC_DEFUN(KDE_CHECK_MINI_STL,
3911
AC_REQUIRE([KDE_CHECK_MICO])
3913
AC_MSG_CHECKING(if we use mico's mini-STL)
3914
AC_CACHE_VAL(kde_cv_have_mini_stl,
3918
kde_save_cxxflags="$CXXFLAGS"
3919
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3922
#include <mico/config.h>
3925
#ifdef HAVE_MINI_STL
3929
kde_cv_have_mini_stl=no,
3930
kde_cv_have_mini_stl=yes)
3931
CXXFLAGS="$kde_save_cxxflags"
3935
if test "x$kde_cv_have_mini_stl" = "xyes"; then
3947
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3949
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3950
AC_SUBST(LIBPTHREAD)
3953
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3955
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3956
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3958
if test "$kde_use_kernthreads" = "yes"; then
3959
ac_save_CXXFLAGS="$CXXFLAGS"
3960
ac_save_CFLAGS="$CFLAGS"
3961
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3962
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3963
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3964
CXXFLAGS="$ac_save_CXXFLAGS"
3965
CFLAGS="$ac_save_CFLAGS"
3966
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3967
kde_use_kernthreads=no
3969
dnl Add proper -I and -l statements
3970
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3971
if test "x$LIBPTHREAD" = "x"; then
3972
kde_use_kernthreads=no
3974
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3979
if test -z "$LIBPTHREAD"; then
3980
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
3984
AH_VERBATIM(__svr_define, [
3985
#if defined(__SVR4) && !defined(__svr4__)
3991
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3992
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3995
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3998
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3999
LIBPTHREAD="$LIBPTHREAD -lc_r"
4001
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4002
if test "$CXX" = "KCC"; then
4003
CXXFLAGS="$CXXFLAGS --thread_safe"
4004
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4010
AC_SUBST(USE_THREADS)
4011
AC_SUBST(LIBPTHREAD)
4014
AC_DEFUN(KDE_CHECK_THREADING,
4016
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4017
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4018
dnl default is yes if libpthread is found and no if no libpthread is available
4019
if test -z "$LIBPTHREAD"; then
4020
if test -z "$USE_THREADS"; then
4021
kde_check_threading_default=no
4023
kde_check_threading_default=yes
4026
kde_check_threading_default=yes
4028
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
4029
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4030
if test "x$kde_use_threading" = "xyes"; then
4031
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4035
AC_DEFUN(KDE_TRY_LINK_PYTHON,
4037
if test "$kde_python_link_found" = no; then
4039
if test "$1" = normal; then
4040
AC_MSG_CHECKING(if a Python application links)
4042
AC_MSG_CHECKING(if Python depends on $2)
4045
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4049
kde_save_cflags="$CFLAGS"
4050
CFLAGS="$CFLAGS $PYTHONINC"
4051
kde_save_libs="$LIBS"
4052
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4053
kde_save_ldflags="$LDFLAGS"
4054
LDFLAGS="$LDFLAGS $PYTHONLIB"
4060
PySys_SetArgv(1, 0);
4062
[kde_cv_try_link_python_$1=yes],
4063
[kde_cv_try_link_python_$1=no]
4065
CFLAGS="$kde_save_cflags"
4066
LIBS="$kde_save_libs"
4067
LDFLAGS="$kde_save_ldflags"
4070
if test "$kde_cv_try_link_python_$1" = "yes"; then
4072
kde_python_link_found=yes
4073
if test ! "$1" = normal; then
4074
LIBPYTHON="$LIBPYTHON $2"
4087
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
4089
AC_MSG_CHECKING([for Python directory])
4091
AC_CACHE_VAL(kde_cv_pythondir,
4093
if test -z "$PYTHONDIR"; then
4094
kde_cv_pythondir=/usr/local
4096
kde_cv_pythondir="$PYTHONDIR"
4100
AC_ARG_WITH(pythondir,
4101
[ --with-pythondir=pythondir use python installed in pythondir ],
4103
ac_python_dir=$withval
4104
], ac_python_dir=$kde_cv_pythondir
4107
AC_MSG_RESULT($ac_python_dir)
4110
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
4112
AC_REQUIRE([KDE_CHECK_LIBDL])
4113
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4114
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4116
if test -z "$1"; then
4122
AC_MSG_CHECKING([for Python$version])
4124
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4125
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4126
if test ! -r $python_incdir/Python.h; then
4127
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4128
python_incdir=$python_incdir/python$version
4129
if test ! -r $python_incdir/Python.h; then
4134
PYTHONINC=-I$python_incdir
4136
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4137
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4138
if test ! -r $python_libdir/libpython$version.a; then
4139
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4140
python_libdir=$python_libdir/python$version/config
4141
if test ! -r $python_libdir/libpython$version.a; then
4146
PYTHONLIB=-L$python_libdir
4147
kde_orig_LIBPYTHON=$LIBPYTHON
4148
if test -z "$LIBPYTHON"; then
4149
LIBPYTHON=-lpython$version
4152
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4153
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4154
python_moddir=$python_moddir/python$version
4155
if test ! -r $python_moddir/copy.py; then
4159
PYTHONMODDIR=$python_moddir
4161
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4163
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4164
LIBPYTHON=$kde_orig_LIBPYTHON
4165
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4166
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4169
dnl Note: this test is very weak
4170
kde_python_link_found=no
4171
KDE_TRY_LINK_PYTHON(normal)
4172
KDE_TRY_LINK_PYTHON(m, -lm)
4173
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4174
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4175
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4176
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4177
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4178
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4179
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4180
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4181
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4182
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4183
[AC_MSG_WARN([it seems, Python depends on another library.
4184
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4185
and contact the authors to let them know about this problem])
4188
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4192
AC_SUBST(PYTHONMODDIR)
4193
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4199
AC_DEFUN(KDE_CHECK_PYTHON,
4201
KDE_CHECK_PYTHON_INTERN("2.3",
4202
[KDE_CHECK_PYTHON_INTERN("2.2",
4203
[KDE_CHECK_PYTHON_INTERN("2.1",
4204
[KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
4208
AC_DEFUN(KDE_CHECK_STL_SGI,
4210
AC_MSG_CHECKING([if STL implementation is SGI like])
4211
AC_CACHE_VAL(kde_cv_stl_type_sgi,
4215
using namespace std;
4217
string astring="Hallo Welt.";
4218
astring.erase(0, 6); // now astring is "Welt"
4220
], kde_cv_stl_type_sgi=yes,
4221
kde_cv_stl_type_sgi=no)
4224
AC_MSG_RESULT($kde_cv_stl_type_sgi)
4226
if test "$kde_cv_stl_type_sgi" = "yes"; then
4227
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4231
AC_DEFUN(KDE_CHECK_STL_HP,
4233
AC_MSG_CHECKING([if STL implementation is HP like])
4234
AC_CACHE_VAL(kde_cv_stl_type_hp,
4238
using namespace std;
4240
string astring="Hello World";
4241
astring.remove(0, 6); // now astring is "World"
4243
], kde_cv_stl_type_hp=yes,
4244
kde_cv_stl_type_hp=no)
4246
AC_MSG_RESULT($kde_cv_stl_type_hp)
4248
if test "$kde_cv_stl_type_hp" = "yes"; then
4249
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
4253
AC_DEFUN(KDE_CHECK_STL,
4257
ac_save_CXXFLAGS="$CXXFLAGS"
4258
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4261
if test "$kde_cv_stl_type_sgi" = "no"; then
4264
if test "$kde_cv_stl_type_hp" = "no"; then
4265
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
4269
CXXFLAGS="$ac_save_CXXFLAGS"
4273
AC_DEFUN(AC_FIND_QIMGIO,
4274
[AC_REQUIRE([AC_FIND_JPEG])
4275
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4276
AC_MSG_CHECKING([for qimgio])
4277
AC_CACHE_VAL(ac_cv_lib_qimgio,
4281
ac_save_LIBS="$LIBS"
4282
ac_save_CXXFLAGS="$CXXFLAGS"
4283
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4284
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4287
#include <qimageio.h>
4288
#include <qstring.h>
4290
QString t = "hallo";
4295
ac_cv_lib_qimgio=yes,
4296
ac_cv_lib_qimgio=no,
4297
ac_cv_lib_qimgio=no)
4298
LIBS="$ac_save_LIBS"
4299
CXXFLAGS="$ac_save_CXXFLAGS"
4302
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4303
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4305
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4308
AC_MSG_RESULT(not found)
4312
AC_DEFUN(KDE_CHECK_ANSI,
4316
AC_DEFUN(KDE_CHECK_INSURE,
4318
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4320
if test $enableval = "no"; dnl
4321
then ac_use_insure="no"
4322
else ac_use_insure="yes"
4324
], [ac_use_insure="no"])
4326
AC_MSG_CHECKING(if we will use Insure++ to debug)
4327
AC_MSG_RESULT($ac_use_insure)
4328
if test "$ac_use_insure" = "yes"; dnl
4329
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4333
AC_DEFUN(AM_DISABLE_LIBRARIES,
4335
AC_PROVIDE([AM_ENABLE_STATIC])
4336
AC_PROVIDE([AM_ENABLE_SHARED])
4342
AC_DEFUN(AC_CHECK_UTMP_FILE,
4344
AC_MSG_CHECKING([for utmp file])
4346
AC_CACHE_VAL(kde_cv_utmp_file,
4357
if test -r "$ac_file"; then
4358
kde_cv_utmp_file=$ac_file
4364
if test "$kde_cv_utmp_file" != "no"; then
4365
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4367
AC_MSG_RESULT($kde_cv_utmp_file)
4370
AC_MSG_RESULT([non found])
4375
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4378
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4380
if test ! -s $srcdir/subdirs; then
4381
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4383
files=`cd $srcdir && ls -1`
4384
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4386
echo $i >> $srcdir/subdirs
4390
if test -s $srcdir/inst-apps; then
4391
ac_topsubdirs="`cat $srcdir/inst-apps`"
4393
ac_topsubdirs="`cat $srcdir/subdirs`"
4396
for i in $ac_topsubdirs; do
4397
AC_MSG_CHECKING([if $i should be compiled])
4398
if test -d $srcdir/$i; then
4400
for j in $DO_NOT_COMPILE; do
4401
if test $i = $j; then
4408
AC_MSG_RESULT($install_it)
4409
vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4410
if test $install_it = "yes"; then
4411
TOPSUBDIRS="$TOPSUBDIRS $i"
4412
eval "$vari""_SUBDIR_included=yes"
4414
eval "$vari""_SUBDIR_included=no"
4418
AC_SUBST(TOPSUBDIRS)
4421
AC_DEFUN(KDE_CHECK_NAMESPACES,
4423
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4437
int Foo::Bar::i = 1;
4440
AC_DEFINE(HAVE_NAMESPACES)
4447
AC_DEFUN(KDE_CHECK_NEWLIBS,
4452
dnl ------------------------------------------------------------------------
4453
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4454
dnl ------------------------------------------------------------------------
4456
AC_DEFUN(AC_CHECK_S_ISSOCK,
4458
AC_MSG_CHECKING(for S_ISSOCK)
4459
AC_CACHE_VAL(ac_cv_have_s_issock,
4465
#include <sys/stat.h>
4469
int b = S_ISSOCK( buff.st_mode );
4471
ac_cv_have_s_issock=yes,
4472
ac_cv_have_s_issock=no)
4475
AC_MSG_RESULT($ac_cv_have_s_issock)
4476
if test "$ac_cv_have_s_issock" = "yes"; then
4477
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4480
AH_VERBATIM(_ISSOCK,
4482
#ifndef HAVE_S_ISSOCK
4483
#define HAVE_S_ISSOCK
4484
#define S_ISSOCK(mode) (1==0)
4490
dnl ------------------------------------------------------------------------
4491
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4492
dnl ------------------------------------------------------------------------
4494
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4496
AC_MSG_CHECKING(for MAXPATHLEN)
4497
AC_CACHE_VAL(ac_cv_maxpathlen,
4500
cat > conftest.$ac_ext <<EOF
4502
# include <stdlib.h>
4505
#include <sys/param.h>
4507
#define MAXPATHLEN 1024
4510
KDE_HELLO MAXPATHLEN
4514
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4516
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4517
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4519
ac_cv_maxpathlen=1024
4525
AC_MSG_RESULT($ac_cv_maxpathlen)
4526
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4529
dnl -------------------------------------------------------------------------
4530
dnl See if the compiler supports a template repository bero@redhat.de
4531
dnl -------------------------------------------------------------------------
4532
AC_DEFUN(KDE_COMPILER_REPO,
4537
KDE_CHECK_COMPILER_FLAG(frepo,
4543
if test -z "$REPO"; then
4544
KDE_CHECK_COMPILER_FLAG(instances=explicit,
4546
REPO="-instances=explicit"
4547
NOREPO="-instances=extern"
4551
if test -n "$REPO"; then
4552
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
4553
[C++ compiler supports template repository])
4561
AC_DEFUN(KDE_CHECK_HEADER,
4564
kde_safe_cppflags=$CPPFLAGS
4565
CPPFLAGS="$CPPFLAGS $all_includes"
4567
AC_CHECK_HEADER($1, $2, $3, $4)
4568
CPPFLAGS=$kde_safe_cppflags
4572
AC_DEFUN(KDE_CHECK_HEADERS,
4574
AH_CHECK_HEADERS([$1])
4576
kde_safe_cppflags=$CPPFLAGS
4577
CPPFLAGS="$CPPFLAGS $all_includes"
4579
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4580
CPPFLAGS=$kde_safe_cppflags
4584
AC_DEFUN(KDE_FAST_CONFIGURE,
4586
dnl makes configure fast (needs perl)
4587
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4588
with_fast_perl=$enableval, with_fast_perl=yes)
4591
AC_DEFUN(KDE_CONF_FILES,
4594
if test -f $srcdir/configure.files ; then
4595
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4598
if test -n "$val" ; then
4600
CONF_FILES="$CONF_FILES $i"
4603
AC_SUBST(CONF_FILES)
4606
AC_DEFUN(KDE_SET_PREFIX,
4609
dnl make $KDEDIR the default for the installation
4610
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4612
if test "x$prefix" = "xNONE"; then
4613
prefix=$ac_default_prefix
4614
ac_configure_args="$ac_configure_args --prefix=$prefix"
4616
# And delete superflous '/' to make compares easier
4617
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4618
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4623
pushdef([AC_PROG_INSTALL],
4625
dnl our own version, testing for a -p flag
4626
popdef([AC_PROG_INSTALL])
4627
dnl as AC_PROG_INSTALL works as it works we first have
4628
dnl to save if the user didn't specify INSTALL, as the
4629
dnl autoconf one overwrites INSTALL and we have no chance to find
4631
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4632
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4633
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4636
if test -z "$kde_save_INSTALL_given" ; then
4637
# OK, user hasn't given any INSTALL, autoconf found one for us
4638
# now we test, if it supports the -p flag
4639
AC_MSG_CHECKING(for -p flag to install)
4640
rm -f confinst.$$.* > /dev/null 2>&1
4641
echo "Testtest" > confinst.$$.orig
4643
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4644
if test -f confinst.$$.new ; then
4645
# OK, -p seems to do no harm to install
4646
INSTALL="${INSTALL} -p"
4651
AC_MSG_RESULT($ac_res)
4653
dnl the following tries to resolve some signs and wonders coming up
4654
dnl with different autoconf/automake versions
4656
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4657
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4658
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4659
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4660
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4661
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4662
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4663
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4664
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4665
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4666
dnl automake (due to broken Makefile.am or whatever) to install programs,
4667
dnl and so does not see the -s flag in automake > 1.4
4668
dnl to clean up that mess we:
4669
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4670
dnl which cleans KDE's program with automake > 1.4;
4671
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4672
dnl with automake<=1.4
4673
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4674
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4676
dnl And to all this comes, that I even can't write in comments variable
4677
dnl names used by automake, because it is so stupid to think I wanted to
4678
dnl _use_ them, therefor I have written A_M_... instead of AM_
4679
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4681
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4682
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4684
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4685
INSTALL_SCRIPT='${INSTALL}'
4689
AC_DEFUN(KDE_LANG_CPLUSPLUS,
4691
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4692
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4695
pushdef([AC_LANG_CPLUSPLUS],
4696
[popdef([AC_LANG_CPLUSPLUS])
4700
AC_DEFUN(KDE_CHECK_LONG_LONG,
4702
AC_MSG_CHECKING(for long long)
4703
AC_CACHE_VAL(kde_cv_c_long_long,
4711
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4714
AC_MSG_RESULT($kde_cv_c_long_long)
4715
if test "$kde_cv_c_long_long" = yes; then
4716
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4720
AC_DEFUN(KDE_CHECK_LIB,
4722
kde_save_LDFLAGS="$LDFLAGS"
4723
dnl AC_CHECK_LIB modifies LIBS, so save it here
4724
kde_save_LIBS="$LIBS"
4725
LDFLAGS="$LDFLAGS $all_libraries"
4727
aix*) LDFLAGS="-brtl $LDFLAGS"
4728
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4731
AC_CHECK_LIB($1, $2, $3, $4, $5)
4732
LDFLAGS="$kde_save_LDFLAGS"
4733
LIBS="$kde_save_LIBS"
4736
AC_DEFUN(KDE_JAVA_PREFIX,
4739
base=`basename "$1"`
4740
list=`ls -1 $dir 2> /dev/null`
4741
for entry in $list; do
4742
if test -d $dir/$entry/bin; then
4745
javadirs="$javadirs $dir/$entry/bin"
4748
elif test -d $dir/$entry/jre/bin; then
4751
javadirs="$javadirs $dir/$entry/jre/bin"
4758
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4759
AC_DEFUN(KDE_CHECK_JAVA_DIR,
4763
[ --with-java=javadir use java installed in javadir, --without-java disables ],
4764
[ ac_java_dir=$withval
4768
AC_MSG_CHECKING([for Java])
4770
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4771
if test "x$ac_java_dir" = "xno"; then
4773
kde_java_includedir=no
4774
kde_java_libjvmdir=no
4775
kde_java_libhpidir=no
4777
if test "x$ac_java_dir" = "x"; then
4780
dnl No option set -> look in $PATH
4781
KDE_JAVA_PREFIX(/usr/j2se)
4782
KDE_JAVA_PREFIX(/usr/j*dk*)
4783
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4784
KDE_JAVA_PREFIX(/opt/j*sdk*)
4785
KDE_JAVA_PREFIX(/usr/lib/java*)
4786
KDE_JAVA_PREFIX(/usr/java*)
4787
KDE_JAVA_PREFIX(/usr/java/j*dk*)
4788
KDE_JAVA_PREFIX(/usr/java/j*re*)
4789
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4790
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4791
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4792
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4793
KDE_JAVA_PREFIX(/opt/java*)
4798
for dir in $PATH; do
4799
javadirs="$javadirs $dir"
4804
for dir in $javadirs; do
4805
if test ! -d $dir; then break; fi
4806
if test -x "$dir/java"; then
4807
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4808
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4809
jredirs="$jredirs $dir"
4816
for dir in $jredirs; do
4818
kde_java_bindir=$dir
4819
if test -x "$dir/javac"; then
4825
if test -n "$JAVAC"; then
4826
dnl this substitution might not work - well, we test for jni.h below
4827
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4829
kde_java_includedir=no
4832
dnl config option set
4833
kde_java_bindir=$ac_java_dir/bin
4834
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4835
kde_java_includedir=no
4837
kde_java_includedir=$ac_java_dir/include
4842
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4843
if test "x$kde_java_bindir" != "xno"; then
4845
dnl Look for libjvm.so
4846
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4847
dnl Look for libhpi.so and avoid green threads
4848
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4850
dnl Now check everything's fine under there
4851
dnl the include dir is our flag for having the JDK
4852
if test -d "$kde_java_includedir"; then
4853
if test ! -x "$kde_java_bindir/javac"; then
4854
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4856
if test ! -x "$kde_java_bindir/javah"; then
4857
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4859
if test ! -x "$kde_java_bindir/jar"; then
4860
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4862
if test ! -r "$kde_java_includedir/jni.h"; then
4863
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4866
jni_includes="-I$kde_java_includedir"
4867
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4868
dnl and under linux here..
4869
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4870
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4871
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4878
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4879
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4882
if test ! -x "$kde_java_bindir/java"; then
4883
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4886
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4887
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4890
if test -n "$jni_includes"; then
4891
dnl Check for JNI version
4894
ac_cxxflags_safe="$CXXFLAGS"
4895
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4901
#ifndef JNI_VERSION_1_2
4904
],[ kde_jni_works=yes ],
4905
[ kde_jni_works=no ])
4907
if test $kde_jni_works = no; then
4908
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4909
You need to have Java Development Kit (JDK) version 1.2.
4911
Use --with-java to specify another location.
4912
Use --without-java to configure without java support.
4913
Or download a newer JDK and try again.
4914
See e.g. http://java.sun.com/products/jdk/1.2 ])
4917
CXXFLAGS="$ac_cxxflags_safe"
4920
dnl All tests ok, inform and subst the variables
4922
JAVAC=$kde_java_bindir/javac
4923
JAVAH=$kde_java_bindir/javah
4924
JAR=$kde_java_bindir/jar
4925
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4926
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4927
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4930
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4931
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4934
AC_MSG_RESULT([none found])
4941
AC_SUBST(jni_includes)
4943
# for backward compat
4944
kde_cv_java_includedir=$kde_java_includedir
4945
kde_cv_java_bindir=$kde_java_bindir
4948
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4949
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4950
dnl big packages, m4_foreach is dog-slow. So use our own version of
4951
dnl it. (matz@kde.org)
4952
m4_define([mm_foreach],
4953
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4954
m4_define([mm_car], [[$1]])
4955
m4_define([mm_car2], [[$@]])
4956
m4_define([_mm_foreach],
4957
[m4_if(m4_quote($2), [], [],
4958
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
4959
mm_car2(m4_shift($2)),
4961
m4_define([AC_FOREACH],
4962
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4964
AC_DEFUN(KDE_NEED_FLEX,
4967
LIBS="$LIBS $USER_LDFLAGS"
4970
if test -z "$LEXLIB"; then
4971
AC_MSG_ERROR([You need to have flex installed.])
4976
AC_DEFUN(AC_PATH_QTOPIA,
4978
dnl TODO: use AC_CACHE_VAL
4980
if test -z "$1"; then
4985
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4986
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4987
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4990
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4991
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4993
AC_REQUIRE([AC_PATH_QT])
4995
AC_MSG_CHECKING([for Qtopia])
4998
AC_SUBST(LIB_QTOPIA)
5000
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5004
AC_ARG_WITH(qtopia-dir,
5005
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
5006
[ ac_qtopia_incdir="$withval"/include] )
5009
for dir in $kde_qtopia_dirs; do
5010
qtopia_incdirs="$qtopia_incdirs $dir/include"
5013
if test ! "$ac_qtopia_incdir" = "NO"; then
5014
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5018
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5019
ac_qtopia_incdir="$qtopia_incdir"
5021
if test -z "$qtopia_incdir"; then
5022
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5025
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5026
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5027
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5029
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5030
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5031
if test "$qtopia_ver" -lt "$qtopia_minver"; then
5032
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5039
ac_cxxflags_safe="$CXXFLAGS"
5040
ac_ldflags_safe="$LDFLAGS"
5041
ac_libs_safe="$LIBS"
5043
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5044
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5045
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5047
cat > conftest.$ac_ext <<EOF
5048
#include "confdefs.h"
5049
#include <qpe/qpeapplication.h>
5050
#include <qpe/version.h>
5052
int main( int argc, char **argv )
5054
QPEApplication app( argc, argv );
5059
if AC_TRY_EVAL(ac_link) && test -s conftest; then
5063
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5064
the end of config.log])
5067
CXXFLAGS="$ac_cxxflags_safe"
5068
LDFLAGS="$ac_ldflags_safe"
5069
LIBS="$ac_libs_safe"
5073
QTOPIA_INCLUDES="-I$qtopia_incdir"
5074
AC_SUBST(QTOPIA_INCLUDES)
5076
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5080
AC_DEFUN(KDE_INIT_DOXYGEN,
5082
AC_MSG_CHECKING([for Qt docs])
5084
if test "${with_qt_dir+set}" = set; then
5085
kde_qtdir="$with_qt_dir"
5088
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html ], QTDOCDIR)
5089
AC_MSG_RESULT($QTDOCDIR)
5093
KDE_FIND_PATH(dot, DOT, [], [])
5094
if test -n "$DOT"; then
5099
AC_SUBST(KDE_HAVE_DOT)
5100
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5103
DOXYGEN_PROJECT_NAME="$1"
5104
DOXYGEN_PROJECT_NUMBER="$2"
5105
AC_SUBST(DOXYGEN_PROJECT_NAME)
5106
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5109
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5112
AC_SUBST(KDE_HAS_DOXYGEN)
5117
AC_DEFUN(AC_FIND_BZIP2,
5119
AC_MSG_CHECKING([for bzDecompress in libbz2])
5120
AC_CACHE_VAL(ac_cv_lib_bzip2,
5123
kde_save_LIBS="$LIBS"
5124
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5125
kde_save_CFLAGS="$CFLAGS"
5126
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5132
[ bz_stream s; (void) bzDecompress(&s); ],
5133
eval "ac_cv_lib_bzip2='-lbz2'",
5134
eval "ac_cv_lib_bzip2=no")
5135
LIBS="$kde_save_LIBS"
5136
CFLAGS="$kde_save_CFLAGS"
5138
AC_MSG_RESULT($ac_cv_lib_bzip2)
5140
if test ! "$ac_cv_lib_bzip2" = no; then
5143
LIBBZ2="$ac_cv_lib_bzip2"
5150
KDE_CHECK_COMPILER_FLAG(shared, [
5151
ld_shared_flag="-shared"
5153
KDE_CHECK_COMPILER_FLAG(fPIC, [
5154
cxx_shared_flag="-fPIC"
5157
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5158
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5161
kde_save_LIBS="$LIBS"
5162
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5163
kde_save_CXXFLAGS="$CXXFLAGS"
5164
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5171
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5172
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5173
eval "ac_cv_lib_bzip2_prefix=no")
5174
LIBS="$kde_save_LIBS"
5175
CXXFLAGS="$kde_save_CXXFLAGS"
5178
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5182
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5185
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5188
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5189
dnl else, we just ignore this
5193
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5196
dnl ------------------------------------------------------------------------
5197
dnl Try to find the SSL headers and libraries.
5198
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5199
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5200
dnl ------------------------------------------------------------------------
5202
AC_DEFUN(KDE_CHECK_SSL,
5204
LIBSSL="-lssl -lcrypto"
5205
AC_REQUIRE([KDE_CHECK_LIB64])
5207
ac_ssl_includes=NO ac_ssl_libraries=NO
5210
AC_ARG_WITH(ssl-dir,
5211
[ --with-ssl-dir=DIR where the root of OpenSSL is installed],
5212
[ ac_ssl_includes="$withval"/include
5213
ac_ssl_libraries="$withval"/lib$kdelibsuff
5218
[ --without-ssl disable SSL checks],
5219
[want_ssl=$withval])
5221
if test $want_ssl = yes; then
5223
AC_MSG_CHECKING(for OpenSSL)
5225
AC_CACHE_VAL(ac_cv_have_ssl,
5226
[#try to guess OpenSSL locations
5228
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5229
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5230
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5231
ac_ssl_includes="$ssl_incdir"
5233
ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
5234
if test ! "$ac_ssl_libraries" = "NO"; then
5235
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5240
for dir in $ssl_libdirs; do
5241
try="ls -1 $dir/libssl*"
5242
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5245
ac_ssl_libraries="$ssl_libdir"
5250
ac_cflags_safe="$CFLAGS"
5251
ac_ldflags_safe="$LDFLAGS"
5252
ac_libs_safe="$LIBS"
5254
CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
5255
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5256
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5258
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5264
CFLAGS="$ac_cflags_safe"
5265
LDFLAGS="$ac_ldflags_safe"
5266
LIBS="$ac_libs_safe"
5270
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5278
eval "$ac_cv_have_ssl"
5280
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5282
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5283
AC_MSG_RESULT($ac_ssl_rsaref)
5285
AC_MSG_CHECKING([for easter eggs])
5286
AC_MSG_RESULT([none found])
5292
if test "$have_ssl" = yes; then
5293
AC_MSG_CHECKING(for OpenSSL version)
5294
dnl Check for SSL version
5295
AC_CACHE_VAL(ac_cv_ssl_version,
5300
cat >conftest.$ac_ext <<EOF
5301
#include <openssl/opensslv.h>
5305
#ifndef OPENSSL_VERSION_NUMBER
5306
printf("ssl_version=\\"error\\"\n");
5308
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5309
printf("ssl_version=\\"old\\"\n");
5311
printf("ssl_version=\\"ok\\"\n");
5317
ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
5318
if AC_TRY_EVAL(ac_compile); then
5320
if eval `./conftest 2>&5`; then
5321
if test $ssl_version = error; then
5322
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5324
if test $ssl_version = old; then
5325
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5329
ac_cv_ssl_version="ssl_version=$ssl_version"
5331
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5332
Check config.log, and if you can't figure it out, send a mail to
5333
David Faure <faure@kde.org>, attaching your config.log])
5337
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5338
Check config.log, and if you can't figure it out, send a mail to
5339
David Faure <faure@kde.org>, attaching your config.log])
5346
eval "$ac_cv_ssl_version"
5347
AC_MSG_RESULT($ssl_version)
5350
if test "$have_ssl" != yes; then
5353
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5354
ac_cv_have_ssl="have_ssl=yes \
5355
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5358
ssl_libraries="$ac_ssl_libraries"
5359
ssl_includes="$ac_ssl_includes"
5361
if test "$ac_ssl_rsaref" = yes; then
5362
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5365
if test $ssl_version = "old"; then
5366
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5370
if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
5373
SSL_INCLUDES="-I$ssl_includes"
5376
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
5379
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5382
AC_SUBST(SSL_INCLUDES)
5383
AC_SUBST(SSL_LDFLAGS)
5387
AC_DEFUN(KDE_CHECK_STRLCPY,
5391
AC_CHECK_SIZEOF(size_t)
5392
AC_CHECK_SIZEOF(unsigned long)
5394
AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)])
5396
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5399
],[AC_MSG_RESULT([yes])],[
5402
Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long)
5403
does not apply. Please mail kde-devel@kde.org with a description of your system!
5408
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5410
# serial 47 AC_PROG_LIBTOOL
5414
AC_DEFUN([AC_PROG_LIBTOOL],
5415
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5416
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5417
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5418
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5420
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5423
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5424
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5425
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5426
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5428
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5430
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5432
[ifdef([AC_PROG_GCJ],
5433
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5434
ifdef([A][M_PROG_GCJ],
5435
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5436
ifdef([LT_AC_PROG_GCJ],
5437
[define([LT_AC_PROG_GCJ],
5438
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5439
])])# AC_PROG_LIBTOOL
5444
AC_DEFUN([_AC_PROG_LIBTOOL],
5445
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5446
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5447
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5449
# This can be used to rebuild libtool when needed
5450
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5452
# Always use our own libtool.
5453
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5454
AC_SUBST(LIBTOOL)dnl
5456
# Prevent multiple expansion
5457
define([AC_PROG_LIBTOOL], [])
5458
])# _AC_PROG_LIBTOOL
5463
AC_DEFUN([AC_LIBTOOL_SETUP],
5465
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5466
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5467
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5468
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5469
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5470
AC_REQUIRE([AC_PROG_CC])dnl
5471
AC_REQUIRE([AC_PROG_LD])dnl
5472
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5473
AC_REQUIRE([AC_PROG_NM])dnl
5474
AC_REQUIRE([LT_AC_PROG_SED])dnl
5476
AC_REQUIRE([AC_PROG_LN_S])dnl
5477
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5478
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5479
AC_REQUIRE([AC_OBJEXT])dnl
5480
AC_REQUIRE([AC_EXEEXT])dnl
5483
AC_LIBTOOL_SYS_MAX_CMD_LEN
5484
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5487
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5488
_LT_AC_PROG_ECHO_BACKSLASH
5492
# AIX sometimes has problems with the GCC collect2 program. For some
5493
# reason, if we set the COLLECT_NAMES environment variable, the problems
5494
# vanish in a puff of smoke.
5495
if test "X${COLLECT_NAMES+set}" != Xset; then
5497
export COLLECT_NAMES
5502
# Sed substitution that helps us do robust quoting. It backslashifies
5503
# metacharacters that are still active within double-quoted strings.
5504
Xsed='sed -e s/^X//'
5505
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5507
# Same as above, but do not quote variable references.
5508
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5510
# Sed substitution to delay expansion of an escaped shell variable in a
5511
# double_quote_subst'ed string.
5512
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5514
# Sed substitution to avoid accidental globbing in evaled expressions
5515
no_glob_subst='s/\*/\\\*/g'
5521
default_ofile=libtool
5522
can_build_shared=yes
5524
# All known linkers require a `.a' archive for static linking (except M$VC,
5525
# which needs '.lib').
5527
ltmain="$ac_aux_dir/ltmain.sh"
5528
ofile="$default_ofile"
5529
with_gnu_ld="$lt_cv_prog_gnu_ld"
5531
AC_CHECK_TOOL(RANLIB, ranlib, :)
5532
AC_CHECK_TOOL(STRIP, strip, :)
5535
old_CFLAGS="$CFLAGS"
5537
# Set sane defaults for various variables
5538
test -z "$AR" && AR=ar
5539
test -z "$AR_FLAGS" && AR_FLAGS=cru
5540
test -z "$AS" && AS=as
5541
test -z "$CC" && CC=cc
5542
test -z "$LTCC" && LTCC=$CC
5543
test -z "$DLLTOOL" && DLLTOOL=dlltool
5544
test -z "$LD" && LD=ld
5545
test -z "$LN_S" && LN_S="ln -s"
5546
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5547
test -z "$NM" && NM=nm
5548
test -z "$SED" && SED=sed
5549
test -z "$OBJDUMP" && OBJDUMP=objdump
5550
test -z "$RANLIB" && RANLIB=:
5551
test -z "$STRIP" && STRIP=:
5552
test -z "$ac_objext" && ac_objext=o
5554
# Determine commands to create old-style static archives.
5555
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5556
old_postinstall_cmds='chmod 644 $oldlib'
5557
old_postuninstall_cmds=
5559
if test -n "$RANLIB"; then
5562
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5565
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5568
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5571
# Only perform the check for file, if the check method requires it
5572
case $deplibs_check_method in
5574
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5580
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5581
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5582
enable_win32_dll=yes, enable_win32_dll=no)
5584
AC_ARG_ENABLE([libtool-lock],
5585
[AC_HELP_STRING([--disable-libtool-lock],
5586
[avoid locking (might break parallel builds)])])
5587
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5590
[AC_HELP_STRING([--with-pic],
5591
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5592
[pic_mode="$withval"],
5594
test -z "$pic_mode" && pic_mode=default
5596
# Use C for the default configuration in the libtool script
5598
AC_LIBTOOL_LANG_C_CONFIG
5600
])# AC_LIBTOOL_SETUP
5603
# _LT_AC_SYS_COMPILER
5604
# -------------------
5605
AC_DEFUN([_LT_AC_SYS_COMPILER],
5606
[AC_REQUIRE([AC_PROG_CC])dnl
5608
# If no C compiler was specified, use CC.
5611
# Allow CC to be a program name with arguments.
5614
])# _LT_AC_SYS_COMPILER
5617
# _LT_AC_SYS_LIBPATH_AIX
5618
# ----------------------
5619
# Links a minimal program and checks the executable
5620
# for the system default hardcoded library path. In most cases,
5621
# this is /usr/lib:/lib, but when the MPI compilers are used
5622
# the location of the communication and MPI libs are included too.
5623
# If we don't find anything, use the default library path according
5624
# to the aix ld manual.
5625
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5626
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5627
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5629
# Check for a 64-bit object if we didn't find anything.
5630
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; }
5632
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5633
])# _LT_AC_SYS_LIBPATH_AIX
5636
# _LT_AC_PROG_ECHO_BACKSLASH
5637
# --------------------------
5638
# Add some code to the start of the generated configure script which
5639
# will find an echo command which doesn't interpret backslashes.
5640
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5641
[ifdef([AC_DIVERSION_NOTICE],
5642
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5643
[AC_DIVERT_PUSH(NOTICE)])
5645
# Check that we are running under the correct shell.
5646
SHELL=${CONFIG_SHELL-/bin/sh}
5650
# Remove one level of quotation (which was required for Make).
5651
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5656
if test "X[$]1" = X--no-reexec; then
5657
# Discard the --no-reexec flag, and continue.
5659
elif test "X[$]1" = X--fallback-echo; then
5660
# Avoid inline document here, it may be left over
5662
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5663
# Yippee, $echo works!
5666
# Restart under the correct shell.
5667
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5670
if test "X[$]1" = X--fallback-echo; then
5671
# used as fallback echo
5679
# The HP-UX ksh and POSIX shell print the target directory to stdout
5681
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5683
if test -z "$ECHO"; then
5684
if test "X${echo_test_string+set}" != Xset; then
5685
# find a string as large as possible, as long as the shell can cope with it
5686
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5687
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5688
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5689
echo_test_string="`eval $cmd`" &&
5690
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5697
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5698
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5699
test "X$echo_testing_string" = "X$echo_test_string"; then
5702
# The Solaris, AIX, and Digital Unix default echo programs unquote
5703
# backslashes. This makes it impossible to quote backslashes using
5704
# echo "$something" | sed 's/\\/\\\\/g'
5706
# So, first we look for a working echo in the user's PATH.
5708
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5709
for dir in $PATH /usr/ucb; do
5711
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5712
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5713
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5714
test "X$echo_testing_string" = "X$echo_test_string"; then
5721
if test "X$echo" = Xecho; then
5722
# We didn't find a better echo, so look for alternatives.
5723
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5724
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5725
test "X$echo_testing_string" = "X$echo_test_string"; then
5726
# This shell has a builtin print -r that does the trick.
5728
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5729
test "X$CONFIG_SHELL" != X/bin/ksh; then
5730
# If we have ksh, try running configure again with it.
5731
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5732
export ORIGINAL_CONFIG_SHELL
5733
CONFIG_SHELL=/bin/ksh
5735
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5739
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5740
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5741
test "X$echo_testing_string" = "X$echo_test_string"; then
5742
# Cool, printf works
5744
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5745
test "X$echo_testing_string" = 'X\t' &&
5746
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5747
test "X$echo_testing_string" = "X$echo_test_string"; then
5748
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5750
SHELL="$CONFIG_SHELL"
5752
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5753
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5754
test "X$echo_testing_string" = 'X\t' &&
5755
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5756
test "X$echo_testing_string" = "X$echo_test_string"; then
5757
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5759
# maybe with a smaller string...
5762
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5763
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5770
if test "$prev" != 'sed 50q "[$]0"'; then
5771
echo_test_string=`eval $prev`
5772
export echo_test_string
5773
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5775
# Oops. We lost completely, so just stick with echo.
5784
# Copy echo and quote the copy suitably for passing to libtool from
5785
# the Makefile, instead of quoting the original, which is used later.
5787
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5788
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5793
])# _LT_AC_PROG_ECHO_BACKSLASH
5798
AC_DEFUN([_LT_AC_LOCK],
5799
[AC_ARG_ENABLE([libtool-lock],
5800
[AC_HELP_STRING([--disable-libtool-lock],
5801
[avoid locking (might break parallel builds)])])
5802
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5804
# Some flags need to be propagated to the compiler or linker for good
5808
# Find out which ABI we are using.
5809
echo 'int i;' > conftest.$ac_ext
5810
if AC_TRY_EVAL(ac_compile); then
5811
case `/usr/bin/file conftest.$ac_objext` in
5823
# Find out which ABI we are using.
5824
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5825
if AC_TRY_EVAL(ac_compile); then
5826
case `/usr/bin/file conftest.$ac_objext` in
5842
# Test if the compiler is 64bit
5843
echo 'int i;' > conftest.$ac_ext
5844
if AC_TRY_EVAL(ac_compile); then
5845
case `/usr/bin/file conftest.$ac_objext` in
5858
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5859
SAVE_CFLAGS="$CFLAGS"
5860
CFLAGS="$CFLAGS -belf"
5861
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5863
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5865
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5866
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5867
CFLAGS="$SAVE_CFLAGS"
5870
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5871
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5872
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5873
AC_CHECK_TOOL(AS, as, false)
5874
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5876
# recent cygwin and mingw systems supply a stub DllMain which the user
5877
# can override, but on older systems we have to supply one
5878
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5880
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5881
DllMain (0, 0, 0);],
5882
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
5885
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5886
# old mingw systems require "-dll" to link a DLL, while more recent ones
5888
SAVE_CFLAGS="$CFLAGS"
5889
CFLAGS="$CFLAGS -mdll"
5890
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
5891
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
5892
CFLAGS="$SAVE_CFLAGS" ;;
5893
*-*-cygwin* | *-*-pw32*)
5894
# cygwin systems need to pass --dll to the linker, and not link
5895
# crt.o which will require a WinMain@16 definition.
5896
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5902
need_locks="$enable_libtool_lock"
5907
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5908
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5909
# ----------------------------------------------------------------
5910
# Check whether the given compiler option works
5911
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
5912
[AC_CACHE_CHECK([$1], [$2],
5914
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5915
save_CFLAGS="$CFLAGS"
5917
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5918
if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
5919
# The compiler can only warn and ignore the option if not recognized
5920
# So say no if there are warnings
5921
if test -s conftest.err; then
5922
# Append any errors to the config.log.
5923
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5929
CFLAGS="$save_CFLAGS"
5932
if test x"[$]$2" = xyes; then
5933
ifelse([$5], , :, [$5])
5935
ifelse([$6], , :, [$6])
5937
])# AC_LIBTOOL_COMPILER_OPTION
5940
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5941
# [ACTION-SUCCESS], [ACTION-FAILURE])
5942
# ------------------------------------------------------------
5943
# Check whether the given compiler option works
5944
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
5945
[AC_CACHE_CHECK([$1], [$2],
5947
save_LDFLAGS="$LDFLAGS"
5948
LDFLAGS="$LDFLAGS $3"
5949
echo "$lt_simple_link_test_code" > conftest.$ac_ext
5950
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5951
# The compiler can only warn and ignore the option if not recognized
5952
# So say no if there are warnings
5953
if test -s conftest.err; then
5954
# Append any errors to the config.log.
5955
cat conftest.err 1>&AS_MESSAGE_LOG_FD
5961
LDFLAGS="$save_LDFLAGS"
5964
if test x"[$]$2" = xyes; then
5965
ifelse([$4], , :, [$4])
5967
ifelse([$5], , :, [$5])
5969
])# AC_LIBTOOL_LINKER_OPTION
5972
# AC_LIBTOOL_SYS_MAX_CMD_LEN
5973
# --------------------------
5974
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
5975
[# find the maximum length of command line arguments
5976
AC_MSG_CHECKING([the maximum length of command line arguments])
5977
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5983
# On DJGPP, this test can blow up pretty badly due to problems in libc
5984
# (any single argument exceeding 2000 bytes causes a buffer overrun
5985
# during glob expansion). Even if it were fixed, the result of this
5986
# check would be larger than it should be.
5987
lt_cv_sys_max_cmd_len=12288; # 12K is about right
5991
# Under GNU Hurd, this test is not required because there is
5992
# no limit to the length of command line arguments.
5993
# Libtool will interpret -1 as no limit whatsoever
5994
lt_cv_sys_max_cmd_len=-1;
5998
# If test is not a shell built-in, we'll probably end up computing a
5999
# maximum length that is only half of the actual maximum length, but
6001
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6002
= "XX$testring") >/dev/null 2>&1 &&
6003
new_result=`expr "X$testring" : ".*" 2>&1` &&
6004
lt_cv_sys_max_cmd_len=$new_result &&
6005
test $i != 17 # 1/2 MB should be enough
6008
testring=$testring$testring
6011
# Add a significant safety factor because C++ compilers can tack on massive
6012
# amounts of additional arguments before passing them to the linker.
6013
# It appears as though 1/2 is a usable value.
6014
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6018
if test -n $lt_cv_sys_max_cmd_len ; then
6019
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6023
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6026
# _LT_AC_CHECK_DLFCN
6027
# --------------------
6028
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6029
[AC_CHECK_HEADERS(dlfcn.h)dnl
6030
])# _LT_AC_CHECK_DLFCN
6033
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6034
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6035
# ------------------------------------------------------------------
6036
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6037
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6038
if test "$cross_compiling" = yes; then :
6041
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6042
lt_status=$lt_dlunknown
6043
cat > conftest.$ac_ext <<EOF
6044
[#line __oline__ "configure"
6045
#include "confdefs.h"
6054
# define LT_DLGLOBAL RTLD_GLOBAL
6057
# define LT_DLGLOBAL DL_GLOBAL
6059
# define LT_DLGLOBAL 0
6063
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6064
find out it does not work in some platform. */
6065
#ifndef LT_DLLAZY_OR_NOW
6067
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6070
# define LT_DLLAZY_OR_NOW DL_LAZY
6073
# define LT_DLLAZY_OR_NOW RTLD_NOW
6076
# define LT_DLLAZY_OR_NOW DL_NOW
6078
# define LT_DLLAZY_OR_NOW 0
6086
extern "C" void exit (int);
6089
void fnord() { int i=42;}
6092
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6093
int status = $lt_dlunknown;
6097
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6098
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6099
/* dlclose (self); */
6105
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6106
(./conftest; exit; ) 2>/dev/null
6109
x$lt_dlno_uscore) $1 ;;
6110
x$lt_dlneed_uscore) $2 ;;
6111
x$lt_unknown|x*) $3 ;;
6114
# compilation failed
6119
])# _LT_AC_TRY_DLOPEN_SELF
6122
# AC_LIBTOOL_DLOPEN_SELF
6123
# -------------------
6124
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6125
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6126
if test "x$enable_dlopen" != xyes; then
6127
enable_dlopen=unknown
6128
enable_dlopen_self=unknown
6129
enable_dlopen_self_static=unknown
6136
lt_cv_dlopen="load_add_on"
6138
lt_cv_dlopen_self=yes
6141
cygwin* | mingw* | pw32*)
6142
lt_cv_dlopen="LoadLibrary"
6147
AC_CHECK_FUNC([shl_load],
6148
[lt_cv_dlopen="shl_load"],
6149
[AC_CHECK_LIB([dld], [shl_load],
6150
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6151
[AC_CHECK_FUNC([dlopen],
6152
[lt_cv_dlopen="dlopen"],
6153
[AC_CHECK_LIB([dl], [dlopen],
6154
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6155
[AC_CHECK_LIB([svld], [dlopen],
6156
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6157
[AC_CHECK_LIB([dld], [dld_link],
6158
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6167
if test "x$lt_cv_dlopen" != xno; then
6173
case $lt_cv_dlopen in
6175
save_CPPFLAGS="$CPPFLAGS"
6176
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6178
save_LDFLAGS="$LDFLAGS"
6179
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6182
LIBS="$lt_cv_dlopen_libs $LIBS"
6184
AC_CACHE_CHECK([whether a program can dlopen itself],
6185
lt_cv_dlopen_self, [dnl
6186
_LT_AC_TRY_DLOPEN_SELF(
6187
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6188
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6191
if test "x$lt_cv_dlopen_self" = xyes; then
6192
LDFLAGS="$LDFLAGS $link_static_flag"
6193
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6194
lt_cv_dlopen_self_static, [dnl
6195
_LT_AC_TRY_DLOPEN_SELF(
6196
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6197
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6201
CPPFLAGS="$save_CPPFLAGS"
6202
LDFLAGS="$save_LDFLAGS"
6207
case $lt_cv_dlopen_self in
6208
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6209
*) enable_dlopen_self=unknown ;;
6212
case $lt_cv_dlopen_self_static in
6213
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6214
*) enable_dlopen_self_static=unknown ;;
6217
])# AC_LIBTOOL_DLOPEN_SELF
6220
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6221
# ---------------------------------
6222
# Check to see if options -c and -o are simultaneously supported by compiler
6223
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6224
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6225
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6226
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6227
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6228
$rm -r conftest 2>/dev/null
6232
ifelse([$1],[],[save_CFLAGS="$CFLAGS"
6233
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
6234
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
6235
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
6236
[$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
6237
GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
6238
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6240
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6241
# that will create temporary files in the current directory regardless of
6242
# the output directory. Thus, making CWD read-only will cause this test
6243
# to fail, enabling locking or at least warning the user not to do parallel
6247
if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
6249
# The compiler can only warn and ignore the option if not recognized
6250
# So say no if there are warnings
6251
if test -s out/conftest.err; then
6252
# Append any errors to the config.log.
6253
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
6255
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6258
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
6259
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
6260
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
6268
])# AC_LIBTOOL_PROG_CC_C_O
6271
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6272
# -----------------------------------------
6273
# Check to see if we can do hard links to lock some files if needed
6274
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6275
[AC_REQUIRE([_LT_AC_LOCK])dnl
6277
hard_links="nottested"
6278
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6279
# do not overwrite the value of need_locks provided by the user
6280
AC_MSG_CHECKING([if we can lock with hard links])
6283
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6285
ln conftest.a conftest.b 2>&5 || hard_links=no
6286
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6287
AC_MSG_RESULT([$hard_links])
6288
if test "$hard_links" = no; then
6289
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6295
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6300
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6301
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6302
[rm -f .libs 2>/dev/null
6303
mkdir .libs 2>/dev/null
6304
if test -d .libs; then
6307
# MS-DOS does not allow filenames that begin with a dot.
6310
rmdir .libs 2>/dev/null])
6311
objdir=$lt_cv_objdir
6312
])# AC_LIBTOOL_OBJDIR
6315
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6316
# ----------------------------------------------
6317
# Check hardcoding attributes.
6318
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6319
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6320
_LT_AC_TAGVAR(hardcode_action, $1)=
6321
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6322
test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6324
# We can hardcode non-existant directories.
6325
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6326
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6327
# have to relink, otherwise we might link with an installed library
6328
# when we should be linking with a yet-to-be-installed one
6329
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6330
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6331
# Linking always hardcodes the temporary library directory.
6332
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6334
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6335
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6338
# We cannot hardcode anything, or else we can only hardcode existing
6340
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6342
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6344
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6345
# Fast installation is not supported
6346
enable_fast_install=no
6347
elif test "$shlibpath_overrides_runpath" = yes ||
6348
test "$enable_shared" = no; then
6349
# Fast installation is not necessary
6350
enable_fast_install=needless
6352
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6355
# AC_LIBTOOL_SYS_LIB_STRIP
6356
# ------------------------
6357
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6360
AC_MSG_CHECKING([whether stripping libraries is possible])
6361
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6362
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6363
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6364
AC_MSG_RESULT([yes])
6368
])# AC_LIBTOOL_SYS_LIB_STRIP
6371
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6372
# -----------------------------
6373
# PORTME Fill in your ld.so characteristics
6374
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6375
[AC_MSG_CHECKING([dynamic linker characteristics])
6377
libname_spec='lib$name'
6384
shlibpath_overrides_runpath=unknown
6386
dynamic_linker="$host_os ld.so"
6387
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6388
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6389
need_lib_prefix=unknown
6390
hardcode_into_libs=no
6392
# when you set need_version to no, make sure it does not cause -set_version
6393
# flags to be left without arguments
6394
need_version=unknown
6399
library_names_spec='${libname}${release}.so$versuffix $libname.a'
6400
shlibpath_var=LIBPATH
6402
# AIX 3 has no versioning support, so we append a major version to the name.
6403
soname_spec='${libname}${release}.so$major'
6408
if test "$host_cpu" = ia64; then
6409
# AIX 5 supports IA64
6410
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6411
shlibpath_var=LD_LIBRARY_PATH
6413
# With GCC up to 2.95.x, collect2 would create an import file
6414
# for dependence libraries. The import file would start with
6415
# the line `#! .'. This would cause the generated library to
6416
# depend on `.', always an invalid library. This was fixed in
6417
# development snapshots of GCC prior to 3.0.
6419
aix4 | aix4.[[01]] | aix4.[[01]].*)
6420
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6422
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6429
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6430
# soname into executable. Probably we can add versioning support to
6431
# collect2, so additional links can be useful in future.
6432
if test "$aix_use_runtimelinking" = yes; then
6433
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6434
# instead of lib<name>.a to let people know that these are not
6435
# typical AIX shared libraries.
6436
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6438
# We preserve .a as extension for shared libraries through AIX4.2
6439
# and later when we are not doing run time linking.
6440
library_names_spec='${libname}${release}.a $libname.a'
6441
soname_spec='${libname}${release}.so$major'
6443
shlibpath_var=LIBPATH
6448
library_names_spec='$libname.ixlibrary $libname.a'
6449
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6450
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'
6454
library_names_spec='${libname}.so'
6455
dynamic_linker="$host_os ld.so"
6456
shlibpath_var=LIBRARY_PATH
6462
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6463
soname_spec='${libname}${release}.so$major'
6464
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6465
shlibpath_var=LD_LIBRARY_PATH
6466
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6467
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6468
# the default ld.so.conf also contains /usr/contrib/lib and
6469
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6470
# libtool to hard-code these into programs
6473
cygwin* | mingw* | pw32*)
6474
version_type=windows
6477
case $GCC,$host_os in
6479
library_names_spec='$libname.dll.a'
6480
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
6481
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6482
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6483
dldir=$destdir/`dirname \$dlpath`~
6484
test -d \$dldir || mkdir -p \$dldir~
6485
$install_prog .libs/$dlname \$dldir/$dlname'
6486
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6487
dlpath=$dir/\$dldll~
6491
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6492
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
6493
if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
6494
# It is most probably a Windows format PATH printed by
6495
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6496
# path with ; separators, and with drive letters. We can handle the
6497
# drive letters (cygwin fileutils understands them), so leave them,
6498
# especially as we might pass files found there to a mingw objdump,
6499
# which wouldn't understand a cygwinified path. Ahh.
6500
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6502
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
6506
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6509
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6512
dynamic_linker='Win32 ld.exe'
6513
# FIXME: first we should search . and the directory the executable is in
6517
darwin* | rhapsody*)
6518
dynamic_linker="$host_os dyld"
6522
# FIXME: Relying on posixy $() will cause problems for
6523
# cross-compilation, but unfortunately the echo tests do not
6524
# yet detect zsh echo's removal of \ escapes.
6525
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)'
6526
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6527
shlibpath_overrides_runpath=yes
6528
shlibpath_var=DYLD_LIBRARY_PATH
6535
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6536
soname_spec='${libname}${release}.so$major'
6537
shlibpath_var=LD_LIBRARY_PATH
6545
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6546
version_type=freebsd-$objformat
6547
case $version_type in
6549
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6554
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6558
shlibpath_var=LD_LIBRARY_PATH
6561
shlibpath_overrides_runpath=yes
6563
freebsd3.[01]* | freebsdelf3.[01]*)
6564
shlibpath_overrides_runpath=yes
6565
hardcode_into_libs=yes
6568
shlibpath_overrides_runpath=no
6569
hardcode_into_libs=yes
6578
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6579
soname_spec='${libname}${release}.so$major'
6580
shlibpath_var=LD_LIBRARY_PATH
6581
hardcode_into_libs=yes
6584
hpux9* | hpux10* | hpux11*)
6585
# Give a soname corresponding to the major version so that dld.sl refuses to
6586
# link against other versions.
6590
if test "$host_cpu" = ia64; then
6591
hardcode_into_libs=yes
6592
dynamic_linker="$host_os dld.so"
6593
shlibpath_var=LD_LIBRARY_PATH
6594
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6595
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6596
soname_spec='${libname}${release}.so$major'
6597
if test "X$HPUX_IA64_MODE" = X32; then
6598
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6600
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6602
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6604
dynamic_linker="$host_os dld.sl"
6605
shlibpath_var=SHLIB_PATH
6606
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6607
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6608
soname_spec='${libname}${release}.sl$major'
6610
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6611
postinstall_cmds='chmod 555 $lib'
6614
irix5* | irix6* | nonstopux*)
6616
nonstopux*) version_type=nonstopux ;;
6617
*) version_type=irix ;;
6621
soname_spec='${libname}${release}.so$major'
6622
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6624
irix5* | nonstopux*)
6628
case $LD in # libtool.m4 will add one of these switches to LD
6629
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6630
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6631
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6632
*) libsuff= shlibsuff= libmagic=never-match;;
6636
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6637
shlibpath_overrides_runpath=no
6638
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6639
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6642
# No shared lib support for Linux oldld, aout, or coff.
6643
linux*oldld* | linux*aout* | linux*coff*)
6647
# This must be Linux ELF.
6652
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6653
soname_spec='${libname}${release}.so$major'
6654
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6656
if test "x$LINUX_64_MODE" = x64; then
6657
# Some platforms are per default 64-bit, so there's no /lib64
6658
if test -d /lib64; then
6662
shlibpath_var=LD_LIBRARY_PATH
6663
shlibpath_overrides_runpath=no
6664
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6665
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6666
# This implies no fast_install, which is unacceptable.
6667
# Some rework will be needed to allow for fast_install
6668
# before this can be enabled.
6669
hardcode_into_libs=yes
6671
# We used to test for /lib/ld.so.1 and disable shared libraries on
6672
# powerpc, because MkLinux only supported shared libraries with the
6673
# GNU dynamic linker. Since this was broken with cross compilers,
6674
# most powerpc-linux boxes support dynamic linking these days and
6675
# people can always --disable-shared, the test was removed, and we
6676
# assume the GNU/Linux dynamic linker is in use.
6677
dynamic_linker='GNU/Linux ld.so'
6684
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6685
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6686
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6687
dynamic_linker='NetBSD (a.out) ld.so'
6689
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6690
soname_spec='${libname}${release}.so$major'
6691
dynamic_linker='NetBSD ld.elf_so'
6693
shlibpath_var=LD_LIBRARY_PATH
6694
shlibpath_overrides_runpath=yes
6695
hardcode_into_libs=yes
6700
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6701
shlibpath_var=LD_LIBRARY_PATH
6702
shlibpath_overrides_runpath=yes
6709
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6710
soname_spec='${libname}${release}.so$major'
6711
shlibpath_var=LD_LIBRARY_PATH
6712
shlibpath_overrides_runpath=yes
6719
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6720
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6721
shlibpath_var=LD_LIBRARY_PATH
6722
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6724
openbsd2.[[89]] | openbsd2.[[89]].*)
6725
shlibpath_overrides_runpath=no
6728
shlibpath_overrides_runpath=yes
6732
shlibpath_overrides_runpath=yes
6737
libname_spec='$name'
6739
library_names_spec='$libname.dll $libname.a'
6740
dynamic_linker='OS/2 ld.exe'
6741
shlibpath_var=LIBPATH
6744
osf3* | osf4* | osf5*)
6748
soname_spec='${libname}${release}.so'
6749
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6750
shlibpath_var=LD_LIBRARY_PATH
6751
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6752
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6757
soname_spec='${libname}${release}.so$major'
6758
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6759
shlibpath_var=LD_LIBRARY_PATH
6766
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6767
soname_spec='${libname}${release}.so$major'
6768
shlibpath_var=LD_LIBRARY_PATH
6769
shlibpath_overrides_runpath=yes
6770
hardcode_into_libs=yes
6771
# ldd complains unless libraries are executable
6772
postinstall_cmds='chmod +x $lib'
6777
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6778
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6779
shlibpath_var=LD_LIBRARY_PATH
6780
shlibpath_overrides_runpath=yes
6781
if test "$with_gnu_ld" = yes; then
6787
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6789
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6790
soname_spec='${libname}${release}.so$major'
6791
shlibpath_var=LD_LIBRARY_PATH
6792
case $host_vendor in
6794
shlibpath_overrides_runpath=no
6799
shlibpath_overrides_runpath=no
6800
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6806
if test -d /usr/nec ;then
6808
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6809
soname_spec='$libname.so.$major'
6810
shlibpath_var=LD_LIBRARY_PATH
6816
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6817
soname_spec='${libname}${release}.so$major'
6818
shlibpath_var=LD_LIBRARY_PATH
6825
AC_MSG_RESULT([$dynamic_linker])
6826
test "$dynamic_linker" = no && can_build_shared=no
6827
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6832
AC_DEFUN([_LT_AC_TAGCONFIG],
6833
[AC_ARG_WITH([tags],
6834
[AC_HELP_STRING([--with-tags=TAGS],
6835
[include additional configurations @<:@CXX,GCJ@:>@])],
6836
[tagnames="$withval"],
6839
mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6842
if test -f "$ltmain" && test -n "$tagnames"; then
6843
if test ! -f "${ofile}"; then
6844
AC_MSG_WARN([output file `$ofile' does not exist])
6847
if test -z "$LTCC"; then
6848
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6849
if test -z "$LTCC"; then
6850
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6852
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6856
# Extract list of available tagged configurations in $ofile.
6857
# Note that this assumes the entire list is on one line.
6858
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6860
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6861
for tagname in $tagnames; do
6863
# Check whether tagname contains only valid characters
6864
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6866
*) AC_MSG_ERROR([invalid tag name: $tagname])
6870
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6872
AC_MSG_ERROR([tag name \"$tagname\" already exists])
6875
# Update the list of available tags.
6876
if test -n "$tagname"; then
6877
echo appending configuration tag \"$tagname\" to $ofile
6881
AC_LIBTOOL_LANG_CXX_CONFIG
6885
AC_LIBTOOL_LANG_GCJ_CONFIG
6889
AC_LIBTOOL_LANG_RC_CONFIG
6893
AC_MSG_ERROR([Unsupported tag name: $tagname])
6897
# Append the new tag name to the list of available tags.
6898
available_tags="$available_tags $tagname"
6903
# Now substitute the updated list of available tags.
6904
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
6905
mv "${ofile}T" "$ofile"
6909
AC_MSG_ERROR([unable to update list of available tagged configurations.])
6912
])# _LT_AC_TAGCONFIG
6917
# enable checks for dlopen support
6918
AC_DEFUN([AC_LIBTOOL_DLOPEN],
6919
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
6920
])# AC_LIBTOOL_DLOPEN
6923
# AC_LIBTOOL_WIN32_DLL
6924
# --------------------
6925
# declare package support for building win32 dll's
6926
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
6927
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
6928
])# AC_LIBTOOL_WIN32_DLL
6931
# AC_ENABLE_SHARED([DEFAULT])
6932
# ---------------------------
6933
# implement the --enable-shared flag
6934
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6935
AC_DEFUN([AC_ENABLE_SHARED],
6936
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
6937
AC_ARG_ENABLE([shared],
6938
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
6939
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
6940
[p=${PACKAGE-default}
6942
yes) enable_shared=yes ;;
6943
no) enable_shared=no ;;
6946
# Look at the argument we got. We use all the common list separators.
6947
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6948
for pkg in $enableval; do
6950
if test "X$pkg" = "X$p"; then
6957
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
6958
])# AC_ENABLE_SHARED
6963
#- set the default shared flag to --disable-shared
6964
AC_DEFUN([AC_DISABLE_SHARED],
6965
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6966
AC_ENABLE_SHARED(no)
6967
])# AC_DISABLE_SHARED
6970
# AC_ENABLE_STATIC([DEFAULT])
6971
# ---------------------------
6972
# implement the --enable-static flag
6973
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
6974
AC_DEFUN([AC_ENABLE_STATIC],
6975
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
6976
AC_ARG_ENABLE([static],
6977
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
6978
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
6979
[p=${PACKAGE-default}
6981
yes) enable_static=yes ;;
6982
no) enable_static=no ;;
6985
# Look at the argument we got. We use all the common list separators.
6986
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6987
for pkg in $enableval; do
6989
if test "X$pkg" = "X$p"; then
6996
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
6997
])# AC_ENABLE_STATIC
7002
# set the default static flag to --disable-static
7003
AC_DEFUN([AC_DISABLE_STATIC],
7004
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7005
AC_ENABLE_STATIC(no)
7006
])# AC_DISABLE_STATIC
7009
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7010
# ---------------------------------
7011
# implement the --enable-fast-install flag
7012
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7013
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7014
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7015
AC_ARG_ENABLE([fast-install],
7016
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7017
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7018
[p=${PACKAGE-default}
7020
yes) enable_fast_install=yes ;;
7021
no) enable_fast_install=no ;;
7023
enable_fast_install=no
7024
# Look at the argument we got. We use all the common list separators.
7025
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7026
for pkg in $enableval; do
7028
if test "X$pkg" = "X$p"; then
7029
enable_fast_install=yes
7035
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7036
])# AC_ENABLE_FAST_INSTALL
7039
# AC_DISABLE_FAST_INSTALL
7040
# -----------------------
7041
# set the default to --disable-fast-install
7042
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7043
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7044
AC_ENABLE_FAST_INSTALL(no)
7045
])# AC_DISABLE_FAST_INSTALL
7048
# AC_LIBTOOL_PICMODE([MODE])
7049
# --------------------------
7050
# implement the --with-pic flag
7051
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7052
AC_DEFUN([AC_LIBTOOL_PICMODE],
7053
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7054
pic_mode=ifelse($#,1,$1,default)
7055
])# AC_LIBTOOL_PICMODE
7058
# AC_PATH_TOOL_PREFIX
7059
# -------------------
7060
# find a file program which can recognise shared library
7061
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7062
[AC_MSG_CHECKING([for $1])
7063
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7065
[[\\/*] | ?:[\\/]*])
7066
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7069
lt_save_MAGIC_CMD="$MAGIC_CMD"
7070
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7071
dnl $ac_dummy forces splitting on constant user-supplied paths.
7072
dnl POSIX.2 word splitting is done only on the output of word expansions,
7073
dnl not every word. This closes a longstanding sh security hole.
7074
ac_dummy="ifelse([$2], , $PATH, [$2])"
7075
for ac_dir in $ac_dummy; do
7077
test -z "$ac_dir" && ac_dir=.
7078
if test -f $ac_dir/$1; then
7079
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7080
if test -n "$file_magic_test_file"; then
7081
case $deplibs_check_method in
7083
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7084
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7085
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7086
egrep "$file_magic_regex" > /dev/null; then
7091
*** Warning: the command libtool uses to detect shared libraries,
7092
*** $file_magic_cmd, produces output that libtool cannot recognize.
7093
*** The result is that libtool may fail to recognize shared libraries
7094
*** as such. This will affect the creation of libtool libraries that
7095
*** depend on shared libraries, but programs linked with such libtool
7096
*** libraries will work regardless of this problem. Nevertheless, you
7097
*** may want to report the problem to your system manager and/or to
7098
*** bug-libtool@gnu.org
7108
MAGIC_CMD="$lt_save_MAGIC_CMD"
7111
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7112
if test -n "$MAGIC_CMD"; then
7113
AC_MSG_RESULT($MAGIC_CMD)
7117
])# AC_PATH_TOOL_PREFIX
7122
# find a file program which can recognise a shared library
7123
AC_DEFUN([AC_PATH_MAGIC],
7124
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7125
if test -z "$lt_cv_path_MAGIC_CMD"; then
7126
if test -n "$ac_tool_prefix"; then
7127
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7137
# find the path to the GNU or non-GNU linker
7138
AC_DEFUN([AC_PROG_LD],
7139
[AC_ARG_WITH([gnu-ld],
7140
[AC_HELP_STRING([--with-gnu-ld],
7141
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7142
[test "$withval" = no || with_gnu_ld=yes],
7144
AC_REQUIRE([AC_PROG_CC])dnl
7145
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7146
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7148
if test "$GCC" = yes; then
7149
# Check if gcc -print-prog-name=ld gives a path.
7150
AC_MSG_CHECKING([for ld used by GCC])
7153
# gcc leaves a trailing carriage return which upsets mingw
7154
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7156
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7159
# Accept absolute paths.
7160
[[\\/]]* | ?:[[\\/]]*)
7161
re_direlt='/[[^/]][[^/]]*/\.\./'
7162
# Canonicalize the path of ld
7163
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7164
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7165
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7167
test -z "$LD" && LD="$ac_prog"
7170
# If it fails, then pretend we aren't using GCC.
7174
# If it is relative, then search for the first ld in PATH.
7178
elif test "$with_gnu_ld" = yes; then
7179
AC_MSG_CHECKING([for GNU ld])
7181
AC_MSG_CHECKING([for non-GNU ld])
7183
AC_CACHE_VAL(lt_cv_path_LD,
7184
[if test -z "$LD"; then
7185
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7186
for ac_dir in $PATH; do
7188
test -z "$ac_dir" && ac_dir=.
7189
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7190
lt_cv_path_LD="$ac_dir/$ac_prog"
7191
# Check to see if the program is GNU ld. I'd rather use --version,
7192
# but apparently some GNU ld's only accept -v.
7193
# Break only if it was the GNU/non-GNU ld that we prefer.
7194
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7195
test "$with_gnu_ld" != no && break
7197
test "$with_gnu_ld" != yes && break
7203
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7206
if test -n "$LD"; then
7211
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7218
AC_DEFUN([AC_PROG_LD_GNU],
7219
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7220
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7221
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7222
lt_cv_prog_gnu_ld=yes
7224
lt_cv_prog_gnu_ld=no
7226
with_gnu_ld=$lt_cv_prog_gnu_ld
7230
# AC_PROG_LD_RELOAD_FLAG
7231
# ----------------------
7232
# find reload flag for linker
7233
# -- PORTME Some linkers may need a different reload flag.
7234
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7235
[AC_CACHE_CHECK([for $LD option to reload object files],
7236
lt_cv_ld_reload_flag,
7237
[lt_cv_ld_reload_flag='-r'])
7238
reload_flag=$lt_cv_ld_reload_flag
7239
case $reload_flag in
7241
*) reload_flag=" $reload_flag" ;;
7243
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7244
])# AC_PROG_LD_RELOAD_FLAG
7247
# AC_DEPLIBS_CHECK_METHOD
7248
# -----------------------
7249
# how to check for library dependencies
7250
# -- PORTME fill in with the dynamic library characteristics
7251
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7252
[AC_CACHE_CHECK([how to recognise dependant libraries],
7253
lt_cv_deplibs_check_method,
7254
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7255
lt_cv_file_magic_test_file=
7256
lt_cv_deplibs_check_method='unknown'
7257
# Need to set the preceding variable on all platforms that support
7258
# interlibrary dependencies.
7259
# 'none' -- dependencies not supported.
7260
# `unknown' -- same as none, but documents that we really don't know.
7261
# 'pass_all' -- all dependencies passed with no checks.
7262
# 'test_compile' -- check by making test program.
7263
# 'file_magic [[regex]]' -- check by looking for files in library path
7264
# which responds to the $file_magic_cmd with a given egrep regex.
7265
# If you have `file' or equivalent on your system and you're not sure
7266
# whether `pass_all' will *always* work, you probably want this one.
7270
lt_cv_deplibs_check_method=pass_all
7274
lt_cv_deplibs_check_method=pass_all
7278
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7279
lt_cv_file_magic_cmd='/usr/bin/file -L'
7280
lt_cv_file_magic_test_file=/shlib/libc.so
7283
cygwin* | mingw* | pw32*)
7284
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7285
lt_cv_file_magic_cmd='$OBJDUMP -f'
7288
darwin* | rhapsody*)
7289
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7290
lt_cv_file_magic_cmd='/usr/bin/file -L'
7292
rhapsody* | darwin1.[[012]])
7293
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7296
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7302
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7305
# Not sure whether the presence of OpenBSD here was a mistake.
7306
# Let's accept both of them until this is cleared up.
7307
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7308
lt_cv_file_magic_cmd=/usr/bin/file
7309
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7313
lt_cv_deplibs_check_method=pass_all
7318
lt_cv_deplibs_check_method=pass_all
7321
hpux10.20* | hpux11*)
7322
lt_cv_file_magic_cmd=/usr/bin/file
7323
if test "$host_cpu" = ia64; then
7324
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7325
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7327
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7328
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7332
irix5* | irix6* | nonstopux*)
7334
irix5* | nonstopux*)
7335
# this will be overridden with pass_all, but let us keep it just in case
7336
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7340
*-32|*"-32 ") libmagic=32-bit;;
7341
*-n32|*"-n32 ") libmagic=N32;;
7342
*-64|*"-64 ") libmagic=64-bit;;
7343
*) libmagic=never-match;;
7345
# this will be overridden with pass_all, but let us keep it just in case
7346
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7349
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7350
lt_cv_deplibs_check_method=pass_all
7353
# This must be Linux ELF.
7356
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
7357
lt_cv_deplibs_check_method=pass_all ;;
7358
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7360
lt_cv_deplibs_check_method=pass_all ;;
7362
# glibc up to 2.1.1 does not perform some relocations on ARM
7363
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7365
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7369
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7370
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
7372
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
7377
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7378
lt_cv_file_magic_cmd=/usr/bin/file
7379
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7383
lt_cv_deplibs_check_method=unknown
7387
lt_cv_file_magic_cmd=/usr/bin/file
7388
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7389
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7390
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7392
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7396
osf3* | osf4* | osf5*)
7397
# this will be overridden with pass_all, but let us keep it just in case
7398
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7399
lt_cv_file_magic_test_file=/shlib/libc.so
7400
lt_cv_deplibs_check_method=pass_all
7404
lt_cv_deplibs_check_method=pass_all
7408
lt_cv_deplibs_check_method=pass_all
7409
lt_cv_file_magic_test_file=/lib/libc.so
7412
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7413
case $host_vendor in
7415
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]]'
7416
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7419
lt_cv_deplibs_check_method=pass_all
7422
lt_cv_file_magic_cmd='/bin/file'
7423
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7426
lt_cv_file_magic_cmd='/bin/file'
7427
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7428
lt_cv_file_magic_test_file=/lib/libc.so
7433
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7434
lt_cv_deplibs_check_method=pass_all
7438
file_magic_cmd=$lt_cv_file_magic_cmd
7439
deplibs_check_method=$lt_cv_deplibs_check_method
7440
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7441
])# AC_DEPLIBS_CHECK_METHOD
7446
# find the path to a BSD-compatible name lister
7447
AC_DEFUN([AC_PROG_NM],
7448
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7449
[if test -n "$NM"; then
7450
# Let the user override the test.
7453
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7454
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7456
test -z "$ac_dir" && ac_dir=.
7457
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7458
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7459
# Check to see if the nm accepts a BSD-compat flag.
7460
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7461
# nm: unknown option "B" ignored
7462
# Tru64's nm complains that /dev/null is an invalid object file
7463
if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
7464
lt_cv_path_NM="$tmp_nm -B"
7466
elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
7467
lt_cv_path_NM="$tmp_nm -p"
7470
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7471
continue # so that we can try to find one that supports BSD flags
7476
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7484
# check for math library
7485
AC_DEFUN([AC_CHECK_LIBM],
7486
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7489
*-*-beos* | *-*-cygwin* | *-*-pw32*)
7490
# These system don't have libm
7493
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7494
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
7497
AC_CHECK_LIB(m, main, LIBM="-lm")
7503
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7504
# -----------------------------------
7505
# sets LIBLTDL to the link flags for the libltdl convenience library and
7506
# LTDLINCL to the include flags for the libltdl header and adds
7507
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7508
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7509
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7510
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7511
# '${top_srcdir}/' (note the single quotes!). If your package is not
7512
# flat and you're not using automake, define top_builddir and
7513
# top_srcdir appropriately in the Makefiles.
7514
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7516
case $enable_ltdl_convenience in
7517
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7518
"") enable_ltdl_convenience=yes
7519
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7521
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7522
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7523
# For backwards non-gettext consistent compatibility...
7525
])# AC_LIBLTDL_CONVENIENCE
7528
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7529
# -----------------------------------
7530
# sets LIBLTDL to the link flags for the libltdl installable library and
7531
# LTDLINCL to the include flags for the libltdl header and adds
7532
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7533
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7534
# DIRECTORY is not provided and an installed libltdl is not found, it is
7535
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7536
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7537
# quotes!). If your package is not flat and you're not using automake,
7538
# define top_builddir and top_srcdir appropriately in the Makefiles.
7539
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7540
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7541
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7542
AC_CHECK_LIB(ltdl, main,
7543
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7544
[if test x"$enable_ltdl_install" = xno; then
7545
AC_MSG_WARN([libltdl not installed, but installation disabled])
7547
enable_ltdl_install=yes
7550
if test x"$enable_ltdl_install" = x"yes"; then
7551
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7552
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7553
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7555
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7559
# For backwards non-gettext consistent compatibility...
7561
])# AC_LIBLTDL_INSTALLABLE
7564
# If this macro is not defined by Autoconf, define it here.
7565
ifdef([AC_PROVIDE_IFELSE],
7567
[define([AC_PROVIDE_IFELSE],
7568
[ifdef([AC_PROVIDE_$1],
7574
# enable support for C++ libraries
7575
AC_DEFUN([AC_LIBTOOL_CXX],
7576
[AC_REQUIRE([_LT_AC_LANG_CXX])
7582
AC_DEFUN([_LT_AC_LANG_CXX],
7583
[AC_REQUIRE([AC_PROG_CXX])
7584
AC_REQUIRE([AC_PROG_CXXCPP])
7590
# enable support for GCJ libraries
7591
AC_DEFUN([AC_LIBTOOL_GCJ],
7592
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7598
AC_DEFUN([_LT_AC_LANG_GCJ],
7599
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7600
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7601
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7602
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7603
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7604
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7610
# enable support for Windows resource files
7611
AC_DEFUN([AC_LIBTOOL_RC],
7612
[AC_REQUIRE([AC_PROG_RC])
7616
# AC_LIBTOOL_LANG_C_CONFIG
7617
# ------------------------
7618
# Ensure that the configuration vars for the C compiler are
7619
# suitably defined. Those variables are subsequently used by
7620
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7621
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7622
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7626
# Source file extension for C test sources.
7629
# Object file extension for compiled C test sources.
7631
_LT_AC_TAGVAR(objext, $1)=$objext
7633
# Code to be used in simple compile tests
7634
lt_simple_compile_test_code="int some_variable = 0;"
7636
# Code to be used in simple link tests
7637
lt_simple_link_test_code='main(){return(0);}'
7642
# Check for any special shared library compilation flags.
7644
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7645
if test "$GCC" = no; then
7648
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7652
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7653
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7654
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7656
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7657
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7663
# Check to make sure the static flag actually works.
7665
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7666
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7667
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7669
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7672
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7673
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7674
AC_LIBTOOL_PROG_CC_C_O($1)
7675
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7676
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7677
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7678
AC_LIBTOOL_SYS_LIB_STRIP
7679
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7680
AC_LIBTOOL_DLOPEN_SELF($1)
7682
# Report which librarie types wil actually be built
7683
AC_MSG_CHECKING([if libtool supports shared libraries])
7684
AC_MSG_RESULT([$can_build_shared])
7686
AC_MSG_CHECKING([whether to build shared libraries])
7687
test "$can_build_shared" = "no" && enable_shared=no
7689
# On AIX, shared libraries and static libraries use the same namespace, and
7690
# are all built from PIC.
7693
test "$enable_shared" = yes && enable_static=no
7694
if test -n "$RANLIB"; then
7695
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7696
postinstall_cmds='$RANLIB $lib'
7701
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7702
test "$enable_shared" = yes && enable_static=no
7706
AC_MSG_RESULT([$enable_shared])
7708
AC_MSG_CHECKING([whether to build static libraries])
7709
# Make sure either enable_shared or enable_static is yes.
7710
test "$enable_shared" = yes || enable_static=yes
7711
AC_MSG_RESULT([$enable_static])
7713
AC_LIBTOOL_CONFIG($1)
7717
])# AC_LIBTOOL_LANG_C_CONFIG
7720
# AC_LIBTOOL_LANG_CXX_CONFIG
7721
# --------------------------
7722
# Ensure that the configuration vars for the C compiler are
7723
# suitably defined. Those variables are subsequently used by
7724
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7725
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7726
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7728
AC_REQUIRE([AC_PROG_CXX])
7729
AC_REQUIRE([AC_PROG_CXXCPP])
7731
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7732
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7733
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7734
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7735
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7736
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7737
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7738
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7739
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7740
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7741
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7742
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7743
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7745
# Dependencies to place before and after the object being linked:
7746
_LT_AC_TAGVAR(predep_objects, $1)=
7747
_LT_AC_TAGVAR(postdep_objects, $1)=
7748
_LT_AC_TAGVAR(predeps, $1)=
7749
_LT_AC_TAGVAR(postdeps, $1)=
7750
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7752
# Source file extension for C test sources.
7755
# Object file extension for compiled C test sources.
7757
_LT_AC_TAGVAR(objext, $1)=$objext
7759
# Code to be used in simple compile tests
7760
lt_simple_compile_test_code="int some_variable = 0;"
7762
# Code to be used in simple link tests
7763
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7765
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7768
# Allow CC to be a program name with arguments.
7773
_LT_AC_TAGVAR(compiler, $1)=$CC
7774
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7776
# We don't want -fno-exception wen compiling C++ code, so set the
7777
# no_builtin_flag separately
7778
if test "$GXX" = yes; then
7779
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7781
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7784
if test "$GXX" = yes; then
7785
# Set up default GNU C++ configuration
7787
# Check if GNU C++ uses GNU ld as the underlying linker, since the
7788
# archiving commands below assume that GNU ld is being used.
7789
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7790
egrep 'GNU ld' > /dev/null; then
7793
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7794
_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'
7796
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7797
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7799
# If archive_cmds runs LD, not CC, wlarc should be empty
7800
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7801
# investigate it a little bit more. (MM)
7804
# ancient GNU ld didn't support --whole-archive et. al.
7805
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7806
egrep 'no-whole-archive' > /dev/null; then
7807
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7809
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7815
# A generic and very simple default shared library creation
7816
# command for GNU C++ for the case where it uses the native
7817
# linker, instead of GNU ld. If possible, this setting should
7818
# overridden to take advantage of the native linker features on
7819
# the platform it is being used on.
7820
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7823
# Commands to make compiler produce verbose output that lists
7824
# what "hidden" libraries, object files and flags are used when
7825
# linking a shared library.
7826
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7834
# PORTME: fill in a description of your system's C++ link characteristics
7835
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7836
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7839
# FIXME: insert proper C++ library support
7840
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7843
if test "$host_cpu" = ia64; then
7844
# On IA64, the linker does run time linking by default, so we don't
7845
# have to do anything special.
7846
aix_use_runtimelinking=no
7847
exp_sym_flag='-Bexport'
7850
# KDE requires run time linking. Make it the default.
7851
aix_use_runtimelinking=yes
7852
exp_sym_flag='-bexport'
7853
no_entry_flag='-bnoentry'
7856
# When large executables or shared objects are built, AIX ld can
7857
# have problems creating the table of contents. If linking a library
7858
# or program results in "error TOC overflow" add -mminimal-toc to
7859
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7860
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7862
_LT_AC_TAGVAR(archive_cmds, $1)=''
7863
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7864
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7865
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7867
if test "$GXX" = yes; then
7868
case $host_os in aix4.[012]|aix4.[012].*)
7869
# We only want to do this on AIX 4.2 and lower, the check
7870
# below for broken collect2 doesn't work under 4.3+
7871
collect2name=`${CC} -print-prog-name=collect2`
7872
if test -f "$collect2name" && \
7873
strings "$collect2name" | grep resolve_lib_name >/dev/null
7875
# We have reworked collect2
7876
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7878
# We have old collect2
7879
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7880
# It fails to find uninstalled libraries when the uninstalled
7881
# path is not listed in the libpath. Setting hardcode_minus_L
7882
# to unsupported forces relinking
7883
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7884
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7885
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7888
shared_flag='-shared'
7891
if test "$host_cpu" = ia64; then
7892
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7893
# chokes on -Wl,-G. The following line is correct:
7896
if test "$aix_use_runtimelinking" = yes; then
7897
shared_flag='-qmkshrobj ${wl}-G'
7899
shared_flag='-qmkshrobj'
7904
# Let the compiler handle the export list.
7905
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7906
if test "$aix_use_runtimelinking" = yes; then
7907
# Warning - without using the other runtime loading flags (-brtl),
7908
# -berok will link without error, but may produce a broken library.
7909
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7910
# Determine the default libpath from the value encoded in an empty executable.
7911
_LT_AC_SYS_LIBPATH_AIX
7912
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7914
_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"
7915
_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"
7917
if test "$host_cpu" = ia64; then
7918
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7919
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7920
_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"
7922
# Determine the default libpath from the value encoded in an empty executable.
7923
_LT_AC_SYS_LIBPATH_AIX
7924
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7925
# Warning - without using the other run time loading flags,
7926
# -berok will link without error, but may produce a broken library.
7927
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7928
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7929
# -bexpall does not export symbols beginning with underscore (_)
7930
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
7931
# Exported symbols can be pulled into shared objects from archives
7932
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7933
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7934
# This is similar to how AIX traditionally builds it's shared libraries.
7935
_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'
7940
case $cc_basename in
7942
# FIXME: insert proper C++ library support
7943
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7948
case $cc_basename in
7950
# FIXME: insert proper C++ library support
7951
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7954
# Green Hills C++ Compiler
7955
# FIXME: insert proper C++ library support
7956
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7959
# FIXME: insert proper C++ library support
7960
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7965
# C++ shared libraries reported to be fairly broken before switch to ELF
7966
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7969
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7972
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7974
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7979
if test $with_gnu_ld = no; then
7980
if test "$host_cpu" = ia64; then
7981
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7983
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7984
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7985
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7988
if test "$host_cpu" = ia64; then
7989
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7990
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7992
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7994
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7995
# but as the default
7996
# location of the library.
7998
case $cc_basename in
8000
# FIXME: insert proper C++ library support
8001
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8006
_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'
8009
if test "$host_cpu" = ia64; then
8010
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8012
_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'
8016
# Commands to make compiler produce verbose output that lists
8017
# what "hidden" libraries, object files and flags are used when
8018
# linking a shared library.
8020
# There doesn't appear to be a way to prevent this compiler from
8021
# explicitly linking system object files so we need to strip them
8022
# from the output so that they don't get included in the library
8024
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'
8027
if test "$GXX" = yes; then
8028
if test $with_gnu_ld = no; then
8031
_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'
8034
if test "$host_cpu" = ia64; then
8035
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8037
_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'
8043
# FIXME: insert proper C++ library support
8044
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8050
case $cc_basename in
8053
_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'
8055
# Archives containing C++ object files must be created using
8056
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8057
# necessary to make sure instantiated templates are included
8059
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8062
if test "$GXX" = yes; then
8063
if test "$with_gnu_ld" = no; then
8064
_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'
8066
_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'
8069
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8072
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8073
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8076
case $cc_basename in
8078
# Kuck and Associates, Inc. (KAI) C++ Compiler
8080
# KCC will only create a shared library if the output file
8081
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8082
# to its proper name (with version) after linking.
8083
_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'
8084
_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'
8086
# Commands to make compiler produce verbose output that lists
8087
# what "hidden" libraries, object files and flags are used when
8088
# linking a shared library.
8090
# There doesn't appear to be a way to prevent this compiler from
8091
# explicitly linking system object files so we need to strip them
8092
# from the output so that they don't get included in the library
8094
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'
8096
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8097
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8099
# Archives containing C++ object files must be created using
8100
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8101
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8105
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8106
_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'
8108
runpath_var=LD_RUN_PATH
8109
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8110
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8112
# Commands to make compiler produce verbose output that lists
8113
# what "hidden" libraries, object files and flags are used when
8114
# linking a shared library.
8116
# There doesn't appear to be a way to prevent this compiler from
8117
# explicitly linking system object files so we need to strip them
8118
# from the output so that they don't get included in the library
8120
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'
8125
# FIXME: insert proper C++ library support
8126
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8129
# FIXME: insert proper C++ library support
8130
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8133
case $cc_basename in
8135
# FIXME: insert proper C++ library support
8136
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8139
# FIXME: insert proper C++ library support
8140
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8145
# NetBSD uses g++ - do we need to do anything?
8148
case $cc_basename in
8150
# Kuck and Associates, Inc. (KAI) C++ Compiler
8152
# KCC will only create a shared library if the output file
8153
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8154
# to its proper name (with version) after linking.
8155
_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'
8157
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8158
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8160
# Archives containing C++ object files must be created using
8161
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8162
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8166
# Rational C++ 2.4.1
8167
# FIXME: insert proper C++ library support
8168
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8171
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8172
_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'
8174
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8175
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8177
# Commands to make compiler produce verbose output that lists
8178
# what "hidden" libraries, object files and flags are used when
8179
# linking a shared library.
8181
# There doesn't appear to be a way to prevent this compiler from
8182
# explicitly linking system object files so we need to strip them
8183
# from the output so that they don't get included in the library
8185
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'
8188
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8189
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8190
_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'
8192
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8193
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8195
# Commands to make compiler produce verbose output that lists
8196
# what "hidden" libraries, object files and flags are used when
8197
# linking a shared library.
8198
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8201
# FIXME: insert proper C++ library support
8202
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8208
case $cc_basename in
8210
# Kuck and Associates, Inc. (KAI) C++ Compiler
8212
# KCC will only create a shared library if the output file
8213
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8214
# to its proper name (with version) after linking.
8215
_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'
8217
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8218
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8220
# Archives containing C++ object files must be created using
8221
# the KAI C++ compiler.
8222
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8225
# Rational C++ 2.4.1
8226
# FIXME: insert proper C++ library support
8227
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8230
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8231
_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'
8232
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
8233
echo "-hidden">> $lib.exp~
8234
$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~
8237
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8238
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8240
# Commands to make compiler produce verbose output that lists
8241
# what "hidden" libraries, object files and flags are used when
8242
# linking a shared library.
8244
# There doesn't appear to be a way to prevent this compiler from
8245
# explicitly linking system object files so we need to strip them
8246
# from the output so that they don't get included in the library
8248
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'
8251
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8252
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8253
_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'
8255
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8256
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8258
# Commands to make compiler produce verbose output that lists
8259
# what "hidden" libraries, object files and flags are used when
8260
# linking a shared library.
8261
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8264
# FIXME: insert proper C++ library support
8265
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8271
# FIXME: insert proper C++ library support
8272
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8275
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8276
case $cc_basename in
8278
# FIXME: insert proper C++ library support
8279
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8282
# FIXME: insert proper C++ library support
8283
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8288
case $cc_basename in
8291
# FIXME: insert proper C++ library support
8292
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8296
# FIXME: insert proper C++ library support
8297
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8300
# FIXME: insert proper C++ library support
8301
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8306
case $cc_basename in
8308
# Sun C++ 4.2, 5.x and Centerline C++
8309
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8310
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8311
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8312
$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'
8314
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8315
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8317
solaris2.[0-5] | solaris2.[0-5].*) ;;
8319
# The C++ compiler is used as linker so we must use $wl
8320
# flag to pass the commands to the underlying system
8322
# Supported since Solaris 2.6 (maybe 2.5.1?)
8323
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8326
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8328
# Commands to make compiler produce verbose output that lists
8329
# what "hidden" libraries, object files and flags are used when
8330
# linking a shared library.
8332
# There doesn't appear to be a way to prevent this compiler from
8333
# explicitly linking system object files so we need to strip them
8334
# from the output so that they don't get included in the library
8336
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'
8338
# Archives containing C++ object files must be created using
8339
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8340
# necessary to make sure instantiated templates are included
8342
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8345
# Green Hills C++ Compiler
8346
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8348
# The C++ compiler must be used to create the archive.
8349
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8352
# GNU C++ compiler with Solaris linker
8353
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8354
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8355
if $CC --version | egrep -v '^2\.7' > /dev/null; then
8356
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8357
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8358
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8360
# Commands to make compiler produce verbose output that lists
8361
# what "hidden" libraries, object files and flags are used when
8362
# linking a shared library.
8363
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8365
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8367
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8368
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8369
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8371
# Commands to make compiler produce verbose output that lists
8372
# what "hidden" libraries, object files and flags are used when
8373
# linking a shared library.
8374
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8377
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8382
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8383
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8386
case $cc_basename in
8388
# NonStop-UX NCC 3.20
8389
# FIXME: insert proper C++ library support
8390
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8393
# FIXME: insert proper C++ library support
8394
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8399
# FIXME: insert proper C++ library support
8400
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8403
# FIXME: insert proper C++ library support
8404
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8407
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8408
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8410
# Figure out "hidden" C++ library dependencies from verbose
8411
# compiler output whening linking a shared library.
8412
cat > conftest.$ac_ext <<EOF
8416
Foo (void) { a = 0; }
8423
if AC_TRY_EVAL(ac_compile); then
8424
# Parse the compiler output and extract the necessary
8425
# objects, libraries and library flags.
8427
# Sentinel used to keep track of whether or not we are before
8428
# the conftest object file.
8429
pre_test_object_deps_done=no
8431
# The `*' in the case matches for architectures that use `case' in
8432
# $output_verbose_cmd can trigger glob expansion during the loop
8433
# eval without this substitution.
8434
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8436
for p in `eval $output_verbose_link_cmd`; do
8440
# Some compilers place space between "-{L,R}" and the path.
8443
|| test $p = "-R"; then
8450
if test "$pre_test_object_deps_done" = no; then
8453
# Internal compiler library paths should come after those
8454
# provided the user. The postdeps already come after the
8455
# user supplied libs so there is no need to process them.
8456
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8457
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8459
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8462
# The "-l" case would never come before the object being
8463
# linked, so don't bother handling this case.
8466
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8467
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8469
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8474
*.$objext|*.$libext)
8475
# This assumes that the test object file only shows up
8476
# once in the compiler output.
8477
if test "$p" = "conftest.$objext"; then
8478
pre_test_object_deps_done=yes
8482
if test "$pre_test_object_deps_done" = no; then
8483
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8484
_LT_AC_TAGVAR(predep_objects, $1)="$p"
8486
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8489
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8490
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
8492
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8497
*) ;; # Ignore the rest.
8505
echo "libtool.m4: error: problem compiling C++ test program"
8508
$rm -f confest.$objext
8510
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8511
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8512
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
8515
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8516
_LT_AC_TAGVAR(LD, $1)="$LD"
8518
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8519
AC_LIBTOOL_PROG_CC_C_O($1)
8520
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8521
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8522
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8523
AC_LIBTOOL_SYS_LIB_STRIP
8524
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8525
AC_LIBTOOL_DLOPEN_SELF($1)
8527
AC_LIBTOOL_CONFIG($1)
8531
])# AC_LIBTOOL_LANG_CXX_CONFIG
8534
# AC_LIBTOOL_LANG_GCJ_CONFIG
8535
# --------------------------
8536
# Ensure that the configuration vars for the C compiler are
8537
# suitably defined. Those variables are subsequently used by
8538
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8539
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8540
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8543
# Source file extension for C test sources.
8546
# Object file extension for compiled C test sources.
8548
_LT_AC_TAGVAR(objext, $1)=$objext
8550
# Code to be used in simple compile tests
8551
lt_simple_compile_test_code="class foo {}"
8553
# Code to be used in simple link tests
8554
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8556
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8559
# Allow CC to be a program name with arguments.
8564
_LT_AC_TAGVAR(compiler, $1)=$CC
8566
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8567
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8569
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8570
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8571
AC_LIBTOOL_PROG_CC_C_O($1)
8572
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8573
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8574
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8575
AC_LIBTOOL_SYS_LIB_STRIP
8576
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8577
AC_LIBTOOL_DLOPEN_SELF($1)
8579
AC_LIBTOOL_CONFIG($1)
8583
])# AC_LIBTOOL_LANG_GCJ_CONFIG
8586
# AC_LIBTOOL_LANG_RC_CONFIG
8587
# --------------------------
8588
# Ensure that the configuration vars for the Windows resource compiler are
8589
# suitably defined. Those variables are subsequently used by
8590
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8591
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8592
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8595
# Source file extension for RC test sources.
8598
# Object file extension for compiled RC test sources.
8600
_LT_AC_TAGVAR(objext, $1)=$objext
8602
# Code to be used in simple compile tests
8603
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8605
# Code to be used in simple link tests
8606
lt_simple_link_test_code="$lt_simple_compile_test_code"
8608
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8611
# Allow CC to be a program name with arguments.
8616
_LT_AC_TAGVAR(compiler, $1)=$CC
8617
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8619
AC_LIBTOOL_CONFIG($1)
8623
])# AC_LIBTOOL_LANG_RC_CONFIG
8626
# AC_LIBTOOL_CONFIG([TAGNAME])
8627
# ----------------------------
8628
# If TAGNAME is not passed, then create an initial libtool script
8629
# with a default configuration from the untagged config vars. Otherwise
8630
# add code to config.status for appending the configuration named by
8631
# TAGNAME from the matching tagged config vars.
8632
AC_DEFUN([AC_LIBTOOL_CONFIG],
8633
[# The else clause should only fire when bootstrapping the
8634
# libtool distribution, otherwise you forgot to ship ltmain.sh
8635
# with your package, and you will get complaints that there are
8636
# no rules to generate ltmain.sh.
8637
if test -f "$ltmain"; then
8638
# Now quote all the things that may contain metacharacters while being
8639
# careful not to overquote the AC_SUBSTed values. We take copies of the
8640
# variables and quote the copies for generation of the libtool script.
8641
for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8642
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8643
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8644
deplibs_check_method reload_flag reload_cmds need_locks \
8645
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8646
lt_cv_sys_global_symbol_to_c_name_address \
8647
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8648
old_postinstall_cmds old_postuninstall_cmds \
8649
_LT_AC_TAGVAR(compiler, $1) \
8650
_LT_AC_TAGVAR(CC, $1) \
8651
_LT_AC_TAGVAR(LD, $1) \
8652
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8653
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8654
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8655
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8656
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8657
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8658
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8659
_LT_AC_TAGVAR(old_archive_cmds, $1) \
8660
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8661
_LT_AC_TAGVAR(predep_objects, $1) \
8662
_LT_AC_TAGVAR(postdep_objects, $1) \
8663
_LT_AC_TAGVAR(predeps, $1) \
8664
_LT_AC_TAGVAR(postdeps, $1) \
8665
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8666
_LT_AC_TAGVAR(archive_cmds, $1) \
8667
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8668
_LT_AC_TAGVAR(postinstall_cmds, $1) \
8669
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
8670
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8671
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
8672
_LT_AC_TAGVAR(no_undefined_flag, $1) \
8673
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
8674
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8675
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8676
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8677
_LT_AC_TAGVAR(exclude_expsyms, $1) \
8678
_LT_AC_TAGVAR(include_expsyms, $1); do
8681
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
8682
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8683
_LT_AC_TAGVAR(archive_cmds, $1) | \
8684
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8685
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8686
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8687
extract_expsyms_cmds | reload_cmds | finish_cmds | \
8688
postinstall_cmds | postuninstall_cmds | \
8689
old_postinstall_cmds | old_postuninstall_cmds | \
8690
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8691
# Double-quote double-evaled strings.
8692
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8695
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8701
*'\[$]0 --fallback-echo"')
8702
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8707
[cfgfile="${ofile}T"
8708
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8710
AC_MSG_NOTICE([creating $ofile])],
8713
cat <<__EOF__ >> "$cfgfile"
8717
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8718
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8719
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
8721
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8722
# Free Software Foundation, Inc.
8724
# This file is part of GNU Libtool:
8725
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8727
# This program is free software; you can redistribute it and/or modify
8728
# it under the terms of the GNU General Public License as published by
8729
# the Free Software Foundation; either version 2 of the License, or
8730
# (at your option) any later version.
8732
# This program is distributed in the hope that it will be useful, but
8733
# WITHOUT ANY WARRANTY; without even the implied warranty of
8734
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8735
# General Public License for more details.
8737
# You should have received a copy of the GNU General Public License
8738
# along with this program; if not, write to the Free Software
8739
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8741
# As a special exception to the GNU General Public License, if you
8742
# distribute this file as part of a program that contains a
8743
# configuration script generated by Autoconf, you may include it under
8744
# the same distribution terms that you use for the rest of that program.
8746
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
8747
Xsed="sed -e s/^X//"
8749
# The HP-UX ksh and POSIX shell print the target directory to stdout
8751
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8753
# The names of the tagged configurations supported by this script.
8756
# ### BEGIN LIBTOOL CONFIG],
8757
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8759
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8761
# Shell to use when invoking shell scripts.
8764
# Whether or not to build shared libraries.
8765
build_libtool_libs=$enable_shared
8767
# Whether or not to build static libraries.
8768
build_old_libs=$enable_static
8770
# Whether or not to add -lc for building shared libraries.
8771
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8773
# Whether or not to optimize for fast installation.
8774
fast_install=$enable_fast_install
8777
host_alias=$host_alias
8780
# An echo program that does not interpret backslashes.
8785
AR_FLAGS=$lt_AR_FLAGS
8790
# A language-specific compiler.
8791
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8793
# Is the compiler the GNU C compiler?
8794
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8796
# The linker used to build libraries.
8797
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8799
# Whether we need hard or soft links.
8802
# A BSD-compatible nm program.
8805
# A sed program that does not truncate output.
8808
# A symbol stripping program
8811
# Used to examine libraries when file_magic_cmd begins "file"
8812
MAGIC_CMD=$MAGIC_CMD
8814
# Used on cygwin: DLL creation program.
8817
# Used on cygwin: object dumper.
8820
# Used on cygwin: assembler.
8823
# The name of the directory that contains temporary libtool files.
8826
# How to create reloadable object files.
8827
reload_flag=$lt_reload_flag
8828
reload_cmds=$lt_reload_cmds
8830
# How to pass a linker flag through the compiler.
8831
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8833
# Object file suffix (normally "o").
8836
# Old archive suffix (normally "a").
8839
# Executable file suffix (normally "").
8842
# Additional compiler flags for building library objects.
8843
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8846
# What is the maximum length of a command?
8847
max_cmd_len=$lt_cv_sys_max_cmd_len
8849
# Does compiler simultaneously support -c and -o options?
8850
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8852
# Must we lock files when doing compilation ?
8853
need_locks=$lt_need_locks
8855
# Do we need the lib prefix for modules?
8856
need_lib_prefix=$need_lib_prefix
8858
# Do we need a version for libraries?
8859
need_version=$need_version
8861
# Whether dlopen is supported.
8862
dlopen_support=$enable_dlopen
8864
# Whether dlopen of programs is supported.
8865
dlopen_self=$enable_dlopen_self
8867
# Whether dlopen of statically linked programs is supported.
8868
dlopen_self_static=$enable_dlopen_self_static
8870
# Compiler flag to prevent dynamic linking.
8871
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
8873
# Compiler flag to turn off builtin functions.
8874
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
8876
# Compiler flag to allow reflexive dlopens.
8877
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
8879
# Compiler flag to generate shared objects directly from archives.
8880
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
8882
# Compiler flag to generate thread-safe objects.
8883
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
8885
# Library versioning type.
8886
version_type=$version_type
8888
# Format of library name prefix.
8889
libname_spec=$lt_libname_spec
8891
# List of archive names. First name is the real one, the rest are links.
8892
# The last name is the one that the linker finds with -lNAME.
8893
library_names_spec=$lt_library_names_spec
8895
# The coded name of the library, if different from the real name.
8896
soname_spec=$lt_soname_spec
8898
# Commands used to build and install an old-style archive.
8900
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
8901
old_postinstall_cmds=$lt_old_postinstall_cmds
8902
old_postuninstall_cmds=$lt_old_postuninstall_cmds
8904
# Create an old-style archive from a shared archive.
8905
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
8907
# Create a temporary old-style archive to link instead of a shared archive.
8908
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
8910
# Commands used to build and install a shared archive.
8911
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
8912
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
8913
postinstall_cmds=$lt_postinstall_cmds
8914
postuninstall_cmds=$lt_postuninstall_cmds
8916
# Commands to strip libraries.
8917
old_striplib=$lt_old_striplib
8918
striplib=$lt_striplib
8920
# Dependencies to place before the objects being linked to create a
8922
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
8924
# Dependencies to place after the objects being linked to create a
8926
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
8928
# Dependencies to place before the objects being linked to create a
8930
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
8932
# Dependencies to place after the objects being linked to create a
8934
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
8936
# The library search path used internally by the compiler when linking
8938
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
8940
# Method to check whether dependent libraries are shared objects.
8941
deplibs_check_method=$lt_deplibs_check_method
8943
# Command to use when deplibs_check_method == file_magic.
8944
file_magic_cmd=$lt_file_magic_cmd
8946
# Flag that allows shared libraries with undefined symbols to be built.
8947
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
8949
# Flag that forces no undefined symbols.
8950
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
8952
# Commands used to finish a libtool library installation in a directory.
8953
finish_cmds=$lt_finish_cmds
8955
# Same as above, but a single script fragment to be evaled but not shown.
8956
finish_eval=$lt_finish_eval
8958
# Take the output of nm and produce a listing of raw symbols and C names.
8959
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
8961
# Transform the output of nm in a proper C declaration
8962
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
8964
# Transform the output of nm in a C name address pair
8965
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
8967
# This is the shared library runtime path variable.
8968
runpath_var=$runpath_var
8970
# This is the shared library path variable.
8971
shlibpath_var=$shlibpath_var
8973
# Is shlibpath searched before the hard-coded library search path?
8974
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
8976
# How to hardcode a shared library path into an executable.
8977
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
8979
# Whether we should hardcode library paths into libraries.
8980
hardcode_into_libs=$hardcode_into_libs
8982
# Flag to hardcode \$libdir into a binary during linking.
8983
# This must work even if \$libdir does not exist.
8984
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
8986
# Whether we need a single -rpath flag with a separated argument.
8987
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
8989
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
8991
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
8993
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
8995
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
8997
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
8998
# the resulting binary.
8999
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9001
# Variables whose values should be saved in libtool wrapper scripts and
9002
# restored at relink time.
9003
variables_saved_for_relink="$variables_saved_for_relink"
9005
# Whether libtool must link a program against all its dependency libraries.
9006
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9008
# Compile-time system search path for libraries
9009
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9011
# Run-time system search path for libraries
9012
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9014
# Fix the shell variable \$srcfile for the compiler.
9015
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9017
# Set to yes if exported symbols are required.
9018
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9020
# The commands to list exported symbols.
9021
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9023
# The commands to extract the exported symbol list from a shared archive.
9024
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9026
# Symbols that should not be listed in the preloaded symbols.
9027
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9029
# Symbols that must always be exported.
9030
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9033
[# ### END LIBTOOL CONFIG],
9034
[# ### END LIBTOOL TAG CONFIG: $tagname])
9041
cat <<\EOF >> "$cfgfile"
9043
# AIX sometimes has problems with the GCC collect2 program. For some
9044
# reason, if we set the COLLECT_NAMES environment variable, the problems
9045
# vanish in a puff of smoke.
9046
if test "X${COLLECT_NAMES+set}" != Xset; then
9048
export COLLECT_NAMES
9053
cygwin* | mingw* | pw32* | os2*)
9054
cat <<'EOF' >> "$cfgfile"
9055
# This is a source program that is used to create dlls on Windows
9056
# Don't remove nor modify the starting and closing comments
9058
# This is a source program that is used to create import libraries
9059
# on Windows for dlls which lack them. Don't remove nor modify the
9060
# starting and closing comments
9061
_LT_AC_FILE_IMPGEN_C
9066
# We use sed instead of cat because bash on DJGPP gets confused if
9067
# if finds mixed CR/LF and LF-only lines. Since sed operates in
9068
# text mode, it properly converts lines to CR/LF. This bash problem
9069
# is reportedly fixed, but why not run on old versions too?
9070
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9072
mv -f "$cfgfile" "$ofile" || \
9073
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9077
# If there is no Makefile yet, we rely on a make rule to execute
9078
# `config.status --recheck' to rerun these tests and create the
9079
# libtool script then.
9080
test -f Makefile && make "$ltmain"
9082
])# AC_LIBTOOL_CONFIG
9085
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9086
# -------------------------------------------
9087
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9088
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9090
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9092
if test "$GCC" = yes; then
9093
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9095
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9096
lt_cv_prog_compiler_rtti_exceptions,
9097
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
9098
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9100
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9103
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9104
# ---------------------------------
9105
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9106
[AC_REQUIRE([AC_CANONICAL_HOST])
9107
AC_REQUIRE([AC_PROG_NM])
9108
AC_REQUIRE([AC_OBJEXT])
9109
# Check for command to grab the raw symbol name followed by C symbol from nm.
9110
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9111
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9113
# These are sane defaults that work on at least a few old systems.
9114
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9116
# Character class describing NM global symbol codes.
9117
symcode='[[BCDEGRST]]'
9119
# Regexp to match symbols that can be accessed directly from C.
9120
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9122
# Transform the above into a raw symbol and a C symbol.
9123
symxfrm='\1 \2\3 \3'
9125
# Transform an extracted symbol line into a proper C declaration
9126
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9128
# Transform an extracted symbol line into symbol name and symbol address
9129
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'"
9131
# Define system-specific variables.
9136
cygwin* | mingw* | pw32*)
9137
symcode='[[ABCDGISTW]]'
9139
hpux*) # Its linker distinguishes data from code symbols
9140
if test "$host_cpu" = ia64; then
9141
symcode='[[ABCDEGRST]]'
9143
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9144
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'"
9147
symcode='[[BCDEGRST]]'
9153
symcode='[[DFNSTU]]'
9157
# Handle CRLF in mingw tool chain
9161
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9165
# If we're using GNU nm, then use its standard symbol codes.
9166
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
9167
symcode='[[ABCDGISTW]]'
9170
# Try without a prefix undercore, then with it.
9171
for ac_symprfx in "" "_"; do
9173
# Write the raw and C identifiers.
9174
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9176
# Check to see that the pipe works correctly.
9180
cat > conftest.$ac_ext <<EOF
9185
void nm_test_func(){}
9189
int main(){nm_test_var='a';nm_test_func();return(0);}
9192
if AC_TRY_EVAL(ac_compile); then
9193
# Now try to grab the symbols.
9195
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9196
# Try sorting and uniquifying the output.
9197
if sort "$nlist" | uniq > "$nlist"T; then
9198
mv -f "$nlist"T "$nlist"
9203
# Make sure that we snagged all the symbols we need.
9204
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
9205
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
9206
cat <<EOF > conftest.$ac_ext
9212
# Now generate the symbol file.
9213
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9215
cat <<EOF >> conftest.$ac_ext
9216
#if defined (__STDC__) && __STDC__
9217
# define lt_ptr_t void *
9219
# define lt_ptr_t char *
9223
/* The mapping between symbol names and symbols. */
9228
lt_preloaded_symbols[[]] =
9231
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9232
cat <<\EOF >> conftest.$ac_ext
9240
# Now try linking the two files.
9241
mv conftest.$ac_objext conftstm.$ac_objext
9242
lt_save_LIBS="$LIBS"
9243
lt_save_CFLAGS="$CFLAGS"
9244
LIBS="conftstm.$ac_objext"
9245
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9246
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9249
LIBS="$lt_save_LIBS"
9250
CFLAGS="$lt_save_CFLAGS"
9252
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9255
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9258
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9261
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9262
cat conftest.$ac_ext >&5
9264
rm -f conftest* conftst*
9266
# Do not use the global_symbol_pipe unless it works.
9267
if test "$pipe_works" = yes; then
9270
lt_cv_sys_global_symbol_pipe=
9274
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9275
lt_cv_sys_global_symbol_to_cdecl=
9277
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9278
AC_MSG_RESULT(failed)
9282
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9285
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9286
# ---------------------------------------
9287
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9288
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9289
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9290
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9292
AC_MSG_CHECKING([for $compiler option to produce PIC])
9294
# C++ specific cases for pic, static, wl, etc.
9295
if test "$GXX" = yes; then
9296
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9297
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9301
# All AIX code is PIC.
9302
if test "$host_cpu" = ia64; then
9303
# AIX 5 now supports IA64 processor
9304
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9308
# FIXME: we need at least 68020 code to build shared libraries, but
9309
# adding the `-m68020' flag to GCC prevents building anything better,
9311
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9313
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9314
# PIC is the default for these OSes.
9316
cygwin* | mingw* | os2*)
9317
# This hack is so that the source file can tell whether it is being
9318
# built for inclusion in a dll (and should export symbols for example).
9319
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9321
darwin* | rhapsody*)
9322
# PIC is the default on this platform
9323
# Common symbols not allowed in MH_DYLIB files
9324
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9327
# DJGPP does not support shared libraries at all
9328
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9331
if test -d /usr/nec; then
9332
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9336
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9337
if test "$host_cpu" != ia64; then
9338
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9342
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9348
# All AIX code is PIC.
9349
if test "$host_cpu" = ia64; then
9350
# AIX 5 now supports IA64 processor
9351
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9353
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9357
case $cc_basename in
9359
# Green Hills C++ Compiler
9360
# _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"
9365
case $cc_basename in
9367
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9370
# Green Hills C++ Compiler
9371
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9378
# FreeBSD uses GNU C++
9380
hpux9* | hpux10* | hpux11*)
9381
case $cc_basename in
9383
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9384
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9385
if test "$host_cpu" != ia64; then
9386
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9390
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9391
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9392
if test "$host_cpu" != ia64; then
9393
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9400
irix5* | irix6* | nonstopux*)
9401
case $cc_basename in
9403
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9404
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9405
# CC pic flag -KPIC is the default.
9412
case $cc_basename in
9415
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9416
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9420
# Make sure the PIC flag is empty. It appears that all Alpha
9421
# Linux and Compaq Tru64 Unix objects are PIC.
9422
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9423
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9434
case $cc_basename in
9436
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9444
osf3* | osf4* | osf5*)
9445
case $cc_basename in
9447
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9450
# Rational C++ 2.4.1
9451
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9454
# Digital/Compaq C++
9455
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9456
# Make sure the PIC flag is empty. It appears that all Alpha
9457
# Linux and Compaq Tru64 Unix objects are PIC.
9458
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9459
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9468
case $cc_basename in
9470
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9477
case $cc_basename in
9479
# Sun C++ 4.2, 5.x and Centerline C++
9480
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9481
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9482
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9485
# Green Hills C++ Compiler
9486
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9493
case $cc_basename in
9496
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9497
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9501
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9508
case $cc_basename in
9510
# NonStop-UX NCC 3.20
9511
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9522
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9528
if test "$GCC" = yes; then
9529
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9530
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9534
# All AIX code is PIC.
9535
if test "$host_cpu" = ia64; then
9536
# AIX 5 now supports IA64 processor
9537
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9542
# FIXME: we need at least 68020 code to build shared libraries, but
9543
# adding the `-m68020' flag to GCC prevents building anything better,
9545
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9548
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9549
# PIC is the default for these OSes.
9552
cygwin* | mingw* | pw32* | os2*)
9553
# This hack is so that the source file can tell whether it is being
9554
# built for inclusion in a dll (and should export symbols for example).
9555
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9558
darwin* | rhapsody*)
9559
# PIC is the default on this platform
9560
# Common symbols not allowed in MH_DYLIB files
9561
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9565
# Just because we use GCC doesn't mean we suddenly get shared libraries
9566
# on systems that don't support them.
9567
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9572
if test -d /usr/nec; then
9573
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9578
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9579
if test "$host_cpu" != ia64; then
9580
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9585
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9589
# PORTME Check for flag to pass linker flags through the system compiler.
9592
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9593
if test "$host_cpu" = ia64; then
9594
# AIX 5 now supports IA64 processor
9595
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9597
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9601
cygwin* | mingw* | pw32* | os2*)
9602
# This hack is so that the source file can tell whether it is being
9603
# built for inclusion in a dll (and should export symbols for example).
9604
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9607
hpux9* | hpux10* | hpux11*)
9608
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9609
if test "$host_cpu" != ia64; then
9610
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9612
# Is there a better lt_prog_compiler_static that works with the bundled CC?
9613
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9616
irix5* | irix6* | nonstopux*)
9617
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9618
# PIC (with -KPIC) is the default.
9619
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9623
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9624
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9627
osf3* | osf4* | osf5*)
9628
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9629
# All OSF/1 code is PIC.
9630
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9634
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9635
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9639
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9640
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9641
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9645
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9646
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9647
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9650
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9651
if test "x$host_vendor" = xsni; then
9652
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9654
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9656
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9657
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9661
if test -d /usr/nec ;then
9662
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9663
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9668
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9669
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9673
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9678
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9681
# Check to make sure the PIC flag actually works.
9683
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9684
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9685
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9686
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9687
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9689
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9691
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9692
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9695
# For platforms which do not support PIC, -DPIC is meaningless:
9697
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9700
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9706
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9707
# ------------------------------------
9708
# See if the linker supports building shared libraries.
9709
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9710
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9712
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9715
# If we're using GNU nm, then we don't want the "-C" option.
9716
# -C means demangle to AIX nm, but means don't demangle with GNU nm
9717
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9718
_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'
9720
_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'
9723
cygwin* | mingw* | pw32*)
9724
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9727
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9732
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9734
_LT_AC_TAGVAR(archive_cmds, $1)=
9735
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9736
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9737
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9738
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9739
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9740
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9741
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9742
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9743
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9744
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9745
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9746
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9747
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9748
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9749
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9750
# include_expsyms should be a list of space-separated symbols to be *always*
9751
# included in the symbol list
9752
_LT_AC_TAGVAR(include_expsyms, $1)=
9753
# exclude_expsyms can be an egrep regular expression of symbols to exclude
9754
# it will be wrapped by ` (' and `)$', so one must not match beginning or
9755
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9756
# as well as any symbol that contains `d'.
9757
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9758
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9759
# platforms (ab)use it in PIC code, but their linkers get confused if
9760
# the symbol is explicitly referenced. Since portable code cannot
9761
# rely on this symbol name, it's probably fine to never include it in
9762
# preloaded symbol tables.
9763
extract_expsyms_cmds=
9766
cygwin* | mingw* | pw32*)
9767
# FIXME: the MSVC++ port hasn't been tested in a loooong time
9768
# When not using gcc, we currently assume that we are using
9769
# Microsoft Visual C++.
9770
if test "$GCC" != yes; then
9779
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
9780
if test "$with_gnu_ld" = yes; then
9781
# If archive_cmds runs LD, not CC, wlarc should be empty
9784
# See if GNU ld supports shared libraries.
9786
aix3* | aix4* | aix5*)
9787
# On AIX/PPC, the GNU linker is very broken
9788
if test "$host_cpu" != ia64; then
9789
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9792
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
9793
*** to be unable to reliably create shared libraries on AIX.
9794
*** Therefore, libtool is disabling shared libraries support. If you
9795
*** really care for shared libraries, you may want to modify your PATH
9796
*** so that a non-GNU linker is found, and then restart.
9803
_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)'
9804
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9805
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9807
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9808
# that the semantics of dynamic libraries on AmigaOS, at least up
9809
# to version 4, is to share data among multiple programs linked
9810
# with the same dynamic library. Since this doesn't match the
9811
# behavior of shared libraries on other platforms, we can't use
9813
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9817
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9818
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9819
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9820
# support --undefined. This deserves some investigation. FIXME
9821
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9823
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9827
cygwin* | mingw* | pw32*)
9828
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9829
# no search path for DLLs.
9830
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9831
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9832
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9834
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9835
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9836
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9837
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9838
else $CC -o impgen impgen.c ; fi)~
9839
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9841
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9843
# cygwin and mingw dlls have different entry points and sets of symbols
9845
# FIXME: what about values for MSVC?
9846
dll_entry=__cygwin_dll_entry@12
9847
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9851
dll_entry=_DllMainCRTStartup@12
9852
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
9856
# mingw and cygwin differ, and it's simplest to just exclude the union
9857
# of the two symbol sets.
9858
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
9860
# recent cygwin and mingw systems supply a stub DllMain which the user
9861
# can override, but on older systems we have to supply one (in ltdll.c)
9862
if test "x$lt_cv_need_dllmain" = "xyes"; then
9863
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
9864
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~
9865
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
9871
# Extract the symbol export list from an `--export-all' def file,
9872
# then regenerate the def file from the symbol export list, so that
9873
# the compiled dll only exports the symbol export list.
9874
# Be careful not to strip the DATA tag left by newer dlltools.
9875
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
9876
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
9877
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
9879
# If the export-symbols file already is a .def file (1st line
9880
# is EXPORTS), use it as is.
9881
# If DATA tags from a recent dlltool are present, honour them!
9882
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
9883
cp $export_symbols $output_objdir/$soname-def;
9885
echo EXPORTS > $output_objdir/$soname-def;
9887
cat $export_symbols | while read symbol; do
9890
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
9891
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
9893
_lt_hint=`expr 1 + \$_lt_hint`;
9897
$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~
9898
$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~
9899
$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~
9900
$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~
9901
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
9905
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9906
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9909
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9910
_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'
9915
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
9916
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9919
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9920
*** create shared libraries on Solaris systems. Therefore, libtool
9921
*** is disabling shared libraries support. We urge you to upgrade GNU
9922
*** binutils to release 2.9.1 or newer. Another option is to modify
9923
*** your PATH or compiler configuration so that the native linker is
9924
*** used, and then restart.
9927
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9928
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9929
_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'
9931
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9936
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9938
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
9939
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
9943
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9944
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9945
_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'
9947
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9952
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
9953
runpath_var=LD_RUN_PATH
9954
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9955
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9957
cygwin* | mingw* | pw32*)
9958
# dlltool doesn't understand --whole-archive et. al.
9959
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9962
# ancient GNU ld didn't support --whole-archive et. al.
9963
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
9964
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9966
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9972
# PORTME fill in a description of your system's linker (not GNU ld)
9975
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9976
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9977
_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'
9978
# Note: this linker hardcodes the directories in LIBPATH if there
9979
# are no directories specified by -L.
9980
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9981
if test "$GCC" = yes && test -z "$link_static_flag"; then
9982
# Neither direct hardcoding nor static linking is supported with a
9984
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
9989
if test "$host_cpu" = ia64; then
9990
# On IA64, the linker does run time linking by default, so we don't
9991
# have to do anything special.
9992
aix_use_runtimelinking=no
9993
exp_sym_flag='-Bexport'
9996
# If we're using GNU nm, then we don't want the "-C" option.
9997
# -C means demangle to AIX nm, but means don't demangle with GNU nm
9998
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9999
_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'
10001
_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'
10004
# KDE requires run time linking. Make it the default.
10005
aix_use_runtimelinking=yes
10006
exp_sym_flag='-bexport'
10007
no_entry_flag='-bnoentry'
10010
# When large executables or shared objects are built, AIX ld can
10011
# have problems creating the table of contents. If linking a library
10012
# or program results in "error TOC overflow" add -mminimal-toc to
10013
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10014
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10016
_LT_AC_TAGVAR(archive_cmds, $1)=''
10017
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10018
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10019
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10021
if test "$GCC" = yes; then
10022
case $host_os in aix4.[012]|aix4.[012].*)
10023
# We only want to do this on AIX 4.2 and lower, the check
10024
# below for broken collect2 doesn't work under 4.3+
10025
collect2name=`${CC} -print-prog-name=collect2`
10026
if test -f "$collect2name" && \
10027
strings "$collect2name" | grep resolve_lib_name >/dev/null
10029
# We have reworked collect2
10030
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10032
# We have old collect2
10033
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10034
# It fails to find uninstalled libraries when the uninstalled
10035
# path is not listed in the libpath. Setting hardcode_minus_L
10036
# to unsupported forces relinking
10037
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10038
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10039
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10042
shared_flag='-shared'
10045
if test "$host_cpu" = ia64; then
10046
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10047
# chokes on -Wl,-G. The following line is correct:
10050
if test "$aix_use_runtimelinking" = yes; then
10051
shared_flag='-qmkshrobj ${wl}-G'
10053
shared_flag='-qmkshrobj'
10058
# Let the compiler handle the export list.
10059
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10060
if test "$aix_use_runtimelinking" = yes; then
10061
# Warning - without using the other runtime loading flags (-brtl),
10062
# -berok will link without error, but may produce a broken library.
10063
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10064
# Determine the default libpath from the value encoded in an empty executable.
10065
_LT_AC_SYS_LIBPATH_AIX
10066
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10067
_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"
10068
_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"
10070
if test "$host_cpu" = ia64; then
10071
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10072
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10073
_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"
10075
# Determine the default libpath from the value encoded in an empty executable.
10076
_LT_AC_SYS_LIBPATH_AIX
10077
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10078
# Warning - without using the other run time loading flags,
10079
# -berok will link without error, but may produce a broken library.
10080
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10081
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10082
# -bexpall does not export symbols beginning with underscore (_)
10083
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10084
# Exported symbols can be pulled into shared objects from archives
10085
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10086
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10087
# This is similar to how AIX traditionally builds it's shared libraries.
10088
_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'
10094
_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)'
10095
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10096
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10097
# see comment about different semantics on the GNU ld section
10098
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10102
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10105
cygwin* | mingw* | pw32*)
10106
# When not using gcc, we currently assume that we are using
10107
# Microsoft Visual C++.
10108
# hardcode_libdir_flag_spec is actually meaningless, as there is
10109
# no search path for DLLs.
10110
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10111
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10112
# Tell ltmain to make .lib files, not .a files.
10114
# FIXME: Setting linknames here is a bad hack.
10115
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
10116
# The linker will automatically build a .lib file if we build a DLL.
10117
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10118
# FIXME: Should let the user specify the lib program.
10119
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10120
fix_srcfile_path='`cygpath -w "$srcfile"`'
10123
darwin* | rhapsody*)
10125
rhapsody* | darwin1.[[012]])
10126
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10129
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10133
# FIXME: Relying on posixy $() will cause problems for
10134
# cross-compilation, but unfortunately the echo tests do not
10135
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
10136
# `"' quotes if we put them in here... so don't!
10137
_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'
10138
# We need to add '_' to the symbols in $export_symbols first
10139
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
10140
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10141
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10142
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10146
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10147
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10148
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10152
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10155
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10156
# support. Future versions do this automatically, but an explicit c++rt0.o
10157
# does not break anything, and helps significantly (at the cost of a little
10160
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10161
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10162
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10163
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10166
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
10168
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10169
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10170
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10171
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10174
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10176
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10177
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10178
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10179
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10182
hpux9* | hpux10* | hpux11*)
10183
if test "$GCC" = yes; then
10186
_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'
10189
if test "$host_cpu" = ia64; then
10190
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10192
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10199
_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'
10202
if test "$host_cpu" = ia64; then
10203
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10205
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10210
if test "$host_cpu" = ia64; then
10211
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10212
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10213
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10215
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10216
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10217
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10219
# hardcode_minus_L: Not really in the search PATH,
10220
# but as the default location of the library.
10221
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10222
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10225
irix5* | irix6* | nonstopux*)
10226
if test "$GCC" = yes; then
10227
_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'
10229
_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'
10231
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10232
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10233
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10237
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10238
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10240
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10242
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10243
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10244
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10248
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10249
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10250
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10251
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10252
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10256
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10257
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10259
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10260
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10261
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10262
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10265
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10266
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10267
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10270
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10271
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10278
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10279
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10280
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10281
_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'
10282
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10286
if test "$GCC" = yes; then
10287
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10288
_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'
10290
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10291
_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'
10293
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10294
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10297
osf4* | osf5*) # as osf3* with the addition of -msym flag
10298
if test "$GCC" = yes; then
10299
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10300
_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'
10301
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10303
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10304
_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'
10305
_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~
10306
$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'
10308
# Both c and cxx compiler support -rpath directly
10309
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10311
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10315
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10316
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10317
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10318
runpath_var=LD_RUN_PATH
10319
hardcode_runpath_var=yes
10323
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10324
if test "$GCC" = yes; then
10325
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10326
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10327
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10329
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10330
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10331
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10333
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10334
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10336
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10337
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
10338
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10340
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10344
if test "x$host_vendor" = xsequent; then
10345
# Use $CC to link under sequent, because it throws in some extra .o
10346
# files that make .init and .fini sections work.
10347
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10349
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10351
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10352
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10353
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10354
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10358
if test "x$host_vendor" = xsni; then
10359
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
10360
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10362
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10363
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10365
runpath_var='LD_RUN_PATH'
10366
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10370
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10371
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10372
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10376
if test -d /usr/nec; then
10377
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10378
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10379
runpath_var=LD_RUN_PATH
10380
hardcode_runpath_var=yes
10381
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10386
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10387
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10388
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10389
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10390
hardcode_runpath_var=yes
10391
runpath_var=LD_RUN_PATH
10394
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10395
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10396
if test "$GCC" = yes; then
10397
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10399
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10401
runpath_var='LD_RUN_PATH'
10402
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10406
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10407
# $CC -shared without GNU ld will not create a library from C++
10408
# object files and a static libstdc++, better avoid it by now
10409
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10410
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10411
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10413
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10414
runpath_var='LD_RUN_PATH'
10418
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10419
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10420
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10424
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10429
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10430
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10432
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10433
if test "$GCC" = yes; then
10434
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10438
# Do we need to explicitly link libc?
10440
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10441
if test "$enable_shared" = yes && test "$GCC" = yes; then
10442
case $_LT_AC_TAGVAR(archive_cmds, $1) in
10444
# FIXME: we may have to deal with multi-command sequences.
10447
# Test whether the compiler implicitly links with -lc since on some
10448
# systems, -lgcc has to come before -lc. If gcc already passes -lc
10449
# to ld, don't add -lc before -lgcc.
10450
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
10452
echo 'static int dummy;' > conftest.$ac_ext
10454
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10457
libobjs=conftest.$ac_objext
10459
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10465
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
10466
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10467
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
10469
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10471
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10473
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10475
cat conftest.err 1>&5
10478
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
10482
])# AC_LIBTOOL_PROG_LD_SHLIBS
10485
# _LT_AC_FILE_LTDLL_C
10486
# -------------------
10487
# Be careful that the start marker always follows a newline.
10488
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
10489
# /* ltdll.c starts here */
10490
# #define WIN32_LEAN_AND_MEAN
10491
# #include <windows.h>
10492
# #undef WIN32_LEAN_AND_MEAN
10493
# #include <stdio.h>
10495
# #ifndef __CYGWIN__
10496
# # ifdef __CYGWIN32__
10497
# # define __CYGWIN__ __CYGWIN32__
10501
# #ifdef __cplusplus
10504
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
10505
# #ifdef __cplusplus
10509
# #ifdef __CYGWIN__
10510
# #include <cygwin/cygwin_dll.h>
10511
# DECLARE_CYGWIN_DLL( DllMain );
10513
# HINSTANCE __hDllInstance_base;
10516
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
10518
# __hDllInstance_base = hInst;
10521
# /* ltdll.c ends here */
10522
])# _LT_AC_FILE_LTDLL_C
10525
# _LT_AC_FILE_IMPGEN_C
10526
# --------------------
10527
# Be careful that the start marker always follows a newline.
10528
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10529
# /* impgen.c starts here */
10530
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10532
# This file is part of GNU libtool.
10534
# This program is free software; you can redistribute it and/or modify
10535
# it under the terms of the GNU General Public License as published by
10536
# the Free Software Foundation; either version 2 of the License, or
10537
# (at your option) any later version.
10539
# This program is distributed in the hope that it will be useful,
10540
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10541
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10542
# GNU General Public License for more details.
10544
# You should have received a copy of the GNU General Public License
10545
# along with this program; if not, write to the Free Software
10546
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10549
# #include <stdio.h> /* for printf() */
10550
# #include <unistd.h> /* for open(), lseek(), read() */
10551
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
10552
# #include <string.h> /* for strdup() */
10554
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
10556
# #define O_BINARY 0
10559
# static unsigned int
10560
# pe_get16 (fd, offset)
10564
# unsigned char b[2];
10565
# lseek (fd, offset, SEEK_SET);
10567
# return b[0] + (b[1]<<8);
10570
# static unsigned int
10571
# pe_get32 (fd, offset)
10575
# unsigned char b[4];
10576
# lseek (fd, offset, SEEK_SET);
10578
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10581
# static unsigned int
10585
# unsigned char *b = ptr;
10586
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10590
# main (argc, argv)
10595
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10596
# unsigned long export_rva, export_size, nsections, secptr, expptr;
10597
# unsigned long name_rvas, nexp;
10598
# unsigned char *expdata, *erva;
10599
# char *filename, *dll_name;
10601
# filename = argv[1];
10603
# dll = open(filename, O_RDONLY|O_BINARY);
10607
# dll_name = filename;
10609
# for (i=0; filename[i]; i++)
10610
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
10611
# dll_name = filename + i +1;
10613
# pe_header_offset = pe_get32 (dll, 0x3c);
10614
# opthdr_ofs = pe_header_offset + 4 + 20;
10615
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
10617
# if (num_entries < 1) /* no exports */
10620
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
10621
# export_size = pe_get32 (dll, opthdr_ofs + 100);
10622
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10623
# secptr = (pe_header_offset + 4 + 20 +
10624
# pe_get16 (dll, pe_header_offset + 4 + 16));
10627
# for (i = 0; i < nsections; i++)
10630
# unsigned long secptr1 = secptr + 40 * i;
10631
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10632
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10633
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10634
# lseek(dll, secptr1, SEEK_SET);
10635
# read(dll, sname, 8);
10636
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
10638
# expptr = fptr + (export_rva - vaddr);
10639
# if (export_rva + export_size > vaddr + vsize)
10640
# export_size = vsize - (export_rva - vaddr);
10645
# expdata = (unsigned char*)malloc(export_size);
10646
# lseek (dll, expptr, SEEK_SET);
10647
# read (dll, expdata, export_size);
10648
# erva = expdata - export_rva;
10650
# nexp = pe_as32 (expdata+24);
10651
# name_rvas = pe_as32 (expdata+32);
10653
# printf ("EXPORTS\n");
10654
# for (i = 0; i<nexp; i++)
10656
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10657
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10662
# /* impgen.c ends here */
10663
])# _LT_AC_FILE_IMPGEN_C
10665
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10666
# ---------------------------------
10667
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10671
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
10672
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10673
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10674
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10675
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10676
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
10677
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
10679
# This is just to silence aclocal about the macro not being used
10680
ifelse([AC_DISABLE_FAST_INSTALL])
10682
AC_DEFUN([LT_AC_PROG_GCJ],
10683
[AC_CHECK_TOOL(GCJ, gcj, no)
10684
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10688
AC_DEFUN([LT_AC_PROG_RC],
10689
[AC_CHECK_TOOL(RC, windres, no)
10692
# NOTE: This macro has been submitted for inclusion into #
10693
# GNU Autoconf as AC_PROG_SED. When it is available in #
10694
# a released version of Autoconf we should remove this #
10695
# macro and use it instead. #
10698
# Check for a fully-functional sed program, that truncates
10699
# as few characters as possible. Prefer GNU sed if found.
10700
AC_DEFUN([LT_AC_PROG_SED],
10701
[AC_MSG_CHECKING([for a sed that does not truncate output])
10702
AC_CACHE_VAL(lt_cv_path_SED,
10703
[# Loop through the user's path and test for sed and gsed.
10704
# Then use that list of sed's as ones to test for truncation.
10705
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706
for as_dir in $PATH
10709
test -z "$as_dir" && as_dir=.
10710
for ac_prog in sed gsed; do
10711
for ac_exec_ext in '' $ac_executable_extensions; do
10712
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10713
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10719
# Create a temporary directory, and hook for its removal unless debugging.
10722
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10723
trap '{ (exit 1); exit 1; }' 1 2 13 15
10726
# Create a (secure) tmp directory for tmp files.
10729
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10730
test -n "$tmp" && test -d "$tmp"
10733
tmp=$TMPDIR/sed$$-$RANDOM
10734
(umask 077 && mkdir $tmp)
10737
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10738
{ (exit 1); exit 1; }
10742
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10743
# along with /bin/sed that truncates output.
10744
for _sed in $_sed_list /usr/xpg4/bin/sed; do
10745
test ! -f ${_sed} && break
10746
cat /dev/null > "$tmp/sed.in"
10748
echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10749
# Check for GNU sed and select it if it is found.
10750
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10751
lt_cv_path_SED=${_sed}
10755
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10756
mv "$tmp/sed.tmp" "$tmp/sed.in"
10757
cp "$tmp/sed.in" "$tmp/sed.nl"
10758
echo >>"$tmp/sed.nl"
10759
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10760
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10761
# 10000 chars as input seems more than enough
10762
test $_count -gt 10 && break
10763
_count=`expr $_count + 1`
10764
if test $_count -gt $_max; then
10766
lt_cv_path_SED=$_sed
10772
AC_MSG_RESULT([$SED])
10775
# Do all the work for Automake. -*- Autoconf -*-
10777
# This macro actually does too much some checks are only needed if
10778
# your package does certain things. But this isn't really a big deal.
10780
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
10781
# Free Software Foundation, Inc.
10783
# This program is free software; you can redistribute it and/or modify
10784
# it under the terms of the GNU General Public License as published by
10785
# the Free Software Foundation; either version 2, or (at your option)
10786
# any later version.
10788
# This program is distributed in the hope that it will be useful,
10789
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10790
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10791
# GNU General Public License for more details.
10793
# You should have received a copy of the GNU General Public License
10794
# along with this program; if not, write to the Free Software
10795
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10802
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
10803
# the ones we care about.
10804
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10806
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10807
# AM_INIT_AUTOMAKE([OPTIONS])
10808
# -----------------------------------------------
10809
# The call with PACKAGE and VERSION arguments is the old style
10810
# call (pre autoconf-2.50), which is being phased out. PACKAGE
10811
# and VERSION should now be passed to AC_INIT and removed from
10812
# the call to AM_INIT_AUTOMAKE.
10813
# We support both call styles for the transition. After
10814
# the next Automake release, Autoconf can make the AC_INIT
10815
# arguments mandatory, and then we can depend on a new Autoconf
10816
# release and drop the old call support.
10817
AC_DEFUN([AM_INIT_AUTOMAKE],
10818
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10819
AC_REQUIRE([AC_PROG_INSTALL])dnl
10820
# test to see if srcdir already configured
10821
if test "`cd $srcdir && pwd`" != "`pwd`" &&
10822
test -f $srcdir/config.status; then
10823
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10826
# test whether we have cygpath
10827
if test -z "$CYGPATH_W"; then
10828
if (cygpath --version) >/dev/null 2>/dev/null; then
10829
CYGPATH_W='cygpath -w'
10834
AC_SUBST([CYGPATH_W])
10836
# Define the identity of the package.
10837
dnl Distinguish between old-style and new-style calls.
10839
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10840
AC_SUBST([PACKAGE], [$1])dnl
10841
AC_SUBST([VERSION], [$2])],
10842
[_AM_SET_OPTIONS([$1])dnl
10843
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10844
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10846
_AM_IF_OPTION([no-define],,
10847
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10848
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10850
# Some tools Automake needs.
10851
AC_REQUIRE([AM_SANITY_CHECK])dnl
10852
AC_REQUIRE([AC_ARG_PROGRAM])dnl
10853
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10854
AM_MISSING_PROG(AUTOCONF, autoconf)
10855
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10856
AM_MISSING_PROG(AUTOHEADER, autoheader)
10857
AM_MISSING_PROG(MAKEINFO, makeinfo)
10858
AM_MISSING_PROG(AMTAR, tar)
10860
AM_PROG_INSTALL_STRIP
10861
# We need awk for the "check" target. The system "awk" is bad on
10863
AC_REQUIRE([AC_PROG_AWK])dnl
10864
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10865
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10867
_AM_IF_OPTION([no-dependencies],,
10868
[AC_PROVIDE_IFELSE([AC_PROG_CC],
10869
[_AM_DEPENDENCIES(CC)],
10870
[define([AC_PROG_CC],
10871
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10872
AC_PROVIDE_IFELSE([AC_PROG_CXX],
10873
[_AM_DEPENDENCIES(CXX)],
10874
[define([AC_PROG_CXX],
10875
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10880
# When config.status generates a header, we must update the stamp-h file.
10881
# This file resides in the same directory as the config header
10882
# that is generated. The stamp files are numbered to have different names.
10884
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10885
# loop where config.status creates the headers, so we can generate
10886
# our stamp files there.
10887
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10888
[# Compute $1's index in $config_headers.
10890
for _am_header in $config_headers :; do
10891
case $_am_header in
10895
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
10898
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
10900
# Copyright 2002 Free Software Foundation, Inc.
10902
# This program is free software; you can redistribute it and/or modify
10903
# it under the terms of the GNU General Public License as published by
10904
# the Free Software Foundation; either version 2, or (at your option)
10905
# any later version.
10907
# This program is distributed in the hope that it will be useful,
10908
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10909
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10910
# GNU General Public License for more details.
10912
# You should have received a copy of the GNU General Public License
10913
# along with this program; if not, write to the Free Software
10914
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
10916
# AM_AUTOMAKE_VERSION(VERSION)
21
10917
# ----------------------------
22
10918
# Automake X.Y traces this macro to ensure aclocal.m4 has been
23
10919
# generated from the m4 files accompanying Automake X.Y.
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
10920
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
26
10922
# AM_SET_CURRENT_AUTOMAKE_VERSION
27
10923
# -------------------------------
28
10924
# Call AM_AUTOMAKE_VERSION so it can be traced.
29
10925
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
30
10926
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
10927
[AM_AUTOMAKE_VERSION([1.7.6])])
10929
# Helper functions for option handling. -*- Autoconf -*-
10931
# Copyright 2001, 2002 Free Software Foundation, Inc.
10933
# This program is free software; you can redistribute it and/or modify
10934
# it under the terms of the GNU General Public License as published by
10935
# the Free Software Foundation; either version 2, or (at your option)
10936
# any later version.
10938
# This program is distributed in the hope that it will be useful,
10939
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10940
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10941
# GNU General Public License for more details.
10943
# You should have received a copy of the GNU General Public License
10944
# along with this program; if not, write to the Free Software
10945
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10950
# _AM_MANGLE_OPTION(NAME)
10951
# -----------------------
10952
AC_DEFUN([_AM_MANGLE_OPTION],
10953
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10955
# _AM_SET_OPTION(NAME)
10956
# ------------------------------
10957
# Set option NAME. Presently that only means defining a flag for this option.
10958
AC_DEFUN([_AM_SET_OPTION],
10959
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10961
# _AM_SET_OPTIONS(OPTIONS)
10962
# ----------------------------------
10963
# OPTIONS is a space-separated list of Automake options.
10964
AC_DEFUN([_AM_SET_OPTIONS],
10965
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10967
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10968
# -------------------------------------------
10969
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10970
AC_DEFUN([_AM_IF_OPTION],
10971
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10974
# Check to make sure that the build environment is sane.
10977
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
10979
# This program is free software; you can redistribute it and/or modify
10980
# it under the terms of the GNU General Public License as published by
10981
# the Free Software Foundation; either version 2, or (at your option)
10982
# any later version.
10984
# This program is distributed in the hope that it will be useful,
10985
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10986
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10987
# GNU General Public License for more details.
10989
# You should have received a copy of the GNU General Public License
10990
# along with this program; if not, write to the Free Software
10991
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10998
AC_DEFUN([AM_SANITY_CHECK],
10999
[AC_MSG_CHECKING([whether build environment is sane])
11002
echo timestamp > conftest.file
11003
# Do `set' in a subshell so we don't clobber the current shell's
11004
# arguments. Must try -L first in case configure is actually a
11005
# symlink; some systems play weird games with the mod time of symlinks
11006
# (eg FreeBSD returns the mod time of the symlink's containing
11009
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11010
if test "$[*]" = "X"; then
11012
set X `ls -t $srcdir/configure conftest.file`
11014
rm -f conftest.file
11015
if test "$[*]" != "X $srcdir/configure conftest.file" \
11016
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
11018
# If neither matched, then we have a broken ls. This can happen
11019
# if, for instance, CONFIG_SHELL is bash and it inherits a
11020
# broken ls alias from the environment. This has actually
11021
# happened. Such a system could not be considered "sane".
11022
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11023
alias in your environment])
11026
test "$[2]" = conftest.file
11032
AC_MSG_ERROR([newly created file is older than distributed files!
11033
Check your system clock])
11035
AC_MSG_RESULT(yes)])
11040
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
11042
# This program is free software; you can redistribute it and/or modify
11043
# it under the terms of the GNU General Public License as published by
11044
# the Free Software Foundation; either version 2, or (at your option)
11045
# any later version.
11047
# This program is distributed in the hope that it will be useful,
11048
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11049
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11050
# GNU General Public License for more details.
11052
# You should have received a copy of the GNU General Public License
11053
# along with this program; if not, write to the Free Software
11054
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11059
# AM_MISSING_PROG(NAME, PROGRAM)
11060
# ------------------------------
11061
AC_DEFUN([AM_MISSING_PROG],
11062
[AC_REQUIRE([AM_MISSING_HAS_RUN])
11063
$1=${$1-"${am_missing_run}$2"}
11067
# AM_MISSING_HAS_RUN
11068
# ------------------
11069
# Define MISSING if not defined so far and test if it supports --run.
11070
# If it does, set am_missing_run to use it, otherwise, to nothing.
11071
AC_DEFUN([AM_MISSING_HAS_RUN],
11072
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11073
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11074
# Use eval to expand $SHELL
11075
if eval "$MISSING --run true"; then
11076
am_missing_run="$MISSING --run "
11079
AC_MSG_WARN([`missing' script is too old or missing])
11083
# AM_AUX_DIR_EXPAND
11085
# Copyright 2001 Free Software Foundation, Inc.
11087
# This program is free software; you can redistribute it and/or modify
11088
# it under the terms of the GNU General Public License as published by
11089
# the Free Software Foundation; either version 2, or (at your option)
11090
# any later version.
11092
# This program is distributed in the hope that it will be useful,
11093
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11094
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11095
# GNU General Public License for more details.
11097
# You should have received a copy of the GNU General Public License
11098
# along with this program; if not, write to the Free Software
11099
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41
11102
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
11103
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to