3
dnl This file is part of the KDE libraries/packages
4
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
7
dnl This file is free software; you can redistribute it and/or
8
dnl modify it under the terms of the GNU Library General Public
9
dnl License as published by the Free Software Foundation; either
10
dnl version 2 of the License, or (at your option) any later version.
12
dnl This library is distributed in the hope that it will be useful,
13
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
dnl Library General Public License for more details.
17
dnl You should have received a copy of the GNU Library General Public License
18
dnl along with this library; see the file COPYING.LIB. If not, write to
19
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
dnl Boston, MA 02111-1307, USA.
23
dnl Please do not modify this file unless you expect your modifications to be
24
dnl carried into every other module in the repository.
26
dnl Single-module modifications are best placed in configure.in for kdelibs
27
dnl and kdebase or configure.in.in if present.
30
dnl Internal subroutine of AC_PATH_X.
31
dnl Set ac_x_includes and/or ac_x_libraries.
32
AC_DEFUN(KDE_PATH_X_DIRECT,
34
AC_REQUIRE([KDE_CHECK_LIB64])
36
if test "$ac_x_includes" = NO; then
37
# Guess where to find include files, by looking for this one X11 .h file.
38
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
40
# First, try using that file with no special directory specified.
41
AC_TRY_CPP([#include <$x_direct_test_include>],
42
[# We can compile using X headers with no special include directory.
44
[# Look for the header file in a standard set of common directories.
45
# Check X11 before X11Rn because it is often a symlink to the current release.
57
/usr/local/X11/include \
58
/usr/local/X11R6/include \
59
/usr/local/X11R5/include \
60
/usr/local/X11R4/include \
62
/usr/local/include/X11 \
63
/usr/local/include/X11R6 \
64
/usr/local/include/X11R5 \
65
/usr/local/include/X11R4 \
69
/usr/XFree86/include/X11 \
73
/usr/unsupported/include \
75
/usr/local/x11r5/include \
76
/usr/lpp/Xamples/include \
78
/usr/openwin/include \
79
/usr/openwin/share/include \
82
if test -r "$ac_dir/$x_direct_test_include"; then
87
fi # $ac_x_includes = NO
89
if test "$ac_x_libraries" = NO; then
90
# Check for the libraries.
92
test -z "$x_direct_test_library" && x_direct_test_library=Xt
93
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
95
# See if we find them without any special options.
96
# Don't add to $LIBS permanently.
98
LIBS="-l$x_direct_test_library $LIBS"
99
AC_TRY_LINK(, [${x_direct_test_function}()],
100
[LIBS="$ac_save_LIBS"
101
# We can link X programs with no special library path.
103
[LIBS="$ac_save_LIBS"
104
# First see if replacing the include by lib works.
105
# Check X11 before X11Rn because it is often a symlink to the current release.
106
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
107
/usr/X11/lib${kdelibsuff} \
108
/usr/X11R6/lib${kdelibsuff} \
109
/usr/X11R5/lib${kdelibsuff} \
110
/usr/X11R4/lib${kdelibsuff} \
112
/usr/lib${kdelibsuff}/X11 \
113
/usr/lib${kdelibsuff}/X11R6 \
114
/usr/lib${kdelibsuff}/X11R5 \
115
/usr/lib${kdelibsuff}/X11R4 \
117
/usr/local/X11/lib${kdelibsuff} \
118
/usr/local/X11R6/lib${kdelibsuff} \
119
/usr/local/X11R5/lib${kdelibsuff} \
120
/usr/local/X11R4/lib${kdelibsuff} \
122
/usr/local/lib${kdelibsuff}/X11 \
123
/usr/local/lib${kdelibsuff}/X11R6 \
124
/usr/local/lib${kdelibsuff}/X11R5 \
125
/usr/local/lib${kdelibsuff}/X11R4 \
127
/usr/X386/lib${kdelibsuff} \
128
/usr/x386/lib${kdelibsuff} \
129
/usr/XFree86/lib${kdelibsuff}/X11 \
131
/usr/lib${kdelibsuff} \
132
/usr/local/lib${kdelibsuff} \
133
/usr/unsupported/lib${kdelibsuff} \
134
/usr/athena/lib${kdelibsuff} \
135
/usr/local/x11r5/lib${kdelibsuff} \
136
/usr/lpp/Xamples/lib${kdelibsuff} \
137
/lib/usr/lib${kdelibsuff}/X11 \
139
/usr/openwin/lib${kdelibsuff} \
140
/usr/openwin/share/lib${kdelibsuff} \
143
dnl Don't even attempt the hair of trying to link an X program!
144
for ac_extension in a so sl; do
145
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
146
ac_x_libraries=$ac_dir
151
fi # $ac_x_libraries = NO
155
dnl ------------------------------------------------------------------------
156
dnl Find a file (or one of more files in a list of dirs)
157
dnl ------------------------------------------------------------------------
159
AC_DEFUN(AC_FIND_FILE,
166
echo "configure: __oline__: $i/$j" >&AC_FD_CC
167
if test -r "$i/$j"; then
168
echo "taking that" >&AC_FD_CC
176
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
177
dnl if-not-found, test-parameter)
178
AC_DEFUN(KDE_FIND_PATH,
180
AC_MSG_CHECKING([for $1])
181
if test -n "$$2"; then
184
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
186
AC_CACHE_VAL(kde_cv_path_$kde_cache,
198
if test -x "$dir/$1"; then
201
evalstr="$dir/$1 $5 2>&1 "
202
if eval $evalstr; then
203
kde_cv_path="$dir/$1"
207
kde_cv_path="$dir/$1"
213
eval "kde_cv_path_$kde_cache=$kde_cv_path"
217
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
221
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
222
AC_MSG_RESULT(not found)
225
AC_MSG_RESULT($kde_cv_path)
231
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
233
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
234
Please check whether you installed Qt correctly.
235
You need to have a running moc binary.
236
configure tried to run $ac_cv_path_moc and the test didn't
237
succeed. If configure shouldn't have tried this one, set
238
the environment variable MOC to the right one before running
243
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
245
AC_MSG_WARN([No Qt ui compiler (uic) found!
246
Please check whether you installed Qt correctly.
247
You need to have a running uic binary.
248
configure tried to run $ac_cv_path_uic and the test didn't
249
succeed. If configure shouldn't have tried this one, set
250
the environment variable UIC to the right one before running
256
AC_DEFUN(KDE_CHECK_UIC_FLAG,
258
AC_MSG_CHECKING([whether uic supports -$1 ])
259
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
260
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
262
cat >conftest.ui <<EOT
263
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
265
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
266
if AC_TRY_EVAL(ac_uic_testrun); then
267
eval "kde_cv_prog_uic_$kde_cache=yes"
269
eval "kde_cv_prog_uic_$kde_cache=no"
274
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
286
dnl ------------------------------------------------------------------------
287
dnl Find the meta object compiler and the ui compiler in the PATH,
288
dnl in $QTDIR/bin, and some more usual places
289
dnl ------------------------------------------------------------------------
291
AC_DEFUN(AC_PATH_QT_MOC_UIC,
294
for dir in $kde_qt_dirs; do
295
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
297
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
298
if test ! "$ac_qt_bindir" = "NO"; then
299
qt_bindirs="$ac_qt_bindir $qt_bindirs"
302
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
303
if test -z "$UIC_NOT_NEEDED"; then
304
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
305
if test -z "$UIC_PATH" ; then
306
KDE_UIC_ERROR_MESSAGE
308
elif test $kde_qtver = 3; then
309
KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
310
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
313
if test x$ac_uic_supports_libpath = xyes; then
314
UIC="$UIC -L \$(kde_widgetdir)"
316
if test x$ac_uic_supports_nounload = xyes; then
321
UIC="echo uic not available: "
328
if test $kde_qtver = 3; then
335
AC_DEFUN(KDE_1_CHECK_PATHS,
337
KDE_1_CHECK_PATH_HEADERS
341
if test -n "$USE_RPATH"; then
343
if test -n "$kde_libraries"; then
344
KDE_TEST_RPATH="-R $kde_libraries"
347
if test -n "$qt_libraries"; then
348
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
351
if test -n "$x_libraries"; then
352
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
355
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
358
AC_MSG_CHECKING([for KDE libraries installed])
359
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'
361
if AC_TRY_EVAL(ac_link) && test -s conftest; then
364
AC_MSG_ERROR([your system fails at linking a small KDE application!
365
Check, if your compiler is installed correctly and if you have used the
366
same compiler to compile Qt and kdelibs as you did use now.
367
For more details about this problem, look at the end of config.log.])
370
if eval `KDEDIR= ./conftest 2>&5`; then
376
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
377
kde_have_all_paths=yes
379
KDE_SET_PATHS($kde_result)
383
AC_DEFUN(KDE_SET_PATHS,
385
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
386
kde_htmldir=\"$kde_htmldir\" \
387
kde_appsdir=\"$kde_appsdir\" \
388
kde_icondir=\"$kde_icondir\" \
389
kde_sounddir=\"$kde_sounddir\" \
390
kde_datadir=\"$kde_datadir\" \
391
kde_locale=\"$kde_locale\" \
392
kde_cgidir=\"$kde_cgidir\" \
393
kde_confdir=\"$kde_confdir\" \
394
kde_mimedir=\"$kde_mimedir\" \
395
kde_toolbardir=\"$kde_toolbardir\" \
396
kde_wallpaperdir=\"$kde_wallpaperdir\" \
397
kde_templatesdir=\"$kde_templatesdir\" \
398
kde_bindir=\"$kde_bindir\" \
399
kde_servicesdir=\"$kde_servicesdir\" \
400
kde_servicetypesdir=\"$kde_servicetypesdir\" \
401
kde_moduledir=\"$kde_moduledir\" \
402
kde_styledir=\"$kde_styledir\" \
403
kde_widgetdir=\"$kde_widgetdir\" \
404
xdg_appsdir=\"$xdg_appsdir\" \
405
xdg_directorydir=\"$xdg_directorydir\" \
409
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
411
if test "$1" = "default"; then
413
if test -z "$kde_htmldir"; then
414
kde_htmldir='\${prefix}/share/doc/HTML'
416
if test -z "$kde_appsdir"; then
417
kde_appsdir='\${prefix}/share/applnk'
419
if test -z "$kde_icondir"; then
420
kde_icondir='\${prefix}/share/icons'
422
if test -z "$kde_sounddir"; then
423
kde_sounddir='\${prefix}/share/sounds'
425
if test -z "$kde_datadir"; then
426
kde_datadir='\${prefix}/share/apps'
428
if test -z "$kde_locale"; then
429
kde_locale='\${prefix}/share/locale'
431
if test -z "$kde_cgidir"; then
432
kde_cgidir='\${exec_prefix}/cgi-bin'
434
if test -z "$kde_confdir"; then
435
kde_confdir='\${prefix}/share/config'
437
if test -z "$kde_mimedir"; then
438
kde_mimedir='\${prefix}/share/mimelnk'
440
if test -z "$kde_toolbardir"; then
441
kde_toolbardir='\${prefix}/share/toolbar'
443
if test -z "$kde_wallpaperdir"; then
444
kde_wallpaperdir='\${prefix}/share/wallpapers'
446
if test -z "$kde_templatesdir"; then
447
kde_templatesdir='\${prefix}/share/templates'
449
if test -z "$kde_bindir"; then
450
kde_bindir='\${exec_prefix}/bin'
452
if test -z "$kde_servicesdir"; then
453
kde_servicesdir='\${prefix}/share/services'
455
if test -z "$kde_servicetypesdir"; then
456
kde_servicetypesdir='\${prefix}/share/servicetypes'
458
if test -z "$kde_moduledir"; then
459
if test "$kde_qtver" = "2"; then
460
kde_moduledir='\${libdir}/kde2'
462
kde_moduledir='\${libdir}/kde3'
465
if test -z "$kde_styledir"; then
466
kde_styledir='\${libdir}/kde3/plugins/styles'
468
if test -z "$kde_widgetdir"; then
469
kde_widgetdir='\${libdir}/kde3/plugins/designer'
471
if test -z "$xdg_appsdir"; then
472
xdg_appsdir='\${datadir}/applications'
474
if test -z "$xdg_directorydir"; then
475
xdg_directorydir='\${datadir}/desktop-directories'
478
KDE_SET_PATHS(defaults)
482
if test $kde_qtver = 1; then
483
AC_MSG_RESULT([compiling])
486
AC_MSG_ERROR([path checking not yet supported for KDE 2])
492
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
493
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
494
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
495
test -z "$kde_datadir" || test -z "$kde_locale" ||
496
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
497
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
498
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
499
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
500
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
501
test -z "$kde_styledir" || test -z "kde_widgetdir" ||
502
test -z "$xdg_appsdir" || test -z "xdg_directorydir"
503
test "x$kde_have_all_paths" != "xyes"; then
504
kde_have_all_paths=no
508
AC_DEFUN(KDE_MISSING_PROG_ERROR,
510
AC_MSG_ERROR([The important program $1 was not found!
511
Please check whether you installed KDE correctly.
515
AC_DEFUN(KDE_MISSING_ARTS_ERROR,
517
AC_MSG_ERROR([The important program $1 was not found!
518
Please check whether you installed aRts correctly.
522
AC_DEFUN(KDE_SUBST_PROGRAMS,
525
[ --without-arts build without aRts [default=detect] ],
526
[build_arts=$withval],
529
AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
531
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"
532
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
533
if test -n "$KDEDIRS"; then
536
for dir in $KDEDIRS; do
537
kde_default_bindirs="$dir/bin $kde_default_bindirs "
541
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
542
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
543
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
544
if test "$build_arts" != "no"; then
545
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
546
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
548
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
549
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
551
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
552
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
553
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
554
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
555
if test "$KDE_XSL_STYLESHEET" = "NO"; then
556
KDE_XSL_STYLESHEET=""
558
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
562
DCOP_DEPENDENCIES='$(DCOPIDL)'
564
AC_SUBST(DCOPIDL2CPP)
565
AC_SUBST(DCOP_DEPENDENCIES)
567
AC_SUBST(ARTSCCONFIG)
569
AC_SUBST(BROCKENBORING)
571
AC_SUBST(KDE_XSL_STYLESHEET)
573
if test -x "$KDECONFIG"; then # it can be "compiled"
574
kde_libs_prefix=`$KDECONFIG --prefix`
575
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
576
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
577
This means it has been moved since you installed it.
578
This won't work. Please recompile kdelibs for the new prefix.
581
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
583
kde_libs_prefix='$(prefix)'
584
kde_libs_htmldir='$(kde_htmldir)'
586
AC_SUBST(kde_libs_prefix)
587
AC_SUBST(kde_libs_htmldir)
590
AC_DEFUN(AC_CREATE_KFSSTND,
592
AC_REQUIRE([AC_CHECK_RPATH])
594
AC_MSG_CHECKING([for KDE paths])
597
AC_CACHE_VAL(kde_cv_all_paths,
599
KDE_SET_DEFAULT_PATHS($1)
602
eval "$kde_cv_all_paths"
603
KDE_CHECK_PATHS_FOR_COMPLETENESS
604
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
605
# wrong values were cached, may be, we can set better ones
607
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
608
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
609
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
610
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
614
xdg_appsdir = xdg_directorydir=
615
KDE_SET_DEFAULT_PATHS($1)
616
eval "$kde_cv_all_paths"
617
KDE_CHECK_PATHS_FOR_COMPLETENESS
618
kde_result="$kde_result (cache overridden)"
620
if test "$kde_have_all_paths" = "no"; then
621
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
622
Since it had compiled and linked before, it must be a strange problem on your system.
623
Look at config.log for details. If you are not able to fix this, look at
624
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
625
(If you're using an egcs version on Linux, you may update binutils!)
629
AC_MSG_RESULT($kde_result)
638
AC_DEFUN(AC_SUBST_KFSSTND,
640
AC_SUBST(kde_htmldir)
641
AC_SUBST(kde_appsdir)
642
AC_SUBST(kde_icondir)
643
AC_SUBST(kde_sounddir)
644
AC_SUBST(kde_datadir)
646
AC_SUBST(kde_confdir)
647
AC_SUBST(kde_mimedir)
648
AC_SUBST(kde_wallpaperdir)
650
dnl X Desktop Group standards
651
AC_SUBST(xdg_appsdir)
652
AC_SUBST(xdg_directorydir)
654
AC_SUBST(kde_templatesdir)
655
AC_SUBST(kde_servicesdir)
656
AC_SUBST(kde_servicetypesdir)
657
AC_SUBST(kde_moduledir)
658
AC_SUBST(kdeinitdir, '$(kde_moduledir)')
659
AC_SUBST(kde_styledir)
660
AC_SUBST(kde_widgetdir)
661
if test "$kde_qtver" = 1; then
662
kde_minidir="$kde_icondir/mini"
664
# for KDE 1 - this breaks KDE2 apps using minidir, but
665
# that's the plan ;-/
666
kde_minidir="/dev/null"
668
dnl AC_SUBST(kde_minidir)
669
dnl AC_SUBST(kde_cgidir)
670
dnl AC_SUBST(kde_toolbardir)
673
AC_DEFUN(KDE_MISC_TESTS,
676
dnl Checks for libraries.
677
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
679
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
682
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
683
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
684
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
685
You should install libcrypt from another source or configure with PAM
690
if test $kde_have_crypt = yes; then
691
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
695
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
696
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
697
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
698
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
700
AC_CHECK_FUNC(inet_ntoa)
701
if test $ac_cv_func_inet_ntoa = no; then
702
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
704
AC_CHECK_FUNC(connect)
705
if test $ac_cv_func_connect = no; then
706
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
710
AC_CHECK_FUNC(remove)
711
if test $ac_cv_func_remove = no; then
712
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
715
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
716
AC_CHECK_FUNC(shmat, ,
717
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
719
# more headers that need to be explicitly included on darwin
720
AC_CHECK_HEADERS(sys/types.h stdint.h)
722
# darwin requires a poll emulation library
723
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
725
# CoreAudio framework
726
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
727
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
728
FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
733
AC_SUBST(FRAMEWORK_COREAUDIO)
734
LIBSOCKET="$X_EXTRA_LIBS"
736
AC_SUBST(X_EXTRA_LIBS)
737
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
740
case $host in dnl this *is* LynxOS specific
742
AC_MSG_CHECKING([LynxOS header file wrappers])
743
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
744
AC_MSG_RESULT(disabled)
745
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
753
# darwin needs this to initialize the environment
754
AC_CHECK_HEADERS(crt_externs.h)
755
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
757
AH_VERBATIM(_DARWIN_ENVIRON,
759
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
760
# include <sys/time.h>
761
# include <crt_externs.h>
762
# define environ (*_NSGetEnviron())
766
AH_VERBATIM(_AIX_STRINGS_H_BZERO,
769
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
770
* that defines bzero.
778
AC_CHECK_FUNCS([vsnprintf snprintf])
782
* On HP-UX, the declaration of vsnprintf() is needed every time !
785
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
795
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
799
int snprintf(char *str, size_t n, char const *fmt, ...);
805
dnl ------------------------------------------------------------------------
806
dnl Find the header files and libraries for X-Windows. Extended the
808
dnl ------------------------------------------------------------------------
812
AC_REQUIRE([KDE_MISC_TESTS])dnl
813
AC_REQUIRE([KDE_CHECK_LIB64])
817
[ --enable-embedded link to Qt-embedded, don't use X],
818
kde_use_qt_emb=$enableval,
824
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
825
kde_use_qt_emb_palm=$enableval,
826
kde_use_qt_emb_palm=no
831
[ --enable-mac link to Qt/Mac (don't use X)],
832
kde_use_qt_mac=$enableval,
836
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
838
AC_MSG_CHECKING(for X)
841
AC_CACHE_VAL(kde_cv_have_x,
842
[# One or both of the vars are not set, and there is no cached value.
843
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
846
kde_x_includes=$x_includes
848
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
851
kde_x_libraries=$x_libraries
854
# below we use the standard autoconf calls
855
ac_x_libraries=$kde_x_libraries
856
ac_x_includes=$kde_x_includes
859
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
860
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
861
dnl location. The correct location is /usr/lib32 or an undefined value
862
dnl (the linker is smart enough to pick the correct default library).
863
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
864
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
865
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
866
dnl x_includes should be left alone.
874
if test -z "$ac_x_includes"; then
877
if test -z "$ac_x_libraries"; then
878
ac_x_libraries="/usr/lib${kdelibsuff}"
881
#from now on we use our own again
883
# when the user already gave --x-includes, we ignore
884
# what the standard autoconf macros told us.
885
if test "$kde_x_includes" = NO; then
886
kde_x_includes=$ac_x_includes
889
# for --x-libraries too
890
if test "$kde_x_libraries" = NO; then
891
kde_x_libraries=$ac_x_libraries
894
if test "$kde_x_includes" = NO; then
895
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
898
if test "$kde_x_libraries" = NO; then
899
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
902
# Record where we found X for the cache.
903
kde_cv_have_x="have_x=yes \
904
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
907
eval "$kde_cv_have_x"
909
if test "$have_x" != yes; then
910
AC_MSG_RESULT($have_x)
913
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
916
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
918
x_includes="."; dnl better than nothing :-
920
x_includes=$kde_x_includes
921
X_INCLUDES="-I$x_includes"
924
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
926
x_libraries="/usr/lib"; dnl better than nothing :-
928
x_libraries=$kde_x_libraries
929
X_LDFLAGS="-L$x_libraries"
931
all_includes="$X_INCLUDES"
932
all_libraries="$X_LDFLAGS"
934
# Check for libraries that X11R6 Xt/Xaw programs need.
935
ac_save_LDFLAGS="$LDFLAGS"
936
LDFLAGS="$LDFLAGS $X_LDFLAGS"
937
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
938
# check for ICE first), but we must link in the order -lSM -lICE or
939
# we get undefined symbols. So assume we have SM if we have ICE.
940
# These have to be linked with before -lX11, unlike the other
941
# libraries we check for below, so use a different variable.
942
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
943
AC_CHECK_LIB(ICE, IceConnectionNumber,
944
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
945
LDFLAGS="$ac_save_LDFLAGS"
947
LIB_X11='-lX11 $(LIBSOCKET)'
949
AC_MSG_CHECKING(for libXext)
950
AC_CACHE_VAL(kde_cv_have_libXext,
952
kde_ldflags_safe="$LDFLAGS"
953
kde_libs_safe="$LIBS"
955
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
956
LIBS="-lXext -lX11 $LIBSOCKET"
965
printf("hello Xext\n");
967
kde_cv_have_libXext=yes,
968
kde_cv_have_libXext=no
971
LDFLAGS=$kde_ldflags_safe
975
AC_MSG_RESULT($kde_cv_have_libXext)
977
if test "$kde_cv_have_libXext" = "no"; then
978
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
979
can't find it itself, we stop here assuming that make wouldn't find
986
elif test "$kde_use_qt_emb" = "yes"; then
987
dnl We're using QT Embedded
989
CXXFLAGS="$CXXFLAGS -fno-rtti"
990
QTE_NORTTI="-fno-rtti -DQWS"
1000
elif test "$kde_use_qt_mac" = "yes"; then
1001
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1002
dnl be included to get the information) --Sam
1003
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1004
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
1015
AC_SUBST(X_PRE_LIBS)
1017
AC_SUBST(LIB_XRENDER)
1019
AC_SUBST(X_INCLUDES)
1021
AC_SUBST(x_includes)
1022
AC_SUBST(x_libraries)
1023
AC_SUBST(QTE_NORTTI)
1030
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
1032
AC_REQUIRE([KDE_USE_QT])
1033
cat > conftest.$ac_ext <<EOF
1034
#include "confdefs.h"
1035
#include <qglobal.h>
1036
#include <qapplication.h>
1038
if test "$kde_qtver" = "2"; then
1039
cat >> conftest.$ac_ext <<EOF
1041
#include <qstring.h>
1045
if test $kde_qtsubver -gt 0; then
1046
cat >> conftest.$ac_ext <<EOF
1047
#if QT_VERSION < 210
1054
if test "$kde_qtver" = "3"; then
1055
cat >> conftest.$ac_ext <<EOF
1056
#include <qcursor.h>
1057
#include <qstylefactory.h>
1058
#include <private/qucomextra_p.h>
1062
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
1063
cat >> conftest.$ac_ext <<EOF
1069
if test "$kde_qtver" = "2"; then
1070
cat >> conftest.$ac_ext <<EOF
1071
QStringList *t = new QStringList();
1074
if test $kde_qtsubver -gt 0; then
1075
cat >> conftest.$ac_ext <<EOF
1077
s.setLatin1("Elvis is alive", 14);
1081
if test "$kde_qtver" = "3"; then
1082
cat >> conftest.$ac_ext <<EOF
1083
(void)QStyleFactory::create(QString::null);
1084
QCursor c(Qt::WhatsThisCursor);
1087
cat >> conftest.$ac_ext <<EOF
1093
AC_DEFUN(KDE_USE_QT,
1095
if test -z "$1"; then
1096
# Current default Qt version: 3.1
1100
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1101
# following is the check if subversion isnt found in passed argument
1102
if test "$kde_qtsubver" = "$1"; then
1105
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1106
if test "$kde_qtver" = "1"; then
1111
if test -z "$2"; then
1112
if test "$kde_qtver" = "2"; then
1113
if test $kde_qtsubver -gt 0; then
1114
kde_qt_minversion=">= Qt 2.2.2"
1116
kde_qt_minversion=">= Qt 2.0.2"
1119
if test "$kde_qtver" = "3"; then
1120
if test $kde_qtsubver -gt 0; then
1121
kde_qt_minversion=">= Qt 3.1 (20021021)"
1123
kde_qt_minversion=">= Qt 3.0"
1126
if test "$kde_qtver" = "1"; then
1127
kde_qt_minversion=">= 1.42 and < 2.0"
1130
kde_qt_minversion=$2
1133
if test -z "$3"; then
1134
if test $kde_qtver = 3; then
1135
if test $kde_qtsubver -gt 0; then
1136
kde_qt_verstring="QT_VERSION >= 0x030100"
1138
kde_qt_verstring="QT_VERSION >= 300"
1141
if test $kde_qtver = 2; then
1142
if test $kde_qtsubver -gt 0; then
1143
kde_qt_verstring="QT_VERSION >= 222"
1145
kde_qt_verstring="QT_VERSION >= 200"
1148
if test $kde_qtver = 1; then
1149
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1155
if test $kde_qtver = 3; then
1156
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1158
if test $kde_qtver = 2; then
1159
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1161
if test $kde_qtver = 1; then
1162
kde_qt_dirs="$QTDIR /usr/lib/qt"
1166
AC_DEFUN(KDE_CHECK_QT_DIRECT,
1168
AC_REQUIRE([KDE_USE_QT])
1169
AC_MSG_CHECKING([if Qt compiles without flags])
1170
AC_CACHE_VAL(kde_cv_qt_direct,
1174
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1175
ac_LIBRARY_PATH="$LIBRARY_PATH"
1176
ac_cxxflags_safe="$CXXFLAGS"
1177
ac_ldflags_safe="$LDFLAGS"
1178
ac_libs_safe="$LIBS"
1180
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1181
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1182
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1183
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1185
LIBS="$LIBQT $LIBSOCKET"
1188
export LD_LIBRARY_PATH
1192
KDE_PRINT_QT_PROGRAM
1194
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1195
kde_cv_qt_direct="yes"
1197
kde_cv_qt_direct="no"
1198
echo "configure: failed program was:" >&AC_FD_CC
1199
cat conftest.$ac_ext >&AC_FD_CC
1203
CXXFLAGS="$ac_cxxflags_safe"
1204
LDFLAGS="$ac_ldflags_safe"
1205
LIBS="$ac_libs_safe"
1207
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1208
export LD_LIBRARY_PATH
1209
LIBRARY_PATH="$ac_LIBRARY_PATH"
1214
if test "$kde_cv_qt_direct" = "yes"; then
1223
dnl ------------------------------------------------------------------------
1224
dnl Try to find the Qt headers and libraries.
1225
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1226
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1227
dnl ------------------------------------------------------------------------
1229
AC_DEFUN(AC_PATH_QT_1_3,
1231
AC_REQUIRE([K_PATH_X])
1232
AC_REQUIRE([KDE_USE_QT])
1233
AC_REQUIRE([KDE_CHECK_LIB64])
1235
dnl ------------------------------------------------------------------------
1236
dnl Add configure flag to enable linking to MT version of Qt library.
1237
dnl ------------------------------------------------------------------------
1241
[ --disable-mt link to non-threaded Qt (deprecated)],
1242
kde_use_qt_mt=$enableval,
1244
if test $kde_qtver = 3; then
1254
dnl ------------------------------------------------------------------------
1255
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1256
dnl ------------------------------------------------------------------------
1260
if test "x$kde_use_qt_mt" = "xyes"; then
1262
if test "x$kde_use_threading" = "xyes"; then
1263
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1264
KDE_MT_LDFLAGS="$USE_THREADS"
1265
KDE_MT_LIBS="$LIBPTHREAD"
1270
AC_SUBST(KDE_MT_LDFLAGS)
1271
AC_SUBST(KDE_MT_LIBS)
1273
kde_qt_was_given=yes
1275
dnl ------------------------------------------------------------------------
1276
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1277
dnl ------------------------------------------------------------------------
1278
if test -z "$LIBQT_GLOB"; then
1279
if test "x$kde_use_qt_emb" = "xyes"; then
1280
LIBQT_GLOB="libqte.*"
1282
LIBQT_GLOB="libqt.*"
1286
if test -z "$LIBQT"; then
1287
dnl ------------------------------------------------------------
1288
dnl If we got --enable-embedded then adjust the Qt library name.
1289
dnl ------------------------------------------------------------
1290
if test "x$kde_use_qt_emb" = "xyes"; then
1296
kde_int_qt="-l$qtlib"
1302
if test -z "$LIBQPE"; then
1303
dnl ------------------------------------------------------------
1304
dnl If we got --enable-palmtop then add -lqpe to the link line
1305
dnl ------------------------------------------------------------
1306
if test "x$kde_use_qt_emb" = "xyes"; then
1307
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1317
dnl ------------------------------------------------------------------------
1318
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1319
dnl ------------------------------------------------------------------------
1321
if test "x$kde_use_qt_mt" = "xyes"; then
1322
if test -z "$LIBQT"; then
1324
kde_int_qt="-l$qtlib-mt"
1327
kde_int_qt="$qtlib-mt"
1329
LIBQT_GLOB="lib$qtlib-mt.*"
1330
USING_QT_MT="using -mt"
1335
if test $kde_qtver != 1; then
1337
AC_REQUIRE([AC_FIND_PNG])
1338
AC_REQUIRE([AC_FIND_JPEG])
1339
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1342
if test $kde_qtver = 3; then
1343
AC_REQUIRE([KDE_CHECK_LIBDL])
1344
LIBQT="$LIBQT $LIBDL"
1347
AC_MSG_CHECKING([for Qt])
1349
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1350
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1352
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1356
[ --with-qt-dir=DIR where the root of Qt is installed ],
1357
[ ac_qt_includes="$withval"/include
1358
ac_qt_libraries="$withval"/lib${kdelibsuff}
1359
ac_qt_bindir="$withval"/bin
1362
AC_ARG_WITH(qt-includes,
1363
[ --with-qt-includes=DIR where the Qt includes are. ],
1365
ac_qt_includes="$withval"
1368
kde_qt_libs_given=no
1370
AC_ARG_WITH(qt-libraries,
1371
[ --with-qt-libraries=DIR where the Qt library is installed.],
1372
[ ac_qt_libraries="$withval"
1373
kde_qt_libs_given=yes
1376
AC_CACHE_VAL(ac_cv_have_qt,
1377
[#try to guess Qt locations
1380
for dir in $kde_qt_dirs; do
1381
qt_incdirs="$qt_incdirs $dir/include $dir"
1383
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
1384
if test ! "$ac_qt_includes" = "NO"; then
1385
qt_incdirs="$ac_qt_includes $qt_incdirs"
1388
if test "$kde_qtver" != "1"; then
1389
kde_qt_header=qstyle.h
1391
kde_qt_header=qglobal.h
1394
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1395
ac_qt_includes="$qt_incdir"
1398
for dir in $kde_qt_dirs; do
1399
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
1401
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1402
if test ! "$ac_qt_libraries" = "NO"; then
1403
qt_libdir=$ac_qt_libraries
1405
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1406
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1408
for dir in $qt_libdirs; do
1409
try="ls -1 $dir/${LIBQT_GLOB}"
1410
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1413
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1414
if test -e "$a"; then
1415
LIBQT="$LIBQT ${kde_int_qt}_incremental"
1420
ac_qt_libraries="$qt_libdir"
1425
ac_cxxflags_safe="$CXXFLAGS"
1426
ac_ldflags_safe="$LDFLAGS"
1427
ac_libs_safe="$LIBS"
1429
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1430
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1431
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1433
KDE_PRINT_QT_PROGRAM
1435
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1438
echo "configure: failed program was:" >&AC_FD_CC
1439
cat conftest.$ac_ext >&AC_FD_CC
1440
ac_qt_libraries="NO"
1443
CXXFLAGS="$ac_cxxflags_safe"
1444
LDFLAGS="$ac_ldflags_safe"
1445
LIBS="$ac_libs_safe"
1448
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1449
ac_cv_have_qt="have_qt=no"
1452
if test "$ac_qt_includes" = NO; then
1453
if test "$ac_qt_libraries" = NO; then
1454
ac_qt_notfound="(headers and libraries)";
1456
ac_qt_notfound="(headers)";
1459
if test "x$kde_use_qt_mt" = "xyes"; then
1461
Make sure that you have compiled Qt with thread support!"
1462
ac_qt_notfound="(library $qtlib-mt)";
1464
ac_qt_notfound="(library $qtlib)";
1468
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1469
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1475
eval "$ac_cv_have_qt"
1477
if test "$have_qt" != yes; then
1478
AC_MSG_RESULT([$have_qt]);
1480
ac_cv_have_qt="have_qt=yes \
1481
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1482
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1484
qt_libraries="$ac_qt_libraries"
1485
qt_includes="$ac_qt_includes"
1488
if test ! "$kde_qt_libs_given" = "yes"; then
1489
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1492
AC_SUBST(qt_libraries)
1493
AC_SUBST(qt_includes)
1495
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1498
QT_INCLUDES="-I$qt_includes"
1499
all_includes="$QT_INCLUDES $all_includes"
1502
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1505
QT_LDFLAGS="-L$qt_libraries"
1506
all_libraries="$all_libraries $QT_LDFLAGS"
1508
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1510
AC_SUBST(QT_INCLUDES)
1511
AC_SUBST(QT_LDFLAGS)
1516
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
1517
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
1519
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
1521
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1522
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
1523
if test -e "$a"; then
1524
LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
1535
AC_DEFUN(AC_PATH_QT,
1540
AC_DEFUN(KDE_CHECK_UIC_PLUGINS,
1542
AC_REQUIRE([AC_PATH_QT_MOC_UIC])
1544
if test x$ac_uic_supports_libpath = xyes; then
1546
AC_MSG_CHECKING([if UIC has KDE plugins available])
1547
AC_CACHE_VAL(kde_cv_uic_plugins,
1549
cat > actest.ui << EOF
1550
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
1551
<class>NewConnectionDialog</class>
1552
<widget class="QDialog">
1553
<widget class="KLineEdit">
1554
<property name="name">
1555
<cstring>testInput</cstring>
1564
kde_cv_uic_plugins=no
1565
kde_line="$UIC_PATH -L $kde_widgetdir"
1566
if test x$ac_uic_supports_nounload = xyes; then
1567
kde_line="$kde_line -nounload"
1569
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
1570
if AC_TRY_EVAL(kde_line); then
1571
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
1572
kde_cv_uic_plugins=yes
1575
rm -f actest.ui actest.cpp
1578
AC_MSG_RESULT([$kde_cv_uic_plugins])
1579
if test "$kde_cv_uic_plugins" != yes; then
1580
AC_MSG_ERROR([you need to install kdelibs first.])
1585
AC_DEFUN(KDE_CHECK_FINAL,
1587
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1588
kde_use_final=$enableval, kde_use_final=no)
1590
if test "x$kde_use_final" = "xyes"; then
1591
KDE_USE_FINAL_TRUE=""
1592
KDE_USE_FINAL_FALSE="#"
1594
KDE_USE_FINAL_TRUE="#"
1595
KDE_USE_FINAL_FALSE=""
1597
AC_SUBST(KDE_USE_FINAL_TRUE)
1598
AC_SUBST(KDE_USE_FINAL_FALSE)
1601
AC_DEFUN(KDE_CHECK_CLOSURE,
1603
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1604
kde_use_closure=$enableval, kde_use_closure=yes)
1607
if test "x$kde_use_closure" = "xyes"; then
1608
KDE_USE_CLOSURE_TRUE=""
1609
KDE_USE_CLOSURE_FALSE="#"
1610
# CXXFLAGS="$CXXFLAGS $REPO"
1612
KDE_USE_CLOSURE_TRUE="#"
1613
KDE_USE_CLOSURE_FALSE=""
1614
KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
1615
[KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
1616
[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
1617
[KDE_NO_UNDEFINED=""])],
1618
[KDE_NO_UNDEFINED=""])
1620
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1621
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1622
AC_SUBST(KDE_NO_UNDEFINED)
1625
AC_DEFUN(KDE_CHECK_NMCHECK,
1627
AC_ARG_ENABLE(nmcheck, [ --enable-nmcheck enable automatic namespace cleanness check],
1628
kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
1630
if test "$kde_use_nmcheck" = "yes"; then
1631
KDE_USE_NMCHECK_TRUE=""
1632
KDE_USE_NMCHECK_FALSE="#"
1634
KDE_USE_NMCHECK_TRUE="#"
1635
KDE_USE_NMCHECK_FALSE=""
1637
AC_SUBST(KDE_USE_NMCHECK_TRUE)
1638
AC_SUBST(KDE_USE_NMCHECK_FALSE)
1642
dnl ------------------------------------------------------------------------
1643
dnl Now, the same with KDE
1644
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1645
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1646
dnl ------------------------------------------------------------------------
1648
AC_DEFUN(AC_BASE_PATH_KDE,
1651
AC_REQUIRE([AC_PATH_QT])dnl
1652
AC_REQUIRE([KDE_CHECK_LIB64])
1655
AC_MSG_CHECKING([for KDE])
1657
if test "${prefix}" != NONE; then
1658
kde_includes=${prefix}/include
1659
ac_kde_includes=$prefix/include
1661
if test "${exec_prefix}" != NONE; then
1662
kde_libraries=${libdir}
1663
ac_kde_libraries=$libdir
1664
if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then
1665
ac_kde_libraries=$exec_prefix/lib${kdelibsuff}
1668
kde_libraries=${prefix}/lib${kdelibsuff}
1669
ac_kde_libraries=$prefix/lib${kdelibsuff}
1678
AC_CACHE_VAL(ac_cv_have_kde,
1679
[#try to guess kde locations
1681
if test "$kde_qtver" = 1; then
1682
kde_check_header="ksock.h"
1683
kde_check_lib="libkdecore.la"
1685
kde_check_header="ksharedptr.h"
1686
kde_check_lib="libkio.la"
1689
if test -z "$1"; then
1691
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"
1692
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1693
kde_incdirs="$ac_kde_includes $kde_incdirs"
1694
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1695
ac_kde_includes="$kde_incdir"
1697
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1699
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1700
So, check this please and use another prefix!])
1703
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}"
1704
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1705
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1706
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1707
ac_kde_libraries="$kde_libdir"
1710
dnl this might be somewhere else
1711
AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
1713
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1715
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1716
So, check this please and use another prefix!])
1719
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
1721
I can't find the designer plugins. These are required and should have been installed
1725
if test -n "$kde_widgetdir"; then
1726
kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
1730
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
1731
ac_cv_have_kde="have_kde=no"
1733
ac_cv_have_kde="have_kde=yes \
1734
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1739
ac_cv_have_kde="have_kde=no"
1744
eval "$ac_cv_have_kde"
1746
if test "$have_kde" != "yes"; then
1747
if test "${prefix}" = NONE; then
1748
ac_kde_prefix="$ac_default_prefix"
1750
ac_kde_prefix="$prefix"
1752
if test "$exec_prefix" = NONE; then
1753
ac_kde_exec_prefix="$ac_kde_prefix"
1754
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1756
ac_kde_exec_prefix="$exec_prefix"
1757
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1760
kde_libraries="${libdir}"
1761
kde_includes=${ac_kde_prefix}/include
1764
ac_cv_have_kde="have_kde=yes \
1765
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1766
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1768
kde_libraries="$ac_kde_libraries"
1769
kde_includes="$ac_kde_includes"
1771
AC_SUBST(kde_libraries)
1772
AC_SUBST(kde_includes)
1774
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1777
KDE_INCLUDES="-I$kde_includes"
1778
all_includes="$KDE_INCLUDES $all_includes"
1781
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
1783
KDE_LDFLAGS="-L$kde_libraries"
1784
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1785
all_libraries="$all_libraries $KDE_LDFLAGS"
1788
AC_SUBST(KDE_LDFLAGS)
1789
AC_SUBST(KDE_INCLUDES)
1791
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1793
all_libraries="$all_libraries $USER_LDFLAGS"
1794
all_includes="$all_includes $USER_INCLUDES"
1795
AC_SUBST(all_includes)
1796
AC_SUBST(all_libraries)
1798
if test -z "$1"; then
1799
KDE_CHECK_UIC_PLUGINS
1802
ac_kde_libraries="$kde_libdir"
1809
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1811
AC_MSG_CHECKING(for extra includes)
1812
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1813
adds non standard include paths],
1814
kde_use_extra_includes="$withval",
1815
kde_use_extra_includes=NONE
1818
if test -n "$kde_use_extra_includes" && \
1819
test "$kde_use_extra_includes" != "NONE"; then
1823
for dir in $kde_use_extra_includes; do
1824
kde_extra_includes="$kde_extra_includes $dir"
1825
USER_INCLUDES="$USER_INCLUDES -I$dir"
1828
kde_use_extra_includes="added"
1830
kde_use_extra_includes="no"
1832
AC_SUBST(USER_INCLUDES)
1834
AC_MSG_RESULT($kde_use_extra_includes)
1837
AC_MSG_CHECKING(for extra libs)
1838
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1839
kde_use_extra_libs=$withval,
1840
kde_use_extra_libs=NONE
1842
if test -n "$kde_use_extra_libs" && \
1843
test "$kde_use_extra_libs" != "NONE"; then
1847
for dir in $kde_use_extra_libs; do
1848
kde_extra_libs="$kde_extra_libs $dir"
1849
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1850
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1853
kde_use_extra_libs="added"
1855
kde_use_extra_libs="no"
1858
AC_SUBST(USER_LDFLAGS)
1860
AC_MSG_RESULT($kde_use_extra_libs)
1864
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1866
AC_MSG_CHECKING([for KDE headers installed])
1869
cat > conftest.$ac_ext <<EOF
1871
# include <stdlib.h>
1874
#include "confdefs.h"
1878
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1879
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1880
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1881
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1882
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1883
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1884
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1885
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1886
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1887
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1888
printf("kde_wallpaperdir=\\"%s\\"\n",
1889
KApplication::kde_wallpaperdir().data());
1890
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1891
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1892
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1893
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1894
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1895
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1896
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1897
printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
1898
printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
1903
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1904
if AC_TRY_EVAL(ac_compile); then
1907
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1908
Check, if you installed the KDE header files correctly.
1909
For more details about this problem, look at the end of config.log.])
1915
AC_DEFUN(KDE_CHECK_KDEQTADDON,
1917
AC_MSG_CHECKING(for kde-qt-addon)
1918
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1920
kde_ldflags_safe="$LDFLAGS"
1921
kde_libs_safe="$LIBS"
1922
kde_cxxflags_safe="$CXXFLAGS"
1924
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1925
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1926
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1934
kde_cv_have_kdeqtaddon=yes,
1935
kde_cv_have_kdeqtaddon=no
1938
LDFLAGS=$kde_ldflags_safe
1940
CXXFLAGS=$kde_cxxflags_safe
1943
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1945
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1946
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1947
It is a separate package (and CVS module) named kde-qt-addon.])
1951
AC_DEFUN(KDE_CHECK_KIMGIO,
1953
AC_REQUIRE([AC_BASE_PATH_KDE])
1954
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1955
AC_REQUIRE([AC_FIND_TIFF])
1956
AC_REQUIRE([AC_FIND_JPEG])
1957
AC_REQUIRE([AC_FIND_PNG])
1958
AC_REQUIRE([AC_FIND_JASPER])
1959
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1961
if test "$1" = "existance"; then
1964
kde_save_LIBS="$LIBS"
1965
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1966
AC_CHECK_LIB(kimgio, kimgioRegister, [
1967
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1968
LIBS="$kde_save_LIBS"
1971
LIBKIMGIO_EXISTS=yes
1974
if test "$LIBKIMGIO_EXISTS" = "yes"; then
1975
LIB_KIMGIO='-lkimgio'
1979
AC_SUBST(LIB_KIMGIO)
1982
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1984
AC_REQUIRE([KDE_MISC_TESTS])
1985
AC_REQUIRE([KDE_CHECK_LIBDL])
1986
AC_REQUIRE([K_PATH_X])
1988
if test $kde_qtver = 3; then
1989
AC_SUBST(LIB_KDECORE, "-lkdecore")
1990
AC_SUBST(LIB_KDEUI, "-lkdeui")
1991
AC_SUBST(LIB_KIO, "-lkio")
1992
AC_SUBST(LIB_SMB, "-lsmb")
1993
AC_SUBST(LIB_KAB, "-lkab")
1994
AC_SUBST(LIB_KABC, "-lkabc")
1995
AC_SUBST(LIB_KHTML, "-lkhtml")
1996
AC_SUBST(LIB_KSPELL, "-lkspell")
1997
AC_SUBST(LIB_KPARTS, "-lkparts")
1998
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
1999
# these are for backward compatibility
2000
AC_SUBST(LIB_KSYCOCA, "-lkio")
2001
AC_SUBST(LIB_KFILE, "-lkio")
2002
elif test $kde_qtver = 2; then
2003
AC_SUBST(LIB_KDECORE, "-lkdecore")
2004
AC_SUBST(LIB_KDEUI, "-lkdeui")
2005
AC_SUBST(LIB_KIO, "-lkio")
2006
AC_SUBST(LIB_KSYCOCA, "-lksycoca")
2007
AC_SUBST(LIB_SMB, "-lsmb")
2008
AC_SUBST(LIB_KFILE, "-lkfile")
2009
AC_SUBST(LIB_KAB, "-lkab")
2010
AC_SUBST(LIB_KHTML, "-lkhtml")
2011
AC_SUBST(LIB_KSPELL, "-lkspell")
2012
AC_SUBST(LIB_KPARTS, "-lkparts")
2013
AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2015
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
2016
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
2017
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
2018
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
2019
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
2023
AC_DEFUN(AC_PATH_KDE,
2026
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
2028
if test "$enableval" = "no";
2029
then ac_use_path_checking="default"
2030
else ac_use_path_checking=""
2034
if test "$kde_qtver" = 1;
2035
then ac_use_path_checking=""
2036
else ac_use_path_checking="default"
2041
AC_CREATE_KFSSTND($ac_use_path_checking)
2044
KDE_CREATE_LIBS_ALIASES
2047
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
2048
AC_DEFUN(KDE_CHECK_FUNC_EXT,
2050
AC_MSG_CHECKING(for $1)
2051
AC_CACHE_VAL(kde_cv_func_$1,
2055
save_CXXFLAGS="$CXXFLAGS"
2056
kde_safe_LIBS="$LIBS"
2057
LIBS="$LIBS $X_EXTRA_LIBS"
2058
if test "$GXX" = "yes"; then
2059
CXXFLAGS="$CXXFLAGS -pedantic-errors"
2069
CXXFLAGS="$save_CXXFLAGS"
2070
LIBS="$kde_safe_LIBS"
2074
AC_MSG_RESULT($kde_cv_func_$1)
2076
AC_MSG_CHECKING([if $1 needs custom prototype])
2077
AC_CACHE_VAL(kde_cv_proto_$1,
2079
if test "x$kde_cv_func_$1" = xyes; then
2083
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
2084
kde_cv_proto_$1="yes - in libkdefakes"
2087
kde_cv_proto_$1=unknown
2092
if test "x$kde_cv_proto_$1" = xunknown; then
2097
LIBS="$LIBS $X_EXTRA_LIBS"
2106
[ kde_cv_func_$1=yes
2107
kde_cv_proto_$1=yes ],
2108
[kde_cv_proto_$1="$1 unavailable"]
2114
AC_MSG_RESULT($kde_cv_proto_$1)
2116
if test "x$kde_cv_func_$1" = xyes; then
2117
AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
2120
if test "x$kde_cv_proto_$1" = xno; then
2121
AC_DEFINE(HAVE_$5_PROTO, 1,
2122
[Define if you have the $1 prototype])
2125
AH_VERBATIM([_HAVE_$5_PROTO],
2127
#if !defined(HAVE_$5_PROTO)
2136
AC_DEFUN(AC_CHECK_SETENV,
2138
KDE_CHECK_FUNC_EXT(setenv, [
2141
[setenv("VAR", "VALUE", 1);],
2142
[int setenv (const char *, const char *, int)],
2146
AC_DEFUN(AC_CHECK_UNSETENV,
2148
KDE_CHECK_FUNC_EXT(unsetenv, [
2152
[void unsetenv (const char *)],
2156
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
2158
KDE_CHECK_FUNC_EXT(getdomainname, [
2164
getdomainname(buffer, 200);
2166
[int getdomainname (char *, size_t)],
2170
AC_DEFUN(AC_CHECK_GETHOSTNAME,
2172
KDE_CHECK_FUNC_EXT(gethostname, [
2178
gethostname(buffer, 200);
2180
[int gethostname (char *, unsigned int)],
2184
AC_DEFUN(AC_CHECK_USLEEP,
2186
KDE_CHECK_FUNC_EXT(usleep, [
2192
[int usleep (unsigned int)],
2197
AC_DEFUN(AC_CHECK_RANDOM,
2199
KDE_CHECK_FUNC_EXT(random, [
2205
[long int random(void)],
2208
KDE_CHECK_FUNC_EXT(srandom, [
2214
[void srandom(unsigned int)],
2219
AC_DEFUN(AC_CHECK_INITGROUPS,
2221
KDE_CHECK_FUNC_EXT(initgroups, [
2222
#include <sys/types.h>
2228
initgroups(buffer, 27);
2230
[int initgroups(const char *, gid_t)],
2234
AC_DEFUN(AC_CHECK_MKSTEMPS,
2236
KDE_CHECK_FUNC_EXT(mkstemps, [
2241
mkstemps("/tmp/aaaXXXXXX", 6);
2243
[int mkstemps(char *, int)],
2247
AC_DEFUN(AC_CHECK_MKDTEMP,
2249
KDE_CHECK_FUNC_EXT(mkdtemp, [
2254
mkdtemp("/tmp/aaaXXXXXX");
2256
[char *mkdtemp(char *)],
2261
AC_DEFUN(AC_CHECK_RES_INIT,
2263
AC_MSG_CHECKING([if res_init needs -lresolv])
2264
kde_libs_safe="$LIBS"
2265
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
2268
#include <sys/types.h>
2269
#include <netinet/in.h>
2270
#include <arpa/nameser.h>
2277
LIBRESOLV="-lresolv"
2279
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2281
[ AC_MSG_RESULT(no) ]
2286
AC_MSG_CHECKING([if res_init is available])
2289
#include <sys/types.h>
2290
#include <netinet/in.h>
2291
#include <arpa/nameser.h>
2299
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2301
[ AC_MSG_RESULT(no) ]
2305
AC_DEFUN(AC_CHECK_STRLCPY,
2307
KDE_CHECK_FUNC_EXT(strlcpy, [
2311
strlcpy(buf, "KDE function test", sizeof(buf));
2313
[unsigned long strlcpy(char*, const char*, unsigned long)],
2317
AC_DEFUN(AC_CHECK_STRLCAT,
2319
KDE_CHECK_FUNC_EXT(strlcat, [
2324
strlcat(buf, "KDE function test", sizeof(buf));
2326
[unsigned long strlcat(char*, const char*, unsigned long)],
2330
AC_DEFUN(AC_FIND_GIF,
2331
[AC_MSG_CHECKING([for giflib])
2332
AC_CACHE_VAL(ac_cv_lib_gif,
2333
[ac_save_LIBS="$LIBS"
2334
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2335
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2337
LIBS="$all_libraries -lgif"
2344
int GifLastError(void);
2348
/* We use char because int might match the return type of a gcc2
2349
builtin and then its argument prototype would still apply. */
2351
[return GifLastError();],
2352
eval "ac_cv_lib_gif=yes",
2353
eval "ac_cv_lib_gif=no")
2354
LIBS="$ac_save_LIBS"
2356
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2358
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2360
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2364
AC_DEFUN(KDE_FIND_JPEG_HELPER,
2366
AC_MSG_CHECKING([for libjpeg$2])
2367
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2370
ac_save_LIBS="$LIBS"
2371
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2372
ac_save_CFLAGS="$CFLAGS"
2373
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2375
[/* Override any gcc2 internal prototype to avoid an error. */
2376
struct jpeg_decompress_struct;
2377
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2382
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2383
int version, size_t structsize);
2387
/* We use char because int might match the return type of a gcc2
2388
builtin and then its argument prototype would still apply. */
2390
[jpeg_CreateDecompress(0L, 0, 0);],
2391
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2392
eval "ac_cv_lib_jpeg_$1=no")
2393
LIBS="$ac_save_LIBS"
2394
CFLAGS="$ac_save_CFLAGS"
2397
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2398
LIBJPEG="$ac_cv_lib_jpeg_$1"
2399
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2407
AC_DEFUN(AC_FIND_JPEG,
2409
dnl first look for libraries
2410
KDE_FIND_JPEG_HELPER(6b, 6b,
2411
KDE_FIND_JPEG_HELPER(normal, [],
2418
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2419
dnl requires system dependent includes loaded before it)
2420
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
2421
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2422
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2424
dnl if headers _and_ libraries are missing, this is no error, and we
2425
dnl continue with a warning (the user will get no jpeg support in khtml)
2426
dnl if only one is missing, it means a configuration error, but we still
2428
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2429
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2431
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2433
There is an installation error in jpeg support. You seem to have only one
2434
of either the headers _or_ the libraries installed. You may need to either
2435
provide correct --with-extra-... options, or the development package of
2436
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2437
Disabling JPEG support.
2440
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2447
AH_VERBATIM(_AC_CHECK_JPEG,
2449
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
2450
* headers and I'm too lazy to write a configure test as long as only
2451
* unixware is related
2454
#define HAVE_BOOLEAN
2459
AC_DEFUN(KDE_CHECK_QT_JPEG,
2461
if test -n "$LIBJPEG"; then
2462
AC_MSG_CHECKING([if Qt needs $LIBJPEG])
2463
AC_CACHE_VAL(kde_cv_qt_jpeg,
2467
ac_save_LIBS="$LIBS"
2468
LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
2469
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2470
ac_save_CXXFLAGS="$CXXFLAGS"
2471
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2473
[#include <qapplication.h>],
2477
QApplication app(argc, argv);],
2478
eval "kde_cv_qt_jpeg=no",
2479
eval "kde_cv_qt_jpeg=yes")
2480
LIBS="$ac_save_LIBS"
2481
CXXFLAGS="$ac_save_CXXFLAGS"
2486
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
2488
LIBJPEG_QT='$(LIBJPEG)'
2496
AC_DEFUN(AC_FIND_ZLIB,
2498
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2499
AC_MSG_CHECKING([for libz])
2500
AC_CACHE_VAL(ac_cv_lib_z,
2503
kde_save_LIBS="$LIBS"
2504
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2505
kde_save_CFLAGS="$CFLAGS"
2506
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2513
gzFile f = (gzFile) 0;
2514
/* this would segfault.. but we only link, don't run */
2515
(void) gzgets(f, buf, sizeof(buf));
2517
return (zlibVersion() == ZLIB_VERSION);
2519
eval "ac_cv_lib_z='-lz'",
2520
eval "ac_cv_lib_z=no")
2521
LIBS="$kde_save_LIBS"
2522
CFLAGS="$kde_save_CFLAGS"
2524
if test ! "$ac_cv_lib_z" = no; then
2525
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2527
AC_MSG_RESULT($ac_cv_lib_z)
2529
AC_MSG_ERROR(not found.
2530
Possibly configure picks up an outdated version
2531
installed by XFree86. Remove it from your system.
2533
Check your installation and look into config.log)
2539
AC_DEFUN(KDE_TRY_TIFFLIB,
2541
AC_MSG_CHECKING([for libtiff $1])
2543
AC_CACHE_VAL(kde_cv_libtiff_$1,
2547
kde_save_LIBS="$LIBS"
2548
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2549
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2551
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2553
kde_save_CXXFLAGS="$CXXFLAGS"
2554
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2560
[return (TIFFOpen( "", "r") == 0); ],
2562
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2564
kde_cv_libtiff_$1=no
2567
LIBS="$kde_save_LIBS"
2568
CXXFLAGS="$kde_save_CXXFLAGS"
2572
if test "$kde_cv_libtiff_$1" = "no"; then
2577
LIBTIFF="$kde_cv_libtiff_$1"
2579
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2585
AC_DEFUN(AC_FIND_TIFF,
2587
AC_REQUIRE([K_PATH_X])
2588
AC_REQUIRE([AC_FIND_ZLIB])
2589
AC_REQUIRE([AC_FIND_JPEG])
2590
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2592
KDE_TRY_TIFFLIB(tiff, [],
2593
KDE_TRY_TIFFLIB(tiff34))
2599
AC_DEFUN(AC_FIND_PNG,
2601
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2602
AC_REQUIRE([AC_FIND_ZLIB])
2603
AC_MSG_CHECKING([for libpng])
2604
AC_CACHE_VAL(ac_cv_lib_png,
2606
kde_save_LIBS="$LIBS"
2607
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
2608
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2610
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2612
kde_save_CFLAGS="$CFLAGS"
2613
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2620
png_structp png_ptr = png_create_read_struct( /* image ptr */
2621
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2622
return( png_ptr != 0 );
2624
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2625
eval "ac_cv_lib_png=no"
2627
LIBS="$kde_save_LIBS"
2628
CFLAGS="$kde_save_CFLAGS"
2630
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2631
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2632
LIBPNG="$ac_cv_lib_png"
2634
AC_MSG_RESULT($ac_cv_lib_png)
2643
AC_DEFUN(AC_FIND_JASPER,
2645
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2646
AC_REQUIRE([AC_FIND_JPEG])
2647
AC_MSG_CHECKING([for jasper])
2648
AC_CACHE_VAL(ac_cv_jasper,
2650
kde_save_LIBS="$LIBS"
2651
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
2652
kde_save_CFLAGS="$CFLAGS"
2653
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2657
#include<jasper/jasper.h>
2660
return( jas_init() );
2662
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
2663
eval "ac_cv_jasper=no"
2665
LIBS="$kde_save_LIBS"
2666
CFLAGS="$kde_save_CFLAGS"
2668
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
2669
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
2670
LIB_JASPER="$ac_cv_jasper"
2671
AC_MSG_RESULT($ac_cv_jasper)
2676
AC_SUBST(LIB_JASPER)
2679
AC_DEFUN(AC_CHECK_BOOL,
2681
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2684
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2686
AC_MSG_CHECKING(if you need GNU extensions)
2687
AC_CACHE_VAL(ac_cv_gnu_extensions,
2689
cat > conftest.c << EOF
2690
#include <features.h>
2692
#ifdef __GNU_LIBRARY__
2697
if (eval "$ac_cpp conftest.c") 2>&5 |
2698
egrep "yes" >/dev/null 2>&1; then
2700
ac_cv_gnu_extensions=yes
2702
ac_cv_gnu_extensions=no
2706
AC_MSG_RESULT($ac_cv_gnu_extensions)
2707
if test "$ac_cv_gnu_extensions" = "yes"; then
2708
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2712
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2714
AC_MSG_CHECKING([whether $CXX supports -$1])
2715
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
2716
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2720
save_CXXFLAGS="$CXXFLAGS"
2721
CXXFLAGS="$CXXFLAGS -$1"
2722
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2723
CXXFLAGS="$save_CXXFLAGS"
2726
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2737
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2738
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2739
dnl it's all white-space separated
2740
AC_DEFUN(AC_REMOVE_FORBIDDEN,
2743
if test -n "$__val"; then
2749
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2750
*) # Careful to not add spaces, where there were none, because otherwise
2751
# libtool gets confused, if we change e.g. CXX
2752
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2760
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2761
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2763
if test "x$kde_use_qt_emb" != "xyes"; then
2764
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2765
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2767
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2768
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2772
AC_DEFUN(AC_CHECK_COMPILERS,
2774
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2778
kde_use_debug_code="yes"
2779
kde_use_debug_define=no
2782
kde_use_debug_code="full"
2783
kde_use_debug_define=no
2786
kde_use_debug_code="no"
2787
kde_use_debug_define=yes
2791
[kde_use_debug_code="no"
2792
kde_use_debug_define=no
2795
dnl Just for configure --help
2796
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2798
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2800
if test $enableval = "no"; then
2801
kde_use_strict_options="no"
2803
kde_use_strict_options="yes"
2805
], [kde_use_strict_options="no"])
2807
AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar],
2809
if test $enableval = "no"; then
2810
kde_use_warnings="no"
2812
kde_use_warnings="yes"
2814
], [kde_use_warnings="yes"])
2816
dnl enable warnings for debug build
2817
if test "$kde_use_debug_code" != "no"; then
2818
kde_use_warnings=yes
2821
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2822
[kde_use_profiling=$enableval],
2823
[kde_use_profiling="no"]
2826
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2833
if test "$GCC" = "yes"; then
2834
if test "$kde_use_debug_code" != "no"; then
2835
if test $kde_use_debug_code = "full"; then
2836
CFLAGS="-g3 -fno-inline $CFLAGS"
2838
CFLAGS="-g -O2 $CFLAGS"
2841
CFLAGS="-O2 $CFLAGS"
2845
if test "$kde_use_debug_define" = "yes"; then
2846
CFLAGS="-DNDEBUG $CFLAGS"
2851
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2852
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2855
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2859
CXXFLAGS=" $CXXFLAGS"
2863
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2864
if test "$kde_use_debug_code" != "no"; then
2865
if test "$CXX" = "KCC"; then
2866
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2868
if test "$kde_use_debug_code" = "full"; then
2869
CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
2871
CXXFLAGS="-g -O2 $CXXFLAGS"
2874
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2876
dnl convenience compiler flags
2877
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2878
AC_SUBST(WOVERLOADED_VIRTUAL)
2880
if test "$CXX" = "KCC"; then
2881
CXXFLAGS="+K3 $CXXFLAGS"
2883
CXXFLAGS="-O2 $CXXFLAGS"
2888
if test "$kde_use_debug_define" = "yes"; then
2889
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2892
if test "$kde_use_profiling" = "yes"; then
2893
KDE_CHECK_COMPILER_FLAG(pg,
2895
CFLAGS="-pg $CFLAGS"
2896
CXXFLAGS="-pg $CXXFLAGS"
2900
if test "$kde_use_warnings" = "yes"; then
2901
if test "$GCC" = "yes"; then
2904
CFLAGS="-ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2905
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2906
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2909
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2910
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2911
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2912
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2916
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2917
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2920
if test "$GXX" = "yes"; then
2921
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2922
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2923
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2924
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2926
if test "$CXX" = "KCC"; then
2927
dnl unfortunately we currently cannot disable exception support in KCC
2928
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2929
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2930
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2932
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2934
kde_use_pch=$enableval
2937
if test "$kde_use_pch" = "yes"; then
2938
dnl TODO: support --pch-dir!
2939
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2940
dnl the below works (but the dir must exist), but it's
2941
dnl useless for a whole package.
2942
dnl The are precompiled headers for each source file, so when compiling
2943
dnl from scratch, it doesn't make a difference, and they take up
2944
dnl around ~5Mb _per_ sourcefile.
2945
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2946
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2948
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2949
dnl all implementations that are defined inside the class {} declaration.
2950
dnl because of templates-compatibility with broken gcc compilers, this
2951
dnl can cause excessive inlining. This flag limits it to a sane level
2952
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2953
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2954
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2955
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2956
dnl Some source files are shared between multiple executables
2957
dnl (or libraries) and some of those need template instantiations.
2958
dnl In that case KCC needs to compile those sources with
2959
dnl --one_instantiation_per_object. To make it easy for us we compile
2960
dnl _all_ objects with that flag (--one_per is a shorthand).
2961
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2963
AC_SUBST(USE_EXCEPTIONS)
2964
dnl obsolete macro - provided to keep things going
2969
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2970
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2971
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2973
if test "$GXX" = yes; then
2974
libstdcpp=`$CXX -print-file-name=libstdc++.so`
2975
if test ! -f $libstdcpp; then
2976
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])
2982
AC_VALIDIFY_CXXFLAGS
2986
if test "$GCC" = yes; then
2989
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
2991
AC_SUBST(NOOPT_CXXFLAGS)
2992
AC_SUBST(NOOPT_CFLAGS)
2998
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3001
AC_DEFUN(KDE_ADD_DEPENDENCIES,
3003
[A]M_DEPENDENCIES(CC)
3004
[A]M_DEPENDENCIES(CXX)
3007
dnl just a wrapper to clean up configure.in
3008
AC_DEFUN(KDE_PROG_LIBTOOL,
3010
AC_REQUIRE([AC_CHECK_COMPILERS])
3011
AC_REQUIRE([AC_ENABLE_SHARED])
3012
AC_REQUIRE([AC_ENABLE_STATIC])
3014
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
3015
AC_REQUIRE([KDE_CHECK_LIB64])
3026
LIBTOOL_SHELL="/bin/sh ./libtool"
3027
# LIBTOOL="$LIBTOOL --silent"
3028
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3029
AC_SUBST(KDE_PLUGIN)
3031
AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)],
3032
kde_use_objprelink=$enableval, kde_use_objprelink=no)
3033
if test "x$kde_use_objprelink" = "xyes"; then
3035
------------------------------------------------------------
3036
Configuration option --enable-objprelink is no longer useful.
3037
See http:://objprelink.sourceforge.net for details:
3038
1- Recent binutils are fast enough to do without objprelink.
3039
2- Newer versions of objprelink do not need this option.
3040
------------------------------------------------------------
3045
AC_DEFUN(KDE_CHECK_LIB64,
3048
AC_ARG_ENABLE(libsuffix,
3049
AC_HELP_STRING([--enable-libsuffix],
3050
[/lib directory suffix (64,32,none[=default])]),
3051
kdelibsuff=$enableval)
3052
# TODO: add an auto case that compiles a little C app to check
3053
# where the glibc is
3054
if test "$kdelibsuff" = "none"; then
3057
if test -z "$kdelibsuff"; then
3058
AC_MSG_RESULT([not using lib directory suffix])
3059
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
3061
if test "$libdir" = '${exec_prefix}/lib'; then
3062
libdir="$libdir${kdelibsuff}"
3063
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms
3065
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
3066
AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3070
AC_DEFUN(KDE_CHECK_TYPES,
3071
[ AC_CHECK_SIZEOF(int, 4)dnl
3072
AC_CHECK_SIZEOF(long, 4)dnl
3073
AC_CHECK_SIZEOF(char *, 4)dnl
3076
AC_DEFUN(KDE_DO_IT_ALL,
3080
AM_INIT_AUTOMAKE($1, $2)
3081
AM_DISABLE_LIBRARIES
3082
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3089
AC_DEFUN(AC_CHECK_RPATH,
3091
AC_MSG_CHECKING(for rpath)
3092
AC_ARG_ENABLE(rpath,
3093
[ --disable-rpath do not use the rpath feature of ld],
3094
USE_RPATH=$enableval, USE_RPATH=yes)
3096
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3098
KDE_RPATH="-R \$(kde_libraries)"
3100
if test -n "$qt_libraries"; then
3101
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3103
dnl $x_libraries is set to /usr/lib in case
3104
if test -n "$X_LDFLAGS"; then
3105
X_RPATH="-R \$(x_libraries)"
3106
KDE_RPATH="$KDE_RPATH $X_RPATH"
3108
if test -n "$KDE_EXTRA_RPATH"; then
3109
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
3112
AC_SUBST(KDE_EXTRA_RPATH)
3115
AC_MSG_RESULT($USE_RPATH)
3118
dnl Check for the type of the third argument of getsockname
3119
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
3120
AC_MSG_CHECKING(for socklen_t)
3121
AC_CACHE_VAL(ac_cv_socklen_t, [
3125
#include <sys/types.h>
3126
#include <sys/socket.h>
3129
getsockname(0,(struct sockaddr*)0, &a);
3131
ac_cv_socklen_t=socklen_t,
3133
#include <sys/types.h>
3134
#include <sys/socket.h>
3137
getsockname(0,(struct sockaddr*)0, &a);
3139
ac_cv_socklen_t=int,
3140
ac_cv_socklen_t=size_t
3146
AC_MSG_RESULT($ac_cv_socklen_t)
3147
if test "$ac_cv_socklen_t" != "socklen_t"; then
3148
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3149
[Define the real type of socklen_t])
3151
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3155
dnl This is a merge of some macros out of the gettext aclocal.m4
3156
dnl since we don't need anything, I took the things we need
3157
dnl the copyright for them is:
3159
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3160
dnl This Makefile.in is free software; the Free Software Foundation
3161
dnl gives unlimited permission to copy and/or distribute it,
3162
dnl with or without modifications, as long as this notice is preserved.
3164
dnl This program is distributed in the hope that it will be useful,
3165
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3166
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3167
dnl PARTICULAR PURPOSE.
3169
dnl for this file it is relicensed under LGPL
3171
AC_DEFUN(AM_KDE_WITH_NLS,
3173
dnl If we use NLS figure out what method
3175
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
3176
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
3177
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3179
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
3180
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
3187
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
3188
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3190
dnl Test whether we really found GNU xgettext.
3191
if test "$XGETTEXT" != ":"; then
3192
dnl If it is no GNU xgettext we define it as : so that the
3193
dnl Makefiles still can work.
3194
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3198
[found xgettext programs is not GNU xgettext; ignore it])
3206
# Search path for a program which passes the given test.
3207
# Ulrich Drepper <drepper@cygnus.com>, 1996.
3210
# Stephan Kulow: I appended a _KDE against name conflicts
3212
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
3213
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3214
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
3215
[# Extract the first word of "$2", so it can be a program name with args.
3216
set dummy $2; ac_word=[$]2
3217
AC_MSG_CHECKING([for $ac_word])
3218
AC_CACHE_VAL(ac_cv_path_$1,
3221
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3224
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3225
for ac_dir in ifelse([$5], , $PATH, [$5]); do
3226
test -z "$ac_dir" && ac_dir=.
3227
if test -f $ac_dir/$ac_word; then
3229
ac_cv_path_$1="$ac_dir/$ac_word"
3235
dnl If no 4th arg is given, leave the cache variable unset,
3236
dnl so AC_PATH_PROGS will keep looking.
3237
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3242
if test -n "[$]$1"; then
3243
AC_MSG_RESULT([$]$1)
3251
# Check whether LC_MESSAGES is available in <locale.h>.
3252
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3256
AC_DEFUN(AM_LC_MESSAGES,
3257
[if test $ac_cv_header_locale_h = yes; then
3258
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3259
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3260
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3261
if test $am_cv_val_LC_MESSAGES = yes; then
3262
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
3266
dnl From Jim Meyering.
3267
dnl FIXME: migrate into libit.
3269
AC_DEFUN([AM_FUNC_OBSTACK],
3270
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
3271
[AC_TRY_LINK([#include "obstack.h"],
3272
[struct obstack *mem;obstack_free(mem,(char *) 0)],
3273
am_cv_func_obstack=yes,
3274
am_cv_func_obstack=no)])
3275
if test $am_cv_func_obstack = yes; then
3276
AC_DEFINE(HAVE_OBSTACK)
3278
LIBOBJS="$LIBOBJS obstack.o"
3282
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
3283
dnl FIXME: Migrate into libit
3285
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
3286
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
3287
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
3288
am_cv_lib_error_at_line=yes,
3289
am_cv_lib_error_at_line=no)])
3290
if test $am_cv_lib_error_at_line = no; then
3291
LIBOBJS="$LIBOBJS error.o"
3293
AC_SUBST(LIBOBJS)dnl
3296
# Macro to add for using GNU gettext.
3297
# Ulrich Drepper <drepper@cygnus.com>, 1995.
3300
# Stephan Kulow: I put a KDE in it to avoid name conflicts
3302
AC_DEFUN(AM_KDE_GNU_GETTEXT,
3303
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3304
AC_REQUIRE([AC_PROG_RANLIB])dnl
3305
AC_REQUIRE([AC_HEADER_STDC])dnl
3306
AC_REQUIRE([AC_TYPE_OFF_T])dnl
3307
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3308
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3309
AC_REQUIRE([AC_FUNC_MMAP])dnl
3310
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
3311
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
3312
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
3313
__argz_count __argz_stringify __argz_next])
3315
AC_MSG_CHECKING(for stpcpy)
3316
AC_CACHE_VAL(kde_cv_func_stpcpy,
3318
kde_safe_cxxflags=$CXXFLAGS
3327
stpcpy(buffer, buffer);
3329
kde_cv_func_stpcpy=yes,
3330
kde_cv_func_stpcpy=no)
3332
CXXFLAGS=$kde_safe_cxxflags
3334
AC_MSG_RESULT($kde_cv_func_stpcpy)
3335
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
3336
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
3341
if test "x$CATOBJEXT" != "x"; then
3342
if test "x$ALL_LINGUAS" = "x"; then
3345
AC_MSG_CHECKING(for catalogs to be installed)
3347
for lang in ${LINGUAS=$ALL_LINGUAS}; do
3348
case "$ALL_LINGUAS" in
3349
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3352
LINGUAS=$NEW_LINGUAS
3353
AC_MSG_RESULT($LINGUAS)
3356
dnl Construct list of names of catalog files to be constructed.
3357
if test -n "$LINGUAS"; then
3358
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3364
AC_DEFUN(AC_HAVE_XPM,
3365
[AC_REQUIRE_CPP()dnl
3366
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3368
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3369
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3371
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3372
xpm_test=$withval, xpm_test="yes")
3373
if test "x$xpm_test" = xno; then
3376
AC_MSG_CHECKING(for XPM)
3377
AC_CACHE_VAL(ac_cv_have_xpm,
3380
ac_save_ldflags="$LDFLAGS"
3381
ac_save_cflags="$CFLAGS"
3382
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
3383
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3385
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3387
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3388
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3389
AC_TRY_LINK([#include <X11/xpm.h>],[],
3390
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3391
LDFLAGS="$ac_save_ldflags"
3392
CFLAGS="$ac_save_cflags"
3395
if test "$ac_cv_have_xpm" = no; then
3401
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3402
if test "$XPM_LDFLAGS" = ""; then
3403
XPMLIB='-lXpm $(LIB_X11)'
3405
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3407
if test "$XPM_INCLUDE" = ""; then
3410
XPMINC="-I$XPM_INCLUDE"
3420
AC_DEFUN(AC_HAVE_DPMS,
3421
[AC_REQUIRE_CPP()dnl
3422
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3424
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3425
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3428
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3429
dpms_test=$withval, dpms_test="yes")
3430
if test "x$dpms_test" = xno; then
3433
AC_MSG_CHECKING(for DPMS)
3434
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3435
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3436
AC_CACHE_VAL(ac_cv_have_dpms,
3438
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
3440
ac_cv_have_dpms="no"
3443
ac_save_ldflags="$LDFLAGS"
3444
ac_save_cflags="$CFLAGS"
3445
ac_save_libs="$LIBS"
3446
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3447
CFLAGS="$CFLAGS $X_INCLUDES"
3448
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3450
#include <X11/Xproto.h>
3452
#include <X11/Xlib.h>
3453
#include <X11/extensions/dpms.h>
3455
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3456
ac_cv_have_dpms="yes", [
3457
LDFLAGS="$ac_save_ldflags"
3458
CFLAGS="$ac_save_cflags"
3459
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3460
LIBS="$LIBS -lXdpms"
3461
CFLAGS="$CFLAGS $X_INCLUDES"
3462
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3464
#include <X11/Xproto.h>
3466
#include <X11/Xlib.h>
3467
#include <X11/extensions/dpms.h>
3469
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3471
ac_cv_have_dpms="-lXdpms"
3472
],ac_cv_have_dpms="no")
3474
LDFLAGS="$ac_save_ldflags"
3475
CFLAGS="$ac_save_cflags"
3476
LIBS="$ac_save_libs"
3480
if test "$ac_cv_have_dpms" = no; then
3486
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3487
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3490
if test "$DPMS_LDFLAGS" = ""; then
3491
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3493
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3495
if test "$DPMS_INCLUDE" = ""; then
3498
DPMSINC="-I$DPMS_INCLUDE"
3508
AC_DEFUN(AC_HAVE_GL,
3509
[AC_REQUIRE_CPP()dnl
3510
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3512
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3513
test -z "$GL_INCLUDE" && GL_INCLUDE=
3515
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3516
gl_test=$withval, gl_test="yes")
3517
if test "x$kde_use_qt_emb" = "xyes"; then
3518
# GL and Qt Embedded is a no-go for now.
3520
elif test "x$gl_test" = xno; then
3523
AC_MSG_CHECKING(for GL)
3524
AC_CACHE_VAL(ac_cv_have_gl,
3528
ac_save_ldflags="$LDFLAGS"
3529
ac_save_cxxflags="$CXXFLAGS"
3530
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3531
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3532
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3533
CXXFLAGS="$CFLAGS $X_INCLUDES"
3534
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3535
AC_TRY_LINK([#include <GL/gl.h>
3538
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3539
if test "x$ac_cv_have_gl" = "xno"; then
3540
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3541
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3542
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3543
CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3544
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3545
AC_TRY_LINK([#include <GL/gl.h>
3548
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3551
LDFLAGS="$ac_save_ldflags"
3552
CXXFLAGS="$ac_save_cxxflags"
3555
if test "$ac_cv_have_gl" = "no"; then
3561
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3562
if test "$GL_LDFLAGS" = ""; then
3563
if test "$ac_cv_have_gl" = "mesa"; then
3564
GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3566
GLLIB='-lGLU -lGL $(LIB_X11)'
3569
if test "$ac_cv_have_gl" = "mesa"; then
3570
GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3572
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3575
if test "$GL_INCLUDE" = ""; then
3578
GLINC="-I$GL_INCLUDE"
3580
AC_MSG_RESULT($ac_cv_have_gl)
3589
dnl shadow password and PAM magic - maintained by ossi@kde.org
3592
AC_REQUIRE([KDE_CHECK_LIBDL])
3595
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3596
[ if test "x$withval" = "xyes"; then
3599
elif test "x$withval" = "xno"; then
3603
pam_service=$withval
3605
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3607
AC_CACHE_VAL(ac_cv_path_pam,
3609
AC_CHECK_LIB(pam, pam_start,
3615
eval "$ac_cv_path_pam"
3619
AC_CHECK_HEADER(security/pam_appl.h,
3620
[ pam_header="security/pam_appl.h"
3622
[ AC_CHECK_HEADER(pam/pam_appl.h,
3623
[ pam_header="pam/pam_appl.h"
3628
AC_MSG_CHECKING(for PAM)
3629
if test "x$use_pam" = xno; then
3634
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3635
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3637
dnl test whether struct pam_message is const (Linux) or not (Sun)
3638
AC_MSG_CHECKING(for const pam_message)
3639
AC_EGREP_HEADER([struct pam_message], $pam_header,
3640
[ AC_EGREP_HEADER([const struct pam_message], $pam_header,
3641
[AC_MSG_RESULT([const: Linux-type PAM])],
3642
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3643
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3645
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3651
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3652
AC_DEFUN(DEF_PAM_SERVICE, [
3654
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3655
[ if test "x$use_pam" = xyes; then
3656
$3_PAM_SERVICE="$withval"
3658
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3659
You may want to enforce it by using --with-pam.])
3662
[ if test "x$use_pam" = xyes; then
3663
$3_PAM_SERVICE="$pam_service"
3666
if test -n "$$3_PAM_SERVICE"; then
3667
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3668
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3670
AC_SUBST($3_PAM_SERVICE)
3673
AC_DEFUN(KDE_SHADOWPASSWD, [
3674
AC_REQUIRE([KDE_PAM])
3676
AC_CHECK_LIB(shadow, getspent,
3677
[ LIBSHADOW="-lshadow"
3681
AC_CHECK_LIB(gen, getspent,
3685
[ AC_CHECK_FUNC(getspent,
3686
[ ac_use_shadow=yes ],
3687
[ ac_use_shadow=no ])
3693
AC_MSG_CHECKING([for shadow passwords])
3696
[ --with-shadow If you want shadow password support ],
3697
[ if test "x$withval" != "xno"; then
3703
use_shadow="$ac_use_shadow"
3706
if test "x$use_shadow" = xyes; then
3708
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3715
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3716
dnl this still applies, if we could use it indirectly through pam.
3717
if test "x$use_shadow" = xyes ||
3718
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3720
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3721
SETUIDFLAGS="-m 4755 -o root";;
3723
SETUIDFLAGS="-m 4755";;
3726
AC_SUBST(SETUIDFLAGS)
3730
AC_DEFUN(KDE_PASSWDLIBS, [
3731
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3732
AC_REQUIRE([KDE_PAM])
3733
AC_REQUIRE([KDE_SHADOWPASSWD])
3735
if test "x$use_pam" = "xyes"; then
3736
PASSWDLIBS="$PAMLIBS"
3738
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3741
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3742
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3743
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3744
dnl may need to read /etc/master.passwd).
3747
SETUIDFLAGS="-m 4755 -o root"
3753
AC_SUBST(PASSWDLIBS)
3756
AC_DEFUN(KDE_CHECK_LIBDL,
3758
AC_CHECK_LIB(dl, dlopen, [
3760
ac_cv_have_dlfcn=yes
3763
AC_CHECK_LIB(dld, shl_unload, [
3765
ac_cv_have_shload=yes
3771
AC_DEFUN(KDE_CHECK_DLOPEN,
3774
AC_CHECK_HEADERS(dlfcn.h dl.h)
3775
if test "$ac_cv_header_dlfcn_h" = "no"; then
3779
if test "$ac_cv_header_dl_h" = "no"; then
3780
ac_cv_have_shload=no
3783
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3785
AC_ARG_ENABLE(dlopen,
3786
[ --disable-dlopen link statically [default=no]] ,
3787
enable_dlopen=$enableval,
3790
# override the user's opinion, if we know it better ;)
3791
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3795
if test "$ac_cv_have_dlfcn" = "yes"; then
3796
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3799
if test "$ac_cv_have_shload" = "yes"; then
3800
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3803
if test "$enable_dlopen" = no ; then
3804
test -n "$1" && eval $1
3806
test -n "$2" && eval $2
3811
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3813
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3815
AC_MSG_CHECKING([dynamic loading])
3816
eval "`egrep '^build_libtool_libs=' libtool`"
3817
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3819
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3823
AC_MSG_RESULT($dynamic_loading)
3824
if test "$dynamic_loading" = "yes"; then
3831
AC_DEFUN(KDE_ADD_INCLUDES,
3833
if test -z "$1"; then
3834
test_include="Pix.h"
3839
AC_MSG_CHECKING([for libg++ ($test_include)])
3841
AC_CACHE_VAL(kde_cv_libgpp_includes,
3843
kde_cv_libgpp_includes=no
3849
/usr/unsupported/include \
3854
if test -r "$ac_dir/$test_include"; then
3855
kde_cv_libgpp_includes=$ac_dir
3861
AC_MSG_RESULT($kde_cv_libgpp_includes)
3862
if test "$kde_cv_libgpp_includes" != "no"; then
3863
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3869
AC_DEFUN(KDE_CHECK_MICO,
3871
AC_REQUIRE([KDE_CHECK_LIBDL])
3872
AC_REQUIRE([KDE_MISC_TESTS])
3873
AC_MSG_CHECKING(for MICO)
3875
if test -z "$MICODIR"; then
3876
kde_micodir=/usr/local
3878
kde_micodir="$MICODIR"
3881
AC_ARG_WITH(micodir,
3882
[ --with-micodir=micodir where mico is installed ],
3883
kde_micodir=$withval,
3884
kde_micodir=$kde_micodir
3887
AC_CACHE_VAL(kde_cv_mico_incdir,
3889
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3890
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3893
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3895
if test ! -r $kde_micodir/include/CORBA.h; then
3896
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3899
AC_MSG_RESULT($kde_micodir)
3901
MICO_INCLUDES=-I$kde_micodir/include
3902
AC_SUBST(MICO_INCLUDES)
3903
MICO_LDFLAGS=-L$kde_micodir/lib
3904
AC_SUBST(MICO_LDFLAGS)
3905
micodir=$kde_micodir
3908
AC_MSG_CHECKING([for MICO version])
3909
AC_CACHE_VAL(kde_cv_mico_version,
3912
cat >conftest.$ac_ext <<EOF
3914
#include <mico/version.h>
3917
printf("MICO_VERSION=%s\n",MICO_VERSION);
3921
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3922
if AC_TRY_EVAL(ac_compile); then
3923
if eval `./conftest 2>&5`; then
3924
kde_cv_mico_version=$MICO_VERSION
3926
AC_MSG_ERROR([your system is not able to execute a small application to
3927
find MICO version! Check $kde_micodir/include/mico/version.h])
3930
AC_MSG_ERROR([your system is not able to compile a small application to
3931
find MICO version! Check $kde_micodir/include/mico/version.h])
3935
dnl installed MICO version
3936
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3937
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3938
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3940
if test "x$1" = "x"; then
3946
dnl required MICO version
3947
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3948
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3949
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3951
if test "$mico_v_maj" -lt "$req_v_maj" || \
3952
( test "$mico_v_maj" -eq "$req_v_maj" && \
3953
test "$mico_v_mid" -lt "$req_v_mid" ) || \
3954
( test "$mico_v_mid" -eq "$req_v_mid" && \
3955
test "$mico_v_min" -lt "$req_v_min" )
3958
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3959
at least is required. You should upgrade MICO.])
3961
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3964
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3966
if test -z "$IDL"; then
3967
IDL='$(kde_bindir)/cuteidl'
3970
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3971
AC_SUBST(IDL_DEPENDENCIES)
3973
idldir="\$(includedir)/idl"
3978
AC_DEFUN(KDE_CHECK_MINI_STL,
3980
AC_REQUIRE([KDE_CHECK_MICO])
3982
AC_MSG_CHECKING(if we use mico's mini-STL)
3983
AC_CACHE_VAL(kde_cv_have_mini_stl,
3987
kde_save_cxxflags="$CXXFLAGS"
3988
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3991
#include <mico/config.h>
3994
#ifdef HAVE_MINI_STL
3998
kde_cv_have_mini_stl=no,
3999
kde_cv_have_mini_stl=yes)
4000
CXXFLAGS="$kde_save_cxxflags"
4004
if test "x$kde_cv_have_mini_stl" = "xyes"; then
4016
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
4018
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
4019
AC_SUBST(LIBPTHREAD)
4022
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
4024
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
4025
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
4027
if test "$kde_use_kernthreads" = "yes"; then
4028
ac_save_CXXFLAGS="$CXXFLAGS"
4029
ac_save_CFLAGS="$CFLAGS"
4030
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
4031
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
4032
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
4033
CXXFLAGS="$ac_save_CXXFLAGS"
4034
CFLAGS="$ac_save_CFLAGS"
4035
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
4036
kde_use_kernthreads=no
4038
dnl Add proper -I and -l statements
4039
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
4040
if test "x$LIBPTHREAD" = "x"; then
4041
kde_use_kernthreads=no
4043
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
4048
if test -z "$LIBPTHREAD"; then
4049
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
4053
AH_VERBATIM(__svr_define, [
4054
#if defined(__SVR4) && !defined(__svr4__)
4060
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
4061
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
4064
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4067
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
4068
LIBPTHREAD="$LIBPTHREAD -lc_r"
4070
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4071
if test "$CXX" = "KCC"; then
4072
CXXFLAGS="$CXXFLAGS --thread_safe"
4073
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
4079
AC_SUBST(USE_THREADS)
4080
AC_SUBST(LIBPTHREAD)
4083
AC_DEFUN(KDE_CHECK_THREADING,
4085
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4086
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
4087
dnl default is yes if libpthread is found and no if no libpthread is available
4088
if test -z "$LIBPTHREAD"; then
4089
if test -z "$USE_THREADS"; then
4090
kde_check_threading_default=no
4092
kde_check_threading_default=yes
4095
kde_check_threading_default=yes
4097
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
4098
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
4099
if test "x$kde_use_threading" = "xyes"; then
4100
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
4104
AC_DEFUN(KDE_TRY_LINK_PYTHON,
4106
if test "$kde_python_link_found" = no; then
4108
if test "$1" = normal; then
4109
AC_MSG_CHECKING(if a Python application links)
4111
AC_MSG_CHECKING(if Python depends on $2)
4114
AC_CACHE_VAL(kde_cv_try_link_python_$1,
4118
kde_save_cflags="$CFLAGS"
4119
CFLAGS="$CFLAGS $PYTHONINC"
4120
kde_save_libs="$LIBS"
4121
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
4122
kde_save_ldflags="$LDFLAGS"
4123
LDFLAGS="$LDFLAGS $PYTHONLIB"
4129
PySys_SetArgv(1, 0);
4131
[kde_cv_try_link_python_$1=yes],
4132
[kde_cv_try_link_python_$1=no]
4134
CFLAGS="$kde_save_cflags"
4135
LIBS="$kde_save_libs"
4136
LDFLAGS="$kde_save_ldflags"
4139
if test "$kde_cv_try_link_python_$1" = "yes"; then
4141
kde_python_link_found=yes
4142
if test ! "$1" = normal; then
4143
LIBPYTHON="$LIBPYTHON $2"
4156
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
4158
AC_MSG_CHECKING([for Python directory])
4160
AC_CACHE_VAL(kde_cv_pythondir,
4162
if test -z "$PYTHONDIR"; then
4163
kde_cv_pythondir=/usr/local
4165
kde_cv_pythondir="$PYTHONDIR"
4169
AC_ARG_WITH(pythondir,
4170
[ --with-pythondir=pythondir use python installed in pythondir ],
4172
ac_python_dir=$withval
4173
], ac_python_dir=$kde_cv_pythondir
4176
AC_MSG_RESULT($ac_python_dir)
4179
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
4181
AC_REQUIRE([KDE_CHECK_LIBDL])
4182
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
4183
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
4185
if test -z "$1"; then
4191
AC_MSG_CHECKING([for Python$version])
4193
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
4194
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
4195
if test ! -r $python_incdir/Python.h; then
4196
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
4197
python_incdir=$python_incdir/python$version
4198
if test ! -r $python_incdir/Python.h; then
4203
PYTHONINC=-I$python_incdir
4205
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4206
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
4207
if test ! -r $python_libdir/libpython$version.a; then
4208
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
4209
python_libdir=$python_libdir/python$version/config
4210
if test ! -r $python_libdir/libpython$version.a; then
4215
PYTHONLIB=-L$python_libdir
4216
kde_orig_LIBPYTHON=$LIBPYTHON
4217
if test -z "$LIBPYTHON"; then
4218
LIBPYTHON=-lpython$version
4221
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
4222
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
4223
python_moddir=$python_moddir/python$version
4224
if test ! -r $python_moddir/copy.py; then
4228
PYTHONMODDIR=$python_moddir
4230
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
4232
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
4233
LIBPYTHON=$kde_orig_LIBPYTHON
4234
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
4235
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
4238
dnl Note: this test is very weak
4239
kde_python_link_found=no
4240
KDE_TRY_LINK_PYTHON(normal)
4241
KDE_TRY_LINK_PYTHON(m, -lm)
4242
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
4243
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
4244
KDE_TRY_LINK_PYTHON(db2, -ldb2)
4245
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
4246
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
4247
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
4248
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
4249
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
4250
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
4251
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
4252
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
4253
[AC_MSG_WARN([it seems, Python depends on another library.
4254
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
4255
and contact the authors to let them know about this problem])
4258
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
4262
AC_SUBST(PYTHONMODDIR)
4263
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
4269
AC_DEFUN(KDE_CHECK_PYTHON,
4271
KDE_CHECK_PYTHON_INTERN("2.3",
4272
[KDE_CHECK_PYTHON_INTERN("2.2",
4273
[KDE_CHECK_PYTHON_INTERN("2.1",
4274
[KDE_CHECK_PYTHON_INTERN("2.0",
4275
[KDE_CHECK_PYTHON_INTERN($1, $2) ])
4281
AC_DEFUN(KDE_CHECK_STL_SGI,
4283
AC_MSG_CHECKING([if STL implementation is SGI like])
4284
AC_CACHE_VAL(kde_cv_stl_type_sgi,
4288
using namespace std;
4290
string astring="Hallo Welt.";
4291
astring.erase(0, 6); // now astring is "Welt"
4293
], kde_cv_stl_type_sgi=yes,
4294
kde_cv_stl_type_sgi=no)
4297
AC_MSG_RESULT($kde_cv_stl_type_sgi)
4299
if test "$kde_cv_stl_type_sgi" = "yes"; then
4300
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
4304
AC_DEFUN(KDE_CHECK_STL_HP,
4306
AC_MSG_CHECKING([if STL implementation is HP like])
4307
AC_CACHE_VAL(kde_cv_stl_type_hp,
4311
using namespace std;
4313
string astring="Hello World";
4314
astring.remove(0, 6); // now astring is "World"
4316
], kde_cv_stl_type_hp=yes,
4317
kde_cv_stl_type_hp=no)
4319
AC_MSG_RESULT($kde_cv_stl_type_hp)
4321
if test "$kde_cv_stl_type_hp" = "yes"; then
4322
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
4326
AC_DEFUN(KDE_CHECK_STL,
4330
ac_save_CXXFLAGS="$CXXFLAGS"
4331
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
4334
if test "$kde_cv_stl_type_sgi" = "no"; then
4337
if test "$kde_cv_stl_type_hp" = "no"; then
4338
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
4342
CXXFLAGS="$ac_save_CXXFLAGS"
4346
AC_DEFUN(AC_FIND_QIMGIO,
4347
[AC_REQUIRE([AC_FIND_JPEG])
4348
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
4349
AC_MSG_CHECKING([for qimgio])
4350
AC_CACHE_VAL(ac_cv_lib_qimgio,
4354
ac_save_LIBS="$LIBS"
4355
ac_save_CXXFLAGS="$CXXFLAGS"
4356
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
4357
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4360
#include <qimageio.h>
4361
#include <qstring.h>
4363
QString t = "hallo";
4368
ac_cv_lib_qimgio=yes,
4369
ac_cv_lib_qimgio=no,
4370
ac_cv_lib_qimgio=no)
4371
LIBS="$ac_save_LIBS"
4372
CXXFLAGS="$ac_save_CXXFLAGS"
4375
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
4376
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
4378
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
4381
AC_MSG_RESULT(not found)
4385
AC_DEFUN(KDE_CHECK_ANSI,
4389
AC_DEFUN(KDE_CHECK_INSURE,
4391
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4393
if test $enableval = "no"; dnl
4394
then ac_use_insure="no"
4395
else ac_use_insure="yes"
4397
], [ac_use_insure="no"])
4399
AC_MSG_CHECKING(if we will use Insure++ to debug)
4400
AC_MSG_RESULT($ac_use_insure)
4401
if test "$ac_use_insure" = "yes"; dnl
4402
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4406
AC_DEFUN(AM_DISABLE_LIBRARIES,
4408
AC_PROVIDE([AM_ENABLE_STATIC])
4409
AC_PROVIDE([AM_ENABLE_SHARED])
4415
AC_DEFUN(AC_CHECK_UTMP_FILE,
4417
AC_MSG_CHECKING([for utmp file])
4419
AC_CACHE_VAL(kde_cv_utmp_file,
4430
if test -r "$ac_file"; then
4431
kde_cv_utmp_file=$ac_file
4437
if test "$kde_cv_utmp_file" != "no"; then
4438
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4440
AC_MSG_RESULT($kde_cv_utmp_file)
4443
AC_MSG_RESULT([non found])
4448
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4451
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4453
if test ! -s $srcdir/subdirs; then
4454
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4456
files=`cd $srcdir && ls -1`
4457
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4459
echo $i >> $srcdir/subdirs
4463
if test -s $srcdir/inst-apps; then
4464
ac_topsubdirs="`cat $srcdir/inst-apps`"
4466
ac_topsubdirs="`cat $srcdir/subdirs`"
4469
for i in $ac_topsubdirs; do
4470
AC_MSG_CHECKING([if $i should be compiled])
4471
if test -d $srcdir/$i; then
4473
for j in $DO_NOT_COMPILE; do
4474
if test $i = $j; then
4481
AC_MSG_RESULT($install_it)
4482
vari=`echo $i | sed -e 's,[[-+.]],_,g'`
4483
if test $install_it = "yes"; then
4484
TOPSUBDIRS="$TOPSUBDIRS $i"
4485
eval "$vari""_SUBDIR_included=yes"
4487
eval "$vari""_SUBDIR_included=no"
4491
AC_SUBST(TOPSUBDIRS)
4494
AC_DEFUN(KDE_CHECK_NAMESPACES,
4496
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4510
int Foo::Bar::i = 1;
4513
AC_DEFINE(HAVE_NAMESPACES)
4520
AC_DEFUN(KDE_CHECK_NEWLIBS,
4525
dnl ------------------------------------------------------------------------
4526
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4527
dnl ------------------------------------------------------------------------
4529
AC_DEFUN(AC_CHECK_S_ISSOCK,
4531
AC_MSG_CHECKING(for S_ISSOCK)
4532
AC_CACHE_VAL(ac_cv_have_s_issock,
4538
#include <sys/stat.h>
4542
int b = S_ISSOCK( buff.st_mode );
4544
ac_cv_have_s_issock=yes,
4545
ac_cv_have_s_issock=no)
4548
AC_MSG_RESULT($ac_cv_have_s_issock)
4549
if test "$ac_cv_have_s_issock" = "yes"; then
4550
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4553
AH_VERBATIM(_ISSOCK,
4555
#ifndef HAVE_S_ISSOCK
4556
#define HAVE_S_ISSOCK
4557
#define S_ISSOCK(mode) (1==0)
4563
dnl ------------------------------------------------------------------------
4564
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4565
dnl ------------------------------------------------------------------------
4567
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4569
AC_MSG_CHECKING(for MAXPATHLEN)
4570
AC_CACHE_VAL(ac_cv_maxpathlen,
4573
cat > conftest.$ac_ext <<EOF
4575
# include <stdlib.h>
4578
#include <sys/param.h>
4580
#define MAXPATHLEN 1024
4583
KDE_HELLO MAXPATHLEN
4587
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4589
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4590
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4592
ac_cv_maxpathlen=1024
4598
AC_MSG_RESULT($ac_cv_maxpathlen)
4599
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4602
AC_DEFUN(KDE_CHECK_HEADER,
4605
kde_safe_cppflags=$CPPFLAGS
4606
CPPFLAGS="$CPPFLAGS $all_includes"
4608
AC_CHECK_HEADER($1, $2, $3, $4)
4609
CPPFLAGS=$kde_safe_cppflags
4613
AC_DEFUN(KDE_CHECK_HEADERS,
4615
AH_CHECK_HEADERS([$1])
4617
kde_safe_cppflags=$CPPFLAGS
4618
CPPFLAGS="$CPPFLAGS $all_includes"
4620
AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
4621
CPPFLAGS=$kde_safe_cppflags
4625
AC_DEFUN(KDE_FAST_CONFIGURE,
4627
dnl makes configure fast (needs perl)
4628
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4629
with_fast_perl=$enableval, with_fast_perl=yes)
4632
AC_DEFUN(KDE_CONF_FILES,
4635
if test -f $srcdir/configure.files ; then
4636
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4639
if test -n "$val" ; then
4641
CONF_FILES="$CONF_FILES $i"
4644
AC_SUBST(CONF_FILES)
4647
AC_DEFUN(KDE_SET_PREFIX,
4650
dnl make $KDEDIR the default for the installation
4651
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4653
if test "x$prefix" = "xNONE"; then
4654
prefix=$ac_default_prefix
4655
ac_configure_args="$ac_configure_args --prefix=$prefix"
4657
# And delete superflous '/' to make compares easier
4658
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4659
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4664
pushdef([AC_PROG_INSTALL],
4666
dnl our own version, testing for a -p flag
4667
popdef([AC_PROG_INSTALL])
4668
dnl as AC_PROG_INSTALL works as it works we first have
4669
dnl to save if the user didn't specify INSTALL, as the
4670
dnl autoconf one overwrites INSTALL and we have no chance to find
4672
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4673
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4674
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4677
if test -z "$kde_save_INSTALL_given" ; then
4678
# OK, user hasn't given any INSTALL, autoconf found one for us
4679
# now we test, if it supports the -p flag
4680
AC_MSG_CHECKING(for -p flag to install)
4681
rm -f confinst.$$.* > /dev/null 2>&1
4682
echo "Testtest" > confinst.$$.orig
4684
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4685
if test -f confinst.$$.new ; then
4686
# OK, -p seems to do no harm to install
4687
INSTALL="${INSTALL} -p"
4692
AC_MSG_RESULT($ac_res)
4694
dnl the following tries to resolve some signs and wonders coming up
4695
dnl with different autoconf/automake versions
4697
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4698
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4699
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4700
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4701
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4702
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4703
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4704
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4705
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4706
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4707
dnl automake (due to broken Makefile.am or whatever) to install programs,
4708
dnl and so does not see the -s flag in automake > 1.4
4709
dnl to clean up that mess we:
4710
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4711
dnl which cleans KDE's program with automake > 1.4;
4712
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4713
dnl with automake<=1.4
4714
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4715
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4717
dnl And to all this comes, that I even can't write in comments variable
4718
dnl names used by automake, because it is so stupid to think I wanted to
4719
dnl _use_ them, therefor I have written A_M_... instead of AM_
4720
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4722
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4723
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4725
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4726
INSTALL_SCRIPT='${INSTALL}'
4730
AC_DEFUN(KDE_LANG_CPLUSPLUS,
4732
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4733
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4736
pushdef([AC_LANG_CPLUSPLUS],
4737
[popdef([AC_LANG_CPLUSPLUS])
4741
AC_DEFUN(KDE_CHECK_LONG_LONG,
4743
AC_MSG_CHECKING(for long long)
4744
AC_CACHE_VAL(kde_cv_c_long_long,
4752
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4755
AC_MSG_RESULT($kde_cv_c_long_long)
4756
if test "$kde_cv_c_long_long" = yes; then
4757
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4761
AC_DEFUN(KDE_CHECK_LIB,
4763
kde_save_LDFLAGS="$LDFLAGS"
4764
dnl AC_CHECK_LIB modifies LIBS, so save it here
4765
kde_save_LIBS="$LIBS"
4766
LDFLAGS="$LDFLAGS $all_libraries"
4768
aix*) LDFLAGS="-brtl $LDFLAGS"
4769
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
4772
AC_CHECK_LIB($1, $2, $3, $4, $5)
4773
LDFLAGS="$kde_save_LDFLAGS"
4774
LIBS="$kde_save_LIBS"
4777
AC_DEFUN(KDE_JAVA_PREFIX,
4780
base=`basename "$1"`
4781
list=`ls -1 $dir 2> /dev/null`
4782
for entry in $list; do
4783
if test -d $dir/$entry/bin; then
4786
javadirs="$javadirs $dir/$entry/bin"
4789
elif test -d $dir/$entry/jre/bin; then
4792
javadirs="$javadirs $dir/$entry/jre/bin"
4799
dnl KDE_CHEC_JAVA_DIR(onlyjre)
4800
AC_DEFUN(KDE_CHECK_JAVA_DIR,
4804
[ --with-java=javadir use java installed in javadir, --without-java disables ],
4805
[ ac_java_dir=$withval
4809
AC_MSG_CHECKING([for Java])
4811
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4812
if test "x$ac_java_dir" = "xno"; then
4814
kde_java_includedir=no
4815
kde_java_libjvmdir=no
4816
kde_java_libhpidir=no
4818
if test "x$ac_java_dir" = "x"; then
4821
dnl No option set -> look in $PATH
4822
KDE_JAVA_PREFIX(/usr/j2se)
4823
KDE_JAVA_PREFIX(/usr/j*dk*)
4824
KDE_JAVA_PREFIX(/usr/lib/j*dk*)
4825
KDE_JAVA_PREFIX(/opt/j*sdk*)
4826
KDE_JAVA_PREFIX(/usr/lib/java*)
4827
KDE_JAVA_PREFIX(/usr/java*)
4828
KDE_JAVA_PREFIX(/usr/java/j*dk*)
4829
KDE_JAVA_PREFIX(/usr/java/j*re*)
4830
KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
4831
KDE_JAVA_PREFIX(/usr/lib/SunJava*)
4832
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
4833
KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
4834
KDE_JAVA_PREFIX(/opt/java*)
4839
for dir in $PATH; do
4840
javadirs="$javadirs $dir"
4845
for dir in $javadirs; do
4846
if test ! -d $dir; then break; fi
4847
if test -x "$dir/java"; then
4848
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4849
if test ! -f $libjvmdir/libjvm.so; then continue; fi
4850
jredirs="$jredirs $dir"
4857
for dir in $jredirs; do
4859
kde_java_bindir=$dir
4860
if test -x "$dir/javac"; then
4866
if test -n "$JAVAC"; then
4867
dnl this substitution might not work - well, we test for jni.h below
4868
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
4870
kde_java_includedir=no
4873
dnl config option set
4874
kde_java_bindir=$ac_java_dir/bin
4875
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
4876
kde_java_includedir=no
4878
kde_java_includedir=$ac_java_dir/include
4883
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
4884
if test "x$kde_java_bindir" != "xno"; then
4886
dnl Look for libjvm.so
4887
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4888
dnl Look for libhpi.so and avoid green threads
4889
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
4891
dnl Now check everything's fine under there
4892
dnl the include dir is our flag for having the JDK
4893
if test -d "$kde_java_includedir"; then
4894
if test ! -x "$kde_java_bindir/javac"; then
4895
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
4897
if test ! -x "$kde_java_bindir/javah"; then
4898
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4900
if test ! -x "$kde_java_bindir/jar"; then
4901
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4903
if test ! -r "$kde_java_includedir/jni.h"; then
4904
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
4907
jni_includes="-I$kde_java_includedir"
4908
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4909
dnl and under linux here..
4910
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
4911
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
4912
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
4919
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4920
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4923
if test ! -x "$kde_java_bindir/java"; then
4924
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
4927
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4928
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4931
if test -n "$jni_includes"; then
4932
dnl Check for JNI version
4935
ac_cxxflags_safe="$CXXFLAGS"
4936
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4942
#ifndef JNI_VERSION_1_2
4945
],[ kde_jni_works=yes ],
4946
[ kde_jni_works=no ])
4948
if test $kde_jni_works = no; then
4949
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
4950
You need to have Java Development Kit (JDK) version 1.2.
4952
Use --with-java to specify another location.
4953
Use --without-java to configure without java support.
4954
Or download a newer JDK and try again.
4955
See e.g. http://java.sun.com/products/jdk/1.2 ])
4958
CXXFLAGS="$ac_cxxflags_safe"
4961
dnl All tests ok, inform and subst the variables
4963
JAVAC=$kde_java_bindir/javac
4964
JAVAH=$kde_java_bindir/javah
4965
JAR=$kde_java_bindir/jar
4966
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4967
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
4968
AC_MSG_RESULT([java JDK in $kde_java_bindir])
4971
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4972
AC_MSG_RESULT([java JRE in $kde_java_bindir])
4974
elif test -d "/Library/Java/Home"; then
4975
kde_java_bindir="/Library/Java/Home/bin"
4976
jni_includes="-I/Library/Java/Home/include"
4978
JAVAC=$kde_java_bindir/javac
4979
JAVAH=$kde_java_bindir/javah
4980
JAR=$kde_java_bindir/jar
4981
JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
4983
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
4984
AC_MSG_RESULT([Apple Java Framework])
4986
AC_MSG_RESULT([none found])
4993
AC_SUBST(jni_includes)
4995
# for backward compat
4996
kde_cv_java_includedir=$kde_java_includedir
4997
kde_cv_java_bindir=$kde_java_bindir
5000
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
5001
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
5002
dnl big packages, m4_foreach is dog-slow. So use our own version of
5003
dnl it. (matz@kde.org)
5004
m4_define([mm_foreach],
5005
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
5006
m4_define([mm_car], [[$1]])
5007
m4_define([mm_car2], [[$@]])
5008
m4_define([_mm_foreach],
5009
[m4_if(m4_quote($2), [], [],
5010
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
5011
mm_car2(m4_shift($2)),
5013
m4_define([AC_FOREACH],
5014
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
5016
AC_DEFUN(KDE_NEED_FLEX,
5019
LIBS="$LIBS $USER_LDFLAGS"
5022
if test -z "$LEXLIB"; then
5023
AC_MSG_ERROR([You need to have flex installed.])
5028
AC_DEFUN(AC_PATH_QTOPIA,
5030
dnl TODO: use AC_CACHE_VAL
5032
if test -z "$1"; then
5037
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
5038
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
5039
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
5042
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
5043
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
5045
AC_REQUIRE([AC_PATH_QT])
5047
AC_MSG_CHECKING([for Qtopia])
5050
AC_SUBST(LIB_QTOPIA)
5052
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
5056
AC_ARG_WITH(qtopia-dir,
5057
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
5058
[ ac_qtopia_incdir="$withval"/include] )
5061
for dir in $kde_qtopia_dirs; do
5062
qtopia_incdirs="$qtopia_incdirs $dir/include"
5065
if test ! "$ac_qtopia_incdir" = "NO"; then
5066
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
5070
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
5071
ac_qtopia_incdir="$qtopia_incdir"
5073
if test -z "$qtopia_incdir"; then
5074
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
5077
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
5078
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
5079
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
5081
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
5082
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
5083
if test "$qtopia_ver" -lt "$qtopia_minver"; then
5084
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
5091
ac_cxxflags_safe="$CXXFLAGS"
5092
ac_ldflags_safe="$LDFLAGS"
5093
ac_libs_safe="$LIBS"
5095
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
5096
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
5097
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
5099
cat > conftest.$ac_ext <<EOF
5100
#include "confdefs.h"
5101
#include <qpe/qpeapplication.h>
5102
#include <qpe/version.h>
5104
int main( int argc, char **argv )
5106
QPEApplication app( argc, argv );
5111
if AC_TRY_EVAL(ac_link) && test -s conftest; then
5115
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
5116
the end of config.log])
5119
CXXFLAGS="$ac_cxxflags_safe"
5120
LDFLAGS="$ac_ldflags_safe"
5121
LIBS="$ac_libs_safe"
5125
QTOPIA_INCLUDES="-I$qtopia_incdir"
5126
AC_SUBST(QTOPIA_INCLUDES)
5128
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
5132
AC_DEFUN(KDE_INIT_DOXYGEN,
5134
AC_MSG_CHECKING([for Qt docs])
5136
if test "${with_qt_dir+set}" = set; then
5137
kde_qtdir="$with_qt_dir"
5140
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
5141
AC_MSG_RESULT($QTDOCDIR)
5145
KDE_FIND_PATH(dot, DOT, [], [])
5146
if test -n "$DOT"; then
5151
AC_SUBST(KDE_HAVE_DOT)
5152
KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
5155
DOXYGEN_PROJECT_NAME="$1"
5156
DOXYGEN_PROJECT_NUMBER="$2"
5157
AC_SUBST(DOXYGEN_PROJECT_NAME)
5158
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5161
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5164
AC_SUBST(KDE_HAS_DOXYGEN)
5169
AC_DEFUN(AC_FIND_BZIP2,
5171
AC_MSG_CHECKING([for bzDecompress in libbz2])
5172
AC_CACHE_VAL(ac_cv_lib_bzip2,
5175
kde_save_LIBS="$LIBS"
5176
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
5177
kde_save_CFLAGS="$CFLAGS"
5178
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
5184
[ bz_stream s; (void) bzDecompress(&s); ],
5185
eval "ac_cv_lib_bzip2='-lbz2'",
5186
eval "ac_cv_lib_bzip2=no")
5187
LIBS="$kde_save_LIBS"
5188
CFLAGS="$kde_save_CFLAGS"
5190
AC_MSG_RESULT($ac_cv_lib_bzip2)
5192
if test ! "$ac_cv_lib_bzip2" = no; then
5195
LIBBZ2="$ac_cv_lib_bzip2"
5202
KDE_CHECK_COMPILER_FLAG(shared, [
5203
ld_shared_flag="-shared"
5205
KDE_CHECK_COMPILER_FLAG(fPIC, [
5206
cxx_shared_flag="-fPIC"
5209
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
5210
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
5213
kde_save_LIBS="$LIBS"
5214
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
5215
kde_save_CXXFLAGS="$CXXFLAGS"
5216
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
5223
[ bz_stream s; (void) BZ2_bzDecompress(&s); ],
5224
eval "ac_cv_lib_bzip2_prefix='-lbz2'",
5225
eval "ac_cv_lib_bzip2_prefix=no")
5226
LIBS="$kde_save_LIBS"
5227
CXXFLAGS="$kde_save_CXXFLAGS"
5230
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
5234
if test ! "$ac_cv_lib_bzip2_prefix" = no; then
5237
LIBBZ2="$ac_cv_lib_bzip2_prefix"
5240
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
5241
dnl else, we just ignore this
5245
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
5248
dnl ------------------------------------------------------------------------
5249
dnl Try to find the SSL headers and libraries.
5250
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
5251
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
5252
dnl ------------------------------------------------------------------------
5254
AC_DEFUN(KDE_CHECK_SSL,
5256
LIBSSL="-lssl -lcrypto"
5257
AC_REQUIRE([KDE_CHECK_LIB64])
5259
ac_ssl_includes=NO ac_ssl_libraries=NO
5262
AC_ARG_WITH(ssl-dir,
5263
[ --with-ssl-dir=DIR where the root of OpenSSL is installed],
5264
[ ac_ssl_includes="$withval"/include
5265
ac_ssl_libraries="$withval"/lib$kdelibsuff
5270
[ --without-ssl disable SSL checks],
5271
[want_ssl=$withval])
5273
if test $want_ssl = yes; then
5275
AC_MSG_CHECKING(for OpenSSL)
5277
AC_CACHE_VAL(ac_cv_have_ssl,
5278
[#try to guess OpenSSL locations
5280
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
5281
ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
5282
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
5283
ac_ssl_includes="$ssl_incdir"
5285
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"
5286
if test ! "$ac_ssl_libraries" = "NO"; then
5287
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
5292
for dir in $ssl_libdirs; do
5293
try="ls -1 $dir/libssl*"
5294
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
5297
ac_ssl_libraries="$ssl_libdir"
5302
ac_cflags_safe="$CFLAGS"
5303
ac_ldflags_safe="$LDFLAGS"
5304
ac_libs_safe="$LIBS"
5306
CFLAGS="$CFLAGS -I$ssl_incdir $all_includes"
5307
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
5308
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
5310
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
5316
CFLAGS="$ac_cflags_safe"
5317
LDFLAGS="$ac_ldflags_safe"
5318
LIBS="$ac_libs_safe"
5322
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
5330
eval "$ac_cv_have_ssl"
5332
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
5334
AC_MSG_CHECKING([whether OpenSSL uses rsaref])
5335
AC_MSG_RESULT($ac_ssl_rsaref)
5337
AC_MSG_CHECKING([for easter eggs])
5338
AC_MSG_RESULT([none found])
5344
if test "$have_ssl" = yes; then
5345
AC_MSG_CHECKING(for OpenSSL version)
5346
dnl Check for SSL version
5347
AC_CACHE_VAL(ac_cv_ssl_version,
5352
cat >conftest.$ac_ext <<EOF
5353
#include <openssl/opensslv.h>
5357
#ifndef OPENSSL_VERSION_NUMBER
5358
printf("ssl_version=\\"error\\"\n");
5360
if (OPENSSL_VERSION_NUMBER < 0x00906000)
5361
printf("ssl_version=\\"old\\"\n");
5363
printf("ssl_version=\\"ok\\"\n");
5369
ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest'
5370
if AC_TRY_EVAL(ac_compile); then
5372
if eval `./conftest 2>&5`; then
5373
if test $ssl_version = error; then
5374
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
5376
if test $ssl_version = old; then
5377
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
5381
ac_cv_ssl_version="ssl_version=$ssl_version"
5383
AC_MSG_ERROR([Your system couldn't run a small SSL test program.
5384
Check config.log, and if you can't figure it out, send a mail to
5385
David Faure <faure@kde.org>, attaching your config.log])
5389
AC_MSG_ERROR([Your system couldn't link a small SSL test program.
5390
Check config.log, and if you can't figure it out, send a mail to
5391
David Faure <faure@kde.org>, attaching your config.log])
5398
eval "$ac_cv_ssl_version"
5399
AC_MSG_RESULT($ssl_version)
5402
if test "$have_ssl" != yes; then
5405
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
5406
ac_cv_have_ssl="have_ssl=yes \
5407
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
5410
ssl_libraries="$ac_ssl_libraries"
5411
ssl_includes="$ac_ssl_includes"
5413
if test "$ac_ssl_rsaref" = yes; then
5414
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref"
5417
if test $ssl_version = "old"; then
5418
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
5422
if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then
5425
SSL_INCLUDES="-I$ssl_includes"
5428
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then
5431
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
5434
AC_SUBST(SSL_INCLUDES)
5435
AC_SUBST(SSL_LDFLAGS)
5439
AC_DEFUN(KDE_CHECK_STRLCPY,
5441
AC_REQUIRE([AC_CHECK_STRLCAT])
5442
AC_REQUIRE([AC_CHECK_STRLCPY])
5443
AC_CHECK_SIZEOF(size_t)
5444
AC_CHECK_SIZEOF(unsigned long)
5446
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
5448
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
5451
],AC_MSG_RESULT([yes]),[
5454
Apparently on your system our assumption sizeof size_t == sizeof unsigned long
5455
does not apply. Please mail kde-devel@kde.org with a description of your system!
5460
AC_DEFUN(KDE_CHECK_BINUTILS,
5462
AC_MSG_CHECKING([if ld supports unversioned version maps])
5464
kde_save_LDFLAGS="$LDFLAGS"
5465
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
5466
echo "{ local: extern \"C++\" { foo }; };" > conftest.map
5467
AC_TRY_LINK([int foo;],
5469
#ifdef __INTEL_COMPILER
5470
icc apparently does not support libtools version-info and version-script
5471
at the same time. Dunno where the bug is, but until somebody figured out,
5472
better disable the optional version scripts.
5476
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
5477
LDFLAGS="$kde_save_LDFLAGS"
5479
AM_CONDITIONAL(include_VERSION_SCRIPT,
5480
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
5482
AC_MSG_RESULT($kde_supports_versionmaps)
5485
AC_DEFUN([AM_PROG_OBJC],[
5486
AC_CHECK_PROGS(OBJC, gcc, gcc)
5487
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
5488
if test "x${OBJCFLAGS-unset}" = xunset; then
5492
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
5494
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5495
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5496
## Free Software Foundation, Inc.
5497
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5499
## This program is free software; you can redistribute it and/or modify
5500
## it under the terms of the GNU General Public License as published by
5501
## the Free Software Foundation; either version 2 of the License, or
5502
## (at your option) any later version.
5504
## This program is distributed in the hope that it will be useful, but
5505
## WITHOUT ANY WARRANTY; without even the implied warranty of
5506
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5507
## General Public License for more details.
5509
## You should have received a copy of the GNU General Public License
5510
## along with this program; if not, write to the Free Software
5511
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5513
## As a special exception to the GNU General Public License, if you
5514
## distribute this file as part of a program that contains a
5515
## configuration script generated by Autoconf, you may include it under
5516
## the same distribution terms that you use for the rest of that program.
5518
# serial 47 AC_PROG_LIBTOOL
5522
AC_DEFUN([AC_PROG_LIBTOOL],
5523
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
5524
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
5525
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
5526
AC_PROVIDE_IFELSE([AC_PROG_CXX],
5528
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
5531
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5532
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5533
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5534
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5536
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5538
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5540
[ifdef([AC_PROG_GCJ],
5541
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5542
ifdef([A][M_PROG_GCJ],
5543
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5544
ifdef([LT_AC_PROG_GCJ],
5545
[define([LT_AC_PROG_GCJ],
5546
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
5547
])])# AC_PROG_LIBTOOL
5552
AC_DEFUN([_AC_PROG_LIBTOOL],
5553
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
5554
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
5555
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
5557
# This can be used to rebuild libtool when needed
5558
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
5560
# Always use our own libtool.
5561
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
5562
AC_SUBST(LIBTOOL)dnl
5564
# Prevent multiple expansion
5565
define([AC_PROG_LIBTOOL], [])
5566
])# _AC_PROG_LIBTOOL
5571
AC_DEFUN([AC_LIBTOOL_SETUP],
5573
AC_REQUIRE([AC_ENABLE_SHARED])dnl
5574
AC_REQUIRE([AC_ENABLE_STATIC])dnl
5575
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
5576
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5577
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5578
AC_REQUIRE([AC_PROG_CC])dnl
5579
AC_REQUIRE([AC_PROG_LD])dnl
5580
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
5581
AC_REQUIRE([AC_PROG_NM])dnl
5582
AC_REQUIRE([LT_AC_PROG_SED])dnl
5584
AC_REQUIRE([AC_PROG_LN_S])dnl
5585
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
5586
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
5587
AC_REQUIRE([AC_OBJEXT])dnl
5588
AC_REQUIRE([AC_EXEEXT])dnl
5591
AC_LIBTOOL_SYS_MAX_CMD_LEN
5592
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5595
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5596
_LT_AC_PROG_ECHO_BACKSLASH
5600
# AIX sometimes has problems with the GCC collect2 program. For some
5601
# reason, if we set the COLLECT_NAMES environment variable, the problems
5602
# vanish in a puff of smoke.
5603
if test "X${COLLECT_NAMES+set}" != Xset; then
5605
export COLLECT_NAMES
5610
# Sed substitution that helps us do robust quoting. It backslashifies
5611
# metacharacters that are still active within double-quoted strings.
5612
Xsed='sed -e s/^X//'
5613
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
5615
# Same as above, but do not quote variable references.
5616
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
5618
# Sed substitution to delay expansion of an escaped shell variable in a
5619
# double_quote_subst'ed string.
5620
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5622
# Sed substitution to avoid accidental globbing in evaled expressions
5623
no_glob_subst='s/\*/\\\*/g'
5629
default_ofile=libtool
5630
can_build_shared=yes
5632
# All known linkers require a `.a' archive for static linking (except M$VC,
5633
# which needs '.lib').
5635
ltmain="$ac_aux_dir/ltmain.sh"
5636
ofile="$default_ofile"
5637
with_gnu_ld="$lt_cv_prog_gnu_ld"
5639
AC_CHECK_TOOL(RANLIB, ranlib, :)
5640
AC_CHECK_TOOL(STRIP, strip, :)
5643
old_CFLAGS="$CFLAGS"
5645
# Set sane defaults for various variables
5646
test -z "$AR" && AR=ar
5647
test -z "$AR_FLAGS" && AR_FLAGS=cru
5648
test -z "$AS" && AS=as
5649
test -z "$CC" && CC=cc
5650
test -z "$LTCC" && LTCC=$CC
5651
test -z "$DLLTOOL" && DLLTOOL=dlltool
5652
test -z "$LD" && LD=ld
5653
test -z "$LN_S" && LN_S="ln -s"
5654
test -z "$MAGIC_CMD" && MAGIC_CMD=file
5655
test -z "$NM" && NM=nm
5656
test -z "$SED" && SED=sed
5657
test -z "$OBJDUMP" && OBJDUMP=objdump
5658
test -z "$RANLIB" && RANLIB=:
5659
test -z "$STRIP" && STRIP=:
5660
test -z "$ac_objext" && ac_objext=o
5662
# Determine commands to create old-style static archives.
5663
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5664
old_postinstall_cmds='chmod 644 $oldlib'
5665
old_postuninstall_cmds=
5667
if test -n "$RANLIB"; then
5670
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5673
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5676
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5679
# Only perform the check for file, if the check method requires it
5680
case $deplibs_check_method in
5682
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5688
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
5689
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5690
enable_win32_dll=yes, enable_win32_dll=no)
5692
AC_ARG_ENABLE([libtool-lock],
5693
[AC_HELP_STRING([--disable-libtool-lock],
5694
[avoid locking (might break parallel builds)])])
5695
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5698
[AC_HELP_STRING([--with-pic],
5699
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
5700
[pic_mode="$withval"],
5702
test -z "$pic_mode" && pic_mode=default
5704
# Use C for the default configuration in the libtool script
5706
AC_LIBTOOL_LANG_C_CONFIG
5708
])# AC_LIBTOOL_SETUP
5711
# _LT_AC_SYS_COMPILER
5712
# -------------------
5713
AC_DEFUN([_LT_AC_SYS_COMPILER],
5714
[AC_REQUIRE([AC_PROG_CC])dnl
5716
# If no C compiler was specified, use CC.
5719
# Allow CC to be a program name with arguments.
5722
])# _LT_AC_SYS_COMPILER
5725
# _LT_AC_SYS_LIBPATH_AIX
5726
# ----------------------
5727
# Links a minimal program and checks the executable
5728
# for the system default hardcoded library path. In most cases,
5729
# this is /usr/lib:/lib, but when the MPI compilers are used
5730
# the location of the communication and MPI libs are included too.
5731
# If we don't find anything, use the default library path according
5732
# to the aix ld manual.
5733
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
5734
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
5735
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
5737
# Check for a 64-bit object if we didn't find anything.
5738
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; }
5740
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
5741
])# _LT_AC_SYS_LIBPATH_AIX
5744
# _LT_AC_PROG_ECHO_BACKSLASH
5745
# --------------------------
5746
# Add some code to the start of the generated configure script which
5747
# will find an echo command which doesn't interpret backslashes.
5748
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
5749
[ifdef([AC_DIVERSION_NOTICE],
5750
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
5751
[AC_DIVERT_PUSH(NOTICE)])
5753
# Check that we are running under the correct shell.
5754
SHELL=${CONFIG_SHELL-/bin/sh}
5758
# Remove one level of quotation (which was required for Make).
5759
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
5764
if test "X[$]1" = X--no-reexec; then
5765
# Discard the --no-reexec flag, and continue.
5767
elif test "X[$]1" = X--fallback-echo; then
5768
# Avoid inline document here, it may be left over
5770
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
5771
# Yippee, $echo works!
5774
# Restart under the correct shell.
5775
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
5778
if test "X[$]1" = X--fallback-echo; then
5779
# used as fallback echo
5787
# The HP-UX ksh and POSIX shell print the target directory to stdout
5789
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
5791
if test -z "$ECHO"; then
5792
if test "X${echo_test_string+set}" != Xset; then
5793
# find a string as large as possible, as long as the shell can cope with it
5794
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
5795
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
5796
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
5797
echo_test_string="`eval $cmd`" &&
5798
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
5805
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5806
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5807
test "X$echo_testing_string" = "X$echo_test_string"; then
5810
# The Solaris, AIX, and Digital Unix default echo programs unquote
5811
# backslashes. This makes it impossible to quote backslashes using
5812
# echo "$something" | sed 's/\\/\\\\/g'
5814
# So, first we look for a working echo in the user's PATH.
5816
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5817
for dir in $PATH /usr/ucb; do
5819
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
5820
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
5821
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
5822
test "X$echo_testing_string" = "X$echo_test_string"; then
5829
if test "X$echo" = Xecho; then
5830
# We didn't find a better echo, so look for alternatives.
5831
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
5832
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
5833
test "X$echo_testing_string" = "X$echo_test_string"; then
5834
# This shell has a builtin print -r that does the trick.
5836
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
5837
test "X$CONFIG_SHELL" != X/bin/ksh; then
5838
# If we have ksh, try running configure again with it.
5839
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
5840
export ORIGINAL_CONFIG_SHELL
5841
CONFIG_SHELL=/bin/ksh
5843
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
5847
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
5848
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
5849
test "X$echo_testing_string" = "X$echo_test_string"; then
5850
# Cool, printf works
5852
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5853
test "X$echo_testing_string" = 'X\t' &&
5854
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5855
test "X$echo_testing_string" = "X$echo_test_string"; then
5856
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
5858
SHELL="$CONFIG_SHELL"
5860
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5861
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
5862
test "X$echo_testing_string" = 'X\t' &&
5863
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
5864
test "X$echo_testing_string" = "X$echo_test_string"; then
5865
echo="$CONFIG_SHELL [$]0 --fallback-echo"
5867
# maybe with a smaller string...
5870
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
5871
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
5878
if test "$prev" != 'sed 50q "[$]0"'; then
5879
echo_test_string=`eval $prev`
5880
export echo_test_string
5881
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
5883
# Oops. We lost completely, so just stick with echo.
5892
# Copy echo and quote the copy suitably for passing to libtool from
5893
# the Makefile, instead of quoting the original, which is used later.
5895
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
5896
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
5901
])# _LT_AC_PROG_ECHO_BACKSLASH
5906
AC_DEFUN([_LT_AC_LOCK],
5907
[AC_ARG_ENABLE([libtool-lock],
5908
[AC_HELP_STRING([--disable-libtool-lock],
5909
[avoid locking (might break parallel builds)])])
5910
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5912
# Some flags need to be propagated to the compiler or linker for good
5916
# Find out which ABI we are using.
5917
echo 'int i;' > conftest.$ac_ext
5918
if AC_TRY_EVAL(ac_compile); then
5919
case `/usr/bin/file conftest.$ac_objext` in
5931
# Find out which ABI we are using.
5932
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
5933
if AC_TRY_EVAL(ac_compile); then
5934
case `/usr/bin/file conftest.$ac_objext` in
5950
# Test if the compiler is 64bit
5951
echo 'int i;' > conftest.$ac_ext
5952
if AC_TRY_EVAL(ac_compile); then
5953
case `/usr/bin/file conftest.$ac_objext` in
5966
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
5967
SAVE_CFLAGS="$CFLAGS"
5968
CFLAGS="$CFLAGS -belf"
5969
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5971
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5973
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5974
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5975
CFLAGS="$SAVE_CFLAGS"
5978
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
5979
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
5980
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
5981
AC_CHECK_TOOL(AS, as, false)
5982
AC_CHECK_TOOL(OBJDUMP, objdump, false)
5984
# recent cygwin and mingw systems supply a stub DllMain which the user
5985
# can override, but on older systems we have to supply one
5986
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
5988
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5989
DllMain (0, 0, 0);],
5990
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
5993
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5994
# old mingw systems require "-dll" to link a DLL, while more recent ones
5996
SAVE_CFLAGS="$CFLAGS"
5997
CFLAGS="$CFLAGS -mdll"
5998
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
5999
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
6000
CFLAGS="$SAVE_CFLAGS" ;;
6001
*-*-cygwin* | *-*-pw32*)
6002
# cygwin systems need to pass --dll to the linker, and not link
6003
# crt.o which will require a WinMain@16 definition.
6004
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
6010
need_locks="$enable_libtool_lock"
6015
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6016
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
6017
# ----------------------------------------------------------------
6018
# Check whether the given compiler option works
6019
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
6020
[AC_CACHE_CHECK([$1], [$2],
6022
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6023
save_CFLAGS="$CFLAGS"
6025
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6026
if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
6027
# The compiler can only warn and ignore the option if not recognized
6028
# So say no if there are warnings
6029
if test -s conftest.err; then
6030
# Append any errors to the config.log.
6031
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6037
CFLAGS="$save_CFLAGS"
6040
if test x"[$]$2" = xyes; then
6041
ifelse([$5], , :, [$5])
6043
ifelse([$6], , :, [$6])
6045
])# AC_LIBTOOL_COMPILER_OPTION
6048
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
6049
# [ACTION-SUCCESS], [ACTION-FAILURE])
6050
# ------------------------------------------------------------
6051
# Check whether the given compiler option works
6052
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6053
[AC_CACHE_CHECK([$1], [$2],
6055
save_LDFLAGS="$LDFLAGS"
6056
LDFLAGS="$LDFLAGS $3"
6057
echo "$lt_simple_link_test_code" > conftest.$ac_ext
6058
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
6059
# The compiler can only warn and ignore the option if not recognized
6060
# So say no if there are warnings
6061
if test -s conftest.err; then
6062
# Append any errors to the config.log.
6063
cat conftest.err 1>&AS_MESSAGE_LOG_FD
6069
LDFLAGS="$save_LDFLAGS"
6072
if test x"[$]$2" = xyes; then
6073
ifelse([$4], , :, [$4])
6075
ifelse([$5], , :, [$5])
6077
])# AC_LIBTOOL_LINKER_OPTION
6080
# AC_LIBTOOL_SYS_MAX_CMD_LEN
6081
# --------------------------
6082
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
6083
[# find the maximum length of command line arguments
6084
AC_MSG_CHECKING([the maximum length of command line arguments])
6085
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
6091
# On DJGPP, this test can blow up pretty badly due to problems in libc
6092
# (any single argument exceeding 2000 bytes causes a buffer overrun
6093
# during glob expansion). Even if it were fixed, the result of this
6094
# check would be larger than it should be.
6095
lt_cv_sys_max_cmd_len=12288; # 12K is about right
6099
# Under GNU Hurd, this test is not required because there is
6100
# no limit to the length of command line arguments.
6101
# Libtool will interpret -1 as no limit whatsoever
6102
lt_cv_sys_max_cmd_len=-1;
6106
# If test is not a shell built-in, we'll probably end up computing a
6107
# maximum length that is only half of the actual maximum length, but
6109
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
6110
= "XX$testring") >/dev/null 2>&1 &&
6111
new_result=`expr "X$testring" : ".*" 2>&1` &&
6112
lt_cv_sys_max_cmd_len=$new_result &&
6113
test $i != 17 # 1/2 MB should be enough
6116
testring=$testring$testring
6119
# Add a significant safety factor because C++ compilers can tack on massive
6120
# amounts of additional arguments before passing them to the linker.
6121
# It appears as though 1/2 is a usable value.
6122
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6126
if test -n $lt_cv_sys_max_cmd_len ; then
6127
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
6131
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
6134
# _LT_AC_CHECK_DLFCN
6135
# --------------------
6136
AC_DEFUN([_LT_AC_CHECK_DLFCN],
6137
[AC_CHECK_HEADERS(dlfcn.h)dnl
6138
])# _LT_AC_CHECK_DLFCN
6141
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6142
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6143
# ------------------------------------------------------------------
6144
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6145
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6146
if test "$cross_compiling" = yes; then :
6149
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6150
lt_status=$lt_dlunknown
6151
cat > conftest.$ac_ext <<EOF
6152
[#line __oline__ "configure"
6153
#include "confdefs.h"
6162
# define LT_DLGLOBAL RTLD_GLOBAL
6165
# define LT_DLGLOBAL DL_GLOBAL
6167
# define LT_DLGLOBAL 0
6171
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6172
find out it does not work in some platform. */
6173
#ifndef LT_DLLAZY_OR_NOW
6175
# define LT_DLLAZY_OR_NOW RTLD_LAZY
6178
# define LT_DLLAZY_OR_NOW DL_LAZY
6181
# define LT_DLLAZY_OR_NOW RTLD_NOW
6184
# define LT_DLLAZY_OR_NOW DL_NOW
6186
# define LT_DLLAZY_OR_NOW 0
6194
extern "C" void exit (int);
6197
void fnord() { int i=42;}
6200
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6201
int status = $lt_dlunknown;
6205
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6206
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6207
/* dlclose (self); */
6213
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6214
(./conftest; exit; ) 2>/dev/null
6217
x$lt_dlno_uscore) $1 ;;
6218
x$lt_dlneed_uscore) $2 ;;
6219
x$lt_unknown|x*) $3 ;;
6222
# compilation failed
6227
])# _LT_AC_TRY_DLOPEN_SELF
6230
# AC_LIBTOOL_DLOPEN_SELF
6231
# -------------------
6232
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6233
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6234
if test "x$enable_dlopen" != xyes; then
6235
enable_dlopen=unknown
6236
enable_dlopen_self=unknown
6237
enable_dlopen_self_static=unknown
6244
lt_cv_dlopen="load_add_on"
6246
lt_cv_dlopen_self=yes
6249
cygwin* | mingw* | pw32*)
6250
lt_cv_dlopen="LoadLibrary"
6255
AC_CHECK_FUNC([shl_load],
6256
[lt_cv_dlopen="shl_load"],
6257
[AC_CHECK_LIB([dld], [shl_load],
6258
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6259
[AC_CHECK_FUNC([dlopen],
6260
[lt_cv_dlopen="dlopen"],
6261
[AC_CHECK_LIB([dl], [dlopen],
6262
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6263
[AC_CHECK_LIB([svld], [dlopen],
6264
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6265
[AC_CHECK_LIB([dld], [dld_link],
6266
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6275
if test "x$lt_cv_dlopen" != xno; then
6281
case $lt_cv_dlopen in
6283
save_CPPFLAGS="$CPPFLAGS"
6284
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6286
save_LDFLAGS="$LDFLAGS"
6287
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6290
LIBS="$lt_cv_dlopen_libs $LIBS"
6292
AC_CACHE_CHECK([whether a program can dlopen itself],
6293
lt_cv_dlopen_self, [dnl
6294
_LT_AC_TRY_DLOPEN_SELF(
6295
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6296
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6299
if test "x$lt_cv_dlopen_self" = xyes; then
6300
LDFLAGS="$LDFLAGS $link_static_flag"
6301
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6302
lt_cv_dlopen_self_static, [dnl
6303
_LT_AC_TRY_DLOPEN_SELF(
6304
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6305
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6309
CPPFLAGS="$save_CPPFLAGS"
6310
LDFLAGS="$save_LDFLAGS"
6315
case $lt_cv_dlopen_self in
6316
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6317
*) enable_dlopen_self=unknown ;;
6320
case $lt_cv_dlopen_self_static in
6321
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6322
*) enable_dlopen_self_static=unknown ;;
6325
])# AC_LIBTOOL_DLOPEN_SELF
6328
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
6329
# ---------------------------------
6330
# Check to see if options -c and -o are simultaneously supported by compiler
6331
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
6332
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6333
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
6334
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
6335
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
6336
$rm -r conftest 2>/dev/null
6340
ifelse([$1],[],[save_CFLAGS="$CFLAGS"
6341
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
6342
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
6343
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
6344
[$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
6345
GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
6346
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6348
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6349
# that will create temporary files in the current directory regardless of
6350
# the output directory. Thus, making CWD read-only will cause this test
6351
# to fail, enabling locking or at least warning the user not to do parallel
6355
if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
6357
# The compiler can only warn and ignore the option if not recognized
6358
# So say no if there are warnings
6359
if test -s out/conftest.err; then
6360
# Append any errors to the config.log.
6361
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
6363
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6366
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
6367
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
6368
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
6376
])# AC_LIBTOOL_PROG_CC_C_O
6379
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
6380
# -----------------------------------------
6381
# Check to see if we can do hard links to lock some files if needed
6382
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
6383
[AC_REQUIRE([_LT_AC_LOCK])dnl
6385
hard_links="nottested"
6386
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
6387
# do not overwrite the value of need_locks provided by the user
6388
AC_MSG_CHECKING([if we can lock with hard links])
6391
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6393
ln conftest.a conftest.b 2>&5 || hard_links=no
6394
ln conftest.a conftest.b 2>/dev/null && hard_links=no
6395
AC_MSG_RESULT([$hard_links])
6396
if test "$hard_links" = no; then
6397
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6403
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
6408
AC_DEFUN([AC_LIBTOOL_OBJDIR],
6409
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
6410
[rm -f .libs 2>/dev/null
6411
mkdir .libs 2>/dev/null
6412
if test -d .libs; then
6415
# MS-DOS does not allow filenames that begin with a dot.
6418
rmdir .libs 2>/dev/null])
6419
objdir=$lt_cv_objdir
6420
])# AC_LIBTOOL_OBJDIR
6423
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
6424
# ----------------------------------------------
6425
# Check hardcoding attributes.
6426
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
6427
[AC_MSG_CHECKING([how to hardcode library paths into programs])
6428
_LT_AC_TAGVAR(hardcode_action, $1)=
6429
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
6430
test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
6432
# We can hardcode non-existant directories.
6433
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
6434
# If the only mechanism to avoid hardcoding is shlibpath_var, we
6435
# have to relink, otherwise we might link with an installed library
6436
# when we should be linking with a yet-to-be-installed one
6437
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
6438
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
6439
# Linking always hardcodes the temporary library directory.
6440
_LT_AC_TAGVAR(hardcode_action, $1)=relink
6442
# We can link without hardcoding, and we can hardcode nonexisting dirs.
6443
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
6446
# We cannot hardcode anything, or else we can only hardcode existing
6448
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
6450
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
6452
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
6453
# Fast installation is not supported
6454
enable_fast_install=no
6455
elif test "$shlibpath_overrides_runpath" = yes ||
6456
test "$enable_shared" = no; then
6457
# Fast installation is not necessary
6458
enable_fast_install=needless
6460
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
6463
# AC_LIBTOOL_SYS_LIB_STRIP
6464
# ------------------------
6465
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
6468
AC_MSG_CHECKING([whether stripping libraries is possible])
6469
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6470
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6471
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6472
AC_MSG_RESULT([yes])
6476
])# AC_LIBTOOL_SYS_LIB_STRIP
6479
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6480
# -----------------------------
6481
# PORTME Fill in your ld.so characteristics
6482
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
6483
[AC_MSG_CHECKING([dynamic linker characteristics])
6485
libname_spec='lib$name'
6492
shlibpath_overrides_runpath=unknown
6494
dynamic_linker="$host_os ld.so"
6495
sys_lib_dlsearch_path_spec="/lib /usr/lib"
6496
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6497
need_lib_prefix=unknown
6498
hardcode_into_libs=no
6500
# when you set need_version to no, make sure it does not cause -set_version
6501
# flags to be left without arguments
6502
need_version=unknown
6507
library_names_spec='${libname}${release}.so$versuffix $libname.a'
6508
shlibpath_var=LIBPATH
6510
# AIX 3 has no versioning support, so we append a major version to the name.
6511
soname_spec='${libname}${release}.so$major'
6516
hardcode_into_libs=yes
6517
if test "$host_cpu" = ia64; then
6518
# AIX 5 supports IA64
6519
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6520
shlibpath_var=LD_LIBRARY_PATH
6522
# With GCC up to 2.95.x, collect2 would create an import file
6523
# for dependence libraries. The import file would start with
6524
# the line `#! .'. This would cause the generated library to
6525
# depend on `.', always an invalid library. This was fixed in
6526
# development snapshots of GCC prior to 3.0.
6528
aix4 | aix4.[[01]] | aix4.[[01]].*)
6529
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6531
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6538
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
6539
# soname into executable. Probably we can add versioning support to
6540
# collect2, so additional links can be useful in future.
6541
if test "$aix_use_runtimelinking" = yes; then
6542
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
6543
# instead of lib<name>.a to let people know that these are not
6544
# typical AIX shared libraries.
6545
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6547
# We preserve .a as extension for shared libraries through AIX4.2
6548
# and later when we are not doing run time linking.
6549
library_names_spec='${libname}${release}.a $libname.a'
6550
soname_spec='${libname}${release}.so$major'
6552
shlibpath_var=LIBPATH
6557
library_names_spec='$libname.ixlibrary $libname.a'
6558
# Create ${libname}_ixlibrary.a entries in /sys/libs.
6559
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'
6563
library_names_spec='${libname}.so'
6564
dynamic_linker="$host_os ld.so"
6565
shlibpath_var=LIBRARY_PATH
6571
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6572
soname_spec='${libname}${release}.so$major'
6573
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6574
shlibpath_var=LD_LIBRARY_PATH
6575
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6576
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6577
# the default ld.so.conf also contains /usr/contrib/lib and
6578
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6579
# libtool to hard-code these into programs
6582
cygwin* | mingw* | pw32*)
6583
version_type=windows
6586
case $GCC,$host_os in
6588
library_names_spec='$libname.dll.a'
6589
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
6590
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6591
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6592
dldir=$destdir/`dirname \$dlpath`~
6593
test -d \$dldir || mkdir -p \$dldir~
6594
$install_prog .libs/$dlname \$dldir/$dlname'
6595
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6596
dlpath=$dir/\$dldll~
6600
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6601
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
6602
if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
6603
# It is most probably a Windows format PATH printed by
6604
# mingw gcc, but we are running on Cygwin. Gcc prints its search
6605
# path with ; separators, and with drive letters. We can handle the
6606
# drive letters (cygwin fileutils understands them), so leave them,
6607
# especially as we might pass files found there to a mingw objdump,
6608
# which wouldn't understand a cygwinified path. Ahh.
6609
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
6611
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
6615
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6618
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6621
dynamic_linker='Win32 ld.exe'
6622
# FIXME: first we should search . and the directory the executable is in
6626
darwin* | rhapsody*)
6627
dynamic_linker="$host_os dyld"
6631
# FIXME: Relying on posixy $() will cause problems for
6632
# cross-compilation, but unfortunately the echo tests do not
6633
# yet detect zsh echo's removal of \ escapes.
6634
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)'
6635
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6636
shlibpath_overrides_runpath=yes
6637
shlibpath_var=DYLD_LIBRARY_PATH
6644
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6645
soname_spec='${libname}${release}.so$major'
6646
shlibpath_var=LD_LIBRARY_PATH
6654
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6655
version_type=freebsd-$objformat
6656
case $version_type in
6658
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6663
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6667
shlibpath_var=LD_LIBRARY_PATH
6670
shlibpath_overrides_runpath=yes
6672
freebsd3.[01]* | freebsdelf3.[01]*)
6673
shlibpath_overrides_runpath=yes
6674
hardcode_into_libs=yes
6677
shlibpath_overrides_runpath=no
6678
hardcode_into_libs=yes
6687
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6688
soname_spec='${libname}${release}.so$major'
6689
shlibpath_var=LD_LIBRARY_PATH
6690
hardcode_into_libs=yes
6693
hpux9* | hpux10* | hpux11*)
6694
# Give a soname corresponding to the major version so that dld.sl refuses to
6695
# link against other versions.
6699
if test "$host_cpu" = ia64; then
6700
hardcode_into_libs=yes
6701
dynamic_linker="$host_os dld.so"
6702
shlibpath_var=LD_LIBRARY_PATH
6703
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6704
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6705
soname_spec='${libname}${release}.so$major'
6706
if test "X$HPUX_IA64_MODE" = X32; then
6707
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6709
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6711
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6713
dynamic_linker="$host_os dld.sl"
6714
shlibpath_var=SHLIB_PATH
6715
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6716
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6717
soname_spec='${libname}${release}.sl$major'
6719
# HP-UX runs *really* slowly unless shared libraries are mode 555.
6720
postinstall_cmds='chmod 555 $lib'
6723
irix5* | irix6* | nonstopux*)
6725
nonstopux*) version_type=nonstopux ;;
6726
*) version_type=irix ;;
6730
soname_spec='${libname}${release}.so$major'
6731
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6733
irix5* | nonstopux*)
6737
case $LD in # libtool.m4 will add one of these switches to LD
6738
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6739
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6740
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6741
*) libsuff= shlibsuff= libmagic=never-match;;
6745
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6746
shlibpath_overrides_runpath=no
6747
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6748
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6751
# No shared lib support for Linux oldld, aout, or coff.
6752
linux*oldld* | linux*aout* | linux*coff*)
6756
# This must be Linux ELF.
6761
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6762
soname_spec='${libname}${release}.so$major'
6763
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6765
if test "x$LINUX_64_MODE" = x64; then
6766
# Some platforms are per default 64-bit, so there's no /lib64
6767
if test -d /lib64; then
6771
shlibpath_var=LD_LIBRARY_PATH
6772
shlibpath_overrides_runpath=no
6773
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6774
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6775
# This implies no fast_install, which is unacceptable.
6776
# Some rework will be needed to allow for fast_install
6777
# before this can be enabled.
6778
hardcode_into_libs=yes
6780
# We used to test for /lib/ld.so.1 and disable shared libraries on
6781
# powerpc, because MkLinux only supported shared libraries with the
6782
# GNU dynamic linker. Since this was broken with cross compilers,
6783
# most powerpc-linux boxes support dynamic linking these days and
6784
# people can always --disable-shared, the test was removed, and we
6785
# assume the GNU/Linux dynamic linker is in use.
6786
dynamic_linker='GNU/Linux ld.so'
6793
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6794
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6795
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6796
dynamic_linker='NetBSD (a.out) ld.so'
6798
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6799
soname_spec='${libname}${release}.so$major'
6800
dynamic_linker='NetBSD ld.elf_so'
6802
shlibpath_var=LD_LIBRARY_PATH
6803
shlibpath_overrides_runpath=yes
6804
hardcode_into_libs=yes
6809
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6810
shlibpath_var=LD_LIBRARY_PATH
6811
shlibpath_overrides_runpath=yes
6818
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6819
soname_spec='${libname}${release}.so$major'
6820
shlibpath_var=LD_LIBRARY_PATH
6821
shlibpath_overrides_runpath=yes
6828
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6829
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6830
shlibpath_var=LD_LIBRARY_PATH
6831
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6833
openbsd2.[[89]] | openbsd2.[[89]].*)
6834
shlibpath_overrides_runpath=no
6837
shlibpath_overrides_runpath=yes
6841
shlibpath_overrides_runpath=yes
6846
libname_spec='$name'
6848
library_names_spec='$libname.dll $libname.a'
6849
dynamic_linker='OS/2 ld.exe'
6850
shlibpath_var=LIBPATH
6853
osf3* | osf4* | osf5*)
6857
soname_spec='${libname}${release}.so'
6858
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6859
shlibpath_var=LD_LIBRARY_PATH
6860
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6861
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6866
soname_spec='${libname}${release}.so$major'
6867
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6868
shlibpath_var=LD_LIBRARY_PATH
6875
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6876
soname_spec='${libname}${release}.so$major'
6877
shlibpath_var=LD_LIBRARY_PATH
6878
shlibpath_overrides_runpath=yes
6879
hardcode_into_libs=yes
6880
# ldd complains unless libraries are executable
6881
postinstall_cmds='chmod +x $lib'
6886
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6887
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6888
shlibpath_var=LD_LIBRARY_PATH
6889
shlibpath_overrides_runpath=yes
6890
if test "$with_gnu_ld" = yes; then
6896
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6898
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6899
soname_spec='${libname}${release}.so$major'
6900
shlibpath_var=LD_LIBRARY_PATH
6901
case $host_vendor in
6903
shlibpath_overrides_runpath=no
6908
shlibpath_overrides_runpath=no
6909
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6915
if test -d /usr/nec ;then
6917
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6918
soname_spec='$libname.so.$major'
6919
shlibpath_var=LD_LIBRARY_PATH
6925
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6926
soname_spec='${libname}${release}.so$major'
6927
shlibpath_var=LD_LIBRARY_PATH
6934
AC_MSG_RESULT([$dynamic_linker])
6935
test "$dynamic_linker" = no && can_build_shared=no
6936
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
6941
AC_DEFUN([_LT_AC_TAGCONFIG],
6942
[AC_ARG_WITH([tags],
6943
[AC_HELP_STRING([--with-tags=TAGS],
6944
[include additional configurations @<:@CXX,GCJ@:>@])],
6945
[tagnames="$withval"],
6948
mingw*|cygwin*) tagnames="$tagnames,RC" ;;
6951
if test -f "$ltmain" && test -n "$tagnames"; then
6952
if test ! -f "${ofile}"; then
6953
AC_MSG_WARN([output file `$ofile' does not exist])
6956
if test -z "$LTCC"; then
6957
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
6958
if test -z "$LTCC"; then
6959
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
6961
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
6965
# Extract list of available tagged configurations in $ofile.
6966
# Note that this assumes the entire list is on one line.
6967
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
6969
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
6970
for tagname in $tagnames; do
6972
# Check whether tagname contains only valid characters
6973
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
6975
*) AC_MSG_ERROR([invalid tag name: $tagname])
6979
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
6981
AC_MSG_ERROR([tag name \"$tagname\" already exists])
6984
# Update the list of available tags.
6985
if test -n "$tagname"; then
6986
echo appending configuration tag \"$tagname\" to $ofile
6990
AC_LIBTOOL_LANG_CXX_CONFIG
6994
AC_LIBTOOL_LANG_GCJ_CONFIG
6998
AC_LIBTOOL_LANG_RC_CONFIG
7002
AC_MSG_ERROR([Unsupported tag name: $tagname])
7006
# Append the new tag name to the list of available tags.
7007
available_tags="$available_tags $tagname"
7012
# Now substitute the updated list of available tags.
7013
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
7014
mv "${ofile}T" "$ofile"
7018
AC_MSG_ERROR([unable to update list of available tagged configurations.])
7021
])# _LT_AC_TAGCONFIG
7026
# enable checks for dlopen support
7027
AC_DEFUN([AC_LIBTOOL_DLOPEN],
7028
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
7029
])# AC_LIBTOOL_DLOPEN
7032
# AC_LIBTOOL_WIN32_DLL
7033
# --------------------
7034
# declare package support for building win32 dll's
7035
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
7036
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
7037
])# AC_LIBTOOL_WIN32_DLL
7040
# AC_ENABLE_SHARED([DEFAULT])
7041
# ---------------------------
7042
# implement the --enable-shared flag
7043
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7044
AC_DEFUN([AC_ENABLE_SHARED],
7045
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
7046
AC_ARG_ENABLE([shared],
7047
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7048
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
7049
[p=${PACKAGE-default}
7051
yes) enable_shared=yes ;;
7052
no) enable_shared=no ;;
7055
# Look at the argument we got. We use all the common list separators.
7056
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7057
for pkg in $enableval; do
7059
if test "X$pkg" = "X$p"; then
7066
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
7067
])# AC_ENABLE_SHARED
7072
#- set the default shared flag to --disable-shared
7073
AC_DEFUN([AC_DISABLE_SHARED],
7074
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7075
AC_ENABLE_SHARED(no)
7076
])# AC_DISABLE_SHARED
7079
# AC_ENABLE_STATIC([DEFAULT])
7080
# ---------------------------
7081
# implement the --enable-static flag
7082
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7083
AC_DEFUN([AC_ENABLE_STATIC],
7084
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
7085
AC_ARG_ENABLE([static],
7086
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7087
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
7088
[p=${PACKAGE-default}
7090
yes) enable_static=yes ;;
7091
no) enable_static=no ;;
7094
# Look at the argument we got. We use all the common list separators.
7095
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7096
for pkg in $enableval; do
7098
if test "X$pkg" = "X$p"; then
7105
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
7106
])# AC_ENABLE_STATIC
7111
# set the default static flag to --disable-static
7112
AC_DEFUN([AC_DISABLE_STATIC],
7113
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7114
AC_ENABLE_STATIC(no)
7115
])# AC_DISABLE_STATIC
7118
# AC_ENABLE_FAST_INSTALL([DEFAULT])
7119
# ---------------------------------
7120
# implement the --enable-fast-install flag
7121
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7122
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
7123
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
7124
AC_ARG_ENABLE([fast-install],
7125
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7126
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7127
[p=${PACKAGE-default}
7129
yes) enable_fast_install=yes ;;
7130
no) enable_fast_install=no ;;
7132
enable_fast_install=no
7133
# Look at the argument we got. We use all the common list separators.
7134
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7135
for pkg in $enableval; do
7137
if test "X$pkg" = "X$p"; then
7138
enable_fast_install=yes
7144
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
7145
])# AC_ENABLE_FAST_INSTALL
7148
# AC_DISABLE_FAST_INSTALL
7149
# -----------------------
7150
# set the default to --disable-fast-install
7151
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
7152
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7153
AC_ENABLE_FAST_INSTALL(no)
7154
])# AC_DISABLE_FAST_INSTALL
7157
# AC_LIBTOOL_PICMODE([MODE])
7158
# --------------------------
7159
# implement the --with-pic flag
7160
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7161
AC_DEFUN([AC_LIBTOOL_PICMODE],
7162
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7163
pic_mode=ifelse($#,1,$1,default)
7164
])# AC_LIBTOOL_PICMODE
7167
# AC_PATH_TOOL_PREFIX
7168
# -------------------
7169
# find a file program which can recognise shared library
7170
AC_DEFUN([AC_PATH_TOOL_PREFIX],
7171
[AC_MSG_CHECKING([for $1])
7172
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
7174
[[\\/*] | ?:[\\/]*])
7175
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7178
lt_save_MAGIC_CMD="$MAGIC_CMD"
7179
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7180
dnl $ac_dummy forces splitting on constant user-supplied paths.
7181
dnl POSIX.2 word splitting is done only on the output of word expansions,
7182
dnl not every word. This closes a longstanding sh security hole.
7183
ac_dummy="ifelse([$2], , $PATH, [$2])"
7184
for ac_dir in $ac_dummy; do
7186
test -z "$ac_dir" && ac_dir=.
7187
if test -f $ac_dir/$1; then
7188
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
7189
if test -n "$file_magic_test_file"; then
7190
case $deplibs_check_method in
7192
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
7193
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7194
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7195
egrep "$file_magic_regex" > /dev/null; then
7200
*** Warning: the command libtool uses to detect shared libraries,
7201
*** $file_magic_cmd, produces output that libtool cannot recognize.
7202
*** The result is that libtool may fail to recognize shared libraries
7203
*** as such. This will affect the creation of libtool libraries that
7204
*** depend on shared libraries, but programs linked with such libtool
7205
*** libraries will work regardless of this problem. Nevertheless, you
7206
*** may want to report the problem to your system manager and/or to
7207
*** bug-libtool@gnu.org
7217
MAGIC_CMD="$lt_save_MAGIC_CMD"
7220
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7221
if test -n "$MAGIC_CMD"; then
7222
AC_MSG_RESULT($MAGIC_CMD)
7226
])# AC_PATH_TOOL_PREFIX
7231
# find a file program which can recognise a shared library
7232
AC_DEFUN([AC_PATH_MAGIC],
7233
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
7234
if test -z "$lt_cv_path_MAGIC_CMD"; then
7235
if test -n "$ac_tool_prefix"; then
7236
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
7246
# find the path to the GNU or non-GNU linker
7247
AC_DEFUN([AC_PROG_LD],
7248
[AC_ARG_WITH([gnu-ld],
7249
[AC_HELP_STRING([--with-gnu-ld],
7250
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
7251
[test "$withval" = no || with_gnu_ld=yes],
7253
AC_REQUIRE([AC_PROG_CC])dnl
7254
AC_REQUIRE([AC_CANONICAL_HOST])dnl
7255
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7257
if test "$GCC" = yes; then
7258
# Check if gcc -print-prog-name=ld gives a path.
7259
AC_MSG_CHECKING([for ld used by GCC])
7262
# gcc leaves a trailing carriage return which upsets mingw
7263
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7265
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7268
# Accept absolute paths.
7269
[[\\/]]* | ?:[[\\/]]*)
7270
re_direlt='/[[^/]][[^/]]*/\.\./'
7271
# Canonicalize the path of ld
7272
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7273
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7274
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7276
test -z "$LD" && LD="$ac_prog"
7279
# If it fails, then pretend we aren't using GCC.
7283
# If it is relative, then search for the first ld in PATH.
7287
elif test "$with_gnu_ld" = yes; then
7288
AC_MSG_CHECKING([for GNU ld])
7290
AC_MSG_CHECKING([for non-GNU ld])
7292
AC_CACHE_VAL(lt_cv_path_LD,
7293
[if test -z "$LD"; then
7294
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7295
for ac_dir in $PATH; do
7297
test -z "$ac_dir" && ac_dir=.
7298
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7299
lt_cv_path_LD="$ac_dir/$ac_prog"
7300
# Check to see if the program is GNU ld. I'd rather use --version,
7301
# but apparently some GNU ld's only accept -v.
7302
# Break only if it was the GNU/non-GNU ld that we prefer.
7303
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
7304
test "$with_gnu_ld" != no && break
7306
test "$with_gnu_ld" != yes && break
7312
lt_cv_path_LD="$LD" # Let the user override the test with a path.
7315
if test -n "$LD"; then
7320
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7327
AC_DEFUN([AC_PROG_LD_GNU],
7328
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7329
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
7330
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
7331
lt_cv_prog_gnu_ld=yes
7333
lt_cv_prog_gnu_ld=no
7335
with_gnu_ld=$lt_cv_prog_gnu_ld
7339
# AC_PROG_LD_RELOAD_FLAG
7340
# ----------------------
7341
# find reload flag for linker
7342
# -- PORTME Some linkers may need a different reload flag.
7343
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
7344
[AC_CACHE_CHECK([for $LD option to reload object files],
7345
lt_cv_ld_reload_flag,
7346
[lt_cv_ld_reload_flag='-r'])
7347
reload_flag=$lt_cv_ld_reload_flag
7348
case $reload_flag in
7350
*) reload_flag=" $reload_flag" ;;
7352
reload_cmds='$LD$reload_flag -o $output$reload_objs'
7353
])# AC_PROG_LD_RELOAD_FLAG
7356
# AC_DEPLIBS_CHECK_METHOD
7357
# -----------------------
7358
# how to check for library dependencies
7359
# -- PORTME fill in with the dynamic library characteristics
7360
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
7361
[AC_CACHE_CHECK([how to recognise dependant libraries],
7362
lt_cv_deplibs_check_method,
7363
[lt_cv_file_magic_cmd='$MAGIC_CMD'
7364
lt_cv_file_magic_test_file=
7365
lt_cv_deplibs_check_method='unknown'
7366
# Need to set the preceding variable on all platforms that support
7367
# interlibrary dependencies.
7368
# 'none' -- dependencies not supported.
7369
# `unknown' -- same as none, but documents that we really don't know.
7370
# 'pass_all' -- all dependencies passed with no checks.
7371
# 'test_compile' -- check by making test program.
7372
# 'file_magic [[regex]]' -- check by looking for files in library path
7373
# which responds to the $file_magic_cmd with a given egrep regex.
7374
# If you have `file' or equivalent on your system and you're not sure
7375
# whether `pass_all' will *always* work, you probably want this one.
7379
lt_cv_deplibs_check_method=pass_all
7383
lt_cv_deplibs_check_method=pass_all
7387
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7388
lt_cv_file_magic_cmd='/usr/bin/file -L'
7389
lt_cv_file_magic_test_file=/shlib/libc.so
7392
cygwin* | mingw* | pw32*)
7393
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
7394
lt_cv_file_magic_cmd='$OBJDUMP -f'
7397
darwin* | rhapsody*)
7398
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
7399
lt_cv_file_magic_cmd='/usr/bin/file -L'
7401
rhapsody* | darwin1.[[012]])
7402
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
7405
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
7411
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7414
# Not sure whether the presence of OpenBSD here was a mistake.
7415
# Let's accept both of them until this is cleared up.
7416
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
7417
lt_cv_file_magic_cmd=/usr/bin/file
7418
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7422
lt_cv_deplibs_check_method=pass_all
7427
lt_cv_deplibs_check_method=pass_all
7430
hpux10.20* | hpux11*)
7431
lt_cv_file_magic_cmd=/usr/bin/file
7432
if test "$host_cpu" = ia64; then
7433
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7434
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7436
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
7437
lt_cv_file_magic_test_file=/usr/lib/libc.sl
7441
irix5* | irix6* | nonstopux*)
7443
irix5* | nonstopux*)
7444
# this will be overridden with pass_all, but let us keep it just in case
7445
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
7449
*-32|*"-32 ") libmagic=32-bit;;
7450
*-n32|*"-n32 ") libmagic=N32;;
7451
*-64|*"-64 ") libmagic=64-bit;;
7452
*) libmagic=never-match;;
7454
# this will be overridden with pass_all, but let us keep it just in case
7455
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
7458
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
7459
lt_cv_deplibs_check_method=pass_all
7462
# This must be Linux ELF.
7465
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
7466
lt_cv_deplibs_check_method=pass_all ;;
7467
# the debian people say, arm and glibc 2.3.1 works for them with pass_all
7469
lt_cv_deplibs_check_method=pass_all ;;
7471
# glibc up to 2.1.1 does not perform some relocations on ARM
7472
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
7474
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
7478
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7479
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
7481
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
7486
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7487
lt_cv_file_magic_cmd=/usr/bin/file
7488
lt_cv_file_magic_test_file=/usr/lib/libnls.so
7492
lt_cv_deplibs_check_method=unknown
7496
lt_cv_file_magic_cmd=/usr/bin/file
7497
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7498
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7499
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
7501
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
7505
osf3* | osf4* | osf5*)
7506
# this will be overridden with pass_all, but let us keep it just in case
7507
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
7508
lt_cv_file_magic_test_file=/shlib/libc.so
7509
lt_cv_deplibs_check_method=pass_all
7513
lt_cv_deplibs_check_method=pass_all
7517
lt_cv_deplibs_check_method=pass_all
7518
lt_cv_file_magic_test_file=/lib/libc.so
7521
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7522
case $host_vendor in
7524
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]]'
7525
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7528
lt_cv_deplibs_check_method=pass_all
7531
lt_cv_file_magic_cmd='/bin/file'
7532
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7535
lt_cv_file_magic_cmd='/bin/file'
7536
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7537
lt_cv_file_magic_test_file=/lib/libc.so
7542
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
7543
lt_cv_deplibs_check_method=pass_all
7547
file_magic_cmd=$lt_cv_file_magic_cmd
7548
deplibs_check_method=$lt_cv_deplibs_check_method
7549
test -z "$deplibs_check_method" && deplibs_check_method=unknown
7550
])# AC_DEPLIBS_CHECK_METHOD
7555
# find the path to a BSD-compatible name lister
7556
AC_DEFUN([AC_PROG_NM],
7557
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
7558
[if test -n "$NM"; then
7559
# Let the user override the test.
7562
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7563
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
7565
test -z "$ac_dir" && ac_dir=.
7566
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
7567
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
7568
# Check to see if the nm accepts a BSD-compat flag.
7569
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
7570
# nm: unknown option "B" ignored
7571
# Tru64's nm complains that /dev/null is an invalid object file
7572
if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
7573
lt_cv_path_NM="$tmp_nm -B"
7575
elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
7576
lt_cv_path_NM="$tmp_nm -p"
7579
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7580
continue # so that we can try to find one that supports BSD flags
7585
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
7593
# check for math library
7594
AC_DEFUN([AC_CHECK_LIBM],
7595
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7598
*-*-beos* | *-*-cygwin* | *-*-pw32*)
7599
# These system don't have libm
7602
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
7603
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
7606
AC_CHECK_LIB(m, main, LIBM="-lm")
7612
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
7613
# -----------------------------------
7614
# sets LIBLTDL to the link flags for the libltdl convenience library and
7615
# LTDLINCL to the include flags for the libltdl header and adds
7616
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
7617
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7618
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
7619
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
7620
# '${top_srcdir}/' (note the single quotes!). If your package is not
7621
# flat and you're not using automake, define top_builddir and
7622
# top_srcdir appropriately in the Makefiles.
7623
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
7624
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7625
case $enable_ltdl_convenience in
7626
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7627
"") enable_ltdl_convenience=yes
7628
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7630
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
7631
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7632
# For backwards non-gettext consistent compatibility...
7634
])# AC_LIBLTDL_CONVENIENCE
7637
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
7638
# -----------------------------------
7639
# sets LIBLTDL to the link flags for the libltdl installable library and
7640
# LTDLINCL to the include flags for the libltdl header and adds
7641
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
7642
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
7643
# DIRECTORY is not provided and an installed libltdl is not found, it is
7644
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
7645
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7646
# quotes!). If your package is not flat and you're not using automake,
7647
# define top_builddir and top_srcdir appropriately in the Makefiles.
7648
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
7649
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
7650
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
7651
AC_CHECK_LIB(ltdl, main,
7652
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7653
[if test x"$enable_ltdl_install" = xno; then
7654
AC_MSG_WARN([libltdl not installed, but installation disabled])
7656
enable_ltdl_install=yes
7659
if test x"$enable_ltdl_install" = x"yes"; then
7660
ac_configure_args="$ac_configure_args --enable-ltdl-install"
7661
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
7662
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
7664
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7668
# For backwards non-gettext consistent compatibility...
7670
])# AC_LIBLTDL_INSTALLABLE
7673
# If this macro is not defined by Autoconf, define it here.
7674
ifdef([AC_PROVIDE_IFELSE],
7676
[define([AC_PROVIDE_IFELSE],
7677
[ifdef([AC_PROVIDE_$1],
7683
# enable support for C++ libraries
7684
AC_DEFUN([AC_LIBTOOL_CXX],
7685
[AC_REQUIRE([_LT_AC_LANG_CXX])
7691
AC_DEFUN([_LT_AC_LANG_CXX],
7692
[AC_REQUIRE([AC_PROG_CXX])
7693
AC_REQUIRE([AC_PROG_CXXCPP])
7699
# enable support for GCJ libraries
7700
AC_DEFUN([AC_LIBTOOL_GCJ],
7701
[AC_REQUIRE([_LT_AC_LANG_GCJ])
7707
AC_DEFUN([_LT_AC_LANG_GCJ],
7708
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
7709
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
7710
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
7711
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
7712
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
7713
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
7719
# enable support for Windows resource files
7720
AC_DEFUN([AC_LIBTOOL_RC],
7721
[AC_REQUIRE([AC_PROG_RC])
7725
# AC_LIBTOOL_LANG_C_CONFIG
7726
# ------------------------
7727
# Ensure that the configuration vars for the C compiler are
7728
# suitably defined. Those variables are subsequently used by
7729
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7730
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
7731
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
7735
# Source file extension for C test sources.
7738
# Object file extension for compiled C test sources.
7740
_LT_AC_TAGVAR(objext, $1)=$objext
7742
# Code to be used in simple compile tests
7743
lt_simple_compile_test_code="int some_variable = 0;"
7745
# Code to be used in simple link tests
7746
lt_simple_link_test_code='main(){return(0);}'
7751
# Check for any special shared library compilation flags.
7753
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
7754
if test "$GCC" = no; then
7757
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
7761
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
7762
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
7763
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
7765
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
7766
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
7772
# Check to make sure the static flag actually works.
7774
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
7775
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
7776
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
7778
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7782
## There is no encapsulation within the following macros, do not change
7783
## the running order or otherwise move them around unless you know exactly
7784
## what you are doing...
7785
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
7786
AC_LIBTOOL_PROG_COMPILER_PIC($1)
7787
AC_LIBTOOL_PROG_CC_C_O($1)
7788
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
7789
AC_LIBTOOL_PROG_LD_SHLIBS($1)
7790
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
7791
AC_LIBTOOL_SYS_LIB_STRIP
7792
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
7793
AC_LIBTOOL_DLOPEN_SELF($1)
7795
# Report which librarie types wil actually be built
7796
AC_MSG_CHECKING([if libtool supports shared libraries])
7797
AC_MSG_RESULT([$can_build_shared])
7799
AC_MSG_CHECKING([whether to build shared libraries])
7800
test "$can_build_shared" = "no" && enable_shared=no
7802
# On AIX, shared libraries and static libraries use the same namespace, and
7803
# are all built from PIC.
7806
test "$enable_shared" = yes && enable_static=no
7807
if test -n "$RANLIB"; then
7808
archive_cmds="$archive_cmds~\$RANLIB \$lib"
7809
postinstall_cmds='$RANLIB $lib'
7814
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7815
test "$enable_shared" = yes && enable_static=no
7819
AC_MSG_RESULT([$enable_shared])
7821
AC_MSG_CHECKING([whether to build static libraries])
7822
# Make sure either enable_shared or enable_static is yes.
7823
test "$enable_shared" = yes || enable_static=yes
7824
AC_MSG_RESULT([$enable_static])
7826
AC_LIBTOOL_CONFIG($1)
7830
])# AC_LIBTOOL_LANG_C_CONFIG
7833
# AC_LIBTOOL_LANG_CXX_CONFIG
7834
# --------------------------
7835
# Ensure that the configuration vars for the C compiler are
7836
# suitably defined. Those variables are subsequently used by
7837
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
7838
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
7839
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
7841
AC_REQUIRE([AC_PROG_CXX])
7842
AC_REQUIRE([AC_PROG_CXXCPP])
7844
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7845
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
7846
_LT_AC_TAGVAR(always_export_symbols, $1)=no
7847
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7848
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7849
_LT_AC_TAGVAR(hardcode_direct, $1)=no
7850
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7851
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7852
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7853
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7854
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7855
_LT_AC_TAGVAR(no_undefined_flag, $1)=
7856
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7858
# Dependencies to place before and after the object being linked:
7859
_LT_AC_TAGVAR(predep_objects, $1)=
7860
_LT_AC_TAGVAR(postdep_objects, $1)=
7861
_LT_AC_TAGVAR(predeps, $1)=
7862
_LT_AC_TAGVAR(postdeps, $1)=
7863
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
7865
# Source file extension for C test sources.
7868
# Object file extension for compiled C test sources.
7870
_LT_AC_TAGVAR(objext, $1)=$objext
7872
# Code to be used in simple compile tests
7873
lt_simple_compile_test_code="int some_variable = 0;"
7875
# Code to be used in simple link tests
7876
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
7878
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7881
# Allow CC to be a program name with arguments.
7886
_LT_AC_TAGVAR(compiler, $1)=$CC
7887
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
7889
# We don't want -fno-exception wen compiling C++ code, so set the
7890
# no_builtin_flag separately
7891
if test "$GXX" = yes; then
7892
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7894
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7897
if test "$GXX" = yes; then
7898
# Set up default GNU C++ configuration
7900
# Check if GNU C++ uses GNU ld as the underlying linker, since the
7901
# archiving commands below assume that GNU ld is being used.
7902
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
7903
egrep 'GNU ld' > /dev/null; then
7906
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7907
_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'
7909
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7910
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7912
# If archive_cmds runs LD, not CC, wlarc should be empty
7913
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7914
# investigate it a little bit more. (MM)
7917
# ancient GNU ld didn't support --whole-archive et. al.
7918
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
7919
egrep 'no-whole-archive' > /dev/null; then
7920
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7922
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7928
# A generic and very simple default shared library creation
7929
# command for GNU C++ for the case where it uses the native
7930
# linker, instead of GNU ld. If possible, this setting should
7931
# overridden to take advantage of the native linker features on
7932
# the platform it is being used on.
7933
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7936
# Commands to make compiler produce verbose output that lists
7937
# what "hidden" libraries, object files and flags are used when
7938
# linking a shared library.
7939
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
7947
# PORTME: fill in a description of your system's C++ link characteristics
7948
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7949
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7952
# FIXME: insert proper C++ library support
7953
_LT_AC_TAGVAR(ld_shlibs, $1)=no
7956
if test "$host_cpu" = ia64; then
7957
# On IA64, the linker does run time linking by default, so we don't
7958
# have to do anything special.
7959
aix_use_runtimelinking=no
7960
exp_sym_flag='-Bexport'
7963
# KDE requires run time linking. Make it the default.
7964
aix_use_runtimelinking=yes
7965
exp_sym_flag='-bexport'
7966
no_entry_flag='-bnoentry'
7969
# When large executables or shared objects are built, AIX ld can
7970
# have problems creating the table of contents. If linking a library
7971
# or program results in "error TOC overflow" add -mminimal-toc to
7972
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7973
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7975
_LT_AC_TAGVAR(archive_cmds, $1)=''
7976
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7977
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7978
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7980
if test "$GXX" = yes; then
7981
case $host_os in aix4.[012]|aix4.[012].*)
7982
# We only want to do this on AIX 4.2 and lower, the check
7983
# below for broken collect2 doesn't work under 4.3+
7984
collect2name=`${CC} -print-prog-name=collect2`
7985
if test -f "$collect2name" && \
7986
strings "$collect2name" | grep resolve_lib_name >/dev/null
7988
# We have reworked collect2
7989
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7991
# We have old collect2
7992
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7993
# It fails to find uninstalled libraries when the uninstalled
7994
# path is not listed in the libpath. Setting hardcode_minus_L
7995
# to unsupported forces relinking
7996
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7997
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7998
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8001
shared_flag='-shared'
8004
if test "$host_cpu" = ia64; then
8005
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8006
# chokes on -Wl,-G. The following line is correct:
8009
if test "$aix_use_runtimelinking" = yes; then
8010
shared_flag='-qmkshrobj ${wl}-G'
8012
shared_flag='-qmkshrobj'
8017
# Let the compiler handle the export list.
8018
_LT_AC_TAGVAR(always_export_symbols, $1)=no
8019
if test "$aix_use_runtimelinking" = yes; then
8020
# Warning - without using the other runtime loading flags (-brtl),
8021
# -berok will link without error, but may produce a broken library.
8022
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8023
# Determine the default libpath from the value encoded in an empty executable.
8024
_LT_AC_SYS_LIBPATH_AIX
8025
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8027
_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"
8028
_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"
8030
if test "$host_cpu" = ia64; then
8031
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8032
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8033
_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"
8035
# Determine the default libpath from the value encoded in an empty executable.
8036
_LT_AC_SYS_LIBPATH_AIX
8037
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8038
# Warning - without using the other run time loading flags,
8039
# -berok will link without error, but may produce a broken library.
8040
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8041
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8042
# -bexpall does not export symbols beginning with underscore (_)
8043
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
8044
# Exported symbols can be pulled into shared objects from archives
8045
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8046
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8047
# This is similar to how AIX traditionally builds it's shared libraries.
8048
_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'
8053
case $cc_basename in
8055
# FIXME: insert proper C++ library support
8056
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8061
case $cc_basename in
8063
# FIXME: insert proper C++ library support
8064
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8067
# Green Hills C++ Compiler
8068
# FIXME: insert proper C++ library support
8069
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8072
# FIXME: insert proper C++ library support
8073
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8078
# C++ shared libraries reported to be fairly broken before switch to ELF
8079
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8082
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8085
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8087
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8092
if test $with_gnu_ld = no; then
8093
if test "$host_cpu" = ia64; then
8094
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8096
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8097
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8098
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8101
if test "$host_cpu" = ia64; then
8102
_LT_AC_TAGVAR(hardcode_direct, $1)=no
8103
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8105
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
8107
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8108
# but as the default
8109
# location of the library.
8111
case $cc_basename in
8113
# FIXME: insert proper C++ library support
8114
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8119
_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'
8122
if test "$host_cpu" = ia64; then
8123
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8125
_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'
8129
# Commands to make compiler produce verbose output that lists
8130
# what "hidden" libraries, object files and flags are used when
8131
# linking a shared library.
8133
# There doesn't appear to be a way to prevent this compiler from
8134
# explicitly linking system object files so we need to strip them
8135
# from the output so that they don't get included in the library
8137
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'
8140
if test "$GXX" = yes; then
8141
if test $with_gnu_ld = no; then
8144
_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'
8147
if test "$host_cpu" = ia64; then
8148
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8150
_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'
8156
# FIXME: insert proper C++ library support
8157
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8163
case $cc_basename in
8166
_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'
8168
# Archives containing C++ object files must be created using
8169
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
8170
# necessary to make sure instantiated templates are included
8172
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8175
if test "$GXX" = yes; then
8176
if test "$with_gnu_ld" = no; then
8177
_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'
8179
_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'
8182
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8185
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8186
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8189
case $cc_basename in
8191
# Kuck and Associates, Inc. (KAI) C++ Compiler
8193
# KCC will only create a shared library if the output file
8194
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8195
# to its proper name (with version) after linking.
8196
_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'
8197
_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'
8199
# Commands to make compiler produce verbose output that lists
8200
# what "hidden" libraries, object files and flags are used when
8201
# linking a shared library.
8203
# There doesn't appear to be a way to prevent this compiler from
8204
# explicitly linking system object files so we need to strip them
8205
# from the output so that they don't get included in the library
8207
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'
8209
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
8210
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8212
# Archives containing C++ object files must be created using
8213
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8214
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8219
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8220
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8221
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8222
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8223
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8224
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8228
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8229
_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'
8231
runpath_var=LD_RUN_PATH
8232
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8233
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8235
# Commands to make compiler produce verbose output that lists
8236
# what "hidden" libraries, object files and flags are used when
8237
# linking a shared library.
8239
# There doesn't appear to be a way to prevent this compiler from
8240
# explicitly linking system object files so we need to strip them
8241
# from the output so that they don't get included in the library
8243
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'
8248
# FIXME: insert proper C++ library support
8249
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8252
# FIXME: insert proper C++ library support
8253
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8256
case $cc_basename in
8258
# FIXME: insert proper C++ library support
8259
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8262
# FIXME: insert proper C++ library support
8263
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8268
# NetBSD uses g++ - do we need to do anything?
8271
case $cc_basename in
8273
# Kuck and Associates, Inc. (KAI) C++ Compiler
8275
# KCC will only create a shared library if the output file
8276
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8277
# to its proper name (with version) after linking.
8278
_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'
8280
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8281
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8283
# Archives containing C++ object files must be created using
8284
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
8285
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8289
# Rational C++ 2.4.1
8290
# FIXME: insert proper C++ library support
8291
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8294
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8295
_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'
8297
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8298
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8300
# Commands to make compiler produce verbose output that lists
8301
# what "hidden" libraries, object files and flags are used when
8302
# linking a shared library.
8304
# There doesn't appear to be a way to prevent this compiler from
8305
# explicitly linking system object files so we need to strip them
8306
# from the output so that they don't get included in the library
8308
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'
8311
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8312
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8313
_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'
8315
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8316
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8318
# Commands to make compiler produce verbose output that lists
8319
# what "hidden" libraries, object files and flags are used when
8320
# linking a shared library.
8321
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8324
# FIXME: insert proper C++ library support
8325
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8331
case $cc_basename in
8333
# Kuck and Associates, Inc. (KAI) C++ Compiler
8335
# KCC will only create a shared library if the output file
8336
# ends with ".so" (or ".sl" for HP-UX), so rename the library
8337
# to its proper name (with version) after linking.
8338
_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'
8340
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8341
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8343
# Archives containing C++ object files must be created using
8344
# the KAI C++ compiler.
8345
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
8348
# Rational C++ 2.4.1
8349
# FIXME: insert proper C++ library support
8350
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8353
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8354
_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'
8355
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
8356
echo "-hidden">> $lib.exp~
8357
$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~
8360
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8361
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8363
# Commands to make compiler produce verbose output that lists
8364
# what "hidden" libraries, object files and flags are used when
8365
# linking a shared library.
8367
# There doesn't appear to be a way to prevent this compiler from
8368
# explicitly linking system object files so we need to strip them
8369
# from the output so that they don't get included in the library
8371
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'
8374
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8375
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8376
_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'
8378
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8379
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8381
# Commands to make compiler produce verbose output that lists
8382
# what "hidden" libraries, object files and flags are used when
8383
# linking a shared library.
8384
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
8387
# FIXME: insert proper C++ library support
8388
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8394
# FIXME: insert proper C++ library support
8395
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8398
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8399
case $cc_basename in
8401
# FIXME: insert proper C++ library support
8402
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8405
# FIXME: insert proper C++ library support
8406
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8411
case $cc_basename in
8414
# FIXME: insert proper C++ library support
8415
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8419
# FIXME: insert proper C++ library support
8420
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8423
# FIXME: insert proper C++ library support
8424
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8429
case $cc_basename in
8431
# Sun C++ 4.2, 5.x and Centerline C++
8432
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8433
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8434
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8435
$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'
8437
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8438
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8440
solaris2.[0-5] | solaris2.[0-5].*) ;;
8442
# The C++ compiler is used as linker so we must use $wl
8443
# flag to pass the commands to the underlying system
8445
# Supported since Solaris 2.6 (maybe 2.5.1?)
8446
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8449
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8451
# Commands to make compiler produce verbose output that lists
8452
# what "hidden" libraries, object files and flags are used when
8453
# linking a shared library.
8455
# There doesn't appear to be a way to prevent this compiler from
8456
# explicitly linking system object files so we need to strip them
8457
# from the output so that they don't get included in the library
8459
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'
8461
# Archives containing C++ object files must be created using
8462
# "CC -xar", where "CC" is the Sun C++ compiler. This is
8463
# necessary to make sure instantiated templates are included
8465
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8468
# Green Hills C++ Compiler
8469
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8471
# The C++ compiler must be used to create the archive.
8472
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8475
# GNU C++ compiler with Solaris linker
8476
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8477
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8478
if $CC --version | egrep -v '^2\.7' > /dev/null; then
8479
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8480
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8481
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8483
# Commands to make compiler produce verbose output that lists
8484
# what "hidden" libraries, object files and flags are used when
8485
# linking a shared library.
8486
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8488
# g++ 2.7 appears to require `-G' NOT `-shared' on this
8490
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
8491
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8492
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
8494
# Commands to make compiler produce verbose output that lists
8495
# what "hidden" libraries, object files and flags are used when
8496
# linking a shared library.
8497
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
8500
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8505
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8506
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8509
case $cc_basename in
8511
# NonStop-UX NCC 3.20
8512
# FIXME: insert proper C++ library support
8513
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8516
# FIXME: insert proper C++ library support
8517
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8522
# FIXME: insert proper C++ library support
8523
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8526
# FIXME: insert proper C++ library support
8527
_LT_AC_TAGVAR(ld_shlibs, $1)=no
8530
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8531
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8533
# Figure out "hidden" C++ library dependencies from verbose
8534
# compiler output whening linking a shared library.
8535
cat > conftest.$ac_ext <<EOF
8539
Foo (void) { a = 0; }
8546
if AC_TRY_EVAL(ac_compile); then
8547
# Parse the compiler output and extract the necessary
8548
# objects, libraries and library flags.
8550
# Sentinel used to keep track of whether or not we are before
8551
# the conftest object file.
8552
pre_test_object_deps_done=no
8554
# The `*' in the case matches for architectures that use `case' in
8555
# $output_verbose_cmd can trigger glob expansion during the loop
8556
# eval without this substitution.
8557
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
8559
for p in `eval $output_verbose_link_cmd`; do
8563
# Some compilers place space between "-{L,R}" and the path.
8566
|| test $p = "-R"; then
8573
if test "$pre_test_object_deps_done" = no; then
8576
# Internal compiler library paths should come after those
8577
# provided the user. The postdeps already come after the
8578
# user supplied libs so there is no need to process them.
8579
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
8580
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8582
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8585
# The "-l" case would never come before the object being
8586
# linked, so don't bother handling this case.
8589
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
8590
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
8592
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
8597
*.$objext|*.$libext)
8598
# This assumes that the test object file only shows up
8599
# once in the compiler output.
8600
if test "$p" = "conftest.$objext"; then
8601
pre_test_object_deps_done=yes
8605
if test "$pre_test_object_deps_done" = no; then
8606
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
8607
_LT_AC_TAGVAR(predep_objects, $1)="$p"
8609
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
8612
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
8613
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
8615
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
8620
*) ;; # Ignore the rest.
8628
echo "libtool.m4: error: problem compiling C++ test program"
8631
$rm -f confest.$objext
8633
case " $_LT_AC_TAGVAR(postdeps, $1) " in
8634
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8635
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
8638
_LT_AC_TAGVAR(GCC, $1)="$GXX"
8639
_LT_AC_TAGVAR(LD, $1)="$LD"
8642
## There is no encapsulation within the following macros, do not change
8643
## the running order or otherwise move them around unless you know exactly
8644
## what you are doing...
8645
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8646
AC_LIBTOOL_PROG_CC_C_O($1)
8647
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8648
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8649
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8650
AC_LIBTOOL_SYS_LIB_STRIP
8651
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8652
AC_LIBTOOL_DLOPEN_SELF($1)
8654
AC_LIBTOOL_CONFIG($1)
8658
])# AC_LIBTOOL_LANG_CXX_CONFIG
8661
# AC_LIBTOOL_LANG_GCJ_CONFIG
8662
# --------------------------
8663
# Ensure that the configuration vars for the C compiler are
8664
# suitably defined. Those variables are subsequently used by
8665
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8666
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
8667
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
8670
# Source file extension for C test sources.
8673
# Object file extension for compiled C test sources.
8675
_LT_AC_TAGVAR(objext, $1)=$objext
8677
# Code to be used in simple compile tests
8678
lt_simple_compile_test_code="class foo {}"
8680
# Code to be used in simple link tests
8681
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
8683
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8686
# Allow CC to be a program name with arguments.
8691
_LT_AC_TAGVAR(compiler, $1)=$CC
8693
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8694
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8697
## There is no encapsulation within the following macros, do not change
8698
## the running order or otherwise move them around unless you know exactly
8699
## what you are doing...
8700
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
8701
AC_LIBTOOL_PROG_COMPILER_PIC($1)
8702
AC_LIBTOOL_PROG_CC_C_O($1)
8703
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
8704
AC_LIBTOOL_PROG_LD_SHLIBS($1)
8705
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
8706
AC_LIBTOOL_SYS_LIB_STRIP
8707
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
8708
AC_LIBTOOL_DLOPEN_SELF($1)
8710
AC_LIBTOOL_CONFIG($1)
8714
])# AC_LIBTOOL_LANG_GCJ_CONFIG
8717
# AC_LIBTOOL_LANG_RC_CONFIG
8718
# --------------------------
8719
# Ensure that the configuration vars for the Windows resource compiler are
8720
# suitably defined. Those variables are subsequently used by
8721
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
8722
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
8723
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
8726
# Source file extension for RC test sources.
8729
# Object file extension for compiled RC test sources.
8731
_LT_AC_TAGVAR(objext, $1)=$objext
8733
# Code to be used in simple compile tests
8734
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8736
# Code to be used in simple link tests
8737
lt_simple_link_test_code="$lt_simple_compile_test_code"
8739
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8742
# Allow CC to be a program name with arguments.
8747
_LT_AC_TAGVAR(compiler, $1)=$CC
8748
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8750
AC_LIBTOOL_CONFIG($1)
8754
])# AC_LIBTOOL_LANG_RC_CONFIG
8757
# AC_LIBTOOL_CONFIG([TAGNAME])
8758
# ----------------------------
8759
# If TAGNAME is not passed, then create an initial libtool script
8760
# with a default configuration from the untagged config vars. Otherwise
8761
# add code to config.status for appending the configuration named by
8762
# TAGNAME from the matching tagged config vars.
8763
AC_DEFUN([AC_LIBTOOL_CONFIG],
8764
[# The else clause should only fire when bootstrapping the
8765
# libtool distribution, otherwise you forgot to ship ltmain.sh
8766
# with your package, and you will get complaints that there are
8767
# no rules to generate ltmain.sh.
8768
if test -f "$ltmain"; then
8769
# Now quote all the things that may contain metacharacters while being
8770
# careful not to overquote the AC_SUBSTed values. We take copies of the
8771
# variables and quote the copies for generation of the libtool script.
8772
for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
8773
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
8774
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
8775
deplibs_check_method reload_flag reload_cmds need_locks \
8776
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
8777
lt_cv_sys_global_symbol_to_c_name_address \
8778
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8779
old_postinstall_cmds old_postuninstall_cmds \
8780
_LT_AC_TAGVAR(compiler, $1) \
8781
_LT_AC_TAGVAR(CC, $1) \
8782
_LT_AC_TAGVAR(LD, $1) \
8783
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
8784
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
8785
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
8786
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
8787
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
8788
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
8789
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
8790
_LT_AC_TAGVAR(old_archive_cmds, $1) \
8791
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
8792
_LT_AC_TAGVAR(predep_objects, $1) \
8793
_LT_AC_TAGVAR(postdep_objects, $1) \
8794
_LT_AC_TAGVAR(predeps, $1) \
8795
_LT_AC_TAGVAR(postdeps, $1) \
8796
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
8797
_LT_AC_TAGVAR(archive_cmds, $1) \
8798
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
8799
_LT_AC_TAGVAR(postinstall_cmds, $1) \
8800
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
8801
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
8802
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
8803
_LT_AC_TAGVAR(no_undefined_flag, $1) \
8804
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
8805
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
8806
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
8807
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
8808
_LT_AC_TAGVAR(exclude_expsyms, $1) \
8809
_LT_AC_TAGVAR(include_expsyms, $1); do
8812
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
8813
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
8814
_LT_AC_TAGVAR(archive_cmds, $1) | \
8815
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
8816
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
8817
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
8818
extract_expsyms_cmds | reload_cmds | finish_cmds | \
8819
postinstall_cmds | postuninstall_cmds | \
8820
old_postinstall_cmds | old_postuninstall_cmds | \
8821
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8822
# Double-quote double-evaled strings.
8823
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8826
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8832
*'\[$]0 --fallback-echo"')
8833
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
8838
[cfgfile="${ofile}T"
8839
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
8841
AC_MSG_NOTICE([creating $ofile])],
8844
cat <<__EOF__ >> "$cfgfile"
8848
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8849
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8850
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
8852
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8853
# Free Software Foundation, Inc.
8855
# This file is part of GNU Libtool:
8856
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8858
# This program is free software; you can redistribute it and/or modify
8859
# it under the terms of the GNU General Public License as published by
8860
# the Free Software Foundation; either version 2 of the License, or
8861
# (at your option) any later version.
8863
# This program is distributed in the hope that it will be useful, but
8864
# WITHOUT ANY WARRANTY; without even the implied warranty of
8865
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8866
# General Public License for more details.
8868
# You should have received a copy of the GNU General Public License
8869
# along with this program; if not, write to the Free Software
8870
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8872
# As a special exception to the GNU General Public License, if you
8873
# distribute this file as part of a program that contains a
8874
# configuration script generated by Autoconf, you may include it under
8875
# the same distribution terms that you use for the rest of that program.
8877
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
8878
Xsed="sed -e s/^X//"
8880
# The HP-UX ksh and POSIX shell print the target directory to stdout
8882
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8884
# The names of the tagged configurations supported by this script.
8887
# ### BEGIN LIBTOOL CONFIG],
8888
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
8890
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8892
# Shell to use when invoking shell scripts.
8895
# Whether or not to build shared libraries.
8896
build_libtool_libs=$enable_shared
8898
# Whether or not to build static libraries.
8899
build_old_libs=$enable_static
8901
# Whether or not to add -lc for building shared libraries.
8902
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
8904
# Whether or not to optimize for fast installation.
8905
fast_install=$enable_fast_install
8908
host_alias=$host_alias
8911
# An echo program that does not interpret backslashes.
8916
AR_FLAGS=$lt_AR_FLAGS
8921
# A language-specific compiler.
8922
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
8924
# Is the compiler the GNU C compiler?
8925
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
8927
# The linker used to build libraries.
8928
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
8930
# Whether we need hard or soft links.
8933
# A BSD-compatible nm program.
8936
# A sed program that does not truncate output.
8939
# A symbol stripping program
8942
# Used to examine libraries when file_magic_cmd begins "file"
8943
MAGIC_CMD=$MAGIC_CMD
8945
# Used on cygwin: DLL creation program.
8948
# Used on cygwin: object dumper.
8951
# Used on cygwin: assembler.
8954
# The name of the directory that contains temporary libtool files.
8957
# How to create reloadable object files.
8958
reload_flag=$lt_reload_flag
8959
reload_cmds=$lt_reload_cmds
8961
# How to pass a linker flag through the compiler.
8962
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8964
# Object file suffix (normally "o").
8967
# Old archive suffix (normally "a").
8970
# Executable file suffix (normally "").
8973
# Additional compiler flags for building library objects.
8974
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8977
# What is the maximum length of a command?
8978
max_cmd_len=$lt_cv_sys_max_cmd_len
8980
# Does compiler simultaneously support -c and -o options?
8981
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
8983
# Must we lock files when doing compilation ?
8984
need_locks=$lt_need_locks
8986
# Do we need the lib prefix for modules?
8987
need_lib_prefix=$need_lib_prefix
8989
# Do we need a version for libraries?
8990
need_version=$need_version
8992
# Whether dlopen is supported.
8993
dlopen_support=$enable_dlopen
8995
# Whether dlopen of programs is supported.
8996
dlopen_self=$enable_dlopen_self
8998
# Whether dlopen of statically linked programs is supported.
8999
dlopen_self_static=$enable_dlopen_self_static
9001
# Compiler flag to prevent dynamic linking.
9002
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
9004
# Compiler flag to turn off builtin functions.
9005
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
9007
# Compiler flag to allow reflexive dlopens.
9008
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
9010
# Compiler flag to generate shared objects directly from archives.
9011
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
9013
# Compiler flag to generate thread-safe objects.
9014
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
9016
# Library versioning type.
9017
version_type=$version_type
9019
# Format of library name prefix.
9020
libname_spec=$lt_libname_spec
9022
# List of archive names. First name is the real one, the rest are links.
9023
# The last name is the one that the linker finds with -lNAME.
9024
library_names_spec=$lt_library_names_spec
9026
# The coded name of the library, if different from the real name.
9027
soname_spec=$lt_soname_spec
9029
# Commands used to build and install an old-style archive.
9031
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
9032
old_postinstall_cmds=$lt_old_postinstall_cmds
9033
old_postuninstall_cmds=$lt_old_postuninstall_cmds
9035
# Create an old-style archive from a shared archive.
9036
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
9038
# Create a temporary old-style archive to link instead of a shared archive.
9039
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
9041
# Commands used to build and install a shared archive.
9042
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
9043
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
9044
postinstall_cmds=$lt_postinstall_cmds
9045
postuninstall_cmds=$lt_postuninstall_cmds
9047
# Commands to strip libraries.
9048
old_striplib=$lt_old_striplib
9049
striplib=$lt_striplib
9051
# Dependencies to place before the objects being linked to create a
9053
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
9055
# Dependencies to place after the objects being linked to create a
9057
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
9059
# Dependencies to place before the objects being linked to create a
9061
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
9063
# Dependencies to place after the objects being linked to create a
9065
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
9067
# The library search path used internally by the compiler when linking
9069
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
9071
# Method to check whether dependent libraries are shared objects.
9072
deplibs_check_method=$lt_deplibs_check_method
9074
# Command to use when deplibs_check_method == file_magic.
9075
file_magic_cmd=$lt_file_magic_cmd
9077
# Flag that allows shared libraries with undefined symbols to be built.
9078
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
9080
# Flag that forces no undefined symbols.
9081
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
9083
# Commands used to finish a libtool library installation in a directory.
9084
finish_cmds=$lt_finish_cmds
9086
# Same as above, but a single script fragment to be evaled but not shown.
9087
finish_eval=$lt_finish_eval
9089
# Take the output of nm and produce a listing of raw symbols and C names.
9090
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
9092
# Transform the output of nm in a proper C declaration
9093
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
9095
# Transform the output of nm in a C name address pair
9096
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
9098
# This is the shared library runtime path variable.
9099
runpath_var=$runpath_var
9101
# This is the shared library path variable.
9102
shlibpath_var=$shlibpath_var
9104
# Is shlibpath searched before the hard-coded library search path?
9105
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9107
# How to hardcode a shared library path into an executable.
9108
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
9110
# Whether we should hardcode library paths into libraries.
9111
hardcode_into_libs=$hardcode_into_libs
9113
# Flag to hardcode \$libdir into a binary during linking.
9114
# This must work even if \$libdir does not exist.
9115
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
9117
# Whether we need a single -rpath flag with a separated argument.
9118
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
9120
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9122
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
9124
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9126
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
9128
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9129
# the resulting binary.
9130
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
9132
# Variables whose values should be saved in libtool wrapper scripts and
9133
# restored at relink time.
9134
variables_saved_for_relink="$variables_saved_for_relink"
9136
# Whether libtool must link a program against all its dependency libraries.
9137
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
9139
# Compile-time system search path for libraries
9140
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9142
# Run-time system search path for libraries
9143
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9145
# Fix the shell variable \$srcfile for the compiler.
9146
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
9148
# Set to yes if exported symbols are required.
9149
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
9151
# The commands to list exported symbols.
9152
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
9154
# The commands to extract the exported symbol list from a shared archive.
9155
extract_expsyms_cmds=$lt_extract_expsyms_cmds
9157
# Symbols that should not be listed in the preloaded symbols.
9158
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
9160
# Symbols that must always be exported.
9161
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
9164
[# ### END LIBTOOL CONFIG],
9165
[# ### END LIBTOOL TAG CONFIG: $tagname])
9172
cat <<\EOF >> "$cfgfile"
9174
# AIX sometimes has problems with the GCC collect2 program. For some
9175
# reason, if we set the COLLECT_NAMES environment variable, the problems
9176
# vanish in a puff of smoke.
9177
if test "X${COLLECT_NAMES+set}" != Xset; then
9179
export COLLECT_NAMES
9184
cygwin* | mingw* | pw32* | os2*)
9185
cat <<'EOF' >> "$cfgfile"
9186
# This is a source program that is used to create dlls on Windows
9187
# Don't remove nor modify the starting and closing comments
9189
# This is a source program that is used to create import libraries
9190
# on Windows for dlls which lack them. Don't remove nor modify the
9191
# starting and closing comments
9192
_LT_AC_FILE_IMPGEN_C
9197
# We use sed instead of cat because bash on DJGPP gets confused if
9198
# if finds mixed CR/LF and LF-only lines. Since sed operates in
9199
# text mode, it properly converts lines to CR/LF. This bash problem
9200
# is reportedly fixed, but why not run on old versions too?
9201
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
9203
mv -f "$cfgfile" "$ofile" || \
9204
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
9208
# If there is no Makefile yet, we rely on a make rule to execute
9209
# `config.status --recheck' to rerun these tests and create the
9210
# libtool script then.
9211
test -f Makefile && make "$ltmain"
9213
])# AC_LIBTOOL_CONFIG
9216
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
9217
# -------------------------------------------
9218
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
9219
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
9221
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9223
if test "$GCC" = yes; then
9224
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9226
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
9227
lt_cv_prog_compiler_rtti_exceptions,
9228
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
9229
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
9231
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
9234
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9235
# ---------------------------------
9236
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
9237
[AC_REQUIRE([AC_CANONICAL_HOST])
9238
AC_REQUIRE([AC_PROG_NM])
9239
AC_REQUIRE([AC_OBJEXT])
9240
# Check for command to grab the raw symbol name followed by C symbol from nm.
9241
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
9242
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
9244
# These are sane defaults that work on at least a few old systems.
9245
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
9247
# Character class describing NM global symbol codes.
9248
symcode='[[BCDEGRST]]'
9250
# Regexp to match symbols that can be accessed directly from C.
9251
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
9253
# Transform the above into a raw symbol and a C symbol.
9254
symxfrm='\1 \2\3 \3'
9256
# Transform an extracted symbol line into a proper C declaration
9257
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
9259
# Transform an extracted symbol line into symbol name and symbol address
9260
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'"
9262
# Define system-specific variables.
9267
cygwin* | mingw* | pw32*)
9268
symcode='[[ABCDGISTW]]'
9270
hpux*) # Its linker distinguishes data from code symbols
9271
if test "$host_cpu" = ia64; then
9272
symcode='[[ABCDEGRST]]'
9274
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
9275
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'"
9278
symcode='[[BCDEGRST]]'
9284
symcode='[[DFNSTU]]'
9288
# Handle CRLF in mingw tool chain
9292
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9296
# If we're using GNU nm, then use its standard symbol codes.
9297
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
9298
symcode='[[ABCDGISTW]]'
9301
# Try without a prefix undercore, then with it.
9302
for ac_symprfx in "" "_"; do
9304
# Write the raw and C identifiers.
9305
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
9307
# Check to see that the pipe works correctly.
9311
cat > conftest.$ac_ext <<EOF
9316
void nm_test_func(){}
9320
int main(){nm_test_var='a';nm_test_func();return(0);}
9323
if AC_TRY_EVAL(ac_compile); then
9324
# Now try to grab the symbols.
9326
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
9327
# Try sorting and uniquifying the output.
9328
if sort "$nlist" | uniq > "$nlist"T; then
9329
mv -f "$nlist"T "$nlist"
9334
# Make sure that we snagged all the symbols we need.
9335
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
9336
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
9337
cat <<EOF > conftest.$ac_ext
9343
# Now generate the symbol file.
9344
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
9346
cat <<EOF >> conftest.$ac_ext
9347
#if defined (__STDC__) && __STDC__
9348
# define lt_ptr_t void *
9350
# define lt_ptr_t char *
9354
/* The mapping between symbol names and symbols. */
9359
lt_preloaded_symbols[[]] =
9362
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
9363
cat <<\EOF >> conftest.$ac_ext
9371
# Now try linking the two files.
9372
mv conftest.$ac_objext conftstm.$ac_objext
9373
lt_save_LIBS="$LIBS"
9374
lt_save_CFLAGS="$CFLAGS"
9375
LIBS="conftstm.$ac_objext"
9376
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
9377
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
9380
LIBS="$lt_save_LIBS"
9381
CFLAGS="$lt_save_CFLAGS"
9383
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
9386
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
9389
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9392
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
9393
cat conftest.$ac_ext >&5
9395
rm -f conftest* conftst*
9397
# Do not use the global_symbol_pipe unless it works.
9398
if test "$pipe_works" = yes; then
9401
lt_cv_sys_global_symbol_pipe=
9405
if test -z "$lt_cv_sys_global_symbol_pipe"; then
9406
lt_cv_sys_global_symbol_to_cdecl=
9408
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9409
AC_MSG_RESULT(failed)
9413
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
9416
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
9417
# ---------------------------------------
9418
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
9419
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
9420
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9421
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
9423
AC_MSG_CHECKING([for $compiler option to produce PIC])
9425
# C++ specific cases for pic, static, wl, etc.
9426
if test "$GXX" = yes; then
9427
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9428
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9432
# All AIX code is PIC.
9433
if test "$host_cpu" = ia64; then
9434
# AIX 5 now supports IA64 processor
9435
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9439
# FIXME: we need at least 68020 code to build shared libraries, but
9440
# adding the `-m68020' flag to GCC prevents building anything better,
9442
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9444
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9445
# PIC is the default for these OSes.
9447
cygwin* | mingw* | os2*)
9448
# This hack is so that the source file can tell whether it is being
9449
# built for inclusion in a dll (and should export symbols for example).
9450
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9452
darwin* | rhapsody*)
9453
# PIC is the default on this platform
9454
# Common symbols not allowed in MH_DYLIB files
9455
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9458
# DJGPP does not support shared libraries at all
9459
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9462
if test -d /usr/nec; then
9463
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9467
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9468
if test "$host_cpu" != ia64; then
9469
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9473
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9479
# All AIX code is PIC.
9480
if test "$host_cpu" = ia64; then
9481
# AIX 5 now supports IA64 processor
9482
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9484
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9488
case $cc_basename in
9490
# Green Hills C++ Compiler
9491
# _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"
9496
case $cc_basename in
9498
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9501
# Green Hills C++ Compiler
9502
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9509
# FreeBSD uses GNU C++
9511
hpux9* | hpux10* | hpux11*)
9512
case $cc_basename in
9514
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9515
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9516
if test "$host_cpu" != ia64; then
9517
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9521
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9522
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
9523
if test "$host_cpu" != ia64; then
9524
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9531
irix5* | irix6* | nonstopux*)
9532
case $cc_basename in
9534
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9535
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9536
# CC pic flag -KPIC is the default.
9543
case $cc_basename in
9546
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9547
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9551
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9552
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9553
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9557
# Make sure the PIC flag is empty. It appears that all Alpha
9558
# Linux and Compaq Tru64 Unix objects are PIC.
9559
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9560
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9571
case $cc_basename in
9573
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
9581
osf3* | osf4* | osf5*)
9582
case $cc_basename in
9584
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
9587
# Rational C++ 2.4.1
9588
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9591
# Digital/Compaq C++
9592
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9593
# Make sure the PIC flag is empty. It appears that all Alpha
9594
# Linux and Compaq Tru64 Unix objects are PIC.
9595
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9596
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9605
case $cc_basename in
9607
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9614
case $cc_basename in
9616
# Sun C++ 4.2, 5.x and Centerline C++
9617
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9618
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9619
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9622
# Green Hills C++ Compiler
9623
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9630
case $cc_basename in
9633
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9634
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9638
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9645
case $cc_basename in
9647
# NonStop-UX NCC 3.20
9648
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9659
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9665
if test "$GCC" = yes; then
9666
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9667
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9671
# All AIX code is PIC.
9672
if test "$host_cpu" = ia64; then
9673
# AIX 5 now supports IA64 processor
9674
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9679
# FIXME: we need at least 68020 code to build shared libraries, but
9680
# adding the `-m68020' flag to GCC prevents building anything better,
9682
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
9685
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9686
# PIC is the default for these OSes.
9689
cygwin* | mingw* | pw32* | os2*)
9690
# This hack is so that the source file can tell whether it is being
9691
# built for inclusion in a dll (and should export symbols for example).
9692
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9695
darwin* | rhapsody*)
9696
# PIC is the default on this platform
9697
# Common symbols not allowed in MH_DYLIB files
9698
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
9702
# Just because we use GCC doesn't mean we suddenly get shared libraries
9703
# on systems that don't support them.
9704
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9709
if test -d /usr/nec; then
9710
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
9715
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
9716
if test "$host_cpu" != ia64; then
9717
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9722
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
9726
# PORTME Check for flag to pass linker flags through the system compiler.
9729
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9730
if test "$host_cpu" = ia64; then
9731
# AIX 5 now supports IA64 processor
9732
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9734
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
9738
cygwin* | mingw* | pw32* | os2*)
9739
# This hack is so that the source file can tell whether it is being
9740
# built for inclusion in a dll (and should export symbols for example).
9741
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
9744
hpux9* | hpux10* | hpux11*)
9745
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9746
if test "$host_cpu" != ia64; then
9747
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
9749
# Is there a better lt_prog_compiler_static that works with the bundled CC?
9750
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
9753
irix5* | irix6* | nonstopux*)
9754
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9755
# PIC (with -KPIC) is the default.
9756
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9760
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9761
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9765
if test "$CC" = "icc"; then
9766
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9767
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9768
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
9772
osf3* | osf4* | osf5*)
9773
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9774
# All OSF/1 code is PIC.
9775
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
9779
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
9780
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
9784
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9785
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9786
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9790
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
9791
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
9792
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9795
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9796
if test "x$host_vendor" = xsni; then
9797
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
9799
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
9801
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
9802
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9806
if test -d /usr/nec ;then
9807
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
9808
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9813
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
9814
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
9818
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
9823
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
9826
# Check to make sure the PIC flag actually works.
9828
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
9829
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
9830
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
9831
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
9832
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
9834
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
9836
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9837
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
9840
# For platforms which do not support PIC, -DPIC is meaningless:
9842
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
9845
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
9851
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
9852
# ------------------------------------
9853
# See if the linker supports building shared libraries.
9854
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
9855
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9857
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9860
# If we're using GNU nm, then we don't want the "-C" option.
9861
# -C means demangle to AIX nm, but means don't demangle with GNU nm
9862
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
9863
_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'
9865
_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'
9868
cygwin* | mingw* | pw32*)
9869
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
9872
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9877
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
9879
_LT_AC_TAGVAR(archive_cmds, $1)=
9880
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
9881
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
9882
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
9883
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
9884
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
9885
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
9886
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
9887
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
9888
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
9889
_LT_AC_TAGVAR(hardcode_direct, $1)=no
9890
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
9891
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9892
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
9893
_LT_AC_TAGVAR(always_export_symbols, $1)=no
9894
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
9895
# include_expsyms should be a list of space-separated symbols to be *always*
9896
# included in the symbol list
9897
_LT_AC_TAGVAR(include_expsyms, $1)=
9898
# exclude_expsyms can be an egrep regular expression of symbols to exclude
9899
# it will be wrapped by ` (' and `)$', so one must not match beginning or
9900
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9901
# as well as any symbol that contains `d'.
9902
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
9903
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9904
# platforms (ab)use it in PIC code, but their linkers get confused if
9905
# the symbol is explicitly referenced. Since portable code cannot
9906
# rely on this symbol name, it's probably fine to never include it in
9907
# preloaded symbol tables.
9908
extract_expsyms_cmds=
9911
cygwin* | mingw* | pw32*)
9912
# FIXME: the MSVC++ port hasn't been tested in a loooong time
9913
# When not using gcc, we currently assume that we are using
9914
# Microsoft Visual C++.
9915
if test "$GCC" != yes; then
9924
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
9925
if test "$with_gnu_ld" = yes; then
9926
# If archive_cmds runs LD, not CC, wlarc should be empty
9929
# See if GNU ld supports shared libraries.
9931
aix3* | aix4* | aix5*)
9932
# On AIX/PPC, the GNU linker is very broken
9933
if test "$host_cpu" != ia64; then
9934
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9937
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
9938
*** to be unable to reliably create shared libraries on AIX.
9939
*** Therefore, libtool is disabling shared libraries support. If you
9940
*** really care for shared libraries, you may want to modify your PATH
9941
*** so that a non-GNU linker is found, and then restart.
9948
_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)'
9949
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9950
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
9952
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9953
# that the semantics of dynamic libraries on AmigaOS, at least up
9954
# to version 4, is to share data among multiple programs linked
9955
# with the same dynamic library. Since this doesn't match the
9956
# behavior of shared libraries on other platforms, we can't use
9958
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9962
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
9963
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9964
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9965
# support --undefined. This deserves some investigation. FIXME
9966
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9968
_LT_AC_TAGVAR(ld_shlibs, $1)=no
9972
cygwin* | mingw* | pw32*)
9973
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
9974
# no search path for DLLs.
9975
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9976
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
9977
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
9979
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
9980
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
9981
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
9982
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
9983
else $CC -o impgen impgen.c ; fi)~
9984
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
9986
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
9988
# cygwin and mingw dlls have different entry points and sets of symbols
9990
# FIXME: what about values for MSVC?
9991
dll_entry=__cygwin_dll_entry@12
9992
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
9996
dll_entry=_DllMainCRTStartup@12
9997
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
10001
# mingw and cygwin differ, and it's simplest to just exclude the union
10002
# of the two symbol sets.
10003
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
10005
# recent cygwin and mingw systems supply a stub DllMain which the user
10006
# can override, but on older systems we have to supply one (in ltdll.c)
10007
if test "x$lt_cv_need_dllmain" = "xyes"; then
10008
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
10009
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~
10010
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
10016
# Extract the symbol export list from an `--export-all' def file,
10017
# then regenerate the def file from the symbol export list, so that
10018
# the compiled dll only exports the symbol export list.
10019
# Be careful not to strip the DATA tag left by newer dlltools.
10020
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
10021
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
10022
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
10024
# If the export-symbols file already is a .def file (1st line
10025
# is EXPORTS), use it as is.
10026
# If DATA tags from a recent dlltool are present, honour them!
10027
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
10028
cp $export_symbols $output_objdir/$soname-def;
10030
echo EXPORTS > $output_objdir/$soname-def;
10032
cat $export_symbols | while read symbol; do
10033
set dummy \$symbol;
10035
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
10036
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
10038
_lt_hint=`expr 1 + \$_lt_hint`;
10042
$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~
10043
$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~
10044
$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~
10045
$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~
10046
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
10050
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10051
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10054
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10055
_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'
10060
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
10061
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10064
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
10065
*** create shared libraries on Solaris systems. Therefore, libtool
10066
*** is disabling shared libraries support. We urge you to upgrade GNU
10067
*** binutils to release 2.9.1 or newer. Another option is to modify
10068
*** your PATH or compiler configuration so that the native linker is
10069
*** used, and then restart.
10072
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10073
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10074
_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'
10076
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10081
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10083
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10084
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10088
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
10089
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10090
_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'
10092
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10097
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
10098
runpath_var=LD_RUN_PATH
10099
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
10100
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
10102
cygwin* | mingw* | pw32*)
10103
# dlltool doesn't understand --whole-archive et. al.
10104
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10107
# ancient GNU ld didn't support --whole-archive et. al.
10108
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
10109
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
10111
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
10117
# PORTME fill in a description of your system's linker (not GNU ld)
10120
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10121
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10122
_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'
10123
# Note: this linker hardcodes the directories in LIBPATH if there
10124
# are no directories specified by -L.
10125
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10126
if test "$GCC" = yes && test -z "$link_static_flag"; then
10127
# Neither direct hardcoding nor static linking is supported with a
10129
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10134
if test "$host_cpu" = ia64; then
10135
# On IA64, the linker does run time linking by default, so we don't
10136
# have to do anything special.
10137
aix_use_runtimelinking=no
10138
exp_sym_flag='-Bexport'
10141
# If we're using GNU nm, then we don't want the "-C" option.
10142
# -C means demangle to AIX nm, but means don't demangle with GNU nm
10143
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
10144
_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'
10146
_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'
10149
# KDE requires run time linking. Make it the default.
10150
aix_use_runtimelinking=yes
10151
exp_sym_flag='-bexport'
10152
no_entry_flag='-bnoentry'
10155
# When large executables or shared objects are built, AIX ld can
10156
# have problems creating the table of contents. If linking a library
10157
# or program results in "error TOC overflow" add -mminimal-toc to
10158
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10159
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10161
_LT_AC_TAGVAR(archive_cmds, $1)=''
10162
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10163
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
10164
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10166
if test "$GCC" = yes; then
10167
case $host_os in aix4.[012]|aix4.[012].*)
10168
# We only want to do this on AIX 4.2 and lower, the check
10169
# below for broken collect2 doesn't work under 4.3+
10170
collect2name=`${CC} -print-prog-name=collect2`
10171
if test -f "$collect2name" && \
10172
strings "$collect2name" | grep resolve_lib_name >/dev/null
10174
# We have reworked collect2
10175
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10177
# We have old collect2
10178
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
10179
# It fails to find uninstalled libraries when the uninstalled
10180
# path is not listed in the libpath. Setting hardcode_minus_L
10181
# to unsupported forces relinking
10182
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10183
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10184
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
10187
shared_flag='-shared'
10190
if test "$host_cpu" = ia64; then
10191
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10192
# chokes on -Wl,-G. The following line is correct:
10195
if test "$aix_use_runtimelinking" = yes; then
10196
shared_flag='-qmkshrobj ${wl}-G'
10198
shared_flag='-qmkshrobj'
10203
# Let the compiler handle the export list.
10204
_LT_AC_TAGVAR(always_export_symbols, $1)=no
10205
if test "$aix_use_runtimelinking" = yes; then
10206
# Warning - without using the other runtime loading flags (-brtl),
10207
# -berok will link without error, but may produce a broken library.
10208
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
10209
# Determine the default libpath from the value encoded in an empty executable.
10210
_LT_AC_SYS_LIBPATH_AIX
10211
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10212
_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"
10213
_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"
10215
if test "$host_cpu" = ia64; then
10216
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10217
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10218
_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"
10220
# Determine the default libpath from the value encoded in an empty executable.
10221
_LT_AC_SYS_LIBPATH_AIX
10222
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10223
# Warning - without using the other run time loading flags,
10224
# -berok will link without error, but may produce a broken library.
10225
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
10226
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
10227
# -bexpall does not export symbols beginning with underscore (_)
10228
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
10229
# Exported symbols can be pulled into shared objects from archives
10230
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10231
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10232
# This is similar to how AIX traditionally builds it's shared libraries.
10233
_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'
10239
_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)'
10240
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10241
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10242
# see comment about different semantics on the GNU ld section
10243
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10247
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
10250
cygwin* | mingw* | pw32*)
10251
# When not using gcc, we currently assume that we are using
10252
# Microsoft Visual C++.
10253
# hardcode_libdir_flag_spec is actually meaningless, as there is
10254
# no search path for DLLs.
10255
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10256
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10257
# Tell ltmain to make .lib files, not .a files.
10259
# FIXME: Setting linknames here is a bad hack.
10260
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
10261
# The linker will automatically build a .lib file if we build a DLL.
10262
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10263
# FIXME: Should let the user specify the lib program.
10264
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
10265
fix_srcfile_path='`cygpath -w "$srcfile"`'
10268
darwin* | rhapsody*)
10270
rhapsody* | darwin1.[[012]])
10271
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
10274
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
10278
# FIXME: Relying on posixy $() will cause problems for
10279
# cross-compilation, but unfortunately the echo tests do not
10280
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
10281
# `"' quotes if we put them in here... so don't!
10282
_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'
10283
# We need to add '_' to the symbols in $export_symbols first
10284
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
10285
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10286
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10287
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
10291
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10292
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10293
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10297
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10300
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10301
# support. Future versions do this automatically, but an explicit c++rt0.o
10302
# does not break anything, and helps significantly (at the cost of a little
10305
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10306
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10307
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10308
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10311
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
10313
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10314
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10315
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10316
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10319
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10321
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
10322
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10323
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10324
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10327
hpux9* | hpux10* | hpux11*)
10328
if test "$GCC" = yes; then
10331
_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'
10334
if test "$host_cpu" = ia64; then
10335
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10337
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10344
_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'
10347
if test "$host_cpu" = ia64; then
10348
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
10350
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10355
if test "$host_cpu" = ia64; then
10356
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10357
_LT_AC_TAGVAR(hardcode_direct, $1)=no
10358
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10360
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
10361
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10362
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10364
# hardcode_minus_L: Not really in the search PATH,
10365
# but as the default location of the library.
10366
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10367
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10370
irix5* | irix6* | nonstopux*)
10371
if test "$GCC" = yes; then
10372
_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'
10374
_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'
10376
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10377
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10378
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10382
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10383
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10385
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10387
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10388
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10389
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10393
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10394
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10395
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10396
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10397
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10401
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10402
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10404
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10405
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10406
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10407
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10410
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
10411
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10415
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
10416
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10423
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10424
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10425
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10426
_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'
10427
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10431
if test "$GCC" = yes; then
10432
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10433
_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'
10435
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10436
_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'
10438
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10439
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10442
osf4* | osf5*) # as osf3* with the addition of -msym flag
10443
if test "$GCC" = yes; then
10444
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10445
_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'
10446
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10448
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10449
_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'
10450
_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~
10451
$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'
10453
# Both c and cxx compiler support -rpath directly
10454
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10456
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
10460
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10461
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10462
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
10463
runpath_var=LD_RUN_PATH
10464
hardcode_runpath_var=yes
10468
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10469
if test "$GCC" = yes; then
10470
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10471
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10472
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
10474
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10475
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10476
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10478
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10479
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10481
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10482
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
10483
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
10485
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
10489
if test "x$host_vendor" = xsequent; then
10490
# Use $CC to link under sequent, because it throws in some extra .o
10491
# files that make .init and .fini sections work.
10492
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10494
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10496
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10497
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10498
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10499
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10503
if test "x$host_vendor" = xsni; then
10504
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
10505
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
10507
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10508
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
10510
runpath_var='LD_RUN_PATH'
10511
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10515
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10516
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10517
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
10521
if test -d /usr/nec; then
10522
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10523
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10524
runpath_var=LD_RUN_PATH
10525
hardcode_runpath_var=yes
10526
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
10531
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10532
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
10533
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
10534
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10535
hardcode_runpath_var=yes
10536
runpath_var=LD_RUN_PATH
10539
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
10540
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10541
if test "$GCC" = yes; then
10542
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10544
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
10546
runpath_var='LD_RUN_PATH'
10547
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10551
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10552
# $CC -shared without GNU ld will not create a library from C++
10553
# object files and a static libstdc++, better avoid it by now
10554
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10555
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10556
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
10557
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
10558
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10559
runpath_var='LD_RUN_PATH'
10563
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10564
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10565
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10569
_LT_AC_TAGVAR(ld_shlibs, $1)=no
10574
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
10575
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
10577
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
10578
if test "$GCC" = yes; then
10579
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10583
# Do we need to explicitly link libc?
10585
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10586
if test "$enable_shared" = yes && test "$GCC" = yes; then
10587
case $_LT_AC_TAGVAR(archive_cmds, $1) in
10589
# FIXME: we may have to deal with multi-command sequences.
10592
# Test whether the compiler implicitly links with -lc since on some
10593
# systems, -lgcc has to come before -lc. If gcc already passes -lc
10594
# to ld, don't add -lc before -lgcc.
10595
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
10597
echo 'static int dummy;' > conftest.$ac_ext
10599
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
10602
libobjs=conftest.$ac_objext
10604
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
10610
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
10611
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
10612
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
10614
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10616
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10618
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
10620
cat conftest.err 1>&5
10623
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
10627
])# AC_LIBTOOL_PROG_LD_SHLIBS
10630
# _LT_AC_FILE_LTDLL_C
10631
# -------------------
10632
# Be careful that the start marker always follows a newline.
10633
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
10634
# /* ltdll.c starts here */
10635
# #define WIN32_LEAN_AND_MEAN
10636
# #include <windows.h>
10637
# #undef WIN32_LEAN_AND_MEAN
10638
# #include <stdio.h>
10640
# #ifndef __CYGWIN__
10641
# # ifdef __CYGWIN32__
10642
# # define __CYGWIN__ __CYGWIN32__
10646
# #ifdef __cplusplus
10649
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
10650
# #ifdef __cplusplus
10654
# #ifdef __CYGWIN__
10655
# #include <cygwin/cygwin_dll.h>
10656
# DECLARE_CYGWIN_DLL( DllMain );
10658
# HINSTANCE __hDllInstance_base;
10661
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
10663
# __hDllInstance_base = hInst;
10666
# /* ltdll.c ends here */
10667
])# _LT_AC_FILE_LTDLL_C
10670
# _LT_AC_FILE_IMPGEN_C
10671
# --------------------
10672
# Be careful that the start marker always follows a newline.
10673
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
10674
# /* impgen.c starts here */
10675
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
10677
# This file is part of GNU libtool.
10679
# This program is free software; you can redistribute it and/or modify
10680
# it under the terms of the GNU General Public License as published by
10681
# the Free Software Foundation; either version 2 of the License, or
10682
# (at your option) any later version.
10684
# This program is distributed in the hope that it will be useful,
10685
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10686
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10687
# GNU General Public License for more details.
10689
# You should have received a copy of the GNU General Public License
10690
# along with this program; if not, write to the Free Software
10691
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10694
# #include <stdio.h> /* for printf() */
10695
# #include <unistd.h> /* for open(), lseek(), read() */
10696
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
10697
# #include <string.h> /* for strdup() */
10699
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
10701
# #define O_BINARY 0
10704
# static unsigned int
10705
# pe_get16 (fd, offset)
10709
# unsigned char b[2];
10710
# lseek (fd, offset, SEEK_SET);
10712
# return b[0] + (b[1]<<8);
10715
# static unsigned int
10716
# pe_get32 (fd, offset)
10720
# unsigned char b[4];
10721
# lseek (fd, offset, SEEK_SET);
10723
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10726
# static unsigned int
10730
# unsigned char *b = ptr;
10731
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
10735
# main (argc, argv)
10740
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
10741
# unsigned long export_rva, export_size, nsections, secptr, expptr;
10742
# unsigned long name_rvas, nexp;
10743
# unsigned char *expdata, *erva;
10744
# char *filename, *dll_name;
10746
# filename = argv[1];
10748
# dll = open(filename, O_RDONLY|O_BINARY);
10752
# dll_name = filename;
10754
# for (i=0; filename[i]; i++)
10755
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
10756
# dll_name = filename + i +1;
10758
# pe_header_offset = pe_get32 (dll, 0x3c);
10759
# opthdr_ofs = pe_header_offset + 4 + 20;
10760
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
10762
# if (num_entries < 1) /* no exports */
10765
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
10766
# export_size = pe_get32 (dll, opthdr_ofs + 100);
10767
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
10768
# secptr = (pe_header_offset + 4 + 20 +
10769
# pe_get16 (dll, pe_header_offset + 4 + 16));
10772
# for (i = 0; i < nsections; i++)
10775
# unsigned long secptr1 = secptr + 40 * i;
10776
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
10777
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
10778
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
10779
# lseek(dll, secptr1, SEEK_SET);
10780
# read(dll, sname, 8);
10781
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
10783
# expptr = fptr + (export_rva - vaddr);
10784
# if (export_rva + export_size > vaddr + vsize)
10785
# export_size = vsize - (export_rva - vaddr);
10790
# expdata = (unsigned char*)malloc(export_size);
10791
# lseek (dll, expptr, SEEK_SET);
10792
# read (dll, expdata, export_size);
10793
# erva = expdata - export_rva;
10795
# nexp = pe_as32 (expdata+24);
10796
# name_rvas = pe_as32 (expdata+32);
10798
# printf ("EXPORTS\n");
10799
# for (i = 0; i<nexp; i++)
10801
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
10802
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
10807
# /* impgen.c ends here */
10808
])# _LT_AC_FILE_IMPGEN_C
10810
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
10811
# ---------------------------------
10812
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
10816
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
10817
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10818
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10819
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10820
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10821
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
10822
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
10824
# This is just to silence aclocal about the macro not being used
10825
ifelse([AC_DISABLE_FAST_INSTALL])
10827
AC_DEFUN([LT_AC_PROG_GCJ],
10828
[AC_CHECK_TOOL(GCJ, gcj, no)
10829
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10833
AC_DEFUN([LT_AC_PROG_RC],
10834
[AC_CHECK_TOOL(RC, windres, no)
10837
############################################################
10838
# NOTE: This macro has been submitted for inclusion into #
10839
# GNU Autoconf as AC_PROG_SED. When it is available in #
10840
# a released version of Autoconf we should remove this #
10841
# macro and use it instead. #
10842
############################################################
10845
# Check for a fully-functional sed program, that truncates
10846
# as few characters as possible. Prefer GNU sed if found.
10847
AC_DEFUN([LT_AC_PROG_SED],
10848
[AC_MSG_CHECKING([for a sed that does not truncate output])
10849
AC_CACHE_VAL(lt_cv_path_SED,
10850
[# Loop through the user's path and test for sed and gsed.
10851
# Then use that list of sed's as ones to test for truncation.
10852
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853
for as_dir in $PATH
10856
test -z "$as_dir" && as_dir=.
10857
for ac_prog in sed gsed; do
10858
for ac_exec_ext in '' $ac_executable_extensions; do
10859
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10860
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
10866
# Create a temporary directory, and hook for its removal unless debugging.
10869
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10870
trap '{ (exit 1); exit 1; }' 1 2 13 15
10873
# Create a (secure) tmp directory for tmp files.
10876
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
10877
test -n "$tmp" && test -d "$tmp"
10880
tmp=$TMPDIR/sed$$-$RANDOM
10881
(umask 077 && mkdir $tmp)
10884
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
10885
{ (exit 1); exit 1; }
10889
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10890
# along with /bin/sed that truncates output.
10891
for _sed in $_sed_list /usr/xpg4/bin/sed; do
10892
test ! -f ${_sed} && break
10893
cat /dev/null > "$tmp/sed.in"
10895
echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
10896
# Check for GNU sed and select it if it is found.
10897
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
10898
lt_cv_path_SED=${_sed}
10902
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
10903
mv "$tmp/sed.tmp" "$tmp/sed.in"
10904
cp "$tmp/sed.in" "$tmp/sed.nl"
10905
echo >>"$tmp/sed.nl"
10906
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
10907
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
10908
# 10000 chars as input seems more than enough
10909
test $_count -gt 10 && break
10910
_count=`expr $_count + 1`
10911
if test $_count -gt $_max; then
10913
lt_cv_path_SED=$_sed
10919
AC_MSG_RESULT([$SED])