1*c074d1c9Sdrahndnl aclocal.m4 generated automatically by aclocal 1.4-p5 2f7cc78ecSespie 3*c074d1c9Sdrahndnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 4f7cc78ecSespiednl This file is free software; the Free Software Foundation 5f7cc78ecSespiednl gives unlimited permission to copy and/or distribute it, 6f7cc78ecSespiednl with or without modifications, as long as this notice is preserved. 7f7cc78ecSespie 8f7cc78ecSespiednl This program is distributed in the hope that it will be useful, 9f7cc78ecSespiednl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10f7cc78ecSespiednl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11f7cc78ecSespiednl PARTICULAR PURPOSE. 12f7cc78ecSespie 13f7cc78ecSespiesinclude(../bfd/acinclude.m4) 14f7cc78ecSespie 15b55d4692Sfgschdnl sinclude(../libtool.m4) already included in bfd/acinclude.m4 16b55d4692Sfgschdnl The lines below arrange for aclocal not to bring libtool.m4 17b55d4692Sfgschdnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake 18b55d4692Sfgschdnl to add a definition of LIBTOOL to Makefile.in. 19b55d4692Sfgschifelse(yes,no,[ 20b55d4692SfgschAC_DEFUN([AM_PROG_LIBTOOL],) 21b55d4692SfgschAC_SUBST(LIBTOOL) 22b55d4692Sfgsch]) 23b55d4692Sfgsch 24b55d4692Sfgschdnl sinclude(../gettext.m4) already included in bfd/acinclude.m4 25b55d4692Sfgschifelse(yes,no,[ 26b55d4692SfgschAC_DEFUN([CY_WITH_NLS],) 27b55d4692SfgschAC_SUBST(INTLLIBS) 28b55d4692Sfgsch]) 29b55d4692Sfgsch 30b55d4692Sfgsch 31b55d4692Sfgsch 32b55d4692Sfgschdnl AM_PROG_LEX 33b55d4692Sfgschdnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT 34b55d4692SfgschAC_DEFUN(AM_PROG_LEX, 35b55d4692Sfgsch[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) 36b55d4692SfgschAC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex]) 37b55d4692SfgschAC_PROG_LEX 38b55d4692SfgschAC_DECL_YYTEXT]) 39b55d4692Sfgsch 40*c074d1c9Sdrahn#serial 1 41*c074d1c9Sdrahn# This test replaces the one in autoconf. 42*c074d1c9Sdrahn# Currently this macro should have the same name as the autoconf macro 43*c074d1c9Sdrahn# because gettext's gettext.m4 (distributed in the automake package) 44*c074d1c9Sdrahn# still uses it. Otherwise, the use in gettext.m4 makes autoheader 45*c074d1c9Sdrahn# give these diagnostics: 46*c074d1c9Sdrahn# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX 47*c074d1c9Sdrahn# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX 48*c074d1c9Sdrahn 49*c074d1c9Sdrahnundefine([AC_ISC_POSIX]) 50*c074d1c9Sdrahn 51*c074d1c9SdrahnAC_DEFUN([AC_ISC_POSIX], 52*c074d1c9Sdrahn [ 53*c074d1c9Sdrahn dnl This test replaces the obsolescent AC_ISC_POSIX kludge. 54*c074d1c9Sdrahn AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) 55*c074d1c9Sdrahn ] 56*c074d1c9Sdrahn) 57*c074d1c9Sdrahn 58f7cc78ecSespie# Do all the work for Automake. This macro actually does too much -- 59f7cc78ecSespie# some checks are only needed if your package does certain things. 60f7cc78ecSespie# But this isn't really a big deal. 61f7cc78ecSespie 62f7cc78ecSespie# serial 1 63f7cc78ecSespie 64f7cc78ecSespiednl Usage: 65f7cc78ecSespiednl AM_INIT_AUTOMAKE(package,version, [no-define]) 66f7cc78ecSespie 67*c074d1c9SdrahnAC_DEFUN([AM_INIT_AUTOMAKE], 68f7cc78ecSespie[AC_REQUIRE([AC_PROG_INSTALL]) 69f7cc78ecSespiePACKAGE=[$1] 70f7cc78ecSespieAC_SUBST(PACKAGE) 71f7cc78ecSespieVERSION=[$2] 72f7cc78ecSespieAC_SUBST(VERSION) 73f7cc78ecSespiednl test to see if srcdir already configured 74f7cc78ecSespieif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 75f7cc78ecSespie AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 76f7cc78ecSespiefi 77f7cc78ecSespieifelse([$3],, 78f7cc78ecSespieAC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 79f7cc78ecSespieAC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 80f7cc78ecSespieAC_REQUIRE([AM_SANITY_CHECK]) 81f7cc78ecSespieAC_REQUIRE([AC_ARG_PROGRAM]) 82f7cc78ecSespiednl FIXME This is truly gross. 83f7cc78ecSespiemissing_dir=`cd $ac_aux_dir && pwd` 84f7cc78ecSespieAM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) 85f7cc78ecSespieAM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 86f7cc78ecSespieAM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) 87f7cc78ecSespieAM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 88f7cc78ecSespieAM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 89f7cc78ecSespieAC_REQUIRE([AC_PROG_MAKE_SET])]) 90f7cc78ecSespie 91f7cc78ecSespie# 92f7cc78ecSespie# Check to make sure that the build environment is sane. 93f7cc78ecSespie# 94f7cc78ecSespie 95*c074d1c9SdrahnAC_DEFUN([AM_SANITY_CHECK], 96f7cc78ecSespie[AC_MSG_CHECKING([whether build environment is sane]) 97f7cc78ecSespie# Just in case 98f7cc78ecSespiesleep 1 99f7cc78ecSespieecho timestamp > conftestfile 100f7cc78ecSespie# Do `set' in a subshell so we don't clobber the current shell's 101f7cc78ecSespie# arguments. Must try -L first in case configure is actually a 102f7cc78ecSespie# symlink; some systems play weird games with the mod time of symlinks 103f7cc78ecSespie# (eg FreeBSD returns the mod time of the symlink's containing 104f7cc78ecSespie# directory). 105f7cc78ecSespieif ( 106f7cc78ecSespie set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 107f7cc78ecSespie if test "[$]*" = "X"; then 108f7cc78ecSespie # -L didn't work. 109f7cc78ecSespie set X `ls -t $srcdir/configure conftestfile` 110f7cc78ecSespie fi 111f7cc78ecSespie if test "[$]*" != "X $srcdir/configure conftestfile" \ 112f7cc78ecSespie && test "[$]*" != "X conftestfile $srcdir/configure"; then 113f7cc78ecSespie 114f7cc78ecSespie # If neither matched, then we have a broken ls. This can happen 115f7cc78ecSespie # if, for instance, CONFIG_SHELL is bash and it inherits a 116f7cc78ecSespie # broken ls alias from the environment. This has actually 117f7cc78ecSespie # happened. Such a system could not be considered "sane". 118f7cc78ecSespie AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 119f7cc78ecSespiealias in your environment]) 120f7cc78ecSespie fi 121f7cc78ecSespie 122f7cc78ecSespie test "[$]2" = conftestfile 123f7cc78ecSespie ) 124f7cc78ecSespiethen 125f7cc78ecSespie # Ok. 126f7cc78ecSespie : 127f7cc78ecSespieelse 128f7cc78ecSespie AC_MSG_ERROR([newly created file is older than distributed files! 129f7cc78ecSespieCheck your system clock]) 130f7cc78ecSespiefi 131f7cc78ecSespierm -f conftest* 132f7cc78ecSespieAC_MSG_RESULT(yes)]) 133f7cc78ecSespie 134f7cc78ecSespiednl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 135f7cc78ecSespiednl The program must properly implement --version. 136*c074d1c9SdrahnAC_DEFUN([AM_MISSING_PROG], 137f7cc78ecSespie[AC_MSG_CHECKING(for working $2) 138f7cc78ecSespie# Run test in a subshell; some versions of sh will print an error if 139f7cc78ecSespie# an executable is not found, even if stderr is redirected. 140f7cc78ecSespie# Redirect stdin to placate older versions of autoconf. Sigh. 141f7cc78ecSespieif ($2 --version) < /dev/null > /dev/null 2>&1; then 142f7cc78ecSespie $1=$2 143f7cc78ecSespie AC_MSG_RESULT(found) 144f7cc78ecSespieelse 145f7cc78ecSespie $1="$3/missing $2" 146f7cc78ecSespie AC_MSG_RESULT(missing) 147f7cc78ecSespiefi 148f7cc78ecSespieAC_SUBST($1)]) 149f7cc78ecSespie 150f7cc78ecSespie# Like AC_CONFIG_HEADER, but automatically create stamp file. 151f7cc78ecSespie 152*c074d1c9SdrahnAC_DEFUN([AM_CONFIG_HEADER], 153f7cc78ecSespie[AC_PREREQ([2.12]) 154f7cc78ecSespieAC_CONFIG_HEADER([$1]) 155f7cc78ecSespiednl When config.status generates a header, we must update the stamp-h file. 156f7cc78ecSespiednl This file resides in the same directory as the config header 157f7cc78ecSespiednl that is generated. We must strip everything past the first ":", 158f7cc78ecSespiednl and everything past the last "/". 159f7cc78ecSespieAC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 160f7cc78ecSespieifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 161f7cc78ecSespie<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 162f7cc78ecSespie<<am_indx=1 163f7cc78ecSespiefor am_file in <<$1>>; do 164f7cc78ecSespie case " <<$>>CONFIG_HEADERS " in 165f7cc78ecSespie *" <<$>>am_file "*<<)>> 166f7cc78ecSespie echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 167f7cc78ecSespie ;; 168f7cc78ecSespie esac 169f7cc78ecSespie am_indx=`expr "<<$>>am_indx" + 1` 170f7cc78ecSespiedone<<>>dnl>>) 171f7cc78ecSespiechangequote([,]))]) 172f7cc78ecSespie 173f7cc78ecSespie# Add --enable-maintainer-mode option to configure. 174f7cc78ecSespie# From Jim Meyering 175f7cc78ecSespie 176f7cc78ecSespie# serial 1 177f7cc78ecSespie 178*c074d1c9SdrahnAC_DEFUN([AM_MAINTAINER_MODE], 179f7cc78ecSespie[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 180f7cc78ecSespie dnl maintainer-mode is disabled by default 181f7cc78ecSespie AC_ARG_ENABLE(maintainer-mode, 182f7cc78ecSespie[ --enable-maintainer-mode enable make rules and dependencies not useful 183f7cc78ecSespie (and sometimes confusing) to the casual installer], 184f7cc78ecSespie USE_MAINTAINER_MODE=$enableval, 185f7cc78ecSespie USE_MAINTAINER_MODE=no) 186f7cc78ecSespie AC_MSG_RESULT($USE_MAINTAINER_MODE) 187f7cc78ecSespie AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) 188f7cc78ecSespie MAINT=$MAINTAINER_MODE_TRUE 189f7cc78ecSespie AC_SUBST(MAINT)dnl 190f7cc78ecSespie] 191f7cc78ecSespie) 192f7cc78ecSespie 193f7cc78ecSespie# Define a conditional. 194f7cc78ecSespie 195*c074d1c9SdrahnAC_DEFUN([AM_CONDITIONAL], 196f7cc78ecSespie[AC_SUBST($1_TRUE) 197f7cc78ecSespieAC_SUBST($1_FALSE) 198f7cc78ecSespieif $2; then 199f7cc78ecSespie $1_TRUE= 200f7cc78ecSespie $1_FALSE='#' 201f7cc78ecSespieelse 202f7cc78ecSespie $1_TRUE='#' 203f7cc78ecSespie $1_FALSE= 204f7cc78ecSespiefi]) 205f7cc78ecSespie 206