1 |
dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
# generated automatically by aclocal 1.9.5 -*- Autoconf -*- |
2 |
|
|
3 |
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
4 |
dnl This file is free software; the Free Software Foundation |
# 2005 Free Software Foundation, Inc. |
5 |
dnl gives unlimited permission to copy and/or distribute it, |
# This file is free software; the Free Software Foundation |
6 |
dnl with or without modifications, as long as this notice is preserved. |
# gives unlimited permission to copy and/or distribute it, |
7 |
|
# with or without modifications, as long as this notice is preserved. |
|
dnl This program is distributed in the hope that it will be useful, |
|
|
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
|
|
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
|
|
dnl PARTICULAR PURPOSE. |
|
|
|
|
|
dnl See whether we need to use fopen-bin.h rather than fopen-same.h. |
|
|
AC_DEFUN(BFD_BINARY_FOPEN, |
|
|
[AC_REQUIRE([AC_CANONICAL_SYSTEM]) |
|
|
case "${host}" in |
|
|
changequote(,)dnl |
|
|
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) |
|
|
changequote([,])dnl |
|
|
AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; |
|
|
esac])dnl |
|
|
|
|
|
dnl Get a default for CC_FOR_BUILD to put into Makefile. |
|
|
AC_DEFUN(BFD_CC_FOR_BUILD, |
|
|
[# Put a plausible default for CC_FOR_BUILD in Makefile. |
|
|
if test -z "$CC_FOR_BUILD"; then |
|
|
if test "x$cross_compiling" = "xno"; then |
|
|
CC_FOR_BUILD='$(CC)' |
|
|
else |
|
|
CC_FOR_BUILD=gcc |
|
|
fi |
|
|
fi |
|
|
AC_SUBST(CC_FOR_BUILD) |
|
|
# Also set EXEEXT_FOR_BUILD. |
|
|
if test "x$cross_compiling" = "xno"; then |
|
|
EXEEXT_FOR_BUILD='$(EXEEXT)' |
|
|
else |
|
|
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, |
|
|
[rm -f conftest* |
|
|
echo 'int main () { return 0; }' > conftest.c |
|
|
bfd_cv_build_exeext= |
|
|
${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 |
|
|
for file in conftest.*; do |
|
|
case $file in |
|
|
*.c | *.o | *.obj | *.ilk | *.pdb) ;; |
|
|
*) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; |
|
|
esac |
|
|
done |
|
|
rm -f conftest* |
|
|
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) |
|
|
EXEEXT_FOR_BUILD="" |
|
|
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} |
|
|
fi |
|
|
AC_SUBST(EXEEXT_FOR_BUILD)])dnl |
|
8 |
|
|
9 |
dnl See whether we need a declaration for a function. |
# This program is distributed in the hope that it will be useful, |
10 |
AC_DEFUN(BFD_NEED_DECLARATION, |
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
11 |
[AC_MSG_CHECKING([whether $1 must be declared]) |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
12 |
AC_CACHE_VAL(bfd_cv_decl_needed_$1, |
# PARTICULAR PURPOSE. |
|
[AC_TRY_COMPILE([ |
|
|
#include <stdio.h> |
|
|
#ifdef HAVE_STRING_H |
|
|
#include <string.h> |
|
|
#else |
|
|
#ifdef HAVE_STRINGS_H |
|
|
#include <strings.h> |
|
|
#endif |
|
|
#endif |
|
|
#ifdef HAVE_STDLIB_H |
|
|
#include <stdlib.h> |
|
|
#endif |
|
|
#ifdef HAVE_UNISTD_H |
|
|
#include <unistd.h> |
|
|
#endif], |
|
|
[char *(*pfn) = (char *(*)) $1], |
|
|
bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) |
|
|
AC_MSG_RESULT($bfd_cv_decl_needed_$1) |
|
|
if test $bfd_cv_decl_needed_$1 = yes; then |
|
|
AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, |
|
|
[Define if $1 is not declared in system header files.]) |
|
|
fi |
|
|
])dnl |
|
13 |
|
|
14 |
dnl Check for existence of a type $1 in sys/procfs.h |
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. |
15 |
|
# |
16 |
|
# This file is free software; the Free Software Foundation |
17 |
|
# gives unlimited permission to copy and/or distribute it, |
18 |
|
# with or without modifications, as long as this notice is preserved. |
19 |
|
|
20 |
AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, |
# AM_AUTOMAKE_VERSION(VERSION) |
21 |
[AC_MSG_CHECKING([for $1 in sys/procfs.h]) |
# ---------------------------- |
22 |
AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, |
# Automake X.Y traces this macro to ensure aclocal.m4 has been |
23 |
[AC_TRY_COMPILE([ |
# generated from the m4 files accompanying Automake X.Y. |
24 |
#define _SYSCALL32 |
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) |
|
#include <sys/procfs.h>], |
|
|
[$1 avar], |
|
|
bfd_cv_have_sys_procfs_type_$1=yes, |
|
|
bfd_cv_have_sys_procfs_type_$1=no |
|
|
)]) |
|
|
if test $bfd_cv_have_sys_procfs_type_$1 = yes; then |
|
|
AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, |
|
|
[Define if <sys/procfs.h> has $1.]) |
|
|
fi |
|
|
AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1) |
|
|
]) |
|
25 |
|
|
26 |
|
# AM_SET_CURRENT_AUTOMAKE_VERSION |
27 |
|
# ------------------------------- |
28 |
|
# Call AM_AUTOMAKE_VERSION so it can be traced. |
29 |
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
30 |
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
31 |
|
[AM_AUTOMAKE_VERSION([1.9.5])]) |
32 |
|
|
33 |
dnl Check for existence of member $2 in type $1 in sys/procfs.h |
# AM_AUX_DIR_EXPAND -*- Autoconf -*- |
34 |
|
|
35 |
AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
36 |
[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) |
# |
37 |
AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, |
# This file is free software; the Free Software Foundation |
38 |
[AC_TRY_COMPILE([ |
# gives unlimited permission to copy and/or distribute it, |
39 |
#define _SYSCALL32 |
# with or without modifications, as long as this notice is preserved. |
40 |
#include <sys/procfs.h>], |
|
41 |
[$1 avar; void* aref = (void*) &avar.$2], |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
42 |
bfd_cv_have_sys_procfs_type_member_$1_$2=yes, |
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
43 |
bfd_cv_have_sys_procfs_type_member_$1_$2=no |
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
44 |
)]) |
# |
45 |
if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then |
# Of course, Automake must honor this variable whenever it calls a |
46 |
AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1, |
# tool from the auxiliary directory. The problem is that $srcdir (and |
47 |
[Define if <sys/procfs.h> has $1.$2.]) |
# therefore $ac_aux_dir as well) can be either absolute or relative, |
48 |
fi |
# depending on how configure is run. This is pretty annoying, since |
49 |
AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top |
50 |
]) |
# source directory, any form will work fine, but in subdirectories a |
51 |
|
# relative path needs to be adjusted first. |
52 |
|
# |
53 |
|
# $ac_aux_dir/missing |
54 |
|
# fails when called from a subdirectory if $ac_aux_dir is relative |
55 |
|
# $top_srcdir/$ac_aux_dir/missing |
56 |
|
# fails if $ac_aux_dir is absolute, |
57 |
|
# fails when called from a subdirectory in a VPATH build with |
58 |
|
# a relative $ac_aux_dir |
59 |
|
# |
60 |
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
61 |
|
# are both prefixed by $srcdir. In an in-source build this is usually |
62 |
|
# harmless because $srcdir is `.', but things will broke when you |
63 |
|
# start a VPATH build or use an absolute $srcdir. |
64 |
|
# |
65 |
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
66 |
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
67 |
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
68 |
|
# and then we would define $MISSING as |
69 |
|
# MISSING="\${SHELL} $am_aux_dir/missing" |
70 |
|
# This will work as long as MISSING is not called from configure, because |
71 |
|
# unfortunately $(top_srcdir) has no meaning in configure. |
72 |
|
# However there are other variables, like CC, which are often used in |
73 |
|
# configure, and could therefore not use this "fixed" $ac_aux_dir. |
74 |
|
# |
75 |
|
# Another solution, used here, is to always expand $ac_aux_dir to an |
76 |
|
# absolute PATH. The drawback is that using absolute paths prevent a |
77 |
|
# configured tree to be moved without reconfiguration. |
78 |
|
|
79 |
sinclude(../libtool.m4) |
AC_DEFUN([AM_AUX_DIR_EXPAND], |
80 |
dnl The lines below arrange for aclocal not to bring libtool.m4 |
[dnl Rely on autoconf to set up CDPATH properly. |
81 |
dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake |
AC_PREREQ([2.50])dnl |
82 |
dnl to add a definition of LIBTOOL to Makefile.in. |
# expand $ac_aux_dir to an absolute path |
83 |
ifelse(yes,no,[ |
am_aux_dir=`cd $ac_aux_dir && pwd` |
|
AC_DEFUN([AM_PROG_LIBTOOL],) |
|
|
AC_DEFUN([AM_DISABLE_SHARED],) |
|
|
AC_SUBST(LIBTOOL) |
|
84 |
]) |
]) |
85 |
|
|
86 |
sinclude(../gettext.m4) |
# AM_CONDITIONAL -*- Autoconf -*- |
|
ifelse(yes,no,[ |
|
|
AC_DEFUN([CY_WITH_NLS],) |
|
|
AC_SUBST(INTLLIBS) |
|
|
]) |
|
87 |
|
|
88 |
AC_DEFUN([AM_INSTALL_LIBBFD], |
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 |
89 |
[AC_MSG_CHECKING([whether to install libbfd]) |
# Free Software Foundation, Inc. |
90 |
AC_ARG_ENABLE(install-libbfd, |
# |
91 |
[ --install-libbfd controls installation of libbfd and related headers], |
# This file is free software; the Free Software Foundation |
92 |
install_libbfd_p=$enableval, |
# gives unlimited permission to copy and/or distribute it, |
93 |
if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then |
# with or without modifications, as long as this notice is preserved. |
94 |
install_libbfd_p=yes |
|
95 |
else |
# serial 7 |
96 |
install_libbfd_p=no |
|
97 |
fi) |
# AM_CONDITIONAL(NAME, SHELL-CONDITION) |
98 |
AC_MSG_RESULT($install_libbfd_p) |
# ------------------------------------- |
99 |
AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes) |
# Define a conditional. |
100 |
# libbfd.a is a host library containing target dependent code |
AC_DEFUN([AM_CONDITIONAL], |
101 |
bfdlibdir='$(libdir)' |
[AC_PREREQ(2.52)dnl |
102 |
bfdincludedir='$(includedir)' |
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
103 |
if test "${host}" != "${target}"; then |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
104 |
bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' |
AC_SUBST([$1_TRUE]) |
105 |
bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' |
AC_SUBST([$1_FALSE]) |
106 |
|
if $2; then |
107 |
|
$1_TRUE= |
108 |
|
$1_FALSE='#' |
109 |
|
else |
110 |
|
$1_TRUE='#' |
111 |
|
$1_FALSE= |
112 |
|
fi |
113 |
|
AC_CONFIG_COMMANDS_PRE( |
114 |
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
115 |
|
AC_MSG_ERROR([[conditional "$1" was never defined. |
116 |
|
Usually this means the macro was only invoked conditionally.]]) |
117 |
|
fi])]) |
118 |
|
|
119 |
|
|
120 |
|
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
121 |
|
# Free Software Foundation, Inc. |
122 |
|
# |
123 |
|
# This file is free software; the Free Software Foundation |
124 |
|
# gives unlimited permission to copy and/or distribute it, |
125 |
|
# with or without modifications, as long as this notice is preserved. |
126 |
|
|
127 |
|
# serial 8 |
128 |
|
|
129 |
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
130 |
|
# written in clear, in which case automake, when reading aclocal.m4, |
131 |
|
# will think it sees a *use*, and therefore will trigger all it's |
132 |
|
# C support machinery. Also note that it means that autoscan, seeing |
133 |
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
134 |
|
|
135 |
|
|
136 |
|
# _AM_DEPENDENCIES(NAME) |
137 |
|
# ---------------------- |
138 |
|
# See how the compiler implements dependency checking. |
139 |
|
# NAME is "CC", "CXX", "GCJ", or "OBJC". |
140 |
|
# We try a few techniques and use that to set a single cache variable. |
141 |
|
# |
142 |
|
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
143 |
|
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
144 |
|
# dependency, and given that the user is not expected to run this macro, |
145 |
|
# just rely on AC_PROG_CC. |
146 |
|
AC_DEFUN([_AM_DEPENDENCIES], |
147 |
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl |
148 |
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
149 |
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
150 |
|
AC_REQUIRE([AM_DEP_TRACK])dnl |
151 |
|
|
152 |
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
153 |
|
[$1], CXX, [depcc="$CXX" am_compiler_list=], |
154 |
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
155 |
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
156 |
|
[depcc="$$1" am_compiler_list=]) |
157 |
|
|
158 |
|
AC_CACHE_CHECK([dependency style of $depcc], |
159 |
|
[am_cv_$1_dependencies_compiler_type], |
160 |
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
161 |
|
# We make a subdir and do the tests there. Otherwise we can end up |
162 |
|
# making bogus files that we don't know about and never remove. For |
163 |
|
# instance it was reported that on HP-UX the gcc test will end up |
164 |
|
# making a dummy file named `D' -- because `-MD' means `put the output |
165 |
|
# in D'. |
166 |
|
mkdir conftest.dir |
167 |
|
# Copy depcomp to subdir because otherwise we won't find it if we're |
168 |
|
# using a relative directory. |
169 |
|
cp "$am_depcomp" conftest.dir |
170 |
|
cd conftest.dir |
171 |
|
# We will build objects and dependencies in a subdirectory because |
172 |
|
# it helps to detect inapplicable dependency modes. For instance |
173 |
|
# both Tru64's cc and ICC support -MD to output dependencies as a |
174 |
|
# side effect of compilation, but ICC will put the dependencies in |
175 |
|
# the current directory while Tru64 will put them in the object |
176 |
|
# directory. |
177 |
|
mkdir sub |
178 |
|
|
179 |
|
am_cv_$1_dependencies_compiler_type=none |
180 |
|
if test "$am_compiler_list" = ""; then |
181 |
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
182 |
fi |
fi |
183 |
AC_SUBST(bfdlibdir) |
for depmode in $am_compiler_list; do |
184 |
AC_SUBST(bfdincludedir) |
# Setup a source with many dependencies, because some compilers |
185 |
] |
# like to wrap large dependency lists on column 80 (with \), and |
186 |
) |
# we should not choose a depcomp mode which is confused by this. |
187 |
|
# |
188 |
|
# We need to recreate these files for each test, as the compiler may |
189 |
|
# overwrite some of them when testing with obscure command lines. |
190 |
|
# This happens at least with the AIX C compiler. |
191 |
|
: > sub/conftest.c |
192 |
|
for i in 1 2 3 4 5 6; do |
193 |
|
echo '#include "conftst'$i'.h"' >> sub/conftest.c |
194 |
|
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
195 |
|
# Solaris 8's {/usr,}/bin/sh. |
196 |
|
touch sub/conftst$i.h |
197 |
|
done |
198 |
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
199 |
|
|
200 |
# lib-prefix.m4 serial 3 (gettext-0.13) |
case $depmode in |
201 |
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
nosideeffect) |
202 |
dnl This file is free software, distributed under the terms of the GNU |
# after this tag, mechanisms are not by side-effect, so they'll |
203 |
dnl General Public License. As a special exception to the GNU General |
# only be used when explicitly requested |
204 |
dnl Public License, this file may be distributed as part of a program |
if test "x$enable_dependency_tracking" = xyes; then |
205 |
dnl that contains a configuration script generated by Autoconf, under |
continue |
|
dnl the same distribution terms as the rest of that program. |
|
|
|
|
|
dnl From Bruno Haible. |
|
|
|
|
|
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and |
|
|
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't |
|
|
dnl require excessive bracketing. |
|
|
ifdef([AC_HELP_STRING], |
|
|
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], |
|
|
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) |
|
|
|
|
|
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
|
|
dnl to access previously installed libraries. The basic assumption is that |
|
|
dnl a user will want packages to use other packages he previously installed |
|
|
dnl with the same --prefix option. |
|
|
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate |
|
|
dnl libraries, but is otherwise very convenient. |
|
|
AC_DEFUN([AC_LIB_PREFIX], |
|
|
[ |
|
|
AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) |
|
|
AC_REQUIRE([AC_PROG_CC]) |
|
|
AC_REQUIRE([AC_CANONICAL_HOST]) |
|
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|
|
dnl By default, look in $includedir and $libdir. |
|
|
use_additional=yes |
|
|
AC_LIB_WITH_FINAL_PREFIX([ |
|
|
eval additional_includedir=\"$includedir\" |
|
|
eval additional_libdir=\"$libdir\" |
|
|
]) |
|
|
AC_LIB_ARG_WITH([lib-prefix], |
|
|
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib |
|
|
--without-lib-prefix don't search for libraries in includedir and libdir], |
|
|
[ |
|
|
if test "X$withval" = "Xno"; then |
|
|
use_additional=no |
|
|
else |
|
|
if test "X$withval" = "X"; then |
|
|
AC_LIB_WITH_FINAL_PREFIX([ |
|
|
eval additional_includedir=\"$includedir\" |
|
|
eval additional_libdir=\"$libdir\" |
|
|
]) |
|
206 |
else |
else |
207 |
additional_includedir="$withval/include" |
break |
|
additional_libdir="$withval/lib" |
|
|
fi |
|
|
fi |
|
|
]) |
|
|
if test $use_additional = yes; then |
|
|
dnl Potentially add $additional_includedir to $CPPFLAGS. |
|
|
dnl But don't add it |
|
|
dnl 1. if it's the standard /usr/include, |
|
|
dnl 2. if it's already present in $CPPFLAGS, |
|
|
dnl 3. if it's /usr/local/include and we are using GCC on Linux, |
|
|
dnl 4. if it doesn't exist as a directory. |
|
|
if test "X$additional_includedir" != "X/usr/include"; then |
|
|
haveit= |
|
|
for x in $CPPFLAGS; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X-I$additional_includedir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
if test "X$additional_includedir" = "X/usr/local/include"; then |
|
|
if test -n "$GCC"; then |
|
|
case $host_os in |
|
|
linux*) haveit=yes;; |
|
|
esac |
|
|
fi |
|
|
fi |
|
|
if test -z "$haveit"; then |
|
|
if test -d "$additional_includedir"; then |
|
|
dnl Really add $additional_includedir to $CPPFLAGS. |
|
|
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" |
|
|
fi |
|
|
fi |
|
208 |
fi |
fi |
209 |
fi |
;; |
210 |
dnl Potentially add $additional_libdir to $LDFLAGS. |
none) break ;; |
211 |
dnl But don't add it |
esac |
212 |
dnl 1. if it's the standard /usr/lib, |
# We check with `-c' and `-o' for the sake of the "dashmstdout" |
213 |
dnl 2. if it's already present in $LDFLAGS, |
# mode. It turns out that the SunPro C++ compiler does not properly |
214 |
dnl 3. if it's /usr/local/lib and we are using GCC on Linux, |
# handle `-M -o', and we need to detect this. |
215 |
dnl 4. if it doesn't exist as a directory. |
if depmode=$depmode \ |
216 |
if test "X$additional_libdir" != "X/usr/lib"; then |
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
217 |
haveit= |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
218 |
for x in $LDFLAGS; do |
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ |
219 |
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
>/dev/null 2>conftest.err && |
220 |
if test "X$x" = "X-L$additional_libdir"; then |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
221 |
haveit=yes |
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && |
222 |
break |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
223 |
fi |
# icc doesn't choke on unknown options, it will just issue warnings |
224 |
done |
# or remarks (even with -Werror). So we grep stderr for any message |
225 |
if test -z "$haveit"; then |
# that says an option was ignored or not supported. |
226 |
if test "X$additional_libdir" = "X/usr/local/lib"; then |
# When given -MP, icc 7.0 and 7.1 complain thusly: |
227 |
if test -n "$GCC"; then |
# icc: Command line warning: ignoring option '-M'; no argument required |
228 |
case $host_os in |
# The diagnosis changed in icc 8.0: |
229 |
linux*) haveit=yes;; |
# icc: Command line remark: option '-MP' not supported |
230 |
esac |
if (grep 'ignoring option' conftest.err || |
231 |
fi |
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
232 |
fi |
am_cv_$1_dependencies_compiler_type=$depmode |
233 |
if test -z "$haveit"; then |
break |
|
if test -d "$additional_libdir"; then |
|
|
dnl Really add $additional_libdir to $LDFLAGS. |
|
|
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" |
|
|
fi |
|
|
fi |
|
234 |
fi |
fi |
235 |
fi |
fi |
236 |
fi |
done |
|
]) |
|
237 |
|
|
238 |
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, |
cd .. |
239 |
dnl acl_final_exec_prefix, containing the values to which $prefix and |
rm -rf conftest.dir |
240 |
dnl $exec_prefix will expand at the end of the configure script. |
else |
241 |
AC_DEFUN([AC_LIB_PREPARE_PREFIX], |
am_cv_$1_dependencies_compiler_type=none |
242 |
[ |
fi |
243 |
dnl Unfortunately, prefix and exec_prefix get only finally determined |
]) |
244 |
dnl at the end of configure. |
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
245 |
if test "X$prefix" = "XNONE"; then |
AM_CONDITIONAL([am__fastdep$1], [ |
246 |
acl_final_prefix="$ac_default_prefix" |
test "x$enable_dependency_tracking" != xno \ |
247 |
else |
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
|
acl_final_prefix="$prefix" |
|
|
fi |
|
|
if test "X$exec_prefix" = "XNONE"; then |
|
|
acl_final_exec_prefix='${prefix}' |
|
|
else |
|
|
acl_final_exec_prefix="$exec_prefix" |
|
|
fi |
|
|
acl_save_prefix="$prefix" |
|
|
prefix="$acl_final_prefix" |
|
|
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
|
|
prefix="$acl_save_prefix" |
|
248 |
]) |
]) |
249 |
|
|
250 |
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the |
|
251 |
dnl variables prefix and exec_prefix bound to the values they will have |
# AM_SET_DEPDIR |
252 |
dnl at the end of the configure script. |
# ------------- |
253 |
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], |
# Choose a directory name for dependency files. |
254 |
[ |
# This macro is AC_REQUIREd in _AM_DEPENDENCIES |
255 |
acl_save_prefix="$prefix" |
AC_DEFUN([AM_SET_DEPDIR], |
256 |
prefix="$acl_final_prefix" |
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
257 |
acl_save_exec_prefix="$exec_prefix" |
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
|
exec_prefix="$acl_final_exec_prefix" |
|
|
$1 |
|
|
exec_prefix="$acl_save_exec_prefix" |
|
|
prefix="$acl_save_prefix" |
|
258 |
]) |
]) |
259 |
|
|
260 |
# lib-link.m4 serial 4 (gettext-0.12) |
|
261 |
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. |
# AM_DEP_TRACK |
262 |
dnl This file is free software, distributed under the terms of the GNU |
# ------------ |
263 |
dnl General Public License. As a special exception to the GNU General |
AC_DEFUN([AM_DEP_TRACK], |
264 |
dnl Public License, this file may be distributed as part of a program |
[AC_ARG_ENABLE(dependency-tracking, |
265 |
dnl that contains a configuration script generated by Autoconf, under |
[ --disable-dependency-tracking speeds up one-time build |
266 |
dnl the same distribution terms as the rest of that program. |
--enable-dependency-tracking do not reject slow dependency extractors]) |
267 |
|
if test "x$enable_dependency_tracking" != xno; then |
268 |
dnl From Bruno Haible. |
am_depcomp="$ac_aux_dir/depcomp" |
269 |
|
AMDEPBACKSLASH='\' |
270 |
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
fi |
271 |
dnl the libraries corresponding to explicit and implicit dependencies. |
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
272 |
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
AC_SUBST([AMDEPBACKSLASH]) |
|
dnl augments the CPPFLAGS variable. |
|
|
AC_DEFUN([AC_LIB_LINKFLAGS], |
|
|
[ |
|
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|
|
AC_REQUIRE([AC_LIB_RPATH]) |
|
|
define([Name],[translit([$1],[./-], [___])]) |
|
|
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
|
|
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ |
|
|
AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
|
|
ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
|
|
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
|
|
ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
|
|
]) |
|
|
LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
|
|
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
|
|
INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
|
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
|
|
AC_SUBST([LIB]NAME) |
|
|
AC_SUBST([LTLIB]NAME) |
|
|
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
|
|
dnl results of this search when this library appears as a dependency. |
|
|
HAVE_LIB[]NAME=yes |
|
|
undefine([Name]) |
|
|
undefine([NAME]) |
|
273 |
]) |
]) |
274 |
|
|
275 |
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) |
# Generate code to set up dependency tracking. -*- Autoconf -*- |
276 |
dnl searches for libname and the libraries corresponding to explicit and |
|
277 |
dnl implicit dependencies, together with the specified include files and |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
278 |
dnl the ability to compile and link the specified testcode. If found, it |
# Free Software Foundation, Inc. |
279 |
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and |
# |
280 |
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and |
# This file is free software; the Free Software Foundation |
281 |
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
# gives unlimited permission to copy and/or distribute it, |
282 |
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
# with or without modifications, as long as this notice is preserved. |
283 |
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
|
284 |
[ |
#serial 3 |
285 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|
286 |
AC_REQUIRE([AC_LIB_RPATH]) |
# _AM_OUTPUT_DEPENDENCY_COMMANDS |
287 |
define([Name],[translit([$1],[./-], [___])]) |
# ------------------------------ |
288 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
289 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
[for mf in $CONFIG_FILES; do |
290 |
|
# Strip MF so we end up with the name of the file. |
291 |
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME |
mf=`echo "$mf" | sed -e 's/:.*$//'` |
292 |
dnl accordingly. |
# Check whether this is an Automake generated Makefile or not. |
293 |
AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
# We used to match only the files named `Makefile.in', but |
294 |
|
# some people rename them; so instead we look at the file content. |
295 |
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, |
# Grep'ing the first line is not enough: some people post-process |
296 |
dnl because if the user has installed lib[]Name and not disabled its use |
# each Makefile.in and add a new line on top of each file to say so. |
297 |
dnl via --without-lib[]Name-prefix, he wants to use it. |
# So let's grep whole file. |
298 |
ac_save_CPPFLAGS="$CPPFLAGS" |
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
299 |
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
dirpart=`AS_DIRNAME("$mf")` |
|
|
|
|
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
|
|
ac_save_LIBS="$LIBS" |
|
|
LIBS="$LIBS $LIB[]NAME" |
|
|
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) |
|
|
LIBS="$ac_save_LIBS" |
|
|
]) |
|
|
if test "$ac_cv_lib[]Name" = yes; then |
|
|
HAVE_LIB[]NAME=yes |
|
|
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) |
|
|
AC_MSG_CHECKING([how to link with lib[]$1]) |
|
|
AC_MSG_RESULT([$LIB[]NAME]) |
|
300 |
else |
else |
301 |
HAVE_LIB[]NAME=no |
continue |
|
dnl If $LIB[]NAME didn't lead to a usable library, we don't need |
|
|
dnl $INC[]NAME either. |
|
|
CPPFLAGS="$ac_save_CPPFLAGS" |
|
|
LIB[]NAME= |
|
|
LTLIB[]NAME= |
|
302 |
fi |
fi |
303 |
AC_SUBST([HAVE_LIB]NAME) |
# Extract the definition of DEPDIR, am__include, and am__quote |
304 |
AC_SUBST([LIB]NAME) |
# from the Makefile without running `make'. |
305 |
AC_SUBST([LTLIB]NAME) |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
306 |
undefine([Name]) |
test -z "$DEPDIR" && continue |
307 |
undefine([NAME]) |
am__include=`sed -n 's/^am__include = //p' < "$mf"` |
308 |
]) |
test -z "am__include" && continue |
309 |
|
am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
310 |
|
# When using ansi2knr, U may be empty or an underscore; expand it |
311 |
|
U=`sed -n 's/^U = //p' < "$mf"` |
312 |
|
# Find all dependency output files, they are included files with |
313 |
|
# $(DEPDIR) in their names. We invoke sed twice because it is the |
314 |
|
# simplest approach to changing $(DEPDIR) to its actual value in the |
315 |
|
# expansion. |
316 |
|
for file in `sed -n " |
317 |
|
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ |
318 |
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
319 |
|
# Make sure the directory exists. |
320 |
|
test -f "$dirpart/$file" && continue |
321 |
|
fdir=`AS_DIRNAME(["$file"])` |
322 |
|
AS_MKDIR_P([$dirpart/$fdir]) |
323 |
|
# echo "creating $dirpart/$file" |
324 |
|
echo '# dummy' > "$dirpart/$file" |
325 |
|
done |
326 |
|
done |
327 |
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
328 |
|
|
|
dnl Determine the platform dependent parameters needed to use rpath: |
|
|
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, |
|
|
dnl hardcode_direct, hardcode_minus_L. |
|
|
AC_DEFUN([AC_LIB_RPATH], |
|
|
[ |
|
|
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
|
|
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
|
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
|
|
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
|
|
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ |
|
|
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
|
|
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
|
|
. ./conftest.sh |
|
|
rm -f ./conftest.sh |
|
|
acl_cv_rpath=done |
|
|
]) |
|
|
wl="$acl_cv_wl" |
|
|
libext="$acl_cv_libext" |
|
|
shlibext="$acl_cv_shlibext" |
|
|
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
|
|
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
|
|
hardcode_direct="$acl_cv_hardcode_direct" |
|
|
hardcode_minus_L="$acl_cv_hardcode_minus_L" |
|
|
dnl Determine whether the user wants rpath handling at all. |
|
|
AC_ARG_ENABLE(rpath, |
|
|
[ --disable-rpath do not hardcode runtime library paths], |
|
|
:, enable_rpath=yes) |
|
|
]) |
|
329 |
|
|
330 |
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
# AM_OUTPUT_DEPENDENCY_COMMANDS |
331 |
dnl the libraries corresponding to explicit and implicit dependencies. |
# ----------------------------- |
332 |
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
# This macro should only be invoked once -- use via AC_REQUIRE. |
333 |
AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
# |
334 |
[ |
# This code is only required when automatic dependency tracking |
335 |
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], |
# is enabled. FIXME. This creates each `.P' file that we will |
336 |
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) |
# need in order to bootstrap the dependency handling code. |
337 |
dnl By default, look in $includedir and $libdir. |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
338 |
use_additional=yes |
[AC_CONFIG_COMMANDS([depfiles], |
339 |
AC_LIB_WITH_FINAL_PREFIX([ |
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
340 |
eval additional_includedir=\"$includedir\" |
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
|
eval additional_libdir=\"$libdir\" |
|
|
]) |
|
|
AC_LIB_ARG_WITH([lib$1-prefix], |
|
|
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib |
|
|
--without-lib$1-prefix don't search for lib$1 in includedir and libdir], |
|
|
[ |
|
|
if test "X$withval" = "Xno"; then |
|
|
use_additional=no |
|
|
else |
|
|
if test "X$withval" = "X"; then |
|
|
AC_LIB_WITH_FINAL_PREFIX([ |
|
|
eval additional_includedir=\"$includedir\" |
|
|
eval additional_libdir=\"$libdir\" |
|
|
]) |
|
|
else |
|
|
additional_includedir="$withval/include" |
|
|
additional_libdir="$withval/lib" |
|
|
fi |
|
|
fi |
|
|
]) |
|
|
dnl Search the library and its dependencies in $additional_libdir and |
|
|
dnl $LDFLAGS. Using breadth-first-seach. |
|
|
LIB[]NAME= |
|
|
LTLIB[]NAME= |
|
|
INC[]NAME= |
|
|
rpathdirs= |
|
|
ltrpathdirs= |
|
|
names_already_handled= |
|
|
names_next_round='$1 $2' |
|
|
while test -n "$names_next_round"; do |
|
|
names_this_round="$names_next_round" |
|
|
names_next_round= |
|
|
for name in $names_this_round; do |
|
|
already_handled= |
|
|
for n in $names_already_handled; do |
|
|
if test "$n" = "$name"; then |
|
|
already_handled=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$already_handled"; then |
|
|
names_already_handled="$names_already_handled $name" |
|
|
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS |
|
|
dnl or AC_LIB_HAVE_LINKFLAGS call. |
|
|
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
|
|
eval value=\"\$HAVE_LIB$uppername\" |
|
|
if test -n "$value"; then |
|
|
if test "$value" = yes; then |
|
|
eval value=\"\$LIB$uppername\" |
|
|
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" |
|
|
eval value=\"\$LTLIB$uppername\" |
|
|
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" |
|
|
else |
|
|
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined |
|
|
dnl that this library doesn't exist. So just drop it. |
|
|
: |
|
|
fi |
|
|
else |
|
|
dnl Search the library lib$name in $additional_libdir and $LDFLAGS |
|
|
dnl and the already constructed $LIBNAME/$LTLIBNAME. |
|
|
found_dir= |
|
|
found_la= |
|
|
found_so= |
|
|
found_a= |
|
|
if test $use_additional = yes; then |
|
|
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
|
|
found_dir="$additional_libdir" |
|
|
found_so="$additional_libdir/lib$name.$shlibext" |
|
|
if test -f "$additional_libdir/lib$name.la"; then |
|
|
found_la="$additional_libdir/lib$name.la" |
|
|
fi |
|
|
else |
|
|
if test -f "$additional_libdir/lib$name.$libext"; then |
|
|
found_dir="$additional_libdir" |
|
|
found_a="$additional_libdir/lib$name.$libext" |
|
|
if test -f "$additional_libdir/lib$name.la"; then |
|
|
found_la="$additional_libdir/lib$name.la" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
if test "X$found_dir" = "X"; then |
|
|
for x in $LDFLAGS $LTLIB[]NAME; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
case "$x" in |
|
|
-L*) |
|
|
dir=`echo "X$x" | sed -e 's/^X-L//'` |
|
|
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
|
|
found_dir="$dir" |
|
|
found_so="$dir/lib$name.$shlibext" |
|
|
if test -f "$dir/lib$name.la"; then |
|
|
found_la="$dir/lib$name.la" |
|
|
fi |
|
|
else |
|
|
if test -f "$dir/lib$name.$libext"; then |
|
|
found_dir="$dir" |
|
|
found_a="$dir/lib$name.$libext" |
|
|
if test -f "$dir/lib$name.la"; then |
|
|
found_la="$dir/lib$name.la" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
esac |
|
|
if test "X$found_dir" != "X"; then |
|
|
break |
|
|
fi |
|
|
done |
|
|
fi |
|
|
if test "X$found_dir" != "X"; then |
|
|
dnl Found the library. |
|
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" |
|
|
if test "X$found_so" != "X"; then |
|
|
dnl Linking with a shared library. We attempt to hardcode its |
|
|
dnl directory into the executable's runpath, unless it's the |
|
|
dnl standard /usr/lib. |
|
|
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
|
|
dnl No hardcoding is needed. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|
|
else |
|
|
dnl Use an explicit option to hardcode DIR into the resulting |
|
|
dnl binary. |
|
|
dnl Potentially add DIR to ltrpathdirs. |
|
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
|
|
haveit= |
|
|
for x in $ltrpathdirs; do |
|
|
if test "X$x" = "X$found_dir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
ltrpathdirs="$ltrpathdirs $found_dir" |
|
|
fi |
|
|
dnl The hardcoding into $LIBNAME is system dependent. |
|
|
if test "$hardcode_direct" = yes; then |
|
|
dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
|
|
dnl resulting binary. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|
|
else |
|
|
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
|
|
dnl Use an explicit option to hardcode DIR into the resulting |
|
|
dnl binary. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|
|
dnl Potentially add DIR to rpathdirs. |
|
|
dnl The rpathdirs will be appended to $LIBNAME at the end. |
|
|
haveit= |
|
|
for x in $rpathdirs; do |
|
|
if test "X$x" = "X$found_dir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
rpathdirs="$rpathdirs $found_dir" |
|
|
fi |
|
|
else |
|
|
dnl Rely on "-L$found_dir". |
|
|
dnl But don't add it if it's already contained in the LDFLAGS |
|
|
dnl or the already constructed $LIBNAME |
|
|
haveit= |
|
|
for x in $LDFLAGS $LIB[]NAME; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X-L$found_dir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
|
|
fi |
|
|
if test "$hardcode_minus_L" != no; then |
|
|
dnl FIXME: Not sure whether we should use |
|
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
|
|
dnl here. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
|
|
else |
|
|
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH |
|
|
dnl here, because this doesn't fit in flags passed to the |
|
|
dnl compiler. So give up. No hardcoding. This affects only |
|
|
dnl very old systems. |
|
|
dnl FIXME: Not sure whether we should use |
|
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
|
|
dnl here. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
else |
|
|
if test "X$found_a" != "X"; then |
|
|
dnl Linking with a static library. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" |
|
|
else |
|
|
dnl We shouldn't come here, but anyway it's good to have a |
|
|
dnl fallback. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" |
|
|
fi |
|
|
fi |
|
|
dnl Assume the include files are nearby. |
|
|
additional_includedir= |
|
|
case "$found_dir" in |
|
|
*/lib | */lib/) |
|
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
|
|
additional_includedir="$basedir/include" |
|
|
;; |
|
|
esac |
|
|
if test "X$additional_includedir" != "X"; then |
|
|
dnl Potentially add $additional_includedir to $INCNAME. |
|
|
dnl But don't add it |
|
|
dnl 1. if it's the standard /usr/include, |
|
|
dnl 2. if it's /usr/local/include and we are using GCC on Linux, |
|
|
dnl 3. if it's already present in $CPPFLAGS or the already |
|
|
dnl constructed $INCNAME, |
|
|
dnl 4. if it doesn't exist as a directory. |
|
|
if test "X$additional_includedir" != "X/usr/include"; then |
|
|
haveit= |
|
|
if test "X$additional_includedir" = "X/usr/local/include"; then |
|
|
if test -n "$GCC"; then |
|
|
case $host_os in |
|
|
linux*) haveit=yes;; |
|
|
esac |
|
|
fi |
|
|
fi |
|
|
if test -z "$haveit"; then |
|
|
for x in $CPPFLAGS $INC[]NAME; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X-I$additional_includedir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
if test -d "$additional_includedir"; then |
|
|
dnl Really add $additional_includedir to $INCNAME. |
|
|
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
dnl Look for dependencies. |
|
|
if test -n "$found_la"; then |
|
|
dnl Read the .la file. It defines the variables |
|
|
dnl dlname, library_names, old_library, dependency_libs, current, |
|
|
dnl age, revision, installed, dlopen, dlpreopen, libdir. |
|
|
save_libdir="$libdir" |
|
|
case "$found_la" in |
|
|
*/* | *\\*) . "$found_la" ;; |
|
|
*) . "./$found_la" ;; |
|
|
esac |
|
|
libdir="$save_libdir" |
|
|
dnl We use only dependency_libs. |
|
|
for dep in $dependency_libs; do |
|
|
case "$dep" in |
|
|
-L*) |
|
|
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
|
|
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. |
|
|
dnl But don't add it |
|
|
dnl 1. if it's the standard /usr/lib, |
|
|
dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
|
|
dnl 3. if it's already present in $LDFLAGS or the already |
|
|
dnl constructed $LIBNAME, |
|
|
dnl 4. if it doesn't exist as a directory. |
|
|
if test "X$additional_libdir" != "X/usr/lib"; then |
|
|
haveit= |
|
|
if test "X$additional_libdir" = "X/usr/local/lib"; then |
|
|
if test -n "$GCC"; then |
|
|
case $host_os in |
|
|
linux*) haveit=yes;; |
|
|
esac |
|
|
fi |
|
|
fi |
|
|
if test -z "$haveit"; then |
|
|
haveit= |
|
|
for x in $LDFLAGS $LIB[]NAME; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X-L$additional_libdir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
if test -d "$additional_libdir"; then |
|
|
dnl Really add $additional_libdir to $LIBNAME. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" |
|
|
fi |
|
|
fi |
|
|
haveit= |
|
|
for x in $LDFLAGS $LTLIB[]NAME; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X-L$additional_libdir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
if test -d "$additional_libdir"; then |
|
|
dnl Really add $additional_libdir to $LTLIBNAME. |
|
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
-R*) |
|
|
dir=`echo "X$dep" | sed -e 's/^X-R//'` |
|
|
if test "$enable_rpath" != no; then |
|
|
dnl Potentially add DIR to rpathdirs. |
|
|
dnl The rpathdirs will be appended to $LIBNAME at the end. |
|
|
haveit= |
|
|
for x in $rpathdirs; do |
|
|
if test "X$x" = "X$dir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
rpathdirs="$rpathdirs $dir" |
|
|
fi |
|
|
dnl Potentially add DIR to ltrpathdirs. |
|
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. |
|
|
haveit= |
|
|
for x in $ltrpathdirs; do |
|
|
if test "X$x" = "X$dir"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
ltrpathdirs="$ltrpathdirs $dir" |
|
|
fi |
|
|
fi |
|
|
;; |
|
|
-l*) |
|
|
dnl Handle this in the next round. |
|
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
|
|
;; |
|
|
*.la) |
|
|
dnl Handle this in the next round. Throw away the .la's |
|
|
dnl directory; it is already contained in a preceding -L |
|
|
dnl option. |
|
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
|
|
;; |
|
|
*) |
|
|
dnl Most likely an immediate library name. |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" |
|
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" |
|
|
;; |
|
|
esac |
|
|
done |
|
|
fi |
|
|
else |
|
|
dnl Didn't find the library; assume it is in the system directories |
|
|
dnl known to the linker and runtime loader. (All the system |
|
|
dnl directories known to the linker should also be known to the |
|
|
dnl runtime loader, otherwise the system is severely misconfigured.) |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" |
|
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
done |
|
|
done |
|
|
if test "X$rpathdirs" != "X"; then |
|
|
if test -n "$hardcode_libdir_separator"; then |
|
|
dnl Weird platform: only the last -rpath option counts, the user must |
|
|
dnl pass all path elements in one option. We can arrange that for a |
|
|
dnl single library, but not when more than one $LIBNAMEs are used. |
|
|
alldirs= |
|
|
for found_dir in $rpathdirs; do |
|
|
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
|
|
done |
|
|
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. |
|
|
acl_save_libdir="$libdir" |
|
|
libdir="$alldirs" |
|
|
eval flag=\"$hardcode_libdir_flag_spec\" |
|
|
libdir="$acl_save_libdir" |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|
|
else |
|
|
dnl The -rpath options are cumulative. |
|
|
for found_dir in $rpathdirs; do |
|
|
acl_save_libdir="$libdir" |
|
|
libdir="$found_dir" |
|
|
eval flag=\"$hardcode_libdir_flag_spec\" |
|
|
libdir="$acl_save_libdir" |
|
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
|
|
done |
|
|
fi |
|
|
fi |
|
|
if test "X$ltrpathdirs" != "X"; then |
|
|
dnl When using libtool, the option that works for both libraries and |
|
|
dnl executables is -R. The -R options are cumulative. |
|
|
for found_dir in $ltrpathdirs; do |
|
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
|
|
done |
|
|
fi |
|
341 |
]) |
]) |
342 |
|
|
343 |
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 |
344 |
dnl unless already present in VAR. |
# Free Software Foundation, Inc. |
345 |
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes |
# |
346 |
dnl contains two or three consecutive elements that belong together. |
# This file is free software; the Free Software Foundation |
347 |
AC_DEFUN([AC_LIB_APPENDTOVAR], |
# gives unlimited permission to copy and/or distribute it, |
348 |
[ |
# with or without modifications, as long as this notice is preserved. |
|
for element in [$2]; do |
|
|
haveit= |
|
|
for x in $[$1]; do |
|
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
|
|
if test "X$x" = "X$element"; then |
|
|
haveit=yes |
|
|
break |
|
|
fi |
|
|
done |
|
|
if test -z "$haveit"; then |
|
|
[$1]="${[$1]}${[$1]:+ }$element" |
|
|
fi |
|
|
done |
|
|
]) |
|
349 |
|
|
350 |
# lib-ld.m4 serial 3 (gettext-0.13) |
# serial 8 |
351 |
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. |
|
352 |
dnl This file is free software, distributed under the terms of the GNU |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
353 |
dnl General Public License. As a special exception to the GNU General |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
354 |
dnl Public License, this file may be distributed as part of a program |
|
355 |
dnl that contains a configuration script generated by Autoconf, under |
# Do all the work for Automake. -*- Autoconf -*- |
|
dnl the same distribution terms as the rest of that program. |
|
|
|
|
|
dnl Subroutines of libtool.m4, |
|
|
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision |
|
|
dnl with libtool.m4. |
|
|
|
|
|
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. |
|
|
AC_DEFUN([AC_LIB_PROG_LD_GNU], |
|
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, |
|
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
|
|
case `$LD -v 2>&1 </dev/null` in |
|
|
*GNU* | *'with BFD'*) |
|
|
acl_cv_prog_gnu_ld=yes ;; |
|
|
*) |
|
|
acl_cv_prog_gnu_ld=no ;; |
|
|
esac]) |
|
|
with_gnu_ld=$acl_cv_prog_gnu_ld |
|
|
]) |
|
356 |
|
|
357 |
dnl From libtool-1.4. Sets the variable LD. |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
358 |
AC_DEFUN([AC_LIB_PROG_LD], |
# Free Software Foundation, Inc. |
359 |
[AC_ARG_WITH(gnu-ld, |
# |
360 |
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
# This file is free software; the Free Software Foundation |
361 |
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
# gives unlimited permission to copy and/or distribute it, |
362 |
AC_REQUIRE([AC_PROG_CC])dnl |
# with or without modifications, as long as this notice is preserved. |
363 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
|
364 |
# Prepare PATH_SEPARATOR. |
# serial 12 |
365 |
# The user is always right. |
|
366 |
if test "${PATH_SEPARATOR+set}" != set; then |
# This macro actually does too much. Some checks are only needed if |
367 |
echo "#! /bin/sh" >conf$$.sh |
# your package does certain things. But this isn't really a big deal. |
368 |
echo "exit 0" >>conf$$.sh |
|
369 |
chmod +x conf$$.sh |
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
370 |
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
# AM_INIT_AUTOMAKE([OPTIONS]) |
371 |
PATH_SEPARATOR=';' |
# ----------------------------------------------- |
372 |
|
# The call with PACKAGE and VERSION arguments is the old style |
373 |
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE |
374 |
|
# and VERSION should now be passed to AC_INIT and removed from |
375 |
|
# the call to AM_INIT_AUTOMAKE. |
376 |
|
# We support both call styles for the transition. After |
377 |
|
# the next Automake release, Autoconf can make the AC_INIT |
378 |
|
# arguments mandatory, and then we can depend on a new Autoconf |
379 |
|
# release and drop the old call support. |
380 |
|
AC_DEFUN([AM_INIT_AUTOMAKE], |
381 |
|
[AC_PREREQ([2.58])dnl |
382 |
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow |
383 |
|
dnl the ones we care about. |
384 |
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
385 |
|
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
386 |
|
AC_REQUIRE([AC_PROG_INSTALL])dnl |
387 |
|
# test to see if srcdir already configured |
388 |
|
if test "`cd $srcdir && pwd`" != "`pwd`" && |
389 |
|
test -f $srcdir/config.status; then |
390 |
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
391 |
|
fi |
392 |
|
|
393 |
|
# test whether we have cygpath |
394 |
|
if test -z "$CYGPATH_W"; then |
395 |
|
if (cygpath --version) >/dev/null 2>/dev/null; then |
396 |
|
CYGPATH_W='cygpath -w' |
397 |
else |
else |
398 |
PATH_SEPARATOR=: |
CYGPATH_W=echo |
399 |
fi |
fi |
|
rm -f conf$$.sh |
|
400 |
fi |
fi |
401 |
ac_prog=ld |
AC_SUBST([CYGPATH_W]) |
402 |
if test "$GCC" = yes; then |
|
403 |
# Check if gcc -print-prog-name=ld gives a path. |
# Define the identity of the package. |
404 |
AC_MSG_CHECKING([for ld used by GCC]) |
dnl Distinguish between old-style and new-style calls. |
405 |
case $host in |
m4_ifval([$2], |
406 |
*-*-mingw*) |
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
407 |
# gcc leaves a trailing carriage return which upsets mingw |
AC_SUBST([PACKAGE], [$1])dnl |
408 |
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
AC_SUBST([VERSION], [$2])], |
409 |
*) |
[_AM_SET_OPTIONS([$1])dnl |
410 |
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
411 |
esac |
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
412 |
case $ac_prog in |
|
413 |
# Accept absolute paths. |
_AM_IF_OPTION([no-define],, |
414 |
[[\\/]* | [A-Za-z]:[\\/]*)] |
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
415 |
[re_direlt='/[^/][^/]*/\.\./'] |
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
416 |
# Canonicalize the path of ld |
|
417 |
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
# Some tools Automake needs. |
418 |
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
AC_REQUIRE([AM_SANITY_CHECK])dnl |
419 |
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
AC_REQUIRE([AC_ARG_PROGRAM])dnl |
420 |
done |
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
421 |
test -z "$LD" && LD="$ac_prog" |
AM_MISSING_PROG(AUTOCONF, autoconf) |
422 |
;; |
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
423 |
"") |
AM_MISSING_PROG(AUTOHEADER, autoheader) |
424 |
# If it fails, then pretend we aren't using GCC. |
AM_MISSING_PROG(MAKEINFO, makeinfo) |
425 |
ac_prog=ld |
AM_PROG_INSTALL_SH |
426 |
;; |
AM_PROG_INSTALL_STRIP |
427 |
*) |
AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
428 |
# If it is relative, then search for the first ld in PATH. |
# We need awk for the "check" target. The system "awk" is bad on |
429 |
with_gnu_ld=unknown |
# some platforms. |
430 |
;; |
AC_REQUIRE([AC_PROG_AWK])dnl |
431 |
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
432 |
|
AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
433 |
|
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
434 |
|
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
435 |
|
[_AM_PROG_TAR([v7])])]) |
436 |
|
_AM_IF_OPTION([no-dependencies],, |
437 |
|
[AC_PROVIDE_IFELSE([AC_PROG_CC], |
438 |
|
[_AM_DEPENDENCIES(CC)], |
439 |
|
[define([AC_PROG_CC], |
440 |
|
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
441 |
|
AC_PROVIDE_IFELSE([AC_PROG_CXX], |
442 |
|
[_AM_DEPENDENCIES(CXX)], |
443 |
|
[define([AC_PROG_CXX], |
444 |
|
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
445 |
|
]) |
446 |
|
]) |
447 |
|
|
448 |
|
|
449 |
|
# When config.status generates a header, we must update the stamp-h file. |
450 |
|
# This file resides in the same directory as the config header |
451 |
|
# that is generated. The stamp files are numbered to have different names. |
452 |
|
|
453 |
|
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
454 |
|
# loop where config.status creates the headers, so we can generate |
455 |
|
# our stamp files there. |
456 |
|
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
457 |
|
[# Compute $1's index in $config_headers. |
458 |
|
_am_stamp_count=1 |
459 |
|
for _am_header in $config_headers :; do |
460 |
|
case $_am_header in |
461 |
|
$1 | $1:* ) |
462 |
|
break ;; |
463 |
|
* ) |
464 |
|
_am_stamp_count=`expr $_am_stamp_count + 1` ;; |
465 |
esac |
esac |
466 |
elif test "$with_gnu_ld" = yes; then |
done |
467 |
AC_MSG_CHECKING([for GNU ld]) |
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
468 |
|
|
469 |
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
470 |
|
# |
471 |
|
# This file is free software; the Free Software Foundation |
472 |
|
# gives unlimited permission to copy and/or distribute it, |
473 |
|
# with or without modifications, as long as this notice is preserved. |
474 |
|
|
475 |
|
# AM_PROG_INSTALL_SH |
476 |
|
# ------------------ |
477 |
|
# Define $install_sh. |
478 |
|
AC_DEFUN([AM_PROG_INSTALL_SH], |
479 |
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
480 |
|
install_sh=${install_sh-"$am_aux_dir/install-sh"} |
481 |
|
AC_SUBST(install_sh)]) |
482 |
|
|
483 |
|
# Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
484 |
|
# |
485 |
|
# This file is free software; the Free Software Foundation |
486 |
|
# gives unlimited permission to copy and/or distribute it, |
487 |
|
# with or without modifications, as long as this notice is preserved. |
488 |
|
|
489 |
|
# serial 2 |
490 |
|
|
491 |
|
# Check whether the underlying file-system supports filenames |
492 |
|
# with a leading dot. For instance MS-DOS doesn't. |
493 |
|
AC_DEFUN([AM_SET_LEADING_DOT], |
494 |
|
[rm -rf .tst 2>/dev/null |
495 |
|
mkdir .tst 2>/dev/null |
496 |
|
if test -d .tst; then |
497 |
|
am__leading_dot=. |
498 |
else |
else |
499 |
AC_MSG_CHECKING([for non-GNU ld]) |
am__leading_dot=_ |
500 |
fi |
fi |
501 |
AC_CACHE_VAL(acl_cv_path_LD, |
rmdir .tst 2>/dev/null |
502 |
[if test -z "$LD"; then |
AC_SUBST([am__leading_dot])]) |
503 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
|
504 |
for ac_dir in $PATH; do |
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- |
505 |
test -z "$ac_dir" && ac_dir=. |
# From Jim Meyering |
506 |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
|
507 |
acl_cv_path_LD="$ac_dir/$ac_prog" |
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 |
508 |
# Check to see if the program is GNU ld. I'd rather use --version, |
# Free Software Foundation, Inc. |
509 |
# but apparently some GNU ld's only accept -v. |
# |
510 |
# Break only if it was the GNU/non-GNU ld that we prefer. |
# This file is free software; the Free Software Foundation |
511 |
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in |
# gives unlimited permission to copy and/or distribute it, |
512 |
*GNU* | *'with BFD'*) |
# with or without modifications, as long as this notice is preserved. |
513 |
test "$with_gnu_ld" != no && break ;; |
|
514 |
*) |
# serial 4 |
515 |
test "$with_gnu_ld" != yes && break ;; |
|
516 |
esac |
AC_DEFUN([AM_MAINTAINER_MODE], |
517 |
fi |
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
518 |
done |
dnl maintainer-mode is disabled by default |
519 |
IFS="$ac_save_ifs" |
AC_ARG_ENABLE(maintainer-mode, |
520 |
else |
[ --enable-maintainer-mode enable make rules and dependencies not useful |
521 |
acl_cv_path_LD="$LD" # Let the user override the test with a path. |
(and sometimes confusing) to the casual installer], |
522 |
fi]) |
USE_MAINTAINER_MODE=$enableval, |
523 |
LD="$acl_cv_path_LD" |
USE_MAINTAINER_MODE=no) |
524 |
if test -n "$LD"; then |
AC_MSG_RESULT([$USE_MAINTAINER_MODE]) |
525 |
AC_MSG_RESULT($LD) |
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) |
526 |
else |
MAINT=$MAINTAINER_MODE_TRUE |
527 |
AC_MSG_RESULT(no) |
AC_SUBST(MAINT)dnl |
528 |
|
] |
529 |
|
) |
530 |
|
|
531 |
|
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) |
532 |
|
|
533 |
|
# Check to see how 'make' treats includes. -*- Autoconf -*- |
534 |
|
|
535 |
|
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. |
536 |
|
# |
537 |
|
# This file is free software; the Free Software Foundation |
538 |
|
# gives unlimited permission to copy and/or distribute it, |
539 |
|
# with or without modifications, as long as this notice is preserved. |
540 |
|
|
541 |
|
# serial 3 |
542 |
|
|
543 |
|
# AM_MAKE_INCLUDE() |
544 |
|
# ----------------- |
545 |
|
# Check to see how make treats includes. |
546 |
|
AC_DEFUN([AM_MAKE_INCLUDE], |
547 |
|
[am_make=${MAKE-make} |
548 |
|
cat > confinc << 'END' |
549 |
|
am__doit: |
550 |
|
@echo done |
551 |
|
.PHONY: am__doit |
552 |
|
END |
553 |
|
# If we don't find an include directive, just comment out the code. |
554 |
|
AC_MSG_CHECKING([for style of include used by $am_make]) |
555 |
|
am__include="#" |
556 |
|
am__quote= |
557 |
|
_am_result=none |
558 |
|
# First try GNU make style include. |
559 |
|
echo "include confinc" > confmf |
560 |
|
# We grep out `Entering directory' and `Leaving directory' |
561 |
|
# messages which can occur if `w' ends up in MAKEFLAGS. |
562 |
|
# In particular we don't look at `^make:' because GNU make might |
563 |
|
# be invoked under some other name (usually "gmake"), in which |
564 |
|
# case it prints its new name instead of `make'. |
565 |
|
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
566 |
|
am__include=include |
567 |
|
am__quote= |
568 |
|
_am_result=GNU |
569 |
|
fi |
570 |
|
# Now try BSD make style include. |
571 |
|
if test "$am__include" = "#"; then |
572 |
|
echo '.include "confinc"' > confmf |
573 |
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
574 |
|
am__include=.include |
575 |
|
am__quote="\"" |
576 |
|
_am_result=BSD |
577 |
|
fi |
578 |
fi |
fi |
579 |
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
AC_SUBST([am__include]) |
580 |
AC_LIB_PROG_LD_GNU |
AC_SUBST([am__quote]) |
581 |
|
AC_MSG_RESULT([$_am_result]) |
582 |
|
rm -f confinc confmf |
583 |
]) |
]) |
584 |
|
|
585 |
# Define a conditional. |
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
586 |
|
|
587 |
AC_DEFUN([AM_CONDITIONAL], |
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 |
588 |
[AC_SUBST($1_TRUE) |
# Free Software Foundation, Inc. |
589 |
AC_SUBST($1_FALSE) |
# |
590 |
if $2; then |
# This file is free software; the Free Software Foundation |
591 |
$1_TRUE= |
# gives unlimited permission to copy and/or distribute it, |
592 |
$1_FALSE='#' |
# with or without modifications, as long as this notice is preserved. |
|
else |
|
|
$1_TRUE='#' |
|
|
$1_FALSE= |
|
|
fi]) |
|
593 |
|
|
594 |
# isc-posix.m4 serial 2 (gettext-0.11.2) |
# serial 4 |
|
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
|
|
dnl This file is free software, distributed under the terms of the GNU |
|
|
dnl General Public License. As a special exception to the GNU General |
|
|
dnl Public License, this file may be distributed as part of a program |
|
|
dnl that contains a configuration script generated by Autoconf, under |
|
|
dnl the same distribution terms as the rest of that program. |
|
|
|
|
|
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. |
|
|
|
|
|
# This test replaces the one in autoconf. |
|
|
# Currently this macro should have the same name as the autoconf macro |
|
|
# because gettext's gettext.m4 (distributed in the automake package) |
|
|
# still uses it. Otherwise, the use in gettext.m4 makes autoheader |
|
|
# give these diagnostics: |
|
|
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX |
|
|
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX |
|
|
|
|
|
undefine([AC_ISC_POSIX]) |
|
|
|
|
|
AC_DEFUN([AC_ISC_POSIX], |
|
|
[ |
|
|
dnl This test replaces the obsolescent AC_ISC_POSIX kludge. |
|
|
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) |
|
|
] |
|
|
) |
|
595 |
|
|
596 |
# Do all the work for Automake. This macro actually does too much -- |
# AM_MISSING_PROG(NAME, PROGRAM) |
597 |
# some checks are only needed if your package does certain things. |
# ------------------------------ |
598 |
# But this isn't really a big deal. |
AC_DEFUN([AM_MISSING_PROG], |
599 |
|
[AC_REQUIRE([AM_MISSING_HAS_RUN]) |
600 |
|
$1=${$1-"${am_missing_run}$2"} |
601 |
|
AC_SUBST($1)]) |
602 |
|
|
|
# serial 1 |
|
603 |
|
|
604 |
dnl Usage: |
# AM_MISSING_HAS_RUN |
605 |
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
# ------------------ |
606 |
|
# Define MISSING if not defined so far and test if it supports --run. |
607 |
|
# If it does, set am_missing_run to use it, otherwise, to nothing. |
608 |
|
AC_DEFUN([AM_MISSING_HAS_RUN], |
609 |
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
610 |
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
611 |
|
# Use eval to expand $SHELL |
612 |
|
if eval "$MISSING --run true"; then |
613 |
|
am_missing_run="$MISSING --run " |
614 |
|
else |
615 |
|
am_missing_run= |
616 |
|
AC_MSG_WARN([`missing' script is too old or missing]) |
617 |
|
fi |
618 |
|
]) |
619 |
|
|
620 |
AC_DEFUN([AM_INIT_AUTOMAKE], |
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. |
621 |
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
# |
622 |
AC_REQUIRE([AC_PROG_INSTALL]) |
# This file is free software; the Free Software Foundation |
623 |
PACKAGE=[$1] |
# gives unlimited permission to copy and/or distribute it, |
624 |
AC_SUBST(PACKAGE) |
# with or without modifications, as long as this notice is preserved. |
625 |
VERSION=[$2] |
|
626 |
AC_SUBST(VERSION) |
# AM_PROG_MKDIR_P |
627 |
dnl test to see if srcdir already configured |
# --------------- |
628 |
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. |
629 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
# |
630 |
|
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories |
631 |
|
# created by `make install' are always world readable, even if the |
632 |
|
# installer happens to have an overly restrictive umask (e.g. 077). |
633 |
|
# This was a mistake. There are at least two reasons why we must not |
634 |
|
# use `-m 0755': |
635 |
|
# - it causes special bits like SGID to be ignored, |
636 |
|
# - it may be too restrictive (some setups expect 775 directories). |
637 |
|
# |
638 |
|
# Do not use -m 0755 and let people choose whatever they expect by |
639 |
|
# setting umask. |
640 |
|
# |
641 |
|
# We cannot accept any implementation of `mkdir' that recognizes `-p'. |
642 |
|
# Some implementations (such as Solaris 8's) are not thread-safe: if a |
643 |
|
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' |
644 |
|
# concurrently, both version can detect that a/ is missing, but only |
645 |
|
# one can create it and the other will error out. Consequently we |
646 |
|
# restrict ourselves to GNU make (using the --version option ensures |
647 |
|
# this.) |
648 |
|
AC_DEFUN([AM_PROG_MKDIR_P], |
649 |
|
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then |
650 |
|
# We used to keeping the `.' as first argument, in order to |
651 |
|
# allow $(mkdir_p) to be used without argument. As in |
652 |
|
# $(mkdir_p) $(somedir) |
653 |
|
# where $(somedir) is conditionally defined. However this is wrong |
654 |
|
# for two reasons: |
655 |
|
# 1. if the package is installed by a user who cannot write `.' |
656 |
|
# make install will fail, |
657 |
|
# 2. the above comment should most certainly read |
658 |
|
# $(mkdir_p) $(DESTDIR)$(somedir) |
659 |
|
# so it does not work when $(somedir) is undefined and |
660 |
|
# $(DESTDIR) is not. |
661 |
|
# To support the latter case, we have to write |
662 |
|
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), |
663 |
|
# so the `.' trick is pointless. |
664 |
|
mkdir_p='mkdir -p --' |
665 |
|
else |
666 |
|
# On NextStep and OpenStep, the `mkdir' command does not |
667 |
|
# recognize any option. It will interpret all options as |
668 |
|
# directories to create, and then abort because `.' already |
669 |
|
# exists. |
670 |
|
for d in ./-p ./--version; |
671 |
|
do |
672 |
|
test -d $d && rmdir $d |
673 |
|
done |
674 |
|
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. |
675 |
|
if test -f "$ac_aux_dir/mkinstalldirs"; then |
676 |
|
mkdir_p='$(mkinstalldirs)' |
677 |
|
else |
678 |
|
mkdir_p='$(install_sh) -d' |
679 |
|
fi |
680 |
fi |
fi |
681 |
ifelse([$3],, |
AC_SUBST([mkdir_p])]) |
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
|
|
AC_REQUIRE([AM_SANITY_CHECK]) |
|
|
AC_REQUIRE([AC_ARG_PROGRAM]) |
|
|
dnl FIXME This is truly gross. |
|
|
missing_dir=`cd $ac_aux_dir && pwd` |
|
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
|
|
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
|
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
|
|
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
|
|
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
|
|
AC_REQUIRE([AC_PROG_MAKE_SET])]) |
|
|
|
|
|
# Copyright 2002 Free Software Foundation, Inc. |
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
|
|
# it under the terms of the GNU General Public License as published by |
|
|
# the Free Software Foundation; either version 2, or (at your option) |
|
|
# any later version. |
|
682 |
|
|
683 |
# This program is distributed in the hope that it will be useful, |
# Helper functions for option handling. -*- Autoconf -*- |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
# GNU General Public License for more details. |
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
|
|
# along with this program; if not, write to the Free Software |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
|
684 |
|
|
685 |
# AM_AUTOMAKE_VERSION(VERSION) |
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. |
686 |
# ---------------------------- |
# |
687 |
# Automake X.Y traces this macro to ensure aclocal.m4 has been |
# This file is free software; the Free Software Foundation |
688 |
# generated from the m4 files accompanying Automake X.Y. |
# gives unlimited permission to copy and/or distribute it, |
689 |
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
# with or without modifications, as long as this notice is preserved. |
690 |
|
|
691 |
|
# serial 3 |
692 |
|
|
693 |
|
# _AM_MANGLE_OPTION(NAME) |
694 |
|
# ----------------------- |
695 |
|
AC_DEFUN([_AM_MANGLE_OPTION], |
696 |
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
697 |
|
|
698 |
|
# _AM_SET_OPTION(NAME) |
699 |
|
# ------------------------------ |
700 |
|
# Set option NAME. Presently that only means defining a flag for this option. |
701 |
|
AC_DEFUN([_AM_SET_OPTION], |
702 |
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
703 |
|
|
704 |
|
# _AM_SET_OPTIONS(OPTIONS) |
705 |
|
# ---------------------------------- |
706 |
|
# OPTIONS is a space-separated list of Automake options. |
707 |
|
AC_DEFUN([_AM_SET_OPTIONS], |
708 |
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
709 |
|
|
710 |
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
711 |
|
# ------------------------------------------- |
712 |
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
713 |
|
AC_DEFUN([_AM_IF_OPTION], |
714 |
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
715 |
|
|
716 |
# AM_SET_CURRENT_AUTOMAKE_VERSION |
# Check to make sure that the build environment is sane. -*- Autoconf -*- |
|
# ------------------------------- |
|
|
# Call AM_AUTOMAKE_VERSION so it can be traced. |
|
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
|
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
|
|
[AM_AUTOMAKE_VERSION([1.4-p6])]) |
|
717 |
|
|
718 |
|
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 |
719 |
|
# Free Software Foundation, Inc. |
720 |
# |
# |
721 |
# Check to make sure that the build environment is sane. |
# This file is free software; the Free Software Foundation |
722 |
# |
# gives unlimited permission to copy and/or distribute it, |
723 |
|
# with or without modifications, as long as this notice is preserved. |
724 |
|
|
725 |
|
# serial 4 |
726 |
|
|
727 |
|
# AM_SANITY_CHECK |
728 |
|
# --------------- |
729 |
AC_DEFUN([AM_SANITY_CHECK], |
AC_DEFUN([AM_SANITY_CHECK], |
730 |
[AC_MSG_CHECKING([whether build environment is sane]) |
[AC_MSG_CHECKING([whether build environment is sane]) |
731 |
# Just in case |
# Just in case |
732 |
sleep 1 |
sleep 1 |
733 |
echo timestamp > conftestfile |
echo timestamp > conftest.file |
734 |
# Do `set' in a subshell so we don't clobber the current shell's |
# Do `set' in a subshell so we don't clobber the current shell's |
735 |
# arguments. Must try -L first in case configure is actually a |
# arguments. Must try -L first in case configure is actually a |
736 |
# symlink; some systems play weird games with the mod time of symlinks |
# symlink; some systems play weird games with the mod time of symlinks |
737 |
# (eg FreeBSD returns the mod time of the symlink's containing |
# (eg FreeBSD returns the mod time of the symlink's containing |
738 |
# directory). |
# directory). |
739 |
if ( |
if ( |
740 |
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
741 |
if test "[$]*" = "X"; then |
if test "$[*]" = "X"; then |
742 |
# -L didn't work. |
# -L didn't work. |
743 |
set X `ls -t $srcdir/configure conftestfile` |
set X `ls -t $srcdir/configure conftest.file` |
744 |
fi |
fi |
745 |
if test "[$]*" != "X $srcdir/configure conftestfile" \ |
rm -f conftest.file |
746 |
&& test "[$]*" != "X conftestfile $srcdir/configure"; then |
if test "$[*]" != "X $srcdir/configure conftest.file" \ |
747 |
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then |
748 |
|
|
749 |
# If neither matched, then we have a broken ls. This can happen |
# If neither matched, then we have a broken ls. This can happen |
750 |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
754 |
alias in your environment]) |
alias in your environment]) |
755 |
fi |
fi |
756 |
|
|
757 |
test "[$]2" = conftestfile |
test "$[2]" = conftest.file |
758 |
) |
) |
759 |
then |
then |
760 |
# Ok. |
# Ok. |
763 |
AC_MSG_ERROR([newly created file is older than distributed files! |
AC_MSG_ERROR([newly created file is older than distributed files! |
764 |
Check your system clock]) |
Check your system clock]) |
765 |
fi |
fi |
|
rm -f conftest* |
|
766 |
AC_MSG_RESULT(yes)]) |
AC_MSG_RESULT(yes)]) |
767 |
|
|
768 |
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. |
769 |
dnl The program must properly implement --version. |
# |
770 |
AC_DEFUN([AM_MISSING_PROG], |
# This file is free software; the Free Software Foundation |
771 |
[AC_MSG_CHECKING(for working $2) |
# gives unlimited permission to copy and/or distribute it, |
772 |
# Run test in a subshell; some versions of sh will print an error if |
# with or without modifications, as long as this notice is preserved. |
773 |
# an executable is not found, even if stderr is redirected. |
|
774 |
# Redirect stdin to placate older versions of autoconf. Sigh. |
# AM_PROG_INSTALL_STRIP |
775 |
if ($2 --version) < /dev/null > /dev/null 2>&1; then |
# --------------------- |
776 |
$1=$2 |
# One issue with vendor `install' (even GNU) is that you can't |
777 |
AC_MSG_RESULT(found) |
# specify the program used to strip binaries. This is especially |
778 |
else |
# annoying in cross-compiling environments, where the build's strip |
779 |
$1="$3/missing $2" |
# is unlikely to handle the host's binaries. |
780 |
AC_MSG_RESULT(missing) |
# Fortunately install-sh will honor a STRIPPROG variable, so we |
781 |
|
# always use install-sh in `make install-strip', and initialize |
782 |
|
# STRIPPROG with the value of the STRIP variable (set by the user). |
783 |
|
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
784 |
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
785 |
|
# Installed binaries are usually stripped using `strip' when the user |
786 |
|
# run `make install-strip'. However `strip' might not be the right |
787 |
|
# tool to use in cross-compilation environments, therefore Automake |
788 |
|
# will honor the `STRIP' environment variable to overrule this program. |
789 |
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
790 |
|
if test "$cross_compiling" != no; then |
791 |
|
AC_CHECK_TOOL([STRIP], [strip], :) |
792 |
fi |
fi |
793 |
AC_SUBST($1)]) |
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
794 |
|
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
795 |
|
|
796 |
# Like AC_CONFIG_HEADER, but automatically create stamp file. |
# Check how to create a tarball. -*- Autoconf -*- |
797 |
|
|
798 |
AC_DEFUN([AM_CONFIG_HEADER], |
# Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
799 |
[AC_PREREQ([2.12]) |
# |
800 |
AC_CONFIG_HEADER([$1]) |
# This file is free software; the Free Software Foundation |
801 |
dnl When config.status generates a header, we must update the stamp-h file. |
# gives unlimited permission to copy and/or distribute it, |
802 |
dnl This file resides in the same directory as the config header |
# with or without modifications, as long as this notice is preserved. |
803 |
dnl that is generated. We must strip everything past the first ":", |
|
804 |
dnl and everything past the last "/". |
# serial 2 |
805 |
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
|
806 |
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
# _AM_PROG_TAR(FORMAT) |
807 |
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
# -------------------- |
808 |
<<am_indx=1 |
# Check how to create a tarball in format FORMAT. |
809 |
for am_file in <<$1>>; do |
# FORMAT should be one of `v7', `ustar', or `pax'. |
810 |
case " <<$>>CONFIG_HEADERS " in |
# |
811 |
*" <<$>>am_file "*<<)>> |
# Substitute a variable $(am__tar) that is a command |
812 |
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
# writing to stdout a FORMAT-tarball containing the directory |
813 |
|
# $tardir. |
814 |
|
# tardir=directory && $(am__tar) > result.tar |
815 |
|
# |
816 |
|
# Substitute a variable $(am__untar) that extract such |
817 |
|
# a tarball read from stdin. |
818 |
|
# $(am__untar) < result.tar |
819 |
|
AC_DEFUN([_AM_PROG_TAR], |
820 |
|
[# Always define AMTAR for backward compatibility. |
821 |
|
AM_MISSING_PROG([AMTAR], [tar]) |
822 |
|
m4_if([$1], [v7], |
823 |
|
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], |
824 |
|
[m4_case([$1], [ustar],, [pax],, |
825 |
|
[m4_fatal([Unknown tar format])]) |
826 |
|
AC_MSG_CHECKING([how to create a $1 tar archive]) |
827 |
|
# Loop over all known methods to create a tar archive until one works. |
828 |
|
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
829 |
|
_am_tools=${am_cv_prog_tar_$1-$_am_tools} |
830 |
|
# Do not fold the above two line into one, because Tru64 sh and |
831 |
|
# Solaris sh will not grok spaces in the rhs of `-'. |
832 |
|
for _am_tool in $_am_tools |
833 |
|
do |
834 |
|
case $_am_tool in |
835 |
|
gnutar) |
836 |
|
for _am_tar in tar gnutar gtar; |
837 |
|
do |
838 |
|
AM_RUN_LOG([$_am_tar --version]) && break |
839 |
|
done |
840 |
|
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
841 |
|
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
842 |
|
am__untar="$_am_tar -xf -" |
843 |
|
;; |
844 |
|
plaintar) |
845 |
|
# Must skip GNU tar: if it does not support --format= it doesn't create |
846 |
|
# ustar tarball either. |
847 |
|
(tar --version) >/dev/null 2>&1 && continue |
848 |
|
am__tar='tar chf - "$$tardir"' |
849 |
|
am__tar_='tar chf - "$tardir"' |
850 |
|
am__untar='tar xf -' |
851 |
|
;; |
852 |
|
pax) |
853 |
|
am__tar='pax -L -x $1 -w "$$tardir"' |
854 |
|
am__tar_='pax -L -x $1 -w "$tardir"' |
855 |
|
am__untar='pax -r' |
856 |
|
;; |
857 |
|
cpio) |
858 |
|
am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
859 |
|
am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
860 |
|
am__untar='cpio -i -H $1 -d' |
861 |
|
;; |
862 |
|
none) |
863 |
|
am__tar=false |
864 |
|
am__tar_=false |
865 |
|
am__untar=false |
866 |
;; |
;; |
867 |
esac |
esac |
|
am_indx=`expr "<<$>>am_indx" + 1` |
|
|
done<<>>dnl>>) |
|
|
changequote([,]))]) |
|
|
|
|
|
# Add --enable-maintainer-mode option to configure. |
|
|
# From Jim Meyering |
|
868 |
|
|
869 |
# serial 1 |
# If the value was cached, stop now. We just wanted to have am__tar |
870 |
|
# and am__untar set. |
871 |
|
test -n "${am_cv_prog_tar_$1}" && break |
872 |
|
|
873 |
|
# tar/untar a dummy directory, and stop if the command works |
874 |
|
rm -rf conftest.dir |
875 |
|
mkdir conftest.dir |
876 |
|
echo GrepMe > conftest.dir/file |
877 |
|
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
878 |
|
rm -rf conftest.dir |
879 |
|
if test -s conftest.tar; then |
880 |
|
AM_RUN_LOG([$am__untar <conftest.tar]) |
881 |
|
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
882 |
|
fi |
883 |
|
done |
884 |
|
rm -rf conftest.dir |
885 |
|
|
886 |
AC_DEFUN([AM_MAINTAINER_MODE], |
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
887 |
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
888 |
dnl maintainer-mode is disabled by default |
AC_SUBST([am__tar]) |
889 |
AC_ARG_ENABLE(maintainer-mode, |
AC_SUBST([am__untar]) |
890 |
[ --enable-maintainer-mode enable make rules and dependencies not useful |
]) # _AM_PROG_TAR |
|
(and sometimes confusing) to the casual installer], |
|
|
USE_MAINTAINER_MODE=$enableval, |
|
|
USE_MAINTAINER_MODE=no) |
|
|
AC_MSG_RESULT($USE_MAINTAINER_MODE) |
|
|
AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
|
|
MAINT=$MAINTAINER_MODE_TRUE |
|
|
AC_SUBST(MAINT)dnl |
|
|
] |
|
|
) |
|
891 |
|
|
892 |
|
m4_include([acinclude.m4]) |