1
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
# Do all the work for Automake. This macro actually does too much --
14
# some checks are only needed if your package does certain things.
15
# But this isn't really a big deal.
20
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22
AC_DEFUN([AM_INIT_AUTOMAKE],
23
[AC_REQUIRE([AC_PROG_INSTALL])
28
dnl test to see if srcdir already configured
29
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
33
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
34
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
35
AC_REQUIRE([AM_SANITY_CHECK])
36
AC_REQUIRE([AC_ARG_PROGRAM])
37
dnl FIXME This is truly gross.
38
missing_dir=`cd $ac_aux_dir && pwd`
39
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44
AC_REQUIRE([AC_PROG_MAKE_SET])])
47
# Check to make sure that the build environment is sane.
50
AC_DEFUN([AM_SANITY_CHECK],
51
[AC_MSG_CHECKING([whether build environment is sane])
54
echo timestamp > conftestfile
55
# Do `set' in a subshell so we don't clobber the current shell's
56
# arguments. Must try -L first in case configure is actually a
57
# symlink; some systems play weird games with the mod time of symlinks
58
# (eg FreeBSD returns the mod time of the symlink's containing
61
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62
if test "[$]*" = "X"; then
64
set X `ls -t $srcdir/configure conftestfile`
66
if test "[$]*" != "X $srcdir/configure conftestfile" \
67
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
69
# If neither matched, then we have a broken ls. This can happen
70
# if, for instance, CONFIG_SHELL is bash and it inherits a
71
# broken ls alias from the environment. This has actually
72
# happened. Such a system could not be considered "sane".
73
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
74
alias in your environment])
77
test "[$]2" = conftestfile
83
AC_MSG_ERROR([newly created file is older than distributed files!
84
Check your system clock])
89
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90
dnl The program must properly implement --version.
91
AC_DEFUN([AM_MISSING_PROG],
92
[AC_MSG_CHECKING(for working $2)
93
# Run test in a subshell; some versions of sh will print an error if
94
# an executable is not found, even if stderr is redirected.
95
# Redirect stdin to placate older versions of autoconf. Sigh.
96
if ($2 --version) < /dev/null > /dev/null 2>&1; then
101
AC_MSG_RESULT(missing)
105
# Like AC_CONFIG_HEADER, but automatically create stamp file.
107
AC_DEFUN([AM_CONFIG_HEADER],
109
AC_CONFIG_HEADER([$1])
110
dnl When config.status generates a header, we must update the stamp-h file.
111
dnl This file resides in the same directory as the config header
112
dnl that is generated. We must strip everything past the first ":",
113
dnl and everything past the last "/".
114
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
118
for am_file in <<$1>>; do
119
case " <<$>>CONFIG_HEADERS " in
120
*" <<$>>am_file "*<<)>>
121
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
124
am_indx=`expr "<<$>>am_indx" + 1`
131
# @defmac AC_PROG_CC_STDC
132
# @maindex PROG_CC_STDC
134
# If the C compiler in not in ANSI C mode by default, try to add an option
135
# to output variable @code{CC} to make it so. This macro tries various
136
# options that select ANSI C on some system or another. It considers the
137
# compiler to be in ANSI C mode if it handles function prototypes correctly.
139
# If you use this macro, you should check after calling it whether the C
140
# compiler has been set to accept ANSI C; if not, the shell variable
141
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
142
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
143
# program @code{ansi2knr}, which comes with Ghostscript.
146
AC_DEFUN([AM_PROG_CC_STDC],
147
[AC_REQUIRE([AC_PROG_CC])
148
AC_BEFORE([$0], [AC_C_INLINE])
149
AC_BEFORE([$0], [AC_C_CONST])
150
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
151
dnl a magic option to avoid problems with ANSI preprocessor commands
153
dnl FIXME: can't do this because then AC_AIX won't work due to a
154
dnl circular dependency.
155
dnl AC_BEFORE([$0], [AC_PROG_CPP])
156
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
157
AC_CACHE_VAL(am_cv_prog_cc_stdc,
158
[am_cv_prog_cc_stdc=no
160
# Don't try gcc -ansi; that turns off useful extensions and
161
# breaks some systems' header files.
163
# Ultrix and OSF/1 -std1
164
# HP-UX -Aa -D_HPUX_SOURCE
165
# SVR4 -Xc -D__EXTENSIONS__
166
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
168
CC="$ac_save_CC $ac_arg"
172
#include <sys/types.h>
173
#include <sys/stat.h>
174
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
175
struct buf { int x; };
176
FILE * (*rcsopen) (struct buf *, struct stat *, int);
177
static char *e (p, i)
183
static char *f (char * (*g) (char **, int), char **p, ...)
188
s = g (p, va_arg (v,int));
192
int test (int i, double x);
193
struct s1 {int (*f) (int a);};
194
struct s2 {int (*f) (double a);};
195
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
199
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
201
[am_cv_prog_cc_stdc="$ac_arg"; break])
205
if test -z "$am_cv_prog_cc_stdc"; then
206
AC_MSG_RESULT([none needed])
208
AC_MSG_RESULT($am_cv_prog_cc_stdc)
210
case "x$am_cv_prog_cc_stdc" in
212
*) CC="$CC $am_cv_prog_cc_stdc" ;;
217
dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
218
# serial 1 AC_PROG_INTLTOOL
219
AC_DEFUN(AC_PROG_INTLTOOL,
222
if test -n "$1"; then
223
AC_MSG_CHECKING(for intltool >= $1)
225
INTLTOOL_REQUIRED_VERSION_AS_INT=$(echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }')
226
INTLTOOL_APPLIED_VERSION=$(awk -F\" '/\$VERSION / { printf $[2]; }' < intltool-update.in)
228
INTLTOOL_APPLIED_VERSION_AS_INT=$(awk -F\" '/\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in)
231
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
232
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
234
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
239
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
240
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
241
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
242
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
243
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
244
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
245
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
246
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
247
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
248
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
249
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
251
AC_SUBST(INTLTOOL_DESKTOP_RULE)
252
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
253
AC_SUBST(INTLTOOL_KEYS_RULE)
254
AC_SUBST(INTLTOOL_OAF_RULE)
255
AC_SUBST(INTLTOOL_PONG_RULE)
256
AC_SUBST(INTLTOOL_SERVER_RULE)
257
AC_SUBST(INTLTOOL_SHEET_RULE)
258
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
259
AC_SUBST(INTLTOOL_UI_RULE)
260
AC_SUBST(INTLTOOL_XML_RULE)
261
AC_SUBST(INTLTOOL_CAVES_RULE)
263
# Use the tools built into the package, not the ones that are installed.
265
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
266
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
267
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
269
AC_SUBST(INTLTOOL_EXTRACT)
270
AC_SUBST(INTLTOOL_MERGE)
271
AC_SUBST(INTLTOOL_UPDATE)
273
AC_PATH_PROG(INTLTOOL_PERL, perl)
274
if test -z "$INTLTOOL_PERL"; then
275
AC_MSG_ERROR([perl not found; required for intltool])
277
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
278
AC_MSG_ERROR([perl 5.x required for intltool])
281
# Remove file type tags (using []) from po/POTFILES.
283
ifdef([AC_DIVERSION_ICMDS],[
284
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
286
mv -f po/POTFILES po/POTFILES.tmp
287
sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
288
rm -f po/POTFILES.tmp
292
ifdef([AC_CONFIG_COMMANDS_PRE],[
293
AC_CONFIG_COMMANDS_PRE([
295
mv -f po/POTFILES po/POTFILES.tmp
296
sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
297
rm -f po/POTFILES.tmp
303
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
307
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
308
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
309
rm -f intltool-extract.out
311
mv -f intltool-extract.out intltool-extract
313
chmod ugo+x intltool-extract
314
chmod u+w intltool-extract
316
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
317
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
318
rm -f intltool-merge.out
320
mv -f intltool-merge.out intltool-merge
322
chmod ugo+x intltool-merge
323
chmod u+w intltool-merge
325
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
326
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
327
rm -f intltool-update.out
329
mv -f intltool-update.out intltool-update
331
chmod ugo+x intltool-update
332
chmod u+w intltool-update
334
], INTLTOOL_PERL=${INTLTOOL_PERL})
338
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
340
# serial 46 AC_PROG_LIBTOOL
342
AC_DEFUN([AC_PROG_LIBTOOL],
343
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
345
# This can be used to rebuild libtool when needed
346
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
348
# Always use our own libtool.
349
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
352
# Prevent multiple expansion
353
define([AC_PROG_LIBTOOL], [])
356
AC_DEFUN([AC_LIBTOOL_SETUP],
358
AC_REQUIRE([AC_ENABLE_SHARED])dnl
359
AC_REQUIRE([AC_ENABLE_STATIC])dnl
360
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
361
AC_REQUIRE([AC_CANONICAL_HOST])dnl
362
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
363
AC_REQUIRE([AC_PROG_CC])dnl
364
AC_REQUIRE([AC_PROG_LD])dnl
365
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
366
AC_REQUIRE([AC_PROG_NM])dnl
367
AC_REQUIRE([AC_PROG_LN_S])dnl
368
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
369
AC_REQUIRE([AC_OBJEXT])dnl
370
AC_REQUIRE([AC_EXEEXT])dnl
373
_LT_AC_PROG_ECHO_BACKSLASH
374
# Only perform the check for file, if the check method requires it
375
case $deplibs_check_method in
377
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
383
AC_CHECK_TOOL(RANLIB, ranlib, :)
384
AC_CHECK_TOOL(STRIP, strip, :)
386
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
387
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
388
enable_win32_dll=yes, enable_win32_dll=no)
390
AC_ARG_ENABLE(libtool-lock,
391
[ --disable-libtool-lock avoid locking (might break parallel builds)])
392
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
394
# Some flags need to be propagated to the compiler or linker for good
398
# Find out which ABI we are using.
399
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
400
if AC_TRY_EVAL(ac_compile); then
401
case `/usr/bin/file conftest.$ac_objext` in
417
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
418
SAVE_CFLAGS="$CFLAGS"
419
CFLAGS="$CFLAGS -belf"
420
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
423
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
425
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
426
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
427
CFLAGS="$SAVE_CFLAGS"
431
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
432
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
433
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
434
AC_CHECK_TOOL(AS, as, false)
435
AC_CHECK_TOOL(OBJDUMP, objdump, false)
437
# recent cygwin and mingw systems supply a stub DllMain which the user
438
# can override, but on older systems we have to supply one
439
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
441
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
443
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
446
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
447
# old mingw systems require "-dll" to link a DLL, while more recent ones
449
SAVE_CFLAGS="$CFLAGS"
450
CFLAGS="$CFLAGS -mdll"
451
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
452
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
453
CFLAGS="$SAVE_CFLAGS" ;;
454
*-*-cygwin* | *-*-pw32*)
455
# cygwin systems need to pass --dll to the linker, and not link
456
# crt.o which will require a WinMain@16 definition.
457
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
467
# AC_LIBTOOL_HEADER_ASSERT
468
# ------------------------
469
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
470
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
471
[lt_cv_func_assert_works],
474
if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
475
case `$CC --version 2>/dev/null` in
476
[[12]].*) lt_cv_func_assert_works=no ;;
477
*) lt_cv_func_assert_works=yes ;;
483
if test "x$lt_cv_func_assert_works" = xyes; then
484
AC_CHECK_HEADERS(assert.h)
486
])# AC_LIBTOOL_HEADER_ASSERT
489
# --------------------
490
AC_DEFUN([_LT_AC_CHECK_DLFCN],
491
[AC_CHECK_HEADERS(dlfcn.h)
492
])# _LT_AC_CHECK_DLFCN
494
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
495
# ---------------------------------
496
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
497
[AC_REQUIRE([AC_CANONICAL_HOST])
498
AC_REQUIRE([AC_PROG_NM])
499
AC_REQUIRE([AC_OBJEXT])
500
# Check for command to grab the raw symbol name followed by C symbol from nm.
501
AC_MSG_CHECKING([command to parse $NM output])
502
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
504
# These are sane defaults that work on at least a few old systems.
505
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
507
# Character class describing NM global symbol codes.
508
symcode='[[BCDEGRST]]'
510
# Regexp to match symbols that can be accessed directly from C.
511
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
513
# Transform the above into a raw symbol and a C symbol.
516
# Transform an extracted symbol line into a proper C declaration
517
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
519
# Transform an extracted symbol line into symbol name and symbol address
520
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
522
# Define system-specific variables.
527
cygwin* | mingw* | pw32*)
528
symcode='[[ABCDGISTW]]'
530
hpux*) # Its linker distinguishes data from code symbols
531
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
532
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
535
symcode='[[BCDEGRST]]'
545
# Handle CRLF in mingw tool chain
549
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
553
# If we're using GNU nm, then use its standard symbol codes.
554
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
555
symcode='[[ABCDGISTW]]'
558
# Try without a prefix undercore, then with it.
559
for ac_symprfx in "" "_"; do
561
# Write the raw and C identifiers.
562
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
564
# Check to see that the pipe works correctly.
567
cat > conftest.$ac_ext <<EOF
572
void nm_test_func(){}
576
int main(){nm_test_var='a';nm_test_func();return(0);}
579
if AC_TRY_EVAL(ac_compile); then
580
# Now try to grab the symbols.
582
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
583
# Try sorting and uniquifying the output.
584
if sort "$nlist" | uniq > "$nlist"T; then
585
mv -f "$nlist"T "$nlist"
590
# Make sure that we snagged all the symbols we need.
591
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
592
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
593
cat <<EOF > conftest.$ac_ext
599
# Now generate the symbol file.
600
eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
602
cat <<EOF >> conftest.$ac_ext
603
#if defined (__STDC__) && __STDC__
604
# define lt_ptr void *
606
# define lt_ptr char *
610
/* The mapping between symbol names and symbols. */
615
lt_preloaded_symbols[[]] =
618
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
619
cat <<\EOF >> conftest.$ac_ext
627
# Now try linking the two files.
628
mv conftest.$ac_objext conftstm.$ac_objext
630
save_CFLAGS="$CFLAGS"
631
LIBS="conftstm.$ac_objext"
632
CFLAGS="$CFLAGS$no_builtin_flag"
633
if AC_TRY_EVAL(ac_link) && test -s conftest; then
637
CFLAGS="$save_CFLAGS"
639
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
642
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
645
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
648
echo "$progname: failed program was:" >&AC_FD_CC
649
cat conftest.$ac_ext >&5
651
rm -f conftest* conftst*
653
# Do not use the global_symbol_pipe unless it works.
654
if test "$pipe_works" = yes; then
657
lt_cv_sys_global_symbol_pipe=
661
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
662
if test -z "$lt_cv_sys_global_symbol_pipe"; then
663
global_symbol_to_cdecl=
664
global_symbol_to_c_name_address=
666
global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
667
global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
669
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
671
AC_MSG_RESULT(failed)
675
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
677
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
678
# ---------------------------------
679
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
680
[# Find the correct PATH separator. Usually this is `:', but
681
# DJGPP uses `;' like DOS.
682
if test "X${PATH_SEPARATOR+set}" != Xset; then
683
UNAME=${UNAME-`uname 2>/dev/null`}
685
*-DOS) lt_cv_sys_path_separator=';' ;;
686
*) lt_cv_sys_path_separator=':' ;;
688
PATH_SEPARATOR=$lt_cv_sys_path_separator
690
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
692
# _LT_AC_PROG_ECHO_BACKSLASH
693
# --------------------------
694
# Add some code to the start of the generated configure script which
695
# will find an echo command which doesn't interpret backslashes.
696
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
697
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
698
[AC_DIVERT_PUSH(NOTICE)])
699
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
701
# Check that we are running under the correct shell.
702
SHELL=${CONFIG_SHELL-/bin/sh}
706
# Remove one level of quotation (which was required for Make).
707
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
712
if test "X[$]1" = X--no-reexec; then
713
# Discard the --no-reexec flag, and continue.
715
elif test "X[$]1" = X--fallback-echo; then
716
# Avoid inline document here, it may be left over
718
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
719
# Yippee, $echo works!
722
# Restart under the correct shell.
723
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
726
if test "X[$]1" = X--fallback-echo; then
727
# used as fallback echo
735
# The HP-UX ksh and POSIX shell print the target directory to stdout
737
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
739
if test -z "$ECHO"; then
740
if test "X${echo_test_string+set}" != Xset; then
741
# find a string as large as possible, as long as the shell can cope with it
742
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
743
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
744
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
745
echo_test_string="`eval $cmd`" &&
746
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
753
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
754
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
755
test "X$echo_testing_string" = "X$echo_test_string"; then
758
# The Solaris, AIX, and Digital Unix default echo programs unquote
759
# backslashes. This makes it impossible to quote backslashes using
760
# echo "$something" | sed 's/\\/\\\\/g'
762
# So, first we look for a working echo in the user's PATH.
764
IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
765
for dir in $PATH /usr/ucb; do
766
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
767
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
768
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
769
test "X$echo_testing_string" = "X$echo_test_string"; then
776
if test "X$echo" = Xecho; then
777
# We didn't find a better echo, so look for alternatives.
778
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
779
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
780
test "X$echo_testing_string" = "X$echo_test_string"; then
781
# This shell has a builtin print -r that does the trick.
783
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
784
test "X$CONFIG_SHELL" != X/bin/ksh; then
785
# If we have ksh, try running configure again with it.
786
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
787
export ORIGINAL_CONFIG_SHELL
788
CONFIG_SHELL=/bin/ksh
790
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
794
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
795
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
796
test "X$echo_testing_string" = "X$echo_test_string"; then
799
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
800
test "X$echo_testing_string" = 'X\t' &&
801
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
802
test "X$echo_testing_string" = "X$echo_test_string"; then
803
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
805
SHELL="$CONFIG_SHELL"
807
echo="$CONFIG_SHELL [$]0 --fallback-echo"
808
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
809
test "X$echo_testing_string" = 'X\t' &&
810
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
811
test "X$echo_testing_string" = "X$echo_test_string"; then
812
echo="$CONFIG_SHELL [$]0 --fallback-echo"
814
# maybe with a smaller string...
817
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
818
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
825
if test "$prev" != 'sed 50q "[$]0"'; then
826
echo_test_string=`eval $prev`
827
export echo_test_string
828
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
830
# Oops. We lost completely, so just stick with echo.
839
# Copy echo and quote the copy suitably for passing to libtool from
840
# the Makefile, instead of quoting the original, which is used later.
842
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
843
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
848
])# _LT_AC_PROG_ECHO_BACKSLASH
850
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
851
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
852
# ------------------------------------------------------------------
853
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
854
[if test "$cross_compiling" = yes; then :
857
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
858
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
859
lt_status=$lt_dlunknown
860
cat > conftest.$ac_ext <<EOF
861
[#line __oline__ "configure"
862
#include "confdefs.h"
871
# define LT_DLGLOBAL RTLD_GLOBAL
874
# define LT_DLGLOBAL DL_GLOBAL
876
# define LT_DLGLOBAL 0
880
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
881
find out it does not work in some platform. */
882
#ifndef LT_DLLAZY_OR_NOW
884
# define LT_DLLAZY_OR_NOW RTLD_LAZY
887
# define LT_DLLAZY_OR_NOW DL_LAZY
890
# define LT_DLLAZY_OR_NOW RTLD_NOW
893
# define LT_DLLAZY_OR_NOW DL_NOW
895
# define LT_DLLAZY_OR_NOW 0
903
extern "C" void exit (int);
906
void fnord() { int i=42;}
909
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
910
int status = $lt_dlunknown;
914
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
915
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
916
/* dlclose (self); */
922
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
923
(./conftest; exit; ) 2>/dev/null
926
x$lt_dlno_uscore) $1 ;;
927
x$lt_dlneed_uscore) $2 ;;
928
x$lt_unknown|x*) $3 ;;
936
])# _LT_AC_TRY_DLOPEN_SELF
938
# AC_LIBTOOL_DLOPEN_SELF
939
# -------------------
940
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
941
[if test "x$enable_dlopen" != xyes; then
942
enable_dlopen=unknown
943
enable_dlopen_self=unknown
944
enable_dlopen_self_static=unknown
951
lt_cv_dlopen="load_add_on"
953
lt_cv_dlopen_self=yes
956
cygwin* | mingw* | pw32*)
957
lt_cv_dlopen="LoadLibrary"
962
AC_CHECK_FUNC([shl_load],
963
[lt_cv_dlopen="shl_load"],
964
[AC_CHECK_LIB([dld], [shl_load],
965
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
966
[AC_CHECK_FUNC([dlopen],
967
[lt_cv_dlopen="dlopen"],
968
[AC_CHECK_LIB([dl], [dlopen],
969
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
970
[AC_CHECK_LIB([svld], [dlopen],
971
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
972
[AC_CHECK_LIB([dld], [dld_link],
973
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
982
if test "x$lt_cv_dlopen" != xno; then
988
case $lt_cv_dlopen in
990
save_CPPFLAGS="$CPPFLAGS"
991
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
992
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
994
save_LDFLAGS="$LDFLAGS"
995
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
998
LIBS="$lt_cv_dlopen_libs $LIBS"
1000
AC_CACHE_CHECK([whether a program can dlopen itself],
1001
lt_cv_dlopen_self, [dnl
1002
_LT_AC_TRY_DLOPEN_SELF(
1003
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1004
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1007
if test "x$lt_cv_dlopen_self" = xyes; then
1008
LDFLAGS="$LDFLAGS $link_static_flag"
1009
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1010
lt_cv_dlopen_self_static, [dnl
1011
_LT_AC_TRY_DLOPEN_SELF(
1012
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1013
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1017
CPPFLAGS="$save_CPPFLAGS"
1018
LDFLAGS="$save_LDFLAGS"
1023
case $lt_cv_dlopen_self in
1024
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1025
*) enable_dlopen_self=unknown ;;
1028
case $lt_cv_dlopen_self_static in
1029
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1030
*) enable_dlopen_self_static=unknown ;;
1033
])# AC_LIBTOOL_DLOPEN_SELF
1035
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1036
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1037
# Sed substitution that helps us do robust quoting. It backslashifies
1038
# metacharacters that are still active within double-quoted strings.
1039
Xsed='sed -e s/^X//'
1040
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1042
# Same as above, but do not quote variable references.
1043
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1045
# Sed substitution to delay expansion of an escaped shell variable in a
1046
# double_quote_subst'ed string.
1047
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1053
default_ofile=libtool
1054
can_build_shared=yes
1056
# All known linkers require a `.a' archive for static linking (except M$VC,
1057
# which needs '.lib').
1059
ltmain="$ac_aux_dir/ltmain.sh"
1060
ofile="$default_ofile"
1061
with_gnu_ld="$lt_cv_prog_gnu_ld"
1062
need_locks="$enable_libtool_lock"
1065
old_CFLAGS="$CFLAGS"
1067
# Set sane defaults for various variables
1068
test -z "$AR" && AR=ar
1069
test -z "$AR_FLAGS" && AR_FLAGS=cru
1070
test -z "$AS" && AS=as
1071
test -z "$CC" && CC=cc
1072
test -z "$DLLTOOL" && DLLTOOL=dlltool
1073
test -z "$LD" && LD=ld
1074
test -z "$LN_S" && LN_S="ln -s"
1075
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1076
test -z "$NM" && NM=nm
1077
test -z "$OBJDUMP" && OBJDUMP=objdump
1078
test -z "$RANLIB" && RANLIB=:
1079
test -z "$STRIP" && STRIP=:
1080
test -z "$ac_objext" && ac_objext=o
1082
if test x"$host" != x"$build"; then
1083
ac_tool_prefix=${host_alias}-
1088
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1091
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1096
# AIX sometimes has problems with the GCC collect2 program. For some
1097
# reason, if we set the COLLECT_NAMES environment variable, the problems
1098
# vanish in a puff of smoke.
1099
if test "X${COLLECT_NAMES+set}" != Xset; then
1101
export COLLECT_NAMES
1106
# Determine commands to create old-style static archives.
1107
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1108
old_postinstall_cmds='chmod 644 $oldlib'
1109
old_postuninstall_cmds=
1111
if test -n "$RANLIB"; then
1114
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1117
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1120
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1123
# Allow CC to be a program name with arguments.
1127
AC_MSG_CHECKING([for objdir])
1128
rm -f .libs 2>/dev/null
1129
mkdir .libs 2>/dev/null
1130
if test -d .libs; then
1133
# MS-DOS does not allow filenames that begin with a dot.
1136
rmdir .libs 2>/dev/null
1137
AC_MSG_RESULT($objdir)
1141
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1142
pic_mode="$withval", pic_mode=default)
1143
test -z "$pic_mode" && pic_mode=default
1145
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1146
# in isolation, and that seeing it set (from the cache) indicates that
1147
# the associated values are set (in the cache) correctly too.
1148
AC_MSG_CHECKING([for $compiler option to produce PIC])
1149
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1150
[ lt_cv_prog_cc_pic=
1151
lt_cv_prog_cc_shlib=
1153
lt_cv_prog_cc_static=
1154
lt_cv_prog_cc_no_builtin=
1155
lt_cv_prog_cc_can_build_shared=$can_build_shared
1157
if test "$GCC" = yes; then
1158
lt_cv_prog_cc_wl='-Wl,'
1159
lt_cv_prog_cc_static='-static'
1163
# Below there is a dirty hack to force normal static linking with -ldl
1164
# The problem is because libdl dynamically linked with both libc and
1165
# libC (AIX C++ library), which obviously doesn't included in libraries
1166
# list by gcc. This cause undefined symbols with -static flags.
1167
# This hack allows C programs to be linked with "-static -ldl", but
1168
# not sure about C++ programs.
1169
lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1172
# FIXME: we need at least 68020 code to build shared libraries, but
1173
# adding the `-m68020' flag to GCC prevents building anything better,
1175
lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1177
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1178
# PIC is the default for these OSes.
1180
darwin* | rhapsody*)
1181
# PIC is the default on this platform
1182
# Common symbols not allowed in MH_DYLIB files
1183
lt_cv_prog_cc_pic='-fno-common'
1185
cygwin* | mingw* | pw32* | os2*)
1186
# This hack is so that the source file can tell whether it is being
1187
# built for inclusion in a dll (and should export symbols for example).
1188
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1191
if test -d /usr/nec; then
1192
lt_cv_prog_cc_pic=-Kconform_pic
1196
lt_cv_prog_cc_pic='-fPIC'
1200
# PORTME Check for PIC flags for the system compiler.
1202
aix3* | aix4* | aix5*)
1203
lt_cv_prog_cc_wl='-Wl,'
1204
# All AIX code is PIC.
1205
if test "$host_cpu" = ia64; then
1206
# AIX 5 now supports IA64 processor
1207
lt_cv_prog_cc_static='-Bstatic'
1209
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1213
hpux9* | hpux10* | hpux11*)
1214
# Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1215
lt_cv_prog_cc_wl='-Wl,'
1216
lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1217
lt_cv_prog_cc_pic='+Z'
1221
lt_cv_prog_cc_wl='-Wl,'
1222
lt_cv_prog_cc_static='-non_shared'
1223
# PIC (with -KPIC) is the default.
1226
cygwin* | mingw* | pw32* | os2*)
1227
# This hack is so that the source file can tell whether it is being
1228
# built for inclusion in a dll (and should export symbols for example).
1229
lt_cv_prog_cc_pic='-DDLL_EXPORT'
1233
lt_cv_prog_cc_pic='-KPIC'
1234
lt_cv_prog_cc_static='-Bstatic'
1237
osf3* | osf4* | osf5*)
1238
# All OSF/1 code is PIC.
1239
lt_cv_prog_cc_wl='-Wl,'
1240
lt_cv_prog_cc_static='-non_shared'
1244
lt_cv_prog_cc_pic='-Kpic'
1245
lt_cv_prog_cc_static='-dn'
1246
lt_cv_prog_cc_shlib='-belf'
1250
lt_cv_prog_cc_pic='-KPIC'
1251
lt_cv_prog_cc_static='-Bstatic'
1252
lt_cv_prog_cc_wl='-Wl,'
1256
lt_cv_prog_cc_pic='-PIC'
1257
lt_cv_prog_cc_static='-Bstatic'
1258
lt_cv_prog_cc_wl='-Qoption ld '
1261
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1262
lt_cv_prog_cc_pic='-KPIC'
1263
lt_cv_prog_cc_static='-Bstatic'
1264
if test "x$host_vendor" = xsni; then
1265
lt_cv_prog_cc_wl='-LD'
1267
lt_cv_prog_cc_wl='-Wl,'
1272
lt_cv_prog_cc_pic='-pic'
1273
lt_cv_prog_cc_static='-Bstatic'
1277
if test -d /usr/nec ;then
1278
lt_cv_prog_cc_pic='-Kconform_pic'
1279
lt_cv_prog_cc_static='-Bstatic'
1284
lt_cv_prog_cc_can_build_shared=no
1289
if test -z "$lt_cv_prog_cc_pic"; then
1290
AC_MSG_RESULT([none])
1292
AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1294
# Check to make sure the pic_flag actually works.
1295
AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1296
AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1297
save_CFLAGS="$CFLAGS"
1298
CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1299
AC_TRY_COMPILE([], [], [dnl
1301
hpux9* | hpux10* | hpux11*)
1302
# On HP-UX, both CC and GCC only warn that PIC is supported... then
1303
# they create non-PIC objects. So, if there were any warnings, we
1304
# assume that PIC is not supported.
1305
if test -s conftest.err; then
1306
lt_cv_prog_cc_pic_works=no
1308
lt_cv_prog_cc_pic_works=yes
1312
lt_cv_prog_cc_pic_works=yes
1316
lt_cv_prog_cc_pic_works=no
1318
CFLAGS="$save_CFLAGS"
1321
if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1323
lt_cv_prog_cc_can_build_shared=no
1325
lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1328
AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1331
# Check for any special shared library compilation flags.
1332
if test -n "$lt_cv_prog_cc_shlib"; then
1333
AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1334
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1336
AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1337
lt_cv_prog_cc_can_build_shared=no
1341
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1342
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1343
lt_cv_prog_cc_static_works=no
1344
save_LDFLAGS="$LDFLAGS"
1345
LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1346
AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1347
LDFLAGS="$save_LDFLAGS"
1350
# Belt *and* braces to stop my trousers falling down:
1351
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1352
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1354
pic_flag="$lt_cv_prog_cc_pic"
1355
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1356
wl="$lt_cv_prog_cc_wl"
1357
link_static_flag="$lt_cv_prog_cc_static"
1358
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1359
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1362
# Check to see if options -o and -c are simultaneously supported by compiler
1363
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1364
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1365
$rm -r conftest 2>/dev/null
1368
echo "int some_variable = 0;" > conftest.$ac_ext
1370
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1371
# that will create temporary files in the current directory regardless of
1372
# the output directory. Thus, making CWD read-only will cause this test
1373
# to fail, enabling locking or at least warning the user not to do parallel
1376
save_CFLAGS="$CFLAGS"
1377
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1379
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1380
# The compiler can only warn and ignore the option if not recognized
1381
# So say no if there are warnings
1382
if test -s out/conftest.err; then
1383
lt_cv_compiler_c_o=no
1385
lt_cv_compiler_c_o=yes
1388
# Append any errors to the config.log.
1389
cat out/conftest.err 1>&AC_FD_CC
1390
lt_cv_compiler_c_o=no
1392
CFLAGS="$save_CFLAGS"
1398
$rm -r conftest 2>/dev/null
1400
compiler_c_o=$lt_cv_compiler_c_o
1401
AC_MSG_RESULT([$compiler_c_o])
1403
if test x"$compiler_c_o" = x"yes"; then
1404
# Check to see if we can write to a .lo
1405
AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1406
AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1407
lt_cv_compiler_o_lo=no
1408
save_CFLAGS="$CFLAGS"
1409
CFLAGS="$CFLAGS -c -o conftest.lo"
1410
save_objext="$ac_objext"
1412
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1413
# The compiler can only warn and ignore the option if not recognized
1414
# So say no if there are warnings
1415
if test -s conftest.err; then
1416
lt_cv_compiler_o_lo=no
1418
lt_cv_compiler_o_lo=yes
1421
ac_objext="$save_objext"
1422
CFLAGS="$save_CFLAGS"
1424
compiler_o_lo=$lt_cv_compiler_o_lo
1425
AC_MSG_RESULT([$compiler_o_lo])
1430
# Check to see if we can do hard links to lock some files if needed
1431
hard_links="nottested"
1432
if test "$compiler_c_o" = no && test "$need_locks" != no; then
1433
# do not overwrite the value of need_locks provided by the user
1434
AC_MSG_CHECKING([if we can lock with hard links])
1437
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1439
ln conftest.a conftest.b 2>&5 || hard_links=no
1440
ln conftest.a conftest.b 2>/dev/null && hard_links=no
1441
AC_MSG_RESULT([$hard_links])
1442
if test "$hard_links" = no; then
1443
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1450
if test "$GCC" = yes; then
1451
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1452
AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1453
echo "int some_variable = 0;" > conftest.$ac_ext
1454
save_CFLAGS="$CFLAGS"
1455
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1456
compiler_rtti_exceptions=no
1457
AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1458
# The compiler can only warn and ignore the option if not recognized
1459
# So say no if there are warnings
1460
if test -s conftest.err; then
1461
compiler_rtti_exceptions=no
1463
compiler_rtti_exceptions=yes
1466
CFLAGS="$save_CFLAGS"
1467
AC_MSG_RESULT([$compiler_rtti_exceptions])
1469
if test "$compiler_rtti_exceptions" = "yes"; then
1470
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1472
no_builtin_flag=' -fno-builtin'
1476
# See if the linker supports building shared libraries.
1477
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1479
allow_undefined_flag=
1481
need_lib_prefix=unknown
1482
need_version=unknown
1483
# when you set need_version to no, make sure it does not cause -set_version
1484
# flags to be left without arguments
1486
archive_expsym_cmds=
1487
old_archive_from_new_cmds=
1488
old_archive_from_expsyms_cmds=
1489
export_dynamic_flag_spec=
1490
whole_archive_flag_spec=
1491
thread_safe_flag_spec=
1492
hardcode_into_libs=no
1493
hardcode_libdir_flag_spec=
1494
hardcode_libdir_separator=
1497
hardcode_shlibpath_var=unsupported
1499
link_all_deplibs=unknown
1500
always_export_symbols=no
1501
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1502
# include_expsyms should be a list of space-separated symbols to be *always*
1503
# included in the symbol list
1505
# exclude_expsyms can be an egrep regular expression of symbols to exclude
1506
# it will be wrapped by ` (' and `)$', so one must not match beginning or
1507
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1508
# as well as any symbol that contains `d'.
1509
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1510
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1511
# platforms (ab)use it in PIC code, but their linkers get confused if
1512
# the symbol is explicitly referenced. Since portable code cannot
1513
# rely on this symbol name, it's probably fine to never include it in
1514
# preloaded symbol tables.
1515
extract_expsyms_cmds=
1518
cygwin* | mingw* | pw32*)
1519
# FIXME: the MSVC++ port hasn't been tested in a loooong time
1520
# When not using gcc, we currently assume that we are using
1521
# Microsoft Visual C++.
1522
if test "$GCC" != yes; then
1532
if test "$with_gnu_ld" = yes; then
1533
# If archive_cmds runs LD, not CC, wlarc should be empty
1536
# See if GNU ld supports shared libraries.
1538
aix3* | aix4* | aix5*)
1539
# On AIX, the GNU linker is very broken
1540
# Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1544
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1545
*** to be unable to reliably create shared libraries on AIX.
1546
*** Therefore, libtool is disabling shared libraries support. If you
1547
*** really care for shared libraries, you may want to modify your PATH
1548
*** so that a non-GNU linker is found, and then restart.
1554
archive_cmds='$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)'
1555
hardcode_libdir_flag_spec='-L$libdir'
1556
hardcode_minus_L=yes
1558
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1559
# that the semantics of dynamic libraries on AmigaOS, at least up
1560
# to version 4, is to share data among multiple programs linked
1561
# with the same dynamic library. Since this doesn't match the
1562
# behavior of shared libraries on other platforms, we can use
1568
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1569
allow_undefined_flag=unsupported
1570
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1571
# support --undefined. This deserves some investigation. FIXME
1572
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1578
cygwin* | mingw* | pw32*)
1579
# hardcode_libdir_flag_spec is actually meaningless, as there is
1580
# no search path for DLLs.
1581
hardcode_libdir_flag_spec='-L$libdir'
1582
allow_undefined_flag=unsupported
1583
always_export_symbols=yes
1585
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1586
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1587
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1588
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1589
else $CC -o impgen impgen.c ; fi)~
1590
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1592
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1594
# cygwin and mingw dlls have different entry points and sets of symbols
1596
# FIXME: what about values for MSVC?
1597
dll_entry=__cygwin_dll_entry@12
1598
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1602
dll_entry=_DllMainCRTStartup@12
1603
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1607
# mingw and cygwin differ, and it's simplest to just exclude the union
1608
# of the two symbol sets.
1609
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1611
# recent cygwin and mingw systems supply a stub DllMain which the user
1612
# can override, but on older systems we have to supply one (in ltdll.c)
1613
if test "x$lt_cv_need_dllmain" = "xyes"; then
1614
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1615
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~
1616
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1622
# Extract the symbol export list from an `--export-all' def file,
1623
# then regenerate the def file from the symbol export list, so that
1624
# the compiled dll only exports the symbol export list.
1625
# Be careful not to strip the DATA tag left be newer dlltools.
1626
export_symbols_cmds="$ltdll_cmds"'
1627
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1628
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1630
# If the export-symbols file already is a .def file (1st line
1631
# is EXPORTS), use it as is.
1632
# If DATA tags from a recent dlltool are present, honour them!
1633
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1634
cp $export_symbols $output_objdir/$soname-def;
1636
echo EXPORTS > $output_objdir/$soname-def;
1638
cat $export_symbols | while read symbol; do
1641
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1642
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1644
_lt_hint=`expr 1 + \$_lt_hint`;
1648
$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~
1649
$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~
1650
$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~
1651
$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~
1652
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1656
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1657
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1660
archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1661
archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1666
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1670
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1671
*** create shared libraries on Solaris systems. Therefore, libtool
1672
*** is disabling shared libraries support. We urge you to upgrade GNU
1673
*** binutils to release 2.9.1 or newer. Another option is to modify
1674
*** your PATH or compiler configuration so that the native linker is
1675
*** used, and then restart.
1678
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1679
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1680
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1687
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1690
hardcode_shlibpath_var=no
1694
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1695
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1696
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1703
if test "$ld_shlibs" = yes; then
1704
runpath_var=LD_RUN_PATH
1705
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1706
export_dynamic_flag_spec='${wl}--export-dynamic'
1708
cygwin* | mingw* | pw32*)
1709
# dlltool doesn't understand --whole-archive et. al.
1710
whole_archive_flag_spec=
1713
# ancient GNU ld didn't support --whole-archive et. al.
1714
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1715
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1717
whole_archive_flag_spec=
1723
# PORTME fill in a description of your system's linker (not GNU ld)
1726
allow_undefined_flag=unsupported
1727
always_export_symbols=yes
1728
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1729
# Note: this linker hardcodes the directories in LIBPATH if there
1730
# are no directories specified by -L.
1731
hardcode_minus_L=yes
1732
if test "$GCC" = yes && test -z "$link_static_flag"; then
1733
# Neither direct hardcoding nor static linking is supported with a
1735
hardcode_direct=unsupported
1740
if test "$host_cpu" = ia64; then
1741
# On IA64, the linker does run time linking by default, so we don't
1742
# have to do anything special.
1743
aix_use_runtimelinking=no
1744
exp_sym_flag='-Bexport'
1747
aix_use_runtimelinking=no
1749
# Test if we are trying to use run time linking or normal
1750
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
1751
# need to do runtime linking.
1752
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1753
for ld_flag in $LDFLAGS; do
1754
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1755
aix_use_runtimelinking=yes
1761
exp_sym_flag='-bexport'
1762
no_entry_flag='-bnoentry'
1765
# When large executables or shared objects are built, AIX ld can
1766
# have problems creating the table of contents. If linking a library
1767
# or program results in "error TOC overflow" add -mminimal-toc to
1768
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1769
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1773
hardcode_libdir_separator=':'
1774
if test "$GCC" = yes; then
1775
case $host_os in aix4.[[012]]|aix4.[[012]].*)
1776
collect2name=`${CC} -print-prog-name=collect2`
1777
if test -f "$collect2name" && \
1778
strings "$collect2name" | grep resolve_lib_name >/dev/null
1780
# We have reworked collect2
1783
# We have old collect2
1784
hardcode_direct=unsupported
1785
# It fails to find uninstalled libraries when the uninstalled
1786
# path is not listed in the libpath. Setting hardcode_minus_L
1787
# to unsupported forces relinking
1788
hardcode_minus_L=yes
1789
hardcode_libdir_flag_spec='-L$libdir'
1790
hardcode_libdir_separator=
1794
shared_flag='-shared'
1797
if test "$host_cpu" = ia64; then
1798
shared_flag='${wl}-G'
1800
if test "$aix_use_runtimelinking" = yes; then
1801
shared_flag='${wl}-G'
1803
shared_flag='${wl}-bM:SRE'
1808
# It seems that -bexpall can do strange things, so it is better to
1809
# generate a list of symbols to export.
1810
always_export_symbols=yes
1811
if test "$aix_use_runtimelinking" = yes; then
1812
# Warning - without using the other runtime loading flags (-brtl),
1813
# -berok will link without error, but may produce a broken library.
1814
allow_undefined_flag='-berok'
1815
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1816
archive_expsym_cmds="\$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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1818
if test "$host_cpu" = ia64; then
1819
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1820
allow_undefined_flag="-z nodefs"
1821
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1823
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1824
# Warning - without using the other run time loading flags,
1825
# -berok will link without error, but may produce a broken library.
1826
allow_undefined_flag='${wl}-berok'
1827
# This is a bit strange, but is similar to how AIX traditionally builds
1828
# it's shared libraries.
1829
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
1835
archive_cmds='$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)'
1836
hardcode_libdir_flag_spec='-L$libdir'
1837
hardcode_minus_L=yes
1838
# see comment about different semantics on the GNU ld section
1842
cygwin* | mingw* | pw32*)
1843
# When not using gcc, we currently assume that we are using
1844
# Microsoft Visual C++.
1845
# hardcode_libdir_flag_spec is actually meaningless, as there is
1846
# no search path for DLLs.
1847
hardcode_libdir_flag_spec=' '
1848
allow_undefined_flag=unsupported
1849
# Tell ltmain to make .lib files, not .a files.
1851
# FIXME: Setting linknames here is a bad hack.
1852
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1853
# The linker will automatically build a .lib file if we build a DLL.
1854
old_archive_from_new_cmds='true'
1855
# FIXME: Should let the user specify the lib program.
1856
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1857
fix_srcfile_path='`cygpath -w "$srcfile"`'
1860
darwin* | rhapsody*)
1862
rhapsody* | darwin1.[[012]])
1863
allow_undefined_flag='-undefined suppress'
1866
allow_undefined_flag='-flat_namespace -undefined suppress'
1869
# FIXME: Relying on posixy $() will cause problems for
1870
# cross-compilation, but unfortunately the echo tests do not
1871
# yet detect zsh echo's removal of \ escapes.
1872
archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
1873
# We need to add '_' to the symbols in $export_symbols first
1874
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1876
hardcode_shlibpath_var=no
1877
whole_archive_flag_spec='-all_load $convenience'
1884
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1885
# support. Future versions do this automatically, but an explicit c++rt0.o
1886
# does not break anything, and helps significantly (at the cost of a little
1889
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1890
hardcode_libdir_flag_spec='-R$libdir'
1892
hardcode_shlibpath_var=no
1895
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
1897
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1899
hardcode_minus_L=yes
1900
hardcode_shlibpath_var=no
1903
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1905
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1906
hardcode_libdir_flag_spec='-R$libdir'
1908
hardcode_shlibpath_var=no
1911
hpux9* | hpux10* | hpux11*)
1913
hpux9*) archive_cmds='$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' ;;
1914
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1916
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1917
hardcode_libdir_separator=:
1919
hardcode_minus_L=yes # Not in the search PATH, but as the default
1920
# location of the library.
1921
export_dynamic_flag_spec='${wl}-E'
1925
if test "$GCC" = yes; then
1926
archive_cmds='$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'
1928
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1930
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1931
hardcode_libdir_separator=:
1932
link_all_deplibs=yes
1936
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1937
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1939
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1941
hardcode_libdir_flag_spec='-R$libdir'
1943
hardcode_shlibpath_var=no
1947
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1949
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1950
hardcode_libdir_separator=:
1951
hardcode_shlibpath_var=no
1956
hardcode_shlibpath_var=no
1957
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1958
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
1959
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1960
export_dynamic_flag_spec='${wl}-E'
1963
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1964
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1965
hardcode_libdir_flag_spec='-R$libdir'
1968
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
1969
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1976
hardcode_libdir_flag_spec='-L$libdir'
1977
hardcode_minus_L=yes
1978
allow_undefined_flag=unsupported
1979
archive_cmds='$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'
1980
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1984
if test "$GCC" = yes; then
1985
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1986
archive_cmds='$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'
1988
allow_undefined_flag=' -expect_unresolved \*'
1989
archive_cmds='$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'
1991
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1992
hardcode_libdir_separator=:
1995
osf4* | osf5*) # as osf3* with the addition of -msym flag
1996
if test "$GCC" = yes; then
1997
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1998
archive_cmds='$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'
1999
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2001
allow_undefined_flag=' -expect_unresolved \*'
2002
archive_cmds='$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'
2003
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2004
$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'
2006
#Both c and cxx compiler support -rpath directly
2007
hardcode_libdir_flag_spec='-rpath $libdir'
2009
hardcode_libdir_separator=:
2013
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2014
hardcode_shlibpath_var=no
2015
runpath_var=LD_RUN_PATH
2016
hardcode_runpath_var=yes
2017
export_dynamic_flag_spec='${wl}-Bexport'
2021
# gcc --version < 3.0 without binutils cannot create self contained
2022
# shared libraries reliably, requiring libgcc.a to resolve some of
2023
# the object symbols generated in some cases. Libraries that use
2024
# assert need libgcc.a to resolve __eprintf, for example. Linking
2025
# a copy of libgcc.a into every shared library to guarantee resolving
2026
# such symbols causes other problems: According to Tim Van Holder
2027
# <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2028
# (to the application) exception stack for one thing.
2029
no_undefined_flag=' -z defs'
2030
if test "$GCC" = yes; then
2031
case `$CC --version 2>/dev/null` in
2035
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2036
*** create self contained shared libraries on Solaris systems, without
2037
*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2038
*** -no-undefined support, which will at least allow you to build shared
2039
*** libraries. However, you may find that when you link such libraries
2040
*** into an application without using GCC, you have to manually add
2041
*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2042
*** upgrade to a newer version of GCC. Another option is to rebuild your
2043
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2050
# $CC -shared without GNU ld will not create a library from C++
2051
# object files and a static libstdc++, better avoid it by now
2052
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2053
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2054
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2055
hardcode_libdir_flag_spec='-R$libdir'
2056
hardcode_shlibpath_var=no
2058
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2059
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
2060
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2062
link_all_deplibs=yes
2066
if test "x$host_vendor" = xsequent; then
2067
# Use $CC to link under sequent, because it throws in some extra .o
2068
# files that make .init and .fini sections work.
2069
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2071
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2073
hardcode_libdir_flag_spec='-L$libdir'
2075
hardcode_minus_L=yes
2076
hardcode_shlibpath_var=no
2080
if test "x$host_vendor" = xsno; then
2081
archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2082
hardcode_direct=yes # is this really true???
2084
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2085
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2087
runpath_var='LD_RUN_PATH'
2088
hardcode_shlibpath_var=no
2092
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2093
hardcode_shlibpath_var=no
2094
export_dynamic_flag_spec='-Bexport'
2098
no_undefined_flag=' -z text'
2099
# $CC -shared without GNU ld will not create a library from C++
2100
# object files and a static libstdc++, better avoid it by now
2101
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2102
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2103
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2104
hardcode_libdir_flag_spec=
2105
hardcode_shlibpath_var=no
2106
runpath_var='LD_RUN_PATH'
2110
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2111
hardcode_libdir_flag_spec='-L$libdir'
2112
hardcode_shlibpath_var=no
2116
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2117
hardcode_libdir_flag_spec='-L$libdir'
2118
hardcode_shlibpath_var=no
2122
if test -d /usr/nec; then
2123
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2124
hardcode_shlibpath_var=no
2125
runpath_var=LD_RUN_PATH
2126
hardcode_runpath_var=yes
2132
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2135
hardcode_shlibpath_var=no
2136
hardcode_runpath_var=yes
2137
runpath_var=LD_RUN_PATH
2140
sysv5uw7* | unixware7*)
2141
no_undefined_flag='${wl}-z ${wl}text'
2142
if test "$GCC" = yes; then
2143
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2145
archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2147
runpath_var='LD_RUN_PATH'
2148
hardcode_shlibpath_var=no
2156
AC_MSG_RESULT([$ld_shlibs])
2157
test "$ld_shlibs" = no && can_build_shared=no
2159
# Check hardcoding attributes.
2160
AC_MSG_CHECKING([how to hardcode library paths into programs])
2162
if test -n "$hardcode_libdir_flag_spec" || \
2163
test -n "$runpath_var"; then
2165
# We can hardcode non-existant directories.
2166
if test "$hardcode_direct" != no &&
2167
# If the only mechanism to avoid hardcoding is shlibpath_var, we
2168
# have to relink, otherwise we might link with an installed library
2169
# when we should be linking with a yet-to-be-installed one
2170
## test "$hardcode_shlibpath_var" != no &&
2171
test "$hardcode_minus_L" != no; then
2172
# Linking always hardcodes the temporary library directory.
2173
hardcode_action=relink
2175
# We can link without hardcoding, and we can hardcode nonexisting dirs.
2176
hardcode_action=immediate
2179
# We cannot hardcode anything, or else we can only hardcode existing
2181
hardcode_action=unsupported
2183
AC_MSG_RESULT([$hardcode_action])
2187
AC_MSG_CHECKING([whether stripping libraries is possible])
2188
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2189
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2190
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2191
AC_MSG_RESULT([yes])
2196
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2197
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2199
# PORTME Fill in your ld.so characteristics
2200
AC_MSG_CHECKING([dynamic linker characteristics])
2202
libname_spec='lib$name'
2209
shlibpath_overrides_runpath=unknown
2211
dynamic_linker="$host_os ld.so"
2212
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
2213
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
2218
library_names_spec='${libname}${release}.so$versuffix $libname.a'
2219
shlibpath_var=LIBPATH
2221
# AIX has no versioning support, so we append a major version to the name.
2222
soname_spec='${libname}${release}.so$major'
2227
if test "$host_cpu" = ia64; then
2228
# AIX 5 supports IA64
2229
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2230
shlibpath_var=LD_LIBRARY_PATH
2232
# With GCC up to 2.95.x, collect2 would create an import file
2233
# for dependence libraries. The import file would start with
2234
# the line `#! .'. This would cause the generated library to
2235
# depend on `.', always an invalid library. This was fixed in
2236
# development snapshots of GCC prior to 3.0.
2238
aix4 | aix4.[[01]] | aix4.[[01]].*)
2239
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2241
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2248
# AIX (on Power*) has no versioning support, so currently we can
2249
# not hardcode correct soname into executable. Probably we can
2250
# add versioning support to collect2, so additional links can
2251
# be useful in future.
2252
if test "$aix_use_runtimelinking" = yes; then
2253
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
2254
# instead of lib<name>.a to let people know that these are not
2255
# typical AIX shared libraries.
2256
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2258
# We preserve .a as extension for shared libraries through AIX4.2
2259
# and later when we are not doing run time linking.
2260
library_names_spec='${libname}${release}.a $libname.a'
2261
soname_spec='${libname}${release}.so$major'
2263
shlibpath_var=LIBPATH
2268
library_names_spec='$libname.ixlibrary $libname.a'
2269
# Create ${libname}_ixlibrary.a entries in /sys/libs.
2270
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'
2274
library_names_spec='${libname}.so'
2275
dynamic_linker="$host_os ld.so"
2276
shlibpath_var=LIBRARY_PATH
2282
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2283
soname_spec='${libname}${release}.so$major'
2284
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2285
shlibpath_var=LD_LIBRARY_PATH
2286
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2287
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2288
export_dynamic_flag_spec=-rdynamic
2289
# the default ld.so.conf also contains /usr/contrib/lib and
2290
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2291
# libtool to hard-code these into programs
2294
cygwin* | mingw* | pw32*)
2295
version_type=windows
2298
case $GCC,$host_os in
2300
library_names_spec='$libname.dll.a'
2301
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2302
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2303
dldir=$destdir/`dirname \$dlpath`~
2304
test -d \$dldir || mkdir -p \$dldir~
2305
$install_prog .libs/$dlname \$dldir/$dlname'
2306
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2307
dlpath=$dir/\$dldll~
2311
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2312
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2315
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2318
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2321
dynamic_linker='Win32 ld.exe'
2322
# FIXME: first we should search . and the directory the executable is in
2326
darwin* | rhapsody*)
2327
dynamic_linker="$host_os dyld"
2331
# FIXME: Relying on posixy $() will cause problems for
2332
# cross-compilation, but unfortunately the echo tests do not
2333
# yet detect zsh echo's removal of \ escapes.
2334
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)'
2335
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2336
shlibpath_overrides_runpath=yes
2337
shlibpath_var=DYLD_LIBRARY_PATH
2345
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2346
version_type=freebsd-$objformat
2347
case $version_type in
2349
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2354
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2358
shlibpath_var=LD_LIBRARY_PATH
2361
shlibpath_overrides_runpath=yes
2364
shlibpath_overrides_runpath=no
2365
hardcode_into_libs=yes
2374
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2375
soname_spec='${libname}${release}.so$major'
2376
shlibpath_var=LD_LIBRARY_PATH
2377
hardcode_into_libs=yes
2380
hpux9* | hpux10* | hpux11*)
2381
# Give a soname corresponding to the major version so that dld.sl refuses to
2382
# link against other versions.
2383
dynamic_linker="$host_os dld.sl"
2387
shlibpath_var=SHLIB_PATH
2388
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2389
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2390
soname_spec='${libname}${release}.sl$major'
2391
# HP-UX runs *really* slowly unless shared libraries are mode 555.
2392
postinstall_cmds='chmod 555 $lib'
2399
soname_spec='${libname}${release}.so$major'
2400
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2406
case $LD in # libtool.m4 will add one of these switches to LD
2407
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2408
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2409
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2410
*) libsuff= shlibsuff= libmagic=never-match;;
2414
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2415
shlibpath_overrides_runpath=no
2416
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2417
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2420
# No shared lib support for Linux oldld, aout, or coff.
2421
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2425
# This must be Linux ELF.
2430
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2431
soname_spec='${libname}${release}.so$major'
2432
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2433
shlibpath_var=LD_LIBRARY_PATH
2434
shlibpath_overrides_runpath=no
2435
# This implies no fast_install, which is unacceptable.
2436
# Some rework will be needed to allow for fast_install
2437
# before this can be enabled.
2438
hardcode_into_libs=yes
2440
# We used to test for /lib/ld.so.1 and disable shared libraries on
2441
# powerpc, because MkLinux only supported shared libraries with the
2442
# GNU dynamic linker. Since this was broken with cross compilers,
2443
# most powerpc-linux boxes support dynamic linking these days and
2444
# people can always --disable-shared, the test was removed, and we
2445
# assume the GNU/Linux dynamic linker is in use.
2446
dynamic_linker='GNU/Linux ld.so'
2453
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2454
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2455
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2456
dynamic_linker='NetBSD (a.out) ld.so'
2458
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2459
soname_spec='${libname}${release}.so$major'
2460
dynamic_linker='NetBSD ld.elf_so'
2462
shlibpath_var=LD_LIBRARY_PATH
2463
shlibpath_overrides_runpath=yes
2464
hardcode_into_libs=yes
2469
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2470
shlibpath_var=LD_LIBRARY_PATH
2471
shlibpath_overrides_runpath=yes
2478
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2480
openbsd2.[[89]] | openbsd2.[[89]].*)
2481
shlibpath_overrides_runpath=no
2484
shlibpath_overrides_runpath=yes
2488
shlibpath_overrides_runpath=yes
2490
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2491
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2492
shlibpath_var=LD_LIBRARY_PATH
2496
libname_spec='$name'
2498
library_names_spec='$libname.dll $libname.a'
2499
dynamic_linker='OS/2 ld.exe'
2500
shlibpath_var=LIBPATH
2503
osf3* | osf4* | osf5*)
2506
soname_spec='${libname}${release}.so'
2507
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2508
shlibpath_var=LD_LIBRARY_PATH
2509
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2510
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2515
soname_spec='${libname}${release}.so$major'
2516
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2517
shlibpath_var=LD_LIBRARY_PATH
2524
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2525
soname_spec='${libname}${release}.so$major'
2526
shlibpath_var=LD_LIBRARY_PATH
2527
shlibpath_overrides_runpath=yes
2528
hardcode_into_libs=yes
2529
# ldd complains unless libraries are executable
2530
postinstall_cmds='chmod +x $lib'
2535
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2536
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2537
shlibpath_var=LD_LIBRARY_PATH
2538
shlibpath_overrides_runpath=yes
2539
if test "$with_gnu_ld" = yes; then
2545
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2547
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2548
soname_spec='${libname}${release}.so$major'
2549
shlibpath_var=LD_LIBRARY_PATH
2550
case $host_vendor in
2552
shlibpath_overrides_runpath=no
2557
shlibpath_overrides_runpath=no
2558
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2565
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2566
soname_spec='${libname}${release}.so$major'
2567
shlibpath_var=LD_LIBRARY_PATH
2574
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2575
soname_spec='${libname}${release}.so$major'
2576
shlibpath_var=LD_LIBRARY_PATH
2580
if test -d /usr/nec ;then
2582
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2583
soname_spec='$libname.so.$major'
2584
shlibpath_var=LD_LIBRARY_PATH
2592
AC_MSG_RESULT([$dynamic_linker])
2593
test "$dynamic_linker" = no && can_build_shared=no
2595
# Report the final consequences.
2596
AC_MSG_CHECKING([if libtool supports shared libraries])
2597
AC_MSG_RESULT([$can_build_shared])
2599
AC_MSG_CHECKING([whether to build shared libraries])
2600
test "$can_build_shared" = "no" && enable_shared=no
2602
# On AIX, shared libraries and static libraries use the same namespace, and
2603
# are all built from PIC.
2606
test "$enable_shared" = yes && enable_static=no
2607
if test -n "$RANLIB"; then
2608
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2609
postinstall_cmds='$RANLIB $lib'
2614
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2615
test "$enable_shared" = yes && enable_static=no
2619
AC_MSG_RESULT([$enable_shared])
2621
AC_MSG_CHECKING([whether to build static libraries])
2622
# Make sure either enable_shared or enable_static is yes.
2623
test "$enable_shared" = yes || enable_static=yes
2624
AC_MSG_RESULT([$enable_static])
2626
if test "$hardcode_action" = relink; then
2627
# Fast installation is not supported
2628
enable_fast_install=no
2629
elif test "$shlibpath_overrides_runpath" = yes ||
2630
test "$enable_shared" = no; then
2631
# Fast installation is not necessary
2632
enable_fast_install=needless
2635
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2636
if test "$GCC" = yes; then
2637
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2640
AC_LIBTOOL_DLOPEN_SELF
2642
if test "$enable_shared" = yes && test "$GCC" = yes; then
2643
case $archive_cmds in
2645
# FIXME: we may have to deal with multi-command sequences.
2648
# Test whether the compiler implicitly links with -lc since on some
2649
# systems, -lgcc has to come before -lc. If gcc already passes -lc
2650
# to ld, don't add -lc before -lgcc.
2651
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2652
AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2654
echo 'static int dummy;' > conftest.$ac_ext
2656
if AC_TRY_EVAL(ac_compile); then
2659
libobjs=conftest.$ac_objext
2661
wl=$lt_cv_prog_cc_wl
2667
save_allow_undefined_flag=$allow_undefined_flag
2668
allow_undefined_flag=
2669
if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2671
lt_cv_archive_cmds_need_lc=no
2673
lt_cv_archive_cmds_need_lc=yes
2675
allow_undefined_flag=$save_allow_undefined_flag
2677
cat conftest.err 1>&5
2679
AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2683
need_lc=${lt_cv_archive_cmds_need_lc-yes}
2685
# The second clause should only fire when bootstrapping the
2686
# libtool distribution, otherwise you forgot to ship ltmain.sh
2687
# with your package, and you will get complaints that there are
2688
# no rules to generate ltmain.sh.
2689
if test -f "$ltmain"; then
2692
# If there is no Makefile yet, we rely on a make rule to execute
2693
# `config.status --recheck' to rerun these tests and create the
2694
# libtool script then.
2695
test -f Makefile && make "$ltmain"
2698
if test -f "$ltmain"; then
2699
trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2702
echo creating $ofile
2704
# Now quote all the things that may contain metacharacters while being
2705
# careful not to overquote the AC_SUBSTed values. We take copies of the
2706
# variables and quote the copies for generation of the libtool script.
2707
for var in echo old_CC old_CFLAGS \
2708
AR AR_FLAGS CC LD LN_S NM SHELL \
2709
reload_flag reload_cmds wl \
2710
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2711
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2712
library_names_spec soname_spec \
2713
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2714
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2715
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2716
old_striplib striplib file_magic_cmd export_symbols_cmds \
2717
deplibs_check_method allow_undefined_flag no_undefined_flag \
2718
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2719
global_symbol_to_c_name_address \
2720
hardcode_libdir_flag_spec hardcode_libdir_separator \
2721
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2722
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2725
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2726
old_postinstall_cmds | old_postuninstall_cmds | \
2727
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2728
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2729
postinstall_cmds | postuninstall_cmds | \
2730
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2731
# Double-quote double-evaled strings.
2732
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2735
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2740
cat <<__EOF__ > "${ofile}T"
2743
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2744
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2745
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2747
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
2748
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2750
# This program is free software; you can redistribute it and/or modify
2751
# it under the terms of the GNU General Public License as published by
2752
# the Free Software Foundation; either version 2 of the License, or
2753
# (at your option) any later version.
2755
# This program is distributed in the hope that it will be useful, but
2756
# WITHOUT ANY WARRANTY; without even the implied warranty of
2757
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2758
# General Public License for more details.
2760
# You should have received a copy of the GNU General Public License
2761
# along with this program; if not, write to the Free Software
2762
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2764
# As a special exception to the GNU General Public License, if you
2765
# distribute this file as part of a program that contains a
2766
# configuration script generated by Autoconf, you may include it under
2767
# the same distribution terms that you use for the rest of that program.
2769
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2770
Xsed="sed -e s/^X//"
2772
# The HP-UX ksh and POSIX shell print the target directory to stdout
2774
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2776
# ### BEGIN LIBTOOL CONFIG
2778
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2780
# Shell to use when invoking shell scripts.
2783
# Whether or not to build shared libraries.
2784
build_libtool_libs=$enable_shared
2786
# Whether or not to build static libraries.
2787
build_old_libs=$enable_static
2789
# Whether or not to add -lc for building shared libraries.
2790
build_libtool_need_lc=$need_lc
2792
# Whether or not to optimize for fast installation.
2793
fast_install=$enable_fast_install
2796
host_alias=$host_alias
2799
# An echo program that does not interpret backslashes.
2804
AR_FLAGS=$lt_AR_FLAGS
2806
# The default C compiler.
2809
# Is the compiler the GNU C compiler?
2812
# The linker used to build libraries.
2815
# Whether we need hard or soft links.
2818
# A BSD-compatible nm program.
2821
# A symbol stripping program
2824
# Used to examine libraries when file_magic_cmd begins "file"
2825
MAGIC_CMD=$MAGIC_CMD
2827
# Used on cygwin: DLL creation program.
2830
# Used on cygwin: object dumper.
2833
# Used on cygwin: assembler.
2836
# The name of the directory that contains temporary libtool files.
2839
# How to create reloadable object files.
2840
reload_flag=$lt_reload_flag
2841
reload_cmds=$lt_reload_cmds
2843
# How to pass a linker flag through the compiler.
2846
# Object file suffix (normally "o").
2849
# Old archive suffix (normally "a").
2852
# Executable file suffix (normally "").
2855
# Additional compiler flags for building library objects.
2856
pic_flag=$lt_pic_flag
2859
# Does compiler simultaneously support -c and -o options?
2860
compiler_c_o=$lt_compiler_c_o
2862
# Can we write directly to a .lo ?
2863
compiler_o_lo=$lt_compiler_o_lo
2865
# Must we lock files when doing compilation ?
2866
need_locks=$lt_need_locks
2868
# Do we need the lib prefix for modules?
2869
need_lib_prefix=$need_lib_prefix
2871
# Do we need a version for libraries?
2872
need_version=$need_version
2874
# Whether dlopen is supported.
2875
dlopen_support=$enable_dlopen
2877
# Whether dlopen of programs is supported.
2878
dlopen_self=$enable_dlopen_self
2880
# Whether dlopen of statically linked programs is supported.
2881
dlopen_self_static=$enable_dlopen_self_static
2883
# Compiler flag to prevent dynamic linking.
2884
link_static_flag=$lt_link_static_flag
2886
# Compiler flag to turn off builtin functions.
2887
no_builtin_flag=$lt_no_builtin_flag
2889
# Compiler flag to allow reflexive dlopens.
2890
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2892
# Compiler flag to generate shared objects directly from archives.
2893
whole_archive_flag_spec=$lt_whole_archive_flag_spec
2895
# Compiler flag to generate thread-safe objects.
2896
thread_safe_flag_spec=$lt_thread_safe_flag_spec
2898
# Library versioning type.
2899
version_type=$version_type
2901
# Format of library name prefix.
2902
libname_spec=$lt_libname_spec
2904
# List of archive names. First name is the real one, the rest are links.
2905
# The last name is the one that the linker finds with -lNAME.
2906
library_names_spec=$lt_library_names_spec
2908
# The coded name of the library, if different from the real name.
2909
soname_spec=$lt_soname_spec
2911
# Commands used to build and install an old-style archive.
2913
old_archive_cmds=$lt_old_archive_cmds
2914
old_postinstall_cmds=$lt_old_postinstall_cmds
2915
old_postuninstall_cmds=$lt_old_postuninstall_cmds
2917
# Create an old-style archive from a shared archive.
2918
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
2920
# Create a temporary old-style archive to link instead of a shared archive.
2921
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
2923
# Commands used to build and install a shared archive.
2924
archive_cmds=$lt_archive_cmds
2925
archive_expsym_cmds=$lt_archive_expsym_cmds
2926
postinstall_cmds=$lt_postinstall_cmds
2927
postuninstall_cmds=$lt_postuninstall_cmds
2929
# Commands to strip libraries.
2930
old_striplib=$lt_old_striplib
2931
striplib=$lt_striplib
2933
# Method to check whether dependent libraries are shared objects.
2934
deplibs_check_method=$lt_deplibs_check_method
2936
# Command to use when deplibs_check_method == file_magic.
2937
file_magic_cmd=$lt_file_magic_cmd
2939
# Flag that allows shared libraries with undefined symbols to be built.
2940
allow_undefined_flag=$lt_allow_undefined_flag
2942
# Flag that forces no undefined symbols.
2943
no_undefined_flag=$lt_no_undefined_flag
2945
# Commands used to finish a libtool library installation in a directory.
2946
finish_cmds=$lt_finish_cmds
2948
# Same as above, but a single script fragment to be evaled but not shown.
2949
finish_eval=$lt_finish_eval
2951
# Take the output of nm and produce a listing of raw symbols and C names.
2952
global_symbol_pipe=$lt_global_symbol_pipe
2954
# Transform the output of nm in a proper C declaration
2955
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
2957
# Transform the output of nm in a C name address pair
2958
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
2960
# This is the shared library runtime path variable.
2961
runpath_var=$runpath_var
2963
# This is the shared library path variable.
2964
shlibpath_var=$shlibpath_var
2966
# Is shlibpath searched before the hard-coded library search path?
2967
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2969
# How to hardcode a shared library path into an executable.
2970
hardcode_action=$hardcode_action
2972
# Whether we should hardcode library paths into libraries.
2973
hardcode_into_libs=$hardcode_into_libs
2975
# Flag to hardcode \$libdir into a binary during linking.
2976
# This must work even if \$libdir does not exist.
2977
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
2979
# Whether we need a single -rpath flag with a separated argument.
2980
hardcode_libdir_separator=$lt_hardcode_libdir_separator
2982
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2984
hardcode_direct=$hardcode_direct
2986
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2988
hardcode_minus_L=$hardcode_minus_L
2990
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2991
# the resulting binary.
2992
hardcode_shlibpath_var=$hardcode_shlibpath_var
2994
# Variables whose values should be saved in libtool wrapper scripts and
2995
# restored at relink time.
2996
variables_saved_for_relink="$variables_saved_for_relink"
2998
# Whether libtool must link a program against all its dependency libraries.
2999
link_all_deplibs=$link_all_deplibs
3001
# Compile-time system search path for libraries
3002
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3004
# Run-time system search path for libraries
3005
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3007
# Fix the shell variable \$srcfile for the compiler.
3008
fix_srcfile_path="$fix_srcfile_path"
3010
# Set to yes if exported symbols are required.
3011
always_export_symbols=$always_export_symbols
3013
# The commands to list exported symbols.
3014
export_symbols_cmds=$lt_export_symbols_cmds
3016
# The commands to extract the exported symbol list from a shared archive.
3017
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3019
# Symbols that should not be listed in the preloaded symbols.
3020
exclude_expsyms=$lt_exclude_expsyms
3022
# Symbols that must always be exported.
3023
include_expsyms=$lt_include_expsyms
3025
# ### END LIBTOOL CONFIG
3031
cat <<\EOF >> "${ofile}T"
3033
# AIX sometimes has problems with the GCC collect2 program. For some
3034
# reason, if we set the COLLECT_NAMES environment variable, the problems
3035
# vanish in a puff of smoke.
3036
if test "X${COLLECT_NAMES+set}" != Xset; then
3038
export COLLECT_NAMES
3045
cygwin* | mingw* | pw32* | os2*)
3046
cat <<'EOF' >> "${ofile}T"
3047
# This is a source program that is used to create dlls on Windows
3048
# Don't remove nor modify the starting and closing comments
3049
# /* ltdll.c starts here */
3050
# #define WIN32_LEAN_AND_MEAN
3051
# #include <windows.h>
3052
# #undef WIN32_LEAN_AND_MEAN
3053
# #include <stdio.h>
3055
# #ifndef __CYGWIN__
3056
# # ifdef __CYGWIN32__
3057
# # define __CYGWIN__ __CYGWIN32__
3061
# #ifdef __cplusplus
3064
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3065
# #ifdef __cplusplus
3070
# #include <cygwin/cygwin_dll.h>
3071
# DECLARE_CYGWIN_DLL( DllMain );
3073
# HINSTANCE __hDllInstance_base;
3076
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3078
# __hDllInstance_base = hInst;
3081
# /* ltdll.c ends here */
3082
# This is a source program that is used to create import libraries
3083
# on Windows for dlls which lack them. Don't remove nor modify the
3084
# starting and closing comments
3085
# /* impgen.c starts here */
3086
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3088
# This file is part of GNU libtool.
3090
# This program is free software; you can redistribute it and/or modify
3091
# it under the terms of the GNU General Public License as published by
3092
# the Free Software Foundation; either version 2 of the License, or
3093
# (at your option) any later version.
3095
# This program is distributed in the hope that it will be useful,
3096
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3097
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3098
# GNU General Public License for more details.
3100
# You should have received a copy of the GNU General Public License
3101
# along with this program; if not, write to the Free Software
3102
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3105
# #include <stdio.h> /* for printf() */
3106
# #include <unistd.h> /* for open(), lseek(), read() */
3107
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3108
# #include <string.h> /* for strdup() */
3110
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3112
# #define O_BINARY 0
3115
# static unsigned int
3116
# pe_get16 (fd, offset)
3120
# unsigned char b[2];
3121
# lseek (fd, offset, SEEK_SET);
3123
# return b[0] + (b[1]<<8);
3126
# static unsigned int
3127
# pe_get32 (fd, offset)
3131
# unsigned char b[4];
3132
# lseek (fd, offset, SEEK_SET);
3134
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3137
# static unsigned int
3141
# unsigned char *b = ptr;
3142
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3151
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3152
# unsigned long export_rva, export_size, nsections, secptr, expptr;
3153
# unsigned long name_rvas, nexp;
3154
# unsigned char *expdata, *erva;
3155
# char *filename, *dll_name;
3157
# filename = argv[1];
3159
# dll = open(filename, O_RDONLY|O_BINARY);
3163
# dll_name = filename;
3165
# for (i=0; filename[i]; i++)
3166
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3167
# dll_name = filename + i +1;
3169
# pe_header_offset = pe_get32 (dll, 0x3c);
3170
# opthdr_ofs = pe_header_offset + 4 + 20;
3171
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
3173
# if (num_entries < 1) /* no exports */
3176
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
3177
# export_size = pe_get32 (dll, opthdr_ofs + 100);
3178
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3179
# secptr = (pe_header_offset + 4 + 20 +
3180
# pe_get16 (dll, pe_header_offset + 4 + 16));
3183
# for (i = 0; i < nsections; i++)
3186
# unsigned long secptr1 = secptr + 40 * i;
3187
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3188
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3189
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3190
# lseek(dll, secptr1, SEEK_SET);
3191
# read(dll, sname, 8);
3192
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
3194
# expptr = fptr + (export_rva - vaddr);
3195
# if (export_rva + export_size > vaddr + vsize)
3196
# export_size = vsize - (export_rva - vaddr);
3201
# expdata = (unsigned char*)malloc(export_size);
3202
# lseek (dll, expptr, SEEK_SET);
3203
# read (dll, expdata, export_size);
3204
# erva = expdata - export_rva;
3206
# nexp = pe_as32 (expdata+24);
3207
# name_rvas = pe_as32 (expdata+32);
3209
# printf ("EXPORTS\n");
3210
# for (i = 0; i<nexp; i++)
3212
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3213
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3218
# /* impgen.c ends here */
3224
# We use sed instead of cat because bash on DJGPP gets confused if
3225
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3226
# text mode, it properly converts lines to CR/LF. This bash problem
3227
# is reportedly fixed, but why not run on old versions too?
3228
sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3230
mv -f "${ofile}T" "$ofile" || \
3231
(rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3235
])# _LT_AC_LTCONFIG_HACK
3237
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3238
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3240
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3241
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3243
# AC_ENABLE_SHARED - implement the --enable-shared flag
3244
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3245
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3247
AC_DEFUN([AC_ENABLE_SHARED],
3248
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3249
AC_ARG_ENABLE(shared,
3250
changequote(<<, >>)dnl
3251
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3252
changequote([, ])dnl
3253
[p=${PACKAGE-default}
3255
yes) enable_shared=yes ;;
3256
no) enable_shared=no ;;
3259
# Look at the argument we got. We use all the common list separators.
3260
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3261
for pkg in $enableval; do
3262
if test "X$pkg" = "X$p"; then
3269
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3272
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3273
AC_DEFUN([AC_DISABLE_SHARED],
3274
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3275
AC_ENABLE_SHARED(no)])
3277
# AC_ENABLE_STATIC - implement the --enable-static flag
3278
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3279
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3281
AC_DEFUN([AC_ENABLE_STATIC],
3282
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3283
AC_ARG_ENABLE(static,
3284
changequote(<<, >>)dnl
3285
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3286
changequote([, ])dnl
3287
[p=${PACKAGE-default}
3289
yes) enable_static=yes ;;
3290
no) enable_static=no ;;
3293
# Look at the argument we got. We use all the common list separators.
3294
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3295
for pkg in $enableval; do
3296
if test "X$pkg" = "X$p"; then
3303
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3306
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3307
AC_DEFUN([AC_DISABLE_STATIC],
3308
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3309
AC_ENABLE_STATIC(no)])
3312
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3313
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3314
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3316
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3317
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3318
AC_ARG_ENABLE(fast-install,
3319
changequote(<<, >>)dnl
3320
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3321
changequote([, ])dnl
3322
[p=${PACKAGE-default}
3324
yes) enable_fast_install=yes ;;
3325
no) enable_fast_install=no ;;
3327
enable_fast_install=no
3328
# Look at the argument we got. We use all the common list separators.
3329
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3330
for pkg in $enableval; do
3331
if test "X$pkg" = "X$p"; then
3332
enable_fast_install=yes
3338
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3341
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3342
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3343
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3344
AC_ENABLE_FAST_INSTALL(no)])
3346
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3347
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3348
# Where MODE is either `yes' or `no'. If omitted, it defaults to
3350
AC_DEFUN([AC_LIBTOOL_PICMODE],
3351
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3352
pic_mode=ifelse($#,1,$1,default)])
3355
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3356
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3357
[AC_MSG_CHECKING([for $1])
3358
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3361
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3364
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3367
ac_save_MAGIC_CMD="$MAGIC_CMD"
3368
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3369
dnl $ac_dummy forces splitting on constant user-supplied paths.
3370
dnl POSIX.2 word splitting is done only on the output of word expansions,
3371
dnl not every word. This closes a longstanding sh security hole.
3372
ac_dummy="ifelse([$2], , $PATH, [$2])"
3373
for ac_dir in $ac_dummy; do
3374
test -z "$ac_dir" && ac_dir=.
3375
if test -f $ac_dir/$1; then
3376
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3377
if test -n "$file_magic_test_file"; then
3378
case $deplibs_check_method in
3380
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3381
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3382
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3383
egrep "$file_magic_regex" > /dev/null; then
3388
*** Warning: the command libtool uses to detect shared libraries,
3389
*** $file_magic_cmd, produces output that libtool cannot recognize.
3390
*** The result is that libtool may fail to recognize shared libraries
3391
*** as such. This will affect the creation of libtool libraries that
3392
*** depend on shared libraries, but programs linked with such libtool
3393
*** libraries will work regardless of this problem. Nevertheless, you
3394
*** may want to report the problem to your system manager and/or to
3395
*** bug-libtool@gnu.org
3405
MAGIC_CMD="$ac_save_MAGIC_CMD"
3408
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3409
if test -n "$MAGIC_CMD"; then
3410
AC_MSG_RESULT($MAGIC_CMD)
3417
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3418
AC_DEFUN([AC_PATH_MAGIC],
3419
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3420
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3421
if test -z "$lt_cv_path_MAGIC_CMD"; then
3422
if test -n "$ac_tool_prefix"; then
3423
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3431
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3432
AC_DEFUN([AC_PROG_LD],
3433
[AC_ARG_WITH(gnu-ld,
3434
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3435
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3436
AC_REQUIRE([AC_PROG_CC])dnl
3437
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3438
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3439
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3441
if test "$GCC" = yes; then
3442
# Check if gcc -print-prog-name=ld gives a path.
3443
AC_MSG_CHECKING([for ld used by GCC])
3446
# gcc leaves a trailing carriage return which upsets mingw
3447
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3449
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3452
# Accept absolute paths.
3453
[[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3454
re_direlt='/[[^/]][[^/]]*/\.\./'
3455
# Canonicalize the path of ld
3456
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3457
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3458
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3460
test -z "$LD" && LD="$ac_prog"
3463
# If it fails, then pretend we aren't using GCC.
3467
# If it is relative, then search for the first ld in PATH.
3471
elif test "$with_gnu_ld" = yes; then
3472
AC_MSG_CHECKING([for GNU ld])
3474
AC_MSG_CHECKING([for non-GNU ld])
3476
AC_CACHE_VAL(lt_cv_path_LD,
3477
[if test -z "$LD"; then
3478
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3479
for ac_dir in $PATH; do
3480
test -z "$ac_dir" && ac_dir=.
3481
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3482
lt_cv_path_LD="$ac_dir/$ac_prog"
3483
# Check to see if the program is GNU ld. I'd rather use --version,
3484
# but apparently some GNU ld's only accept -v.
3485
# Break only if it was the GNU/non-GNU ld that we prefer.
3486
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3487
test "$with_gnu_ld" != no && break
3489
test "$with_gnu_ld" != yes && break
3495
lt_cv_path_LD="$LD" # Let the user override the test with a path.
3498
if test -n "$LD"; then
3503
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3508
AC_DEFUN([AC_PROG_LD_GNU],
3509
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3510
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3511
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3512
lt_cv_prog_gnu_ld=yes
3514
lt_cv_prog_gnu_ld=no
3516
with_gnu_ld=$lt_cv_prog_gnu_ld
3519
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3520
# -- PORTME Some linkers may need a different reload flag.
3521
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3522
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3523
[lt_cv_ld_reload_flag='-r'])
3524
reload_flag=$lt_cv_ld_reload_flag
3525
test -n "$reload_flag" && reload_flag=" $reload_flag"
3528
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3529
# -- PORTME fill in with the dynamic library characteristics
3530
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3531
[AC_CACHE_CHECK([how to recognise dependant libraries],
3532
lt_cv_deplibs_check_method,
3533
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3534
lt_cv_file_magic_test_file=
3535
lt_cv_deplibs_check_method='unknown'
3536
# Need to set the preceding variable on all platforms that support
3537
# interlibrary dependencies.
3538
# 'none' -- dependencies not supported.
3539
# `unknown' -- same as none, but documents that we really don't know.
3540
# 'pass_all' -- all dependencies passed with no checks.
3541
# 'test_compile' -- check by making test program.
3542
# 'file_magic [[regex]]' -- check by looking for files in library path
3543
# which responds to the $file_magic_cmd with a given egrep regex.
3544
# If you have `file' or equivalent on your system and you're not sure
3545
# whether `pass_all' will *always* work, you probably want this one.
3549
lt_cv_deplibs_check_method=pass_all
3553
lt_cv_deplibs_check_method=pass_all
3557
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3558
lt_cv_file_magic_cmd='/usr/bin/file -L'
3559
lt_cv_file_magic_test_file=/shlib/libc.so
3562
cygwin* | mingw* | pw32*)
3563
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3564
lt_cv_file_magic_cmd='$OBJDUMP -f'
3567
darwin* | rhapsody*)
3568
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3569
lt_cv_file_magic_cmd='/usr/bin/file -L'
3571
rhapsody* | darwin1.[[012]])
3572
lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3575
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3581
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3584
# Not sure whether the presence of OpenBSD here was a mistake.
3585
# Let's accept both of them until this is cleared up.
3586
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3587
lt_cv_file_magic_cmd=/usr/bin/file
3588
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3592
lt_cv_deplibs_check_method=pass_all
3597
lt_cv_deplibs_check_method=pass_all
3601
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3602
lt_cv_file_magic_cmd=/usr/bin/file
3603
lt_cv_file_magic_test_file=/usr/lib/libc.sl
3609
# this will be overridden with pass_all, but let us keep it just in case
3610
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3614
*-32|*"-32 ") libmagic=32-bit;;
3615
*-n32|*"-n32 ") libmagic=N32;;
3616
*-64|*"-64 ") libmagic=64-bit;;
3617
*) libmagic=never-match;;
3619
# this will be overridden with pass_all, but let us keep it just in case
3620
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3623
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3624
lt_cv_deplibs_check_method=pass_all
3627
# This must be Linux ELF.
3630
alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3631
lt_cv_deplibs_check_method=pass_all ;;
3633
# glibc up to 2.1.1 does not perform some relocations on ARM
3634
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3636
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3640
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3641
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3643
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3648
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3649
lt_cv_file_magic_cmd=/usr/bin/file
3650
lt_cv_file_magic_test_file=/usr/lib/libnls.so
3654
lt_cv_file_magic_cmd=/usr/bin/file
3655
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3656
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3657
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3659
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3663
osf3* | osf4* | osf5*)
3664
# this will be overridden with pass_all, but let us keep it just in case
3665
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3666
lt_cv_file_magic_test_file=/shlib/libc.so
3667
lt_cv_deplibs_check_method=pass_all
3671
lt_cv_deplibs_check_method=pass_all
3675
lt_cv_deplibs_check_method=pass_all
3676
lt_cv_file_magic_test_file=/lib/libc.so
3679
sysv5uw[[78]]* | sysv4*uw2*)
3680
lt_cv_deplibs_check_method=pass_all
3683
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3684
case $host_vendor in
3686
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]]'
3687
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3690
lt_cv_deplibs_check_method=pass_all
3693
lt_cv_file_magic_cmd='/bin/file'
3694
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3697
lt_cv_file_magic_cmd='/bin/file'
3698
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3699
lt_cv_file_magic_test_file=/lib/libc.so
3705
file_magic_cmd=$lt_cv_file_magic_cmd
3706
deplibs_check_method=$lt_cv_deplibs_check_method
3710
# AC_PROG_NM - find the path to a BSD-compatible name lister
3711
AC_DEFUN([AC_PROG_NM],
3712
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3713
AC_MSG_CHECKING([for BSD-compatible nm])
3714
AC_CACHE_VAL(lt_cv_path_NM,
3715
[if test -n "$NM"; then
3716
# Let the user override the test.
3719
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3720
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3721
test -z "$ac_dir" && ac_dir=.
3722
tmp_nm=$ac_dir/${ac_tool_prefix}nm
3723
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3724
# Check to see if the nm accepts a BSD-compat flag.
3725
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3726
# nm: unknown option "B" ignored
3727
# Tru64's nm complains that /dev/null is an invalid object file
3728
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3729
lt_cv_path_NM="$tmp_nm -B"
3731
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3732
lt_cv_path_NM="$tmp_nm -p"
3735
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3736
continue # so that we can try to find one that supports BSD flags
3741
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3744
AC_MSG_RESULT([$NM])
3747
# AC_CHECK_LIBM - check for math library
3748
AC_DEFUN([AC_CHECK_LIBM],
3749
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3752
*-*-beos* | *-*-cygwin* | *-*-pw32*)
3753
# These system don't have libm
3756
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3757
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3760
AC_CHECK_LIB(m, main, LIBM="-lm")
3765
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3766
# the libltdl convenience library and INCLTDL to the include flags for
3767
# the libltdl header and adds --enable-ltdl-convenience to the
3768
# configure arguments. Note that LIBLTDL and INCLTDL are not
3769
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3770
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3771
# with '${top_builddir}/' and INCLTDL will be prefixed with
3772
# '${top_srcdir}/' (note the single quotes!). If your package is not
3773
# flat and you're not using automake, define top_builddir and
3774
# top_srcdir appropriately in the Makefiles.
3775
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3776
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3777
case $enable_ltdl_convenience in
3778
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3779
"") enable_ltdl_convenience=yes
3780
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3782
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3783
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3786
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3787
# the libltdl installable library and INCLTDL to the include flags for
3788
# the libltdl header and adds --enable-ltdl-install to the configure
3789
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
3790
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3791
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3792
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
3793
# with '${top_srcdir}/' (note the single quotes!). If your package is
3794
# not flat and you're not using automake, define top_builddir and
3795
# top_srcdir appropriately in the Makefiles.
3796
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3797
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3798
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3799
AC_CHECK_LIB(ltdl, main,
3800
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3801
[if test x"$enable_ltdl_install" = xno; then
3802
AC_MSG_WARN([libltdl not installed, but installation disabled])
3804
enable_ltdl_install=yes
3807
if test x"$enable_ltdl_install" = x"yes"; then
3808
ac_configure_args="$ac_configure_args --enable-ltdl-install"
3809
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3810
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3812
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3819
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3820
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3821
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3822
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3823
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3824
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3825
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3827
# This is just to silence aclocal about the macro not being used
3828
ifelse([AC_DISABLE_FAST_INSTALL])
3831
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
3833
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
3837
AC_DEFUN([GNOME_INIT_HOOK],[
3838
AC_SUBST(GNOME_LIBS)
3839
AC_SUBST(GNOMEUI_LIBS)
3840
AC_SUBST(GNOMEGNORBA_LIBS)
3841
AC_SUBST(GTKXMHTML_LIBS)
3843
AC_SUBST(GNOME_LIBDIR)
3844
AC_SUBST(GNOME_INCLUDEDIR)
3846
AC_ARG_WITH(gnome-includes,
3847
[ --with-gnome-includes Specify location of GNOME headers],[
3848
CFLAGS="$CFLAGS -I$withval"
3851
AC_ARG_WITH(gnome-libs,
3852
[ --with-gnome-libs Specify location of GNOME libs],[
3853
LDFLAGS="$LDFLAGS -L$withval"
3854
gnome_prefix=$withval
3858
[ --with-gnome Specify prefix for GNOME files],
3859
if test x$withval = xyes; then
3861
dnl Note that an empty true branch is not
3862
dnl valid sh syntax.
3863
ifelse([$1], [], :, [$1])
3865
if test "x$withval" = xno; then
3869
LDFLAGS="$LDFLAGS -L$withval/lib"
3870
CFLAGS="$CFLAGS -I$withval/include"
3871
gnome_prefix=$withval/lib
3876
if test "x$want_gnome" = xyes; then
3878
AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
3879
if test "$GNOME_CONFIG" = "no"; then
3880
no_gnome_config="yes"
3882
AC_MSG_CHECKING(if $GNOME_CONFIG works)
3883
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
3885
GNOME_GNORBA_HOOK([],$2)
3886
GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
3887
GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
3888
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
3889
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
3890
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
3891
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
3892
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
3896
no_gnome_config="yes"
3900
if test x$exec_prefix = xNONE; then
3901
if test x$prefix = xNONE; then
3902
gnome_prefix=$ac_default_prefix/lib
3904
gnome_prefix=$prefix/lib
3907
gnome_prefix=`eval echo \`echo $libdir\``
3910
if test "$no_gnome_config" = "yes"; then
3911
AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
3912
if test -f $gnome_prefix/gnomeConf.sh; then
3913
AC_MSG_RESULT(found)
3914
echo "loading gnome configuration from" \
3915
"$gnome_prefix/gnomeConf.sh"
3916
. $gnome_prefix/gnomeConf.sh
3919
AC_MSG_RESULT(not found)
3920
if test x$2 = xfail; then
3921
AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
3927
if test -n "$3"; then
3930
AC_MSG_CHECKING(extra library \"$i\")
3933
AC_SUBST(GNOME_APPLETS_LIBS)
3934
GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
3935
AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
3937
AC_SUBST(GNOME_DOCKLETS_LIBS)
3938
GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
3939
AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
3941
AC_SUBST(GNOME_CAPPLET_LIBS)
3942
GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
3943
AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
3945
AC_MSG_RESULT(unknown library)
3947
EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i`
3948
GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR"
3954
dnl GNOME_INIT ([additional-inits])
3957
AC_DEFUN([GNOME_INIT],[
3958
GNOME_INIT_HOOK([],fail,$1)
3962
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
3964
dnl if failflag is "failure" it aborts if gnorba is not found.
3967
AC_DEFUN([GNOME_GNORBA_HOOK],[
3968
GNOME_ORBIT_HOOK([],$2)
3969
AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
3970
gnome_cv_gnorba_found=no
3971
if test x$gnome_cv_orbit_found = xyes; then
3972
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
3973
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
3974
if test -n "$GNORBA_LIBS"; then
3975
gnome_cv_gnorba_found=yes
3979
AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
3980
if test x$gnome_cv_orbit_found = xyes; then
3982
GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
3983
GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
3984
AC_SUBST(GNORBA_CFLAGS)
3985
AC_SUBST(GNORBA_LIBS)
3987
if test x$2 = xfailure; then
3988
AC_MSG_ERROR(gnorba library not installed or installation problem)
3993
AC_DEFUN([GNOME_GNORBA_CHECK], [
3994
GNOME_GNORBA_HOOK([],failure)
3998
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
4000
dnl if failflag is "failure" it aborts if orbit is not found.
4003
AC_DEFUN([GNOME_ORBIT_HOOK],[
4004
AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
4005
AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
4006
AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
4007
if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
4008
gnome_cv_orbit_found=no
4010
gnome_cv_orbit_found=yes
4013
AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
4014
if test x$gnome_cv_orbit_found = xyes; then
4016
ORBIT_CFLAGS=`orbit-config --cflags client server`
4017
ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
4018
AC_SUBST(ORBIT_CFLAGS)
4019
AC_SUBST(ORBIT_LIBS)
4021
if test x$2 = xfailure; then
4022
AC_MSG_ERROR(ORBit not installed or installation problem)
4027
AC_DEFUN([GNOME_ORBIT_CHECK], [
4028
GNOME_ORBIT_HOOK([],failure)
4031
# Define a conditional.
4033
AC_DEFUN([AM_CONDITIONAL],
4045
# This test replaces the one in autoconf.
4046
# Currently this macro should have the same name as the autoconf macro
4047
# because gettext's gettext.m4 (distributed in the automake package)
4048
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
4049
# give these diagnostics:
4050
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
4051
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
4053
undefine([AC_ISC_POSIX])
4055
AC_DEFUN([AC_ISC_POSIX],
4057
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
4058
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
4062
dnl GNOME_COMPILE_WARNINGS
4063
dnl Turn on many useful compiler warnings
4064
dnl For now, only works on GCC
4065
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
4066
AC_ARG_ENABLE(compile-warnings,
4067
[ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_compile_warnings=minimum)
4069
AC_MSG_CHECKING(what warning flags to pass to the C compiler)
4071
if test "x$GCC" != xyes; then
4072
enable_compile_warnings=no
4075
if test "x$enable_compile_warnings" != "xno"; then
4076
if test "x$GCC" = "xyes"; then
4078
*[\ \ ]-Wall[\ \ ]*) ;;
4079
*) warnCFLAGS="-Wall -Wunused" ;;
4082
## -W is not all that useful. And it cannot be controlled
4083
## with individual -Wno-xxx flags, unlike -Wall
4084
if test "x$enable_compile_warnings" = "xyes"; then
4085
warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations"
4089
AC_MSG_RESULT($warnCFLAGS)
4091
AC_ARG_ENABLE(iso-c,
4092
[ --enable-iso-c Try to warn if code is not ISO C ],,
4095
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
4097
if test "x$enable_iso_c" != "xno"; then
4098
if test "x$GCC" = "xyes"; then
4100
*[\ \ ]-ansi[\ \ ]*) ;;
4101
*) complCFLAGS="$complCFLAGS -ansi" ;;
4105
*[\ \ ]-pedantic[\ \ ]*) ;;
4106
*) complCFLAGS="$complCFLAGS -pedantic" ;;
4110
AC_MSG_RESULT($complCFLAGS)
4111
if test "x$cflags_set" != "xyes"; then
4112
CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
4114
AC_SUBST(cflags_set)
4118
dnl For C++, do basically the same thing.
4120
AC_DEFUN([GNOME_CXX_WARNINGS],[
4121
AC_ARG_ENABLE(cxx-warnings,
4122
[ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
4124
AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
4126
if test "x$GCC" != xyes; then
4127
enable_compile_warnings=no
4129
if test "x$enable_cxx_warnings" != "xno"; then
4130
if test "x$GCC" = "xyes"; then
4131
case " $CXXFLAGS " in
4132
*[\ \ ]-Wall[\ \ ]*) ;;
4133
*) warnCXXFLAGS="-Wall -Wno-unused" ;;
4136
## -W is not all that useful. And it cannot be controlled
4137
## with individual -Wno-xxx flags, unlike -Wall
4138
if test "x$enable_cxx_warnings" = "xyes"; then
4139
warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual"
4143
AC_MSG_RESULT($warnCXXFLAGS)
4145
AC_ARG_ENABLE(iso-cxx,
4146
[ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
4149
AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
4151
if test "x$enable_iso_cxx" != "xno"; then
4152
if test "x$GCC" = "xyes"; then
4153
case " $CXXFLAGS " in
4154
*[\ \ ]-ansi[\ \ ]*) ;;
4155
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
4158
case " $CXXFLAGS " in
4159
*[\ \ ]-pedantic[\ \ ]*) ;;
4160
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
4164
AC_MSG_RESULT($complCXXFLAGS)
4165
if test "x$cxxflags_set" != "xyes"; then
4166
CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
4168
AC_SUBST(cxxflags_set)
4174
dnl Basic X11 related checks for X11. At the end, the following will be
4175
dnl defined/changed:
4176
dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK
4177
dnl CPPFLAGS Will include $X_CFLAGS
4178
dnl GNOME_HAVE_SM `true' or `false' depending on whether session
4179
dnl management is available. It is available if
4180
dnl both -lSM and X11/SM/SMlib.h exist. (Some
4181
dnl Solaris boxes have the library but not the header)
4182
dnl XPM_LIBS -lXpm if Xpm library is present, otherwise ""
4184
dnl The following configure cache variables are defined (but not used):
4185
dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
4187
AC_DEFUN([GNOME_X_CHECKS],
4189
AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
4190
dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could
4191
dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
4193
dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
4194
dnl CPPFLAGS, not CFLAGS
4195
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
4197
saved_ldflags="$LDFLAGS"
4198
LDFLAGS="$LDFLAGS $GTK_LIBS"
4200
gnome_cv_passdown_x_libs="$GTK_LIBS"
4201
gnome_cv_passdown_X_LIBS="$GTK_LIBS"
4202
gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
4203
gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
4205
LDFLAGS="$saved_ldflags $GTK_LIBS"
4207
dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
4210
dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
4211
dnl AC_EGREP_CPP(answer_affirmatively,
4212
dnl [#include <gtk/gtkfeatures.h>
4213
dnl #ifdef GTK_HAVE_FEATURES_1_1_0
4214
dnl answer_affirmatively
4216
dnl ], dev_gtk=yes, dev_gtk=no)
4217
dnl if test "$dev_gtk" = "yes"; then
4220
dnl AC_MSG_RESULT("$dev_gtk")
4225
dnl Already found it.
4228
dnl Assume that if we have -lSM then we also have -lICE.
4229
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
4230
[GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
4235
if test "$GNOME_HAVE_SM" = true; then
4236
AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
4239
if test "$GNOME_HAVE_SM" = true; then
4240
AC_DEFINE(HAVE_LIBSM)
4244
AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
4247
AC_REQUIRE([GNOME_PTHREAD_CHECK])
4248
LDFLAGS="$saved_ldflags"
4250
AC_PROVIDE([GNOME_X_CHECKS])
4253
# Configure paths for GTK+
4254
# Owen Taylor 97-11-3
4256
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
4257
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
4259
AC_DEFUN(AM_PATH_GTK,
4261
dnl Get the cflags and libraries from the gtk-config script
4263
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
4264
gtk_config_prefix="$withval", gtk_config_prefix="")
4265
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
4266
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
4267
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
4268
, enable_gtktest=yes)
4274
gtk_config_args="$gtk_config_args gthread"
4279
if test x$gtk_config_exec_prefix != x ; then
4280
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4281
if test x${GTK_CONFIG+set} != xset ; then
4282
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4285
if test x$gtk_config_prefix != x ; then
4286
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4287
if test x${GTK_CONFIG+set} != xset ; then
4288
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4292
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
4293
min_gtk_version=ifelse([$1], ,0.99.7,$1)
4294
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
4296
if test "$GTK_CONFIG" = "no" ; then
4299
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4300
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4301
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4302
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
4303
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4304
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
4305
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4306
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
4307
if test "x$enable_gtktest" = "xyes" ; then
4308
ac_save_CFLAGS="$CFLAGS"
4309
ac_save_LIBS="$LIBS"
4310
CFLAGS="$CFLAGS $GTK_CFLAGS"
4311
LIBS="$GTK_LIBS $LIBS"
4313
dnl Now check if the installed GTK is sufficiently new. (Also sanity
4314
dnl checks the results of gtk-config to some extent
4318
#include <gtk/gtk.h>
4325
int major, minor, micro;
4328
system ("touch conf.gtktest");
4330
/* HP/UX 9 (%@#!) writes to sscanf strings */
4331
tmp_version = g_strdup("$min_gtk_version");
4332
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
4333
printf("%s, bad version string\n", "$min_gtk_version");
4337
if ((gtk_major_version != $gtk_config_major_version) ||
4338
(gtk_minor_version != $gtk_config_minor_version) ||
4339
(gtk_micro_version != $gtk_config_micro_version))
4341
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
4342
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
4343
gtk_major_version, gtk_minor_version, gtk_micro_version);
4344
printf ("*** was found! If gtk-config was correct, then it is best\n");
4345
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
4346
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
4347
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
4348
printf("*** required on your system.\n");
4349
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
4350
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
4351
printf("*** before re-running configure\n");
4353
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
4354
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
4355
(gtk_minor_version != GTK_MINOR_VERSION) ||
4356
(gtk_micro_version != GTK_MICRO_VERSION))
4358
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
4359
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
4360
printf("*** library (version %d.%d.%d)\n",
4361
gtk_major_version, gtk_minor_version, gtk_micro_version);
4363
#endif /* defined (GTK_MAJOR_VERSION) ... */
4366
if ((gtk_major_version > major) ||
4367
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4368
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
4374
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
4375
gtk_major_version, gtk_minor_version, gtk_micro_version);
4376
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
4377
major, minor, micro);
4378
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
4380
printf("*** If you have already installed a sufficiently new version, this error\n");
4381
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
4382
printf("*** being found. The easiest way to fix this is to remove the old version\n");
4383
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
4384
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
4385
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4386
printf("*** so that the correct libraries are found at run-time))\n");
4391
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
4392
CFLAGS="$ac_save_CFLAGS"
4393
LIBS="$ac_save_LIBS"
4396
if test "x$no_gtk" = x ; then
4398
ifelse([$2], , :, [$2])
4401
if test "$GTK_CONFIG" = "no" ; then
4402
echo "*** The gtk-config script installed by GTK could not be found"
4403
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
4404
echo "*** your path, or set the GTK_CONFIG environment variable to the"
4405
echo "*** full path to gtk-config."
4407
if test -f conf.gtktest ; then
4410
echo "*** Could not run GTK test program, checking why..."
4411
CFLAGS="$CFLAGS $GTK_CFLAGS"
4412
LIBS="$LIBS $GTK_LIBS"
4414
#include <gtk/gtk.h>
4416
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
4417
[ echo "*** The test program compiled, but did not run. This usually means"
4418
echo "*** that the run-time linker is not finding GTK or finding the wrong"
4419
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
4420
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4421
echo "*** to the installed location Also, make sure you have run ldconfig if that"
4422
echo "*** is required on your system"
4424
echo "*** If you have an old version installed, it is best to remove it, although"
4425
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4427
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
4428
echo "*** came with the system with the command"
4430
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
4431
[ echo "*** The test program failed to compile or link. See the file config.log for the"
4432
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
4433
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
4434
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
4435
CFLAGS="$ac_save_CFLAGS"
4436
LIBS="$ac_save_LIBS"
4441
ifelse([$3], , :, [$3])
4443
AC_SUBST(GTK_CFLAGS)
4449
dnl And better, use gthreads instead...
4452
AC_DEFUN([GNOME_PTHREAD_CHECK],[
4454
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
4455
[AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
4456
[AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
4457
[AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread",
4458
[AC_CHECK_FUNC(pthread_create)]
4463
AC_SUBST(PTHREAD_LIB)
4464
AC_PROVIDE([GNOME_PTHREAD_CHECK])
4467
# Configure paths for GLIB
4468
# Owen Taylor 97-11-3
4470
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
4471
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
4472
dnl gthread is specified in MODULES, pass to glib-config
4474
AC_DEFUN(AM_PATH_GLIB,
4476
dnl Get the cflags and libraries from the glib-config script
4478
AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
4479
glib_config_prefix="$withval", glib_config_prefix="")
4480
AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
4481
glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
4482
AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
4483
, enable_glibtest=yes)
4485
if test x$glib_config_exec_prefix != x ; then
4486
glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
4487
if test x${GLIB_CONFIG+set} != xset ; then
4488
GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
4491
if test x$glib_config_prefix != x ; then
4492
glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
4493
if test x${GLIB_CONFIG+set} != xset ; then
4494
GLIB_CONFIG=$glib_config_prefix/bin/glib-config
4502
glib_config_args="$glib_config_args gmodule"
4505
glib_config_args="$glib_config_args gthread"
4510
AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
4511
min_glib_version=ifelse([$1], ,0.99.7,$1)
4512
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
4514
if test "$GLIB_CONFIG" = "no" ; then
4517
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
4518
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
4519
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
4520
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
4521
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
4522
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
4523
glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
4524
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
4525
if test "x$enable_glibtest" = "xyes" ; then
4526
ac_save_CFLAGS="$CFLAGS"
4527
ac_save_LIBS="$LIBS"
4528
CFLAGS="$CFLAGS $GLIB_CFLAGS"
4529
LIBS="$GLIB_LIBS $LIBS"
4531
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
4532
dnl checks the results of glib-config to some extent
4543
int major, minor, micro;
4546
system ("touch conf.glibtest");
4548
/* HP/UX 9 (%@#!) writes to sscanf strings */
4549
tmp_version = g_strdup("$min_glib_version");
4550
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
4551
printf("%s, bad version string\n", "$min_glib_version");
4555
if ((glib_major_version != $glib_config_major_version) ||
4556
(glib_minor_version != $glib_config_minor_version) ||
4557
(glib_micro_version != $glib_config_micro_version))
4559
printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
4560
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
4561
glib_major_version, glib_minor_version, glib_micro_version);
4562
printf ("*** was found! If glib-config was correct, then it is best\n");
4563
printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
4564
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
4565
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
4566
printf("*** required on your system.\n");
4567
printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
4568
printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
4569
printf("*** before re-running configure\n");
4571
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
4572
(glib_minor_version != GLIB_MINOR_VERSION) ||
4573
(glib_micro_version != GLIB_MICRO_VERSION))
4575
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
4576
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
4577
printf("*** library (version %d.%d.%d)\n",
4578
glib_major_version, glib_minor_version, glib_micro_version);
4582
if ((glib_major_version > major) ||
4583
((glib_major_version == major) && (glib_minor_version > minor)) ||
4584
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
4590
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
4591
glib_major_version, glib_minor_version, glib_micro_version);
4592
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
4593
major, minor, micro);
4594
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
4596
printf("*** If you have already installed a sufficiently new version, this error\n");
4597
printf("*** probably means that the wrong copy of the glib-config shell script is\n");
4598
printf("*** being found. The easiest way to fix this is to remove the old version\n");
4599
printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
4600
printf("*** correct copy of glib-config. (In this case, you will have to\n");
4601
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4602
printf("*** so that the correct libraries are found at run-time))\n");
4607
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
4608
CFLAGS="$ac_save_CFLAGS"
4609
LIBS="$ac_save_LIBS"
4612
if test "x$no_glib" = x ; then
4614
ifelse([$2], , :, [$2])
4617
if test "$GLIB_CONFIG" = "no" ; then
4618
echo "*** The glib-config script installed by GLIB could not be found"
4619
echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
4620
echo "*** your path, or set the GLIB_CONFIG environment variable to the"
4621
echo "*** full path to glib-config."
4623
if test -f conf.glibtest ; then
4626
echo "*** Could not run GLIB test program, checking why..."
4627
CFLAGS="$CFLAGS $GLIB_CFLAGS"
4628
LIBS="$LIBS $GLIB_LIBS"
4632
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
4633
[ echo "*** The test program compiled, but did not run. This usually means"
4634
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
4635
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
4636
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4637
echo "*** to the installed location Also, make sure you have run ldconfig if that"
4638
echo "*** is required on your system"
4640
echo "*** If you have an old version installed, it is best to remove it, although"
4641
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
4643
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
4644
echo "*** came with the system with the command"
4646
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
4647
[ echo "*** The test program failed to compile or link. See the file config.log for the"
4648
echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
4649
echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
4650
echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
4651
CFLAGS="$ac_save_CFLAGS"
4652
LIBS="$ac_save_LIBS"
4657
ifelse([$3], , :, [$3])
4659
AC_SUBST(GLIB_CFLAGS)
4664
# Configure paths for gdk-pixbuf
4665
# Elliot Lee 2000-01-10
4666
# stolen from Raph Levien 98-11-18
4667
# stolen from Manish Singh 98-9-30
4668
# stolen back from Frank Belew
4669
# stolen from Manish Singh
4670
# Shamelessly stolen from Owen Taylor
4672
dnl AM_PATH_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
4673
dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS
4675
AC_DEFUN(AM_PATH_GDK_PIXBUF,
4677
dnl Get the cflags and libraries from the gdk-pixbuf-config script
4679
AC_ARG_WITH(gdk-pixbuf-prefix,[ --with-gdk-pixbuf-prefix=PFX Prefix where GDK_PIXBUF is installed (optional)],
4680
gdk_pixbuf_prefix="$withval", gdk_pixbuf_prefix="")
4681
AC_ARG_WITH(gdk-pixbuf-exec-prefix,[ --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional)],
4682
gdk_pixbuf_exec_prefix="$withval", gdk_pixbuf_exec_prefix="")
4683
AC_ARG_ENABLE(gdk_pixbuftest, [ --disable-gdk_pixbuftest Do not try to compile and run a test GDK_PIXBUF program],
4684
, enable_gdk_pixbuftest=yes)
4686
if test x$gdk_pixbuf_exec_prefix != x ; then
4687
gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix"
4688
if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
4689
GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config
4692
if test x$gdk_pixbuf_prefix != x ; then
4693
gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix"
4694
if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
4695
GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config
4699
AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
4700
min_gdk_pixbuf_version=ifelse([$1], ,0.2.5,$1)
4701
AC_MSG_CHECKING(for GDK_PIXBUF - version >= $min_gdk_pixbuf_version)
4703
if test "$GDK_PIXBUF_CONFIG" = "no" ; then
4706
GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags`
4707
GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs`
4709
gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
4710
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
4711
gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
4712
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
4713
gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \
4714
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
4715
if test "x$enable_gdk_pixbuftest" = "xyes" ; then
4716
ac_save_CFLAGS="$CFLAGS"
4717
ac_save_LIBS="$LIBS"
4718
CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
4719
LIBS="$LIBS $GDK_PIXBUF_LIBS"
4721
dnl Now check if the installed GDK_PIXBUF is sufficiently new. (Also sanity
4722
dnl checks the results of gdk-pixbuf-config to some extent
4724
rm -f conf.gdk_pixbuftest
4729
#include <gdk-pixbuf/gdk-pixbuf.h>
4732
my_strdup (char *str)
4738
new_str = malloc ((strlen (str) + 1) * sizeof(char));
4739
strcpy (new_str, str);
4749
int major, minor, micro;
4752
system ("touch conf.gdk_pixbuftest");
4754
/* HP/UX 9 (%@#!) writes to sscanf strings */
4755
tmp_version = my_strdup("$min_gdk_pixbuf_version");
4756
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
4757
printf("%s, bad version string\n", "$min_gdk_pixbuf_version");
4761
if (($gdk_pixbuf_major_version > major) ||
4762
(($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) ||
4763
(($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro)))
4769
printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version);
4770
printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro);
4771
printf("*** best to upgrade to the required version.\n");
4772
printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n");
4773
printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n");
4774
printf("*** config.cache before re-running configure\n");
4779
],, no_gdk_pixbuf=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
4780
CFLAGS="$ac_save_CFLAGS"
4781
LIBS="$ac_save_LIBS"
4784
if test "x$no_gdk_pixbuf" = x ; then
4786
ifelse([$2], , :, [$2])
4789
if test "$GDK_PIXBUF_CONFIG" = "no" ; then
4790
echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found"
4791
echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in"
4792
echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the"
4793
echo "*** full path to gdk-pixbuf-config."
4795
if test -f conf.gdk_pixbuftest ; then
4798
echo "*** Could not run GDK_PIXBUF test program, checking why..."
4799
CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
4800
LIBS="$LIBS $GDK_PIXBUF_LIBS"
4803
#include <gdk-pixbuf/gdk-pixbuf.h>
4805
[ echo "*** The test program compiled, but did not run. This usually means"
4806
echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong"
4807
echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your"
4808
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
4809
echo "*** to the installed location Also, make sure you have run ldconfig if that"
4810
echo "*** is required on your system"
4812
echo "*** If you have an old version installed, it is best to remove it, although"
4813
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
4814
[ echo "*** The test program failed to compile or link. See the file config.log for the"
4815
echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed"
4816
echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you"
4817
echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" ])
4818
CFLAGS="$ac_save_CFLAGS"
4819
LIBS="$ac_save_LIBS"
4822
GDK_PIXBUF_CFLAGS=""
4824
ifelse([$3], , :, [$3])
4826
AC_SUBST(GDK_PIXBUF_CFLAGS)
4827
AC_SUBST(GDK_PIXBUF_LIBS)
4828
rm -f conf.gdk_pixbuftest
4831
# Configure paths for LIBXML2
4832
# Toshio Kuratomi 2001-04-21
4834
# Configure paths for GLIB
4835
# Owen Taylor 97-11-3
4837
dnl AM_PATH_XML([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
4838
dnl Test for XML, and define XML_CFLAGS and XML_LIBS
4840
AC_DEFUN(AM_PATH_XML,[
4841
AC_ARG_WITH(xml-prefix,
4842
[ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
4843
xml_config_prefix="$withval", xml_config_prefix="")
4844
AC_ARG_WITH(xml-exec-prefix,
4845
[ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
4846
xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
4847
AC_ARG_ENABLE(xmltest,
4848
[ --disable-xmltest Do not try to compile and run a test LIBXML program],,
4851
if test x$xml_config_exec_prefix != x ; then
4852
xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
4853
if test x${XML_CONFIG+set} != xset ; then
4854
XML_CONFIG=$xml_config_exec_prefix/bin/xml-config
4857
if test x$xml_config_prefix != x ; then
4858
xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
4859
if test x${XML_CONFIG+set} != xset ; then
4860
XML_CONFIG=$xml_config_prefix/bin/xml-config
4864
AC_PATH_PROG(XML_CONFIG, xml-config, no)
4865
min_xml_version=ifelse([$1], ,1.0.0,[$1])
4866
AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
4868
if test "$XML_CONFIG" = "no" ; then
4871
XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags`
4872
XML_LIBS=`$XML_CONFIG $xml_config_args --libs`
4873
xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \
4874
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
4875
xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \
4876
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
4877
xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
4878
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
4879
if test "x$enable_xmltest" = "xyes" ; then
4880
ac_save_CFLAGS="$CFLAGS"
4881
ac_save_LIBS="$LIBS"
4882
CFLAGS="$CFLAGS $XML_CFLAGS"
4883
LIBS="$XML_LIBS $LIBS"
4885
dnl Now check if the installed libxml is sufficiently new.
4886
dnl (Also sanity checks the results of xml-config to some extent)
4892
#include <libxml/tree.h>
4897
int xml_major_version, xml_minor_version, xml_micro_version;
4898
int major, minor, micro;
4900
int tmp_int_version;
4902
system("touch conf.xmltest");
4904
/* Capture xml-config output via autoconf/configure variables */
4905
/* HP/UX 9 (%@#!) writes to sscanf strings */
4906
tmp_version = (char *)strdup("$min_xml_version");
4907
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
4908
printf("%s, bad version string from xml-config\n", "$min_xml_version");
4913
/* Capture the version information from the header files */
4914
tmp_int_version = LIBXML_VERSION;
4915
xml_major_version=tmp_int_version / 10000;
4916
xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100;
4917
xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000);
4919
/* Compare xml-config output to the libxml headers */
4920
if ((xml_major_version != $xml_config_major_version) ||
4921
(xml_minor_version != $xml_config_minor_version)
4924
/* The last released version of libxml-1.x has an incorrect micro version in
4925
* the header file so neither the includes nor the library will match the
4926
* micro_version to the output of xml-config
4928
(xml_micro_version != $xml_config_micro_version)
4933
printf("*** libxml header files (version %d.%d.%d) do not match\n",
4934
xml_major_version, xml_minor_version, xml_micro_version);
4935
printf("*** xml-config (version %d.%d.%d)\n",
4936
$xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
4939
/* Compare the headers to the library to make sure we match */
4940
/* Less than ideal -- doesn't provide us with return value feedback,
4941
* only exits if there's a serious mismatch between header and library.
4943
LIBXML_TEST_VERSION;
4945
/* Test that the library is greater than our minimum version */
4946
if (($xml_config_major_version > major) ||
4947
(($xml_config_major_version == major) && ($xml_config_minor_version > minor)) ||
4948
(($xml_config_major_version == major) && ($xml_config_minor_version == minor) &&
4949
($xml_config_micro_version >= micro)))
4955
printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
4956
xml_major_version, xml_minor_version, xml_micro_version);
4957
printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
4958
major, minor, micro);
4959
printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
4961
printf("*** If you have already installed a sufficiently new version, this error\n");
4962
printf("*** probably means that the wrong copy of the xml-config shell script is\n");
4963
printf("*** being found. The easiest way to fix this is to remove the old version\n");
4964
printf("*** of LIBXML, but you can also set the XML_CONFIG environment to point to the\n");
4965
printf("*** correct copy of xml-config. (In this case, you will have to\n");
4966
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
4967
printf("*** so that the correct libraries are found at run-time))\n");
4971
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
4972
CFLAGS="$ac_save_CFLAGS"
4973
LIBS="$ac_save_LIBS"
4977
if test "x$no_xml" = x ; then
4978
AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
4979
ifelse([$2], , :, [$2])
4982
if test "$XML_CONFIG" = "no" ; then
4983
echo "*** The xml-config script installed by LIBXML could not be found"
4984
echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
4985
echo "*** your path, or set the XML_CONFIG environment variable to the"
4986
echo "*** full path to xml-config."
4988
if test -f conf.xmltest ; then
4991
echo "*** Could not run libxml test program, checking why..."
4992
CFLAGS="$CFLAGS $XML_CFLAGS"
4993
LIBS="$LIBS $XML_LIBS"
4995
#include <libxml/tree.h>
4997
], [ LIBXML_TEST_VERSION; return 0;],
4998
[ echo "*** The test program compiled, but did not run. This usually means"
4999
echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
5000
echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
5001
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
5002
echo "*** to the installed location Also, make sure you have run ldconfig if that"
5003
echo "*** is required on your system"
5005
echo "*** If you have an old version installed, it is best to remove it, although"
5006
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
5007
[ echo "*** The test program failed to compile or link. See the file config.log for the"
5008
echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
5009
echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
5010
echo "*** may want to edit the xml-config script: $XML_CONFIG" ])
5011
CFLAGS="$ac_save_CFLAGS"
5012
LIBS="$ac_save_LIBS"
5018
ifelse([$3], , :, [$3])
5020
AC_SUBST(XML_CFLAGS)
5025
# Configure paths for LIBXML2
5026
# Toshio Kuratomi 2001-04-21
5028
# Configure paths for GLIB
5029
# Owen Taylor 97-11-3
5031
dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
5032
dnl Test for XML, and define XML_CFLAGS and XML_LIBS
5034
AC_DEFUN(AM_PATH_XML2,[
5035
AC_ARG_WITH(xml-prefix,
5036
[ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
5037
xml_config_prefix="$withval", xml_config_prefix="")
5038
AC_ARG_WITH(xml-exec-prefix,
5039
[ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
5040
xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
5041
AC_ARG_ENABLE(xmltest,
5042
[ --disable-xmltest Do not try to compile and run a test LIBXML program],,
5045
if test x$xml_config_exec_prefix != x ; then
5046
xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
5047
if test x${XML2_CONFIG+set} != xset ; then
5048
XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
5051
if test x$xml_config_prefix != x ; then
5052
xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
5053
if test x${XML2_CONFIG+set} != xset ; then
5054
XML2_CONFIG=$xml_config_prefix/bin/xml2-config
5058
AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
5059
min_xml_version=ifelse([$1], ,2.0.0,[$1])
5060
AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
5062
if test "$XML2_CONFIG" = "no" ; then
5065
XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
5066
XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
5067
xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
5068
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
5069
xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
5070
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
5071
xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
5072
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
5073
if test "x$enable_xmltest" = "xyes" ; then
5074
ac_save_CFLAGS="$CFLAGS"
5075
ac_save_LIBS="$LIBS"
5076
CFLAGS="$CFLAGS $XML_CFLAGS"
5077
LIBS="$XML_LIBS $LIBS"
5079
dnl Now check if the installed libxml is sufficiently new.
5080
dnl (Also sanity checks the results of xml2-config to some extent)
5086
#include <xmlversion.h>
5091
int xml_major_version, xml_minor_version, xml_micro_version;
5092
int major, minor, micro;
5095
system("touch conf.xmltest");
5097
/* Capture xml2-config output via autoconf/configure variables */
5098
/* HP/UX 9 (%@#!) writes to sscanf strings */
5099
tmp_version = (char *)strdup("$min_xml_version");
5100
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
5101
printf("%s, bad version string from xml2-config\n", "$min_xml_version");
5106
/* Capture the version information from the header files */
5107
tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
5108
if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
5109
printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
5114
/* Compare xml2-config output to the libxml headers */
5115
if ((xml_major_version != $xml_config_major_version) ||
5116
(xml_minor_version != $xml_config_minor_version) ||
5117
(xml_micro_version != $xml_config_micro_version))
5119
printf("*** libxml header files (version %d.%d.%d) do not match\n",
5120
xml_major_version, xml_minor_version, xml_micro_version);
5121
printf("*** xml2-config (version %d.%d.%d)\n",
5122
$xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
5125
/* Compare the headers to the library to make sure we match */
5126
/* Less than ideal -- doesn't provide us with return value feedback,
5127
* only exits if there's a serious mismatch between header and library.
5129
LIBXML_TEST_VERSION;
5131
/* Test that the library is greater than our minimum version */
5132
if ((xml_major_version > major) ||
5133
((xml_major_version == major) && (xml_minor_version > minor)) ||
5134
((xml_major_version == major) && (xml_minor_version == minor) &&
5135
(xml_micro_version >= micro)))
5141
printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
5142
xml_major_version, xml_minor_version, xml_micro_version);
5143
printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
5144
major, minor, micro);
5145
printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
5147
printf("*** If you have already installed a sufficiently new version, this error\n");
5148
printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
5149
printf("*** being found. The easiest way to fix this is to remove the old version\n");
5150
printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
5151
printf("*** correct copy of xml2-config. (In this case, you will have to\n");
5152
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
5153
printf("*** so that the correct libraries are found at run-time))\n");
5157
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
5158
CFLAGS="$ac_save_CFLAGS"
5159
LIBS="$ac_save_LIBS"
5163
if test "x$no_xml" = x ; then
5164
AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
5165
ifelse([$2], , :, [$2])
5168
if test "$XML2_CONFIG" = "no" ; then
5169
echo "*** The xml2-config script installed by LIBXML could not be found"
5170
echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
5171
echo "*** your path, or set the XML2_CONFIG environment variable to the"
5172
echo "*** full path to xml2-config."
5174
if test -f conf.xmltest ; then
5177
echo "*** Could not run libxml test program, checking why..."
5178
CFLAGS="$CFLAGS $XML_CFLAGS"
5179
LIBS="$LIBS $XML_LIBS"
5181
#include <xmlversion.h>
5183
], [ LIBXML_TEST_VERSION; return 0;],
5184
[ echo "*** The test program compiled, but did not run. This usually means"
5185
echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
5186
echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
5187
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
5188
echo "*** to the installed location Also, make sure you have run ldconfig if that"
5189
echo "*** is required on your system"
5191
echo "*** If you have an old version installed, it is best to remove it, although"
5192
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
5193
[ echo "*** The test program failed to compile or link. See the file config.log for the"
5194
echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
5195
echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
5196
echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
5197
CFLAGS="$ac_save_CFLAGS"
5198
LIBS="$ac_save_LIBS"
5204
ifelse([$3], , :, [$3])
5206
AC_SUBST(XML_CFLAGS)
5213
dnl From Bruno Haible.
5215
AC_DEFUN([AM_ICONV],
5217
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
5218
dnl those with the standalone portable GNU libiconv installed).
5220
AC_ARG_WITH([libiconv-prefix],
5221
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
5222
for dir in `echo "$withval" | tr : ' '`; do
5223
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5224
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
5228
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
5229
am_cv_func_iconv="no, consider installing GNU libiconv"
5231
AC_TRY_LINK([#include <stdlib.h>
5232
#include <iconv.h>],
5233
[iconv_t cd = iconv_open("","");
5234
iconv(cd,NULL,NULL,NULL,NULL);
5236
am_cv_func_iconv=yes)
5237
if test "$am_cv_func_iconv" != yes; then
5238
am_save_LIBS="$LIBS"
5239
LIBS="$LIBS -liconv"
5240
AC_TRY_LINK([#include <stdlib.h>
5241
#include <iconv.h>],
5242
[iconv_t cd = iconv_open("","");
5243
iconv(cd,NULL,NULL,NULL,NULL);
5246
am_cv_func_iconv=yes)
5247
LIBS="$am_save_LIBS"
5250
if test "$am_cv_func_iconv" = yes; then
5251
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
5252
AC_MSG_CHECKING([for iconv declaration])
5253
AC_CACHE_VAL(am_cv_proto_iconv, [
5261
#if defined(__STDC__) || defined(__cplusplus)
5262
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5266
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
5267
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
5268
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5269
AC_MSG_RESULT([$]{ac_t:-
5270
}[$]am_cv_proto_iconv)
5271
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
5272
[Define as const if the declaration of iconv() needs const.])
5275
if test "$am_cv_lib_iconv" = yes; then
5281
# Macro to add for using GNU gettext.
5282
# Ulrich Drepper <drepper@cygnus.com>, 1995.
5284
# This file can be copied and used freely without restrictions. It can
5285
# be used in projects which are not available under the GNU General Public
5286
# License or the GNU Library General Public License but which still want
5287
# to provide support for the GNU gettext functionality.
5288
# Please note that the actual code of the GNU gettext library is covered
5289
# by the GNU Library General Public License, and the rest of the GNU
5290
# gettext package package is covered by the GNU General Public License.
5291
# They are *not* in the public domain.
5295
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
5296
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
5297
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
5298
dnl depending on --{enable,disable}-{shared,static} and on the presence of
5299
dnl AM-DISABLE-SHARED). Otherwise, a static library
5300
dnl $(top_builddir)/intl/libintl.a will be created.
5301
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
5302
dnl implementations (in libc or libintl) without the ngettext() function
5303
dnl will be ignored.
5304
dnl LIBDIR is used to find the intl libraries. If empty,
5305
dnl the value `$(top_builddir)/intl/' is used.
5307
dnl The result of the configuration is one of three cases:
5308
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
5310
dnl Catalog format: GNU --> install in $(datadir)
5311
dnl Catalog extension: .mo after installation, .gmo in source tree
5312
dnl 2) GNU gettext has been found in the system's C library.
5313
dnl Catalog format: GNU --> install in $(datadir)
5314
dnl Catalog extension: .mo after installation, .gmo in source tree
5315
dnl 3) No internationalization, always use English msgid.
5316
dnl Catalog format: none
5317
dnl Catalog extension: none
5318
dnl The use of .gmo is historical (it was needed to avoid overwriting the
5319
dnl GNU format catalogs when building on a platform with an X/Open gettext),
5320
dnl but we keep it in order not to force irrelevant filename changes on the
5323
AC_DEFUN([AM_WITH_NLS],
5324
[AC_MSG_CHECKING([whether NLS is requested])
5325
dnl Default is enabled NLS
5327
[ --disable-nls do not use Native Language Support],
5328
USE_NLS=$enableval, USE_NLS=yes)
5329
AC_MSG_RESULT($USE_NLS)
5332
BUILD_INCLUDED_LIBINTL=no
5333
USE_INCLUDED_LIBINTL=no
5336
dnl If we use NLS figure out what method
5337
if test "$USE_NLS" = "yes"; then
5338
AC_DEFINE(ENABLE_NLS, 1,
5339
[Define to 1 if translation of program messages to the user's native language
5341
AC_MSG_CHECKING([whether included gettext is requested])
5342
AC_ARG_WITH(included-gettext,
5343
[ --with-included-gettext use the GNU gettext library included here],
5344
nls_cv_force_use_gnu_gettext=$withval,
5345
nls_cv_force_use_gnu_gettext=no)
5346
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
5348
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5349
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5350
dnl User does not insist on using GNU NLS library. Figure out what
5351
dnl to use. If GNU gettext is available we use this. Else we have
5352
dnl to fall back to GNU NLS library.
5355
dnl Add a version number to the cache macros.
5356
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
5357
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
5359
AC_CHECK_HEADER(libintl.h,
5360
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
5361
[AC_TRY_LINK([#include <libintl.h>
5362
extern int _nl_msg_cat_cntr;],
5363
[bindtextdomain ("", "");
5364
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
5365
gt_cv_func_gnugettext_libc=yes,
5366
gt_cv_func_gnugettext_libc=no)])
5368
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
5369
AC_CACHE_CHECK([for GNU gettext in libintl],
5370
gt_cv_func_gnugettext_libintl,
5371
[gt_save_LIBS="$LIBS"
5372
LIBS="$LIBS -lintl $LIBICONV"
5373
AC_TRY_LINK([#include <libintl.h>
5374
extern int _nl_msg_cat_cntr;],
5375
[bindtextdomain ("", "");
5376
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
5377
gt_cv_func_gnugettext_libintl=yes,
5378
gt_cv_func_gnugettext_libintl=no)
5379
LIBS="$gt_save_LIBS"])
5382
dnl If an already present or preinstalled GNU gettext() is found,
5383
dnl use it. But if this macro is used in GNU gettext, and GNU
5384
dnl gettext is already preinstalled in libintl, we update this
5385
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
5386
if test "$gt_cv_func_gnugettext_libc" = "yes" \
5387
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
5388
&& test "$PACKAGE" != gettext; }; then
5389
AC_DEFINE(HAVE_GETTEXT, 1,
5390
[Define if the GNU gettext() function is already present or preinstalled.])
5392
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
5393
dnl If iconv() is in a separate libiconv library, then anyone
5394
dnl linking with libintl{.a,.so} also needs to link with
5396
INTLLIBS="-lintl $LIBICONV"
5399
gt_save_LIBS="$LIBS"
5400
LIBS="$LIBS $INTLLIBS"
5401
AC_CHECK_FUNCS(dcgettext)
5402
LIBS="$gt_save_LIBS"
5404
dnl Search for GNU msgfmt in the PATH.
5405
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5406
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
5407
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5409
dnl Search for GNU xgettext in the PATH.
5410
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5411
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
5417
if test "$CATOBJEXT" = "NONE"; then
5418
dnl GNU gettext is not found in the C library.
5419
dnl Fall back on GNU gettext library.
5420
nls_cv_use_gnu_gettext=yes
5424
if test "$nls_cv_use_gnu_gettext" = "yes"; then
5425
dnl Mark actions used to generate GNU NLS library.
5426
INTLOBJS="\$(GETTOBJS)"
5427
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5428
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
5429
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5430
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5431
[$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
5433
BUILD_INCLUDED_LIBINTL=yes
5434
USE_INCLUDED_LIBINTL=yes
5436
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
5437
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
5440
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5441
dnl Test whether we really found GNU msgfmt.
5442
if test "$GMSGFMT" != ":"; then
5443
dnl If it is no GNU msgfmt we define it as : so that the
5444
dnl Makefiles still can work.
5445
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
5449
[found msgfmt program is not GNU msgfmt; ignore it])
5454
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5455
dnl Test whether we really found GNU xgettext.
5456
if test "$XGETTEXT" != ":"; then
5457
dnl If it is no GNU xgettext we define it as : so that the
5458
dnl Makefiles still can work.
5459
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
5463
[found xgettext program is not GNU xgettext; ignore it])
5468
dnl We need to process the po/ directory.
5472
[for ac_file in $CONFIG_FILES; do
5473
# Support "outfile[:infile[:infile...]]"
5475
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5477
# PO directories have a Makefile.in generated from Makefile.in.in.
5478
case "$ac_file" in */Makefile.in)
5479
# Adjust a relative srcdir.
5480
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
5481
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
5482
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
5483
# In autoconf-2.13 it is called $ac_given_srcdir.
5484
# In autoconf-2.50 it is called $srcdir.
5485
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
5486
case "$ac_given_srcdir" in
5487
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
5488
/*) top_srcdir="$ac_given_srcdir" ;;
5489
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
5491
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
5492
rm -f "$ac_dir/POTFILES"
5493
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
5494
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
5495
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
5496
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
5503
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
5504
dnl to 'yes' because some of the testsuite requires it.
5505
if test "$PACKAGE" = gettext; then
5506
BUILD_INCLUDED_LIBINTL=yes
5509
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
5510
dnl because plural.y uses bison specific features. It requires at least
5511
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
5513
dnl bison is only needed for the maintainer (who touches plural.y). But in
5514
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
5515
dnl the rule in general Makefile. Now, some people carelessly touch the
5516
dnl files or have a broken "make" program, hence the plural.c rule will
5517
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
5518
dnl present or too old.
5519
AC_CHECK_PROGS([INTLBISON], [bison])
5520
if test -z "$INTLBISON"; then
5523
dnl Found it, now check the version.
5524
AC_MSG_CHECKING([version of bison])
5525
changequote(<<,>>)dnl
5526
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
5527
case $ac_prog_version in
5528
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
5529
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
5531
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
5532
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
5534
AC_MSG_RESULT([$ac_prog_version])
5536
if test $ac_verc_fail = yes; then
5540
dnl These rules are solely for the distribution goal. While doing this
5541
dnl we only have to keep exactly one list of the available catalogs
5542
dnl in configure.in.
5543
for lang in $ALL_LINGUAS; do
5544
GMOFILES="$GMOFILES $lang.gmo"
5545
POFILES="$POFILES $lang.po"
5548
dnl Make all variables we use known to autoconf.
5549
AC_SUBST(BUILD_INCLUDED_LIBINTL)
5550
AC_SUBST(USE_INCLUDED_LIBINTL)
5559
dnl For backward compatibility. Some configure.ins may be using this.
5561
nls_cv_header_libgt=
5563
dnl For backward compatibility. Some Makefiles may be using this.
5565
AC_SUBST(DATADIRNAME)
5567
dnl For backward compatibility. Some Makefiles may be using this.
5569
AC_SUBST(INSTOBJEXT)
5571
dnl For backward compatibility. Some Makefiles may be using this.
5576
dnl Usage: Just like AM_WITH_NLS, which see.
5577
AC_DEFUN([AM_GNU_GETTEXT],
5578
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5579
AC_REQUIRE([AC_PROG_CC])dnl
5580
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5581
AC_REQUIRE([AC_PROG_RANLIB])dnl
5582
AC_REQUIRE([AC_ISC_POSIX])dnl
5583
AC_REQUIRE([AC_HEADER_STDC])dnl
5584
AC_REQUIRE([AC_C_CONST])dnl
5585
AC_REQUIRE([AC_C_INLINE])dnl
5586
AC_REQUIRE([AC_TYPE_OFF_T])dnl
5587
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
5588
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
5589
AC_REQUIRE([AC_FUNC_MMAP])dnl
5590
AC_REQUIRE([jm_GLIBC21])dnl
5592
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5593
stdlib.h string.h unistd.h sys/param.h])
5594
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
5595
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5596
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
5601
AM_WITH_NLS([$1],[$2],[$3])
5603
if test "x$CATOBJEXT" != "x"; then
5604
if test "x$ALL_LINGUAS" = "x"; then
5607
AC_MSG_CHECKING(for catalogs to be installed)
5609
for presentlang in $ALL_LINGUAS; do
5611
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
5612
# Use the presentlang catalog if desiredlang is
5613
# a. equal to presentlang, or
5614
# b. a variant of presentlang (because in this case,
5615
# presentlang can be used as a fallback for messages
5616
# which are not translated in the desiredlang catalog).
5617
case "$desiredlang" in
5618
"$presentlang"*) useit=yes;;
5621
if test $useit = yes; then
5622
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
5625
LINGUAS=$NEW_LINGUAS
5626
AC_MSG_RESULT($LINGUAS)
5629
dnl Construct list of names of catalog files to be constructed.
5630
if test -n "$LINGUAS"; then
5631
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
5635
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
5636
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
5637
dnl Try to locate is.
5639
if test -n "$ac_aux_dir"; then
5640
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5642
if test -z "$MKINSTALLDIRS"; then
5643
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5645
AC_SUBST(MKINSTALLDIRS)
5647
dnl Enable libtool support if the surrounding package wishes it.
5648
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
5649
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
5652
# Search path for a program which passes the given test.
5653
# Ulrich Drepper <drepper@cygnus.com>, 1996.
5655
# This file can be copied and used freely without restrictions. It can
5656
# be used in projects which are not available under the GNU General Public
5657
# License or the GNU Library General Public License but which still want
5658
# to provide support for the GNU gettext functionality.
5659
# Please note that the actual code of the GNU gettext library is covered
5660
# by the GNU Library General Public License, and the rest of the GNU
5661
# gettext package package is covered by the GNU General Public License.
5662
# They are *not* in the public domain.
5666
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
5667
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
5668
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
5669
[# Extract the first word of "$2", so it can be a program name with args.
5670
set dummy $2; ac_word=[$]2
5671
AC_MSG_CHECKING([for $ac_word])
5672
AC_CACHE_VAL(ac_cv_path_$1,
5675
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
5678
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5679
for ac_dir in ifelse([$5], , $PATH, [$5]); do
5680
test -z "$ac_dir" && ac_dir=.
5681
if test -f $ac_dir/$ac_word; then
5683
ac_cv_path_$1="$ac_dir/$ac_word"
5689
dnl If no 4th arg is given, leave the cache variable unset,
5690
dnl so AC_PATH_PROGS will keep looking.
5691
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5696
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5697
AC_MSG_RESULT([$]$1)
5706
# Test for the GNU C Library, version 2.1 or newer.
5707
# From Bruno Haible.
5709
AC_DEFUN([jm_GLIBC21],
5711
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5712
ac_cv_gnu_library_2_1,
5713
[AC_EGREP_CPP([Lucky GNU user],
5715
#include <features.h>
5716
#ifdef __GNU_LIBRARY__
5717
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5722
ac_cv_gnu_library_2_1=yes,
5723
ac_cv_gnu_library_2_1=no)
5727
GLIBC21="$ac_cv_gnu_library_2_1"
5733
dnl From Bruno Haible.
5735
AC_DEFUN([AM_LANGINFO_CODESET],
5737
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
5738
[AC_TRY_LINK([#include <langinfo.h>],
5739
[char* cs = nl_langinfo(CODESET);],
5740
am_cv_langinfo_codeset=yes,
5741
am_cv_langinfo_codeset=no)
5743
if test $am_cv_langinfo_codeset = yes; then
5744
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
5745
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
5749
# Check whether LC_MESSAGES is available in <locale.h>.
5750
# Ulrich Drepper <drepper@cygnus.com>, 1995.
5752
# This file can be copied and used freely without restrictions. It can
5753
# be used in projects which are not available under the GNU General Public
5754
# License or the GNU Library General Public License but which still want
5755
# to provide support for the GNU gettext functionality.
5756
# Please note that the actual code of the GNU gettext library is covered
5757
# by the GNU Library General Public License, and the rest of the GNU
5758
# gettext package package is covered by the GNU General Public License.
5759
# They are *not* in the public domain.
5763
AC_DEFUN([AM_LC_MESSAGES],
5764
[if test $ac_cv_header_locale_h = yes; then
5765
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
5766
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
5767
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
5768
if test $am_cv_val_LC_MESSAGES = yes; then
5769
AC_DEFINE(HAVE_LC_MESSAGES, 1,
5770
[Define if your <locale.h> file defines LC_MESSAGES.])