aclocal.m4 revision 130561
1130561Sobriendnl aclocal.m4 generated automatically by aclocal 1.4-p6 238889Sjdp 394536Sobriendnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 460484Sobriendnl This file is free software; the Free Software Foundation 538889Sjdpdnl gives unlimited permission to copy and/or distribute it, 638889Sjdpdnl with or without modifications, as long as this notice is preserved. 738889Sjdp 838889Sjdpdnl This program is distributed in the hope that it will be useful, 938889Sjdpdnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1038889Sjdpdnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1138889Sjdpdnl PARTICULAR PURPOSE. 1238889Sjdp 13130561Sobriensinclude(../config/accross.m4) 14130561Sobrien 1533965Sjdpdnl See whether we need to use fopen-bin.h rather than fopen-same.h. 1633965SjdpAC_DEFUN(BFD_BINARY_FOPEN, 1733965Sjdp[AC_REQUIRE([AC_CANONICAL_SYSTEM]) 1833965Sjdpcase "${host}" in 1933965Sjdpchangequote(,)dnl 2060484Sobrien*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) 2133965Sjdpchangequote([,])dnl 2260484Sobrien AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;; 2333965Sjdpesac])dnl 2433965Sjdp 2533965Sjdpdnl Get a default for CC_FOR_BUILD to put into Makefile. 2633965SjdpAC_DEFUN(BFD_CC_FOR_BUILD, 2733965Sjdp[# Put a plausible default for CC_FOR_BUILD in Makefile. 2833965Sjdpif test -z "$CC_FOR_BUILD"; then 2933965Sjdp if test "x$cross_compiling" = "xno"; then 3033965Sjdp CC_FOR_BUILD='$(CC)' 3133965Sjdp else 3233965Sjdp CC_FOR_BUILD=gcc 3333965Sjdp fi 3433965Sjdpfi 3538889SjdpAC_SUBST(CC_FOR_BUILD) 3638889Sjdp# Also set EXEEXT_FOR_BUILD. 3738889Sjdpif test "x$cross_compiling" = "xno"; then 3838889Sjdp EXEEXT_FOR_BUILD='$(EXEEXT)' 3938889Sjdpelse 4038889Sjdp AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, 4160484Sobrien [rm -f conftest* 4260484Sobrien echo 'int main () { return 0; }' > conftest.c 4360484Sobrien bfd_cv_build_exeext= 4460484Sobrien ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 4560484Sobrien for file in conftest.*; do 4660484Sobrien case $file in 4760484Sobrien *.c | *.o | *.obj | *.ilk | *.pdb) ;; 4860484Sobrien *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; 4960484Sobrien esac 5060484Sobrien done 5160484Sobrien rm -f conftest* 5260484Sobrien test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) 5338889Sjdp EXEEXT_FOR_BUILD="" 5438889Sjdp test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} 5538889Sjdpfi 5638889SjdpAC_SUBST(EXEEXT_FOR_BUILD)])dnl 5733965Sjdp 5833965Sjdpdnl See whether we need a declaration for a function. 5933965SjdpAC_DEFUN(BFD_NEED_DECLARATION, 6033965Sjdp[AC_MSG_CHECKING([whether $1 must be declared]) 6133965SjdpAC_CACHE_VAL(bfd_cv_decl_needed_$1, 6233965Sjdp[AC_TRY_COMPILE([ 6333965Sjdp#include <stdio.h> 6433965Sjdp#ifdef HAVE_STRING_H 6533965Sjdp#include <string.h> 6633965Sjdp#else 6733965Sjdp#ifdef HAVE_STRINGS_H 6833965Sjdp#include <strings.h> 6933965Sjdp#endif 7033965Sjdp#endif 7133965Sjdp#ifdef HAVE_STDLIB_H 7233965Sjdp#include <stdlib.h> 7333965Sjdp#endif 7433965Sjdp#ifdef HAVE_UNISTD_H 7533965Sjdp#include <unistd.h> 7633965Sjdp#endif], 7733965Sjdp[char *(*pfn) = (char *(*)) $1], 7833965Sjdpbfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)]) 7933965SjdpAC_MSG_RESULT($bfd_cv_decl_needed_$1) 8033965Sjdpif test $bfd_cv_decl_needed_$1 = yes; then 8160484Sobrien AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, 8260484Sobrien [Define if $1 is not declared in system header files.]) 8333965Sjdpfi 8433965Sjdp])dnl 8538889Sjdp 8660484Sobriendnl Check for existence of a type $1 in sys/procfs.h 8760484Sobrien 8860484SobrienAC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, 8960484Sobrien[AC_MSG_CHECKING([for $1 in sys/procfs.h]) 9060484Sobrien AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, 9177298Sobrien [AC_TRY_COMPILE([ 9277298Sobrien#define _SYSCALL32 9377298Sobrien#include <sys/procfs.h>], 9460484Sobrien [$1 avar], 9560484Sobrien bfd_cv_have_sys_procfs_type_$1=yes, 9660484Sobrien bfd_cv_have_sys_procfs_type_$1=no 9760484Sobrien )]) 9860484Sobrien if test $bfd_cv_have_sys_procfs_type_$1 = yes; then 9960484Sobrien AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1, 10060484Sobrien [Define if <sys/procfs.h> has $1.]) 10160484Sobrien fi 10260484Sobrien AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1) 10360484Sobrien]) 10460484Sobrien 10560484Sobrien 10660484Sobriendnl Check for existence of member $2 in type $1 in sys/procfs.h 10760484Sobrien 10860484SobrienAC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, 10960484Sobrien[AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) 11060484Sobrien AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, 11177298Sobrien [AC_TRY_COMPILE([ 11277298Sobrien#define _SYSCALL32 11377298Sobrien#include <sys/procfs.h>], 11460484Sobrien [$1 avar; void* aref = (void*) &avar.$2], 11560484Sobrien bfd_cv_have_sys_procfs_type_member_$1_$2=yes, 11660484Sobrien bfd_cv_have_sys_procfs_type_member_$1_$2=no 11760484Sobrien )]) 11860484Sobrien if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then 11960484Sobrien AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1, 12060484Sobrien [Define if <sys/procfs.h> has $1.$2.]) 12160484Sobrien fi 12260484Sobrien AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) 12360484Sobrien]) 12460484Sobrien 12577298Sobriensinclude(../libtool.m4) 12677298Sobriendnl The lines below arrange for aclocal not to bring libtool.m4 12777298Sobriendnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake 12877298Sobriendnl to add a definition of LIBTOOL to Makefile.in. 12977298Sobrienifelse(yes,no,[ 13077298SobrienAC_DEFUN([AM_PROG_LIBTOOL],) 13177298SobrienAC_DEFUN([AM_DISABLE_SHARED],) 13277298SobrienAC_SUBST(LIBTOOL) 13377298Sobrien]) 13460484Sobrien 13577298Sobriensinclude(../gettext.m4) 13677298Sobrienifelse(yes,no,[ 13777298SobrienAC_DEFUN([CY_WITH_NLS],) 13877298SobrienAC_SUBST(INTLLIBS) 13977298Sobrien]) 14060484Sobrien 141104834SobrienAC_DEFUN([AM_INSTALL_LIBBFD], 142104834Sobrien[AC_MSG_CHECKING([whether to install libbfd]) 143104834Sobrien AC_ARG_ENABLE(install-libbfd, 144130561Sobrien[ --enable-install-libbfd controls installation of libbfd and related headers], 145104834Sobrien install_libbfd_p=$enableval, 146130561Sobrien if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then 147104834Sobrien install_libbfd_p=yes 148104834Sobrien else 149104834Sobrien install_libbfd_p=no 150104834Sobrien fi) 151104834Sobrien AC_MSG_RESULT($install_libbfd_p) 152104834Sobrien AM_CONDITIONAL(INSTALL_LIBBFD, test $install_libbfd_p = yes) 153104834Sobrien # libbfd.a is a host library containing target dependent code 154104834Sobrien bfdlibdir='$(libdir)' 155104834Sobrien bfdincludedir='$(includedir)' 156104834Sobrien if test "${host}" != "${target}"; then 157104834Sobrien bfdlibdir='$(exec_prefix)/$(host_alias)/$(target_alias)/lib' 158104834Sobrien bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include' 159104834Sobrien fi 160104834Sobrien AC_SUBST(bfdlibdir) 161104834Sobrien AC_SUBST(bfdincludedir) 162104834Sobrien] 163104834Sobrien) 164104834Sobrien 165104834Sobrien# Define a conditional. 166104834Sobrien 167104834SobrienAC_DEFUN([AM_CONDITIONAL], 168104834Sobrien[AC_SUBST($1_TRUE) 169104834SobrienAC_SUBST($1_FALSE) 170104834Sobrienif $2; then 171104834Sobrien $1_TRUE= 172104834Sobrien $1_FALSE='#' 173104834Sobrienelse 174104834Sobrien $1_TRUE='#' 175104834Sobrien $1_FALSE= 176104834Sobrienfi]) 177104834Sobrien 178130561Sobrien# isc-posix.m4 serial 2 (gettext-0.11.2) 179130561Sobriendnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 180130561Sobriendnl This file is free software, distributed under the terms of the GNU 181130561Sobriendnl General Public License. As a special exception to the GNU General 182130561Sobriendnl Public License, this file may be distributed as part of a program 183130561Sobriendnl that contains a configuration script generated by Autoconf, under 184130561Sobriendnl the same distribution terms as the rest of that program. 185130561Sobrien 186130561Sobrien# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. 187130561Sobrien 188130561Sobrien# This test replaces the one in autoconf. 189130561Sobrien# Currently this macro should have the same name as the autoconf macro 190130561Sobrien# because gettext's gettext.m4 (distributed in the automake package) 191130561Sobrien# still uses it. Otherwise, the use in gettext.m4 makes autoheader 192130561Sobrien# give these diagnostics: 193130561Sobrien# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX 194130561Sobrien# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX 195130561Sobrien 196130561Sobrienundefine([AC_ISC_POSIX]) 197130561Sobrien 198130561SobrienAC_DEFUN([AC_ISC_POSIX], 199130561Sobrien [ 200130561Sobrien dnl This test replaces the obsolescent AC_ISC_POSIX kludge. 201130561Sobrien AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) 202130561Sobrien ] 203130561Sobrien) 204130561Sobrien 20538889Sjdp# Do all the work for Automake. This macro actually does too much -- 20638889Sjdp# some checks are only needed if your package does certain things. 20738889Sjdp# But this isn't really a big deal. 20838889Sjdp 20938889Sjdp# serial 1 21038889Sjdp 21138889Sjdpdnl Usage: 21238889Sjdpdnl AM_INIT_AUTOMAKE(package,version, [no-define]) 21338889Sjdp 21494536SobrienAC_DEFUN([AM_INIT_AUTOMAKE], 215130561Sobrien[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 216130561SobrienAC_REQUIRE([AC_PROG_INSTALL]) 21738889SjdpPACKAGE=[$1] 21838889SjdpAC_SUBST(PACKAGE) 21938889SjdpVERSION=[$2] 22038889SjdpAC_SUBST(VERSION) 22138889Sjdpdnl test to see if srcdir already configured 22238889Sjdpif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 22338889Sjdp AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 22438889Sjdpfi 22538889Sjdpifelse([$3],, 22660484SobrienAC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 22760484SobrienAC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 22838889SjdpAC_REQUIRE([AM_SANITY_CHECK]) 22938889SjdpAC_REQUIRE([AC_ARG_PROGRAM]) 23038889Sjdpdnl FIXME This is truly gross. 23138889Sjdpmissing_dir=`cd $ac_aux_dir && pwd` 232130561SobrienAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) 23338889SjdpAM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 234130561SobrienAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) 23538889SjdpAM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 23638889SjdpAM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 23738889SjdpAC_REQUIRE([AC_PROG_MAKE_SET])]) 23838889Sjdp 239130561Sobrien# Copyright 2002 Free Software Foundation, Inc. 240130561Sobrien 241130561Sobrien# This program is free software; you can redistribute it and/or modify 242130561Sobrien# it under the terms of the GNU General Public License as published by 243130561Sobrien# the Free Software Foundation; either version 2, or (at your option) 244130561Sobrien# any later version. 245130561Sobrien 246130561Sobrien# This program is distributed in the hope that it will be useful, 247130561Sobrien# but WITHOUT ANY WARRANTY; without even the implied warranty of 248130561Sobrien# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 249130561Sobrien# GNU General Public License for more details. 250130561Sobrien 251130561Sobrien# You should have received a copy of the GNU General Public License 252130561Sobrien# along with this program; if not, write to the Free Software 253130561Sobrien# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 254130561Sobrien 255130561Sobrien# AM_AUTOMAKE_VERSION(VERSION) 256130561Sobrien# ---------------------------- 257130561Sobrien# Automake X.Y traces this macro to ensure aclocal.m4 has been 258130561Sobrien# generated from the m4 files accompanying Automake X.Y. 259130561SobrienAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) 260130561Sobrien 261130561Sobrien# AM_SET_CURRENT_AUTOMAKE_VERSION 262130561Sobrien# ------------------------------- 263130561Sobrien# Call AM_AUTOMAKE_VERSION so it can be traced. 264130561Sobrien# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 265130561SobrienAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 266130561Sobrien [AM_AUTOMAKE_VERSION([1.4-p6])]) 267130561Sobrien 26838889Sjdp# 26938889Sjdp# Check to make sure that the build environment is sane. 27038889Sjdp# 27138889Sjdp 27294536SobrienAC_DEFUN([AM_SANITY_CHECK], 27338889Sjdp[AC_MSG_CHECKING([whether build environment is sane]) 27438889Sjdp# Just in case 27538889Sjdpsleep 1 27638889Sjdpecho timestamp > conftestfile 27738889Sjdp# Do `set' in a subshell so we don't clobber the current shell's 27838889Sjdp# arguments. Must try -L first in case configure is actually a 27938889Sjdp# symlink; some systems play weird games with the mod time of symlinks 28038889Sjdp# (eg FreeBSD returns the mod time of the symlink's containing 28138889Sjdp# directory). 28238889Sjdpif ( 28338889Sjdp set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 28438889Sjdp if test "[$]*" = "X"; then 28538889Sjdp # -L didn't work. 28638889Sjdp set X `ls -t $srcdir/configure conftestfile` 28738889Sjdp fi 28838889Sjdp if test "[$]*" != "X $srcdir/configure conftestfile" \ 28938889Sjdp && test "[$]*" != "X conftestfile $srcdir/configure"; then 29038889Sjdp 29138889Sjdp # If neither matched, then we have a broken ls. This can happen 29238889Sjdp # if, for instance, CONFIG_SHELL is bash and it inherits a 29338889Sjdp # broken ls alias from the environment. This has actually 29438889Sjdp # happened. Such a system could not be considered "sane". 29538889Sjdp AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 29638889Sjdpalias in your environment]) 29738889Sjdp fi 29838889Sjdp 29938889Sjdp test "[$]2" = conftestfile 30038889Sjdp ) 30138889Sjdpthen 30238889Sjdp # Ok. 30338889Sjdp : 30438889Sjdpelse 30538889Sjdp AC_MSG_ERROR([newly created file is older than distributed files! 30638889SjdpCheck your system clock]) 30738889Sjdpfi 30838889Sjdprm -f conftest* 30938889SjdpAC_MSG_RESULT(yes)]) 31038889Sjdp 31138889Sjdpdnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 31238889Sjdpdnl The program must properly implement --version. 31394536SobrienAC_DEFUN([AM_MISSING_PROG], 31438889Sjdp[AC_MSG_CHECKING(for working $2) 31538889Sjdp# Run test in a subshell; some versions of sh will print an error if 31638889Sjdp# an executable is not found, even if stderr is redirected. 31738889Sjdp# Redirect stdin to placate older versions of autoconf. Sigh. 31838889Sjdpif ($2 --version) < /dev/null > /dev/null 2>&1; then 31938889Sjdp $1=$2 32038889Sjdp AC_MSG_RESULT(found) 32138889Sjdpelse 32238889Sjdp $1="$3/missing $2" 32338889Sjdp AC_MSG_RESULT(missing) 32438889Sjdpfi 32538889SjdpAC_SUBST($1)]) 32638889Sjdp 32738889Sjdp# Like AC_CONFIG_HEADER, but automatically create stamp file. 32838889Sjdp 32994536SobrienAC_DEFUN([AM_CONFIG_HEADER], 33038889Sjdp[AC_PREREQ([2.12]) 33138889SjdpAC_CONFIG_HEADER([$1]) 33238889Sjdpdnl When config.status generates a header, we must update the stamp-h file. 33338889Sjdpdnl This file resides in the same directory as the config header 33438889Sjdpdnl that is generated. We must strip everything past the first ":", 33538889Sjdpdnl and everything past the last "/". 33638889SjdpAC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 33738889Sjdpifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 33838889Sjdp<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 33938889Sjdp<<am_indx=1 34038889Sjdpfor am_file in <<$1>>; do 34138889Sjdp case " <<$>>CONFIG_HEADERS " in 34238889Sjdp *" <<$>>am_file "*<<)>> 34338889Sjdp echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 34438889Sjdp ;; 34538889Sjdp esac 34638889Sjdp am_indx=`expr "<<$>>am_indx" + 1` 34738889Sjdpdone<<>>dnl>>) 34838889Sjdpchangequote([,]))]) 34938889Sjdp 35038889Sjdp# Add --enable-maintainer-mode option to configure. 35138889Sjdp# From Jim Meyering 35238889Sjdp 35338889Sjdp# serial 1 35438889Sjdp 35594536SobrienAC_DEFUN([AM_MAINTAINER_MODE], 35638889Sjdp[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 35738889Sjdp dnl maintainer-mode is disabled by default 35838889Sjdp AC_ARG_ENABLE(maintainer-mode, 35938889Sjdp[ --enable-maintainer-mode enable make rules and dependencies not useful 36038889Sjdp (and sometimes confusing) to the casual installer], 36138889Sjdp USE_MAINTAINER_MODE=$enableval, 36238889Sjdp USE_MAINTAINER_MODE=no) 36338889Sjdp AC_MSG_RESULT($USE_MAINTAINER_MODE) 36460484Sobrien AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) 36560484Sobrien MAINT=$MAINTAINER_MODE_TRUE 36638889Sjdp AC_SUBST(MAINT)dnl 36738889Sjdp] 36838889Sjdp) 36938889Sjdp 370