aclocal.m4 revision 80588
174784Sobriendnl aclocal.m4 generated automatically by aclocal 1.4 268349Sobrien 368349Sobriendnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. 468349Sobriendnl This file is free software; the Free Software Foundation 568349Sobriendnl gives unlimited permission to copy and/or distribute it, 668349Sobriendnl with or without modifications, as long as this notice is preserved. 768349Sobrien 868349Sobriendnl This program is distributed in the hope that it will be useful, 968349Sobriendnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1068349Sobriendnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1168349Sobriendnl PARTICULAR PURPOSE. 1268349Sobrien 1368349Sobriendnl cloned from autoconf 2.13 acspecific.m4 1468349SobrienAC_DEFUN(AC_C_LONG_LONG, 1568349Sobrien[AC_CACHE_CHECK(for long long, ac_cv_c_long_long, 1668349Sobrien[if test "$GCC" = yes; then 1768349Sobrien ac_cv_c_long_long=yes 1868349Sobrienelse 1968349SobrienAC_TRY_RUN([int main() { 2068349Sobrienlong long foo = 0; 2168349Sobrienexit(sizeof(long long) < sizeof(long)); }], 2268349Sobrienac_cv_c_long_long=yes, ac_cv_c_long_long=no) 2368349Sobrienfi]) 2468349Sobrienif test $ac_cv_c_long_long = yes; then 2568349Sobrien AC_DEFINE(HAVE_LONG_LONG) 2668349Sobrienfi 2768349Sobrien]) 2868349Sobrien 2968349Sobriendnl from autoconf 2.13 acgeneral.m4, with patch: 3068349Sobriendnl Date: Fri, 15 Jan 1999 05:52:41 -0800 3168349Sobriendnl Message-ID: <199901151352.FAA18237@shade.twinsun.com> 3268349Sobriendnl From: eggert@twinsun.com (Paul Eggert) 3368349Sobriendnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars 3468349Sobriendnl Newsgroups: gnu.utils.bug 3568349Sobrien 3668349Sobriendnl AC_CHECK_TYPE2(TYPE, DEFAULT) 3768349SobrienAC_DEFUN(AC_CHECK_TYPE2, 3868349Sobrien[AC_REQUIRE([AC_HEADER_STDC])dnl 3968349SobrienAC_MSG_CHECKING(for $1) 4068349SobrienAC_CACHE_VAL(ac_cv_type_$1, 4168349Sobrien[AC_EGREP_CPP(dnl 4268349Sobrienchangequote(<<,>>)dnl 4368349Sobrien<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl 4468349Sobrienchangequote([,]), [#include <sys/types.h> 4568349Sobrien#if STDC_HEADERS 4668349Sobrien#include <stdlib.h> 4768349Sobrien#include <stddef.h> 4868349Sobrien#endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl 4968349Sobrienif eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then 5068349Sobrien AC_MSG_RESULT(yes) 5168349Sobrienelse 5268349Sobrien AC_MSG_RESULT(no) 5368349Sobrien AC_DEFINE_UNQUOTED($1, $2) 5468349Sobrienfi 5568349Sobrien]) 5668349Sobrien 5768349Sobriendnl from autoconf 2.13 acgeneral.m4, with additional third argument 5868349Sobriendnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE, [INCLUDES]]) 5968349SobrienAC_DEFUN(AC_CHECK_SIZEOF_INCLUDES, 6068349Sobrien[changequote(<<, >>)dnl 6168349Sobriendnl The name to #define. 6268349Sobriendefine(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl 6368349Sobriendnl The cache variable name. 6468349Sobriendefine(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl 6568349Sobrienchangequote([, ])dnl 6668349SobrienAC_MSG_CHECKING(size of $1) 6768349SobrienAC_CACHE_VAL(AC_CV_NAME, 6868349Sobrien[AC_TRY_RUN([$3 6968349Sobrien#include <stdio.h> 7068349Sobrienmain() 7168349Sobrien{ 7268349Sobrien FILE *f=fopen("conftestval", "w"); 7368349Sobrien if (!f) exit(1); 7468349Sobrien fprintf(f, "%d\n", sizeof($1)); 7568349Sobrien exit(0); 7668349Sobrien}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl 7768349SobrienAC_MSG_RESULT($AC_CV_NAME) 7868349SobrienAC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) 7968349Sobrienundefine([AC_TYPE_NAME])dnl 8068349Sobrienundefine([AC_CV_NAME])dnl 8168349Sobrien]) 8268349Sobrien 8368349Sobriendnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE]) 8468349SobrienAC_DEFUN(AC_CHECK_SIZEOF_STDC_HEADERS, 8568349Sobrien[AC_CHECK_SIZEOF_INCLUDES($1, $2, 8668349Sobrien[#include <sys/types.h> 8768349Sobrien#ifdef STDC_HEADERS 8868349Sobrien#include <stdlib.h> 8968349Sobrien#endif 9068349Sobrien]) 9168349Sobrien]) 9268349Sobrien 9368349Sobrien# Do all the work for Automake. This macro actually does too much -- 9468349Sobrien# some checks are only needed if your package does certain things. 9568349Sobrien# But this isn't really a big deal. 9668349Sobrien 9768349Sobrien# serial 1 9868349Sobrien 9968349Sobriendnl Usage: 10068349Sobriendnl AM_INIT_AUTOMAKE(package,version, [no-define]) 10168349Sobrien 10268349SobrienAC_DEFUN(AM_INIT_AUTOMAKE, 10368349Sobrien[AC_REQUIRE([AC_PROG_INSTALL]) 10468349SobrienPACKAGE=[$1] 10568349SobrienAC_SUBST(PACKAGE) 10668349SobrienVERSION=[$2] 10768349SobrienAC_SUBST(VERSION) 10868349Sobriendnl test to see if srcdir already configured 10968349Sobrienif test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 11068349Sobrien AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11168349Sobrienfi 11268349Sobrienifelse([$3],, 11368349SobrienAC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 11468349SobrienAC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 11568349SobrienAC_REQUIRE([AM_SANITY_CHECK]) 11668349SobrienAC_REQUIRE([AC_ARG_PROGRAM]) 11768349Sobriendnl FIXME This is truly gross. 11868349Sobrienmissing_dir=`cd $ac_aux_dir && pwd` 11968349SobrienAM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) 12068349SobrienAM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 12168349SobrienAM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) 12268349SobrienAM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 12368349SobrienAM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 12468349SobrienAC_REQUIRE([AC_PROG_MAKE_SET])]) 12568349Sobrien 12668349Sobrien# 12768349Sobrien# Check to make sure that the build environment is sane. 12868349Sobrien# 12968349Sobrien 13068349SobrienAC_DEFUN(AM_SANITY_CHECK, 13168349Sobrien[AC_MSG_CHECKING([whether build environment is sane]) 13268349Sobrien# Just in case 13368349Sobriensleep 1 13468349Sobrienecho timestamp > conftestfile 13568349Sobrien# Do `set' in a subshell so we don't clobber the current shell's 13668349Sobrien# arguments. Must try -L first in case configure is actually a 13768349Sobrien# symlink; some systems play weird games with the mod time of symlinks 13868349Sobrien# (eg FreeBSD returns the mod time of the symlink's containing 13968349Sobrien# directory). 14068349Sobrienif ( 14168349Sobrien set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 14268349Sobrien if test "[$]*" = "X"; then 14368349Sobrien # -L didn't work. 14468349Sobrien set X `ls -t $srcdir/configure conftestfile` 14568349Sobrien fi 14668349Sobrien if test "[$]*" != "X $srcdir/configure conftestfile" \ 14768349Sobrien && test "[$]*" != "X conftestfile $srcdir/configure"; then 14868349Sobrien 14968349Sobrien # If neither matched, then we have a broken ls. This can happen 15068349Sobrien # if, for instance, CONFIG_SHELL is bash and it inherits a 15168349Sobrien # broken ls alias from the environment. This has actually 15268349Sobrien # happened. Such a system could not be considered "sane". 15368349Sobrien AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 15468349Sobrienalias in your environment]) 15568349Sobrien fi 15668349Sobrien 15768349Sobrien test "[$]2" = conftestfile 15868349Sobrien ) 15968349Sobrienthen 16068349Sobrien # Ok. 16168349Sobrien : 16268349Sobrienelse 16368349Sobrien AC_MSG_ERROR([newly created file is older than distributed files! 16468349SobrienCheck your system clock]) 16568349Sobrienfi 16668349Sobrienrm -f conftest* 16768349SobrienAC_MSG_RESULT(yes)]) 16868349Sobrien 16968349Sobriendnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 17068349Sobriendnl The program must properly implement --version. 17168349SobrienAC_DEFUN(AM_MISSING_PROG, 17268349Sobrien[AC_MSG_CHECKING(for working $2) 17368349Sobrien# Run test in a subshell; some versions of sh will print an error if 17468349Sobrien# an executable is not found, even if stderr is redirected. 17568349Sobrien# Redirect stdin to placate older versions of autoconf. Sigh. 17668349Sobrienif ($2 --version) < /dev/null > /dev/null 2>&1; then 17768349Sobrien $1=$2 17868349Sobrien AC_MSG_RESULT(found) 17968349Sobrienelse 18068349Sobrien $1="$3/missing $2" 18168349Sobrien AC_MSG_RESULT(missing) 18268349Sobrienfi 18368349SobrienAC_SUBST($1)]) 18468349Sobrien 18568349Sobrien# Like AC_CONFIG_HEADER, but automatically create stamp file. 18668349Sobrien 18768349SobrienAC_DEFUN(AM_CONFIG_HEADER, 18868349Sobrien[AC_PREREQ([2.12]) 18968349SobrienAC_CONFIG_HEADER([$1]) 19068349Sobriendnl When config.status generates a header, we must update the stamp-h file. 19168349Sobriendnl This file resides in the same directory as the config header 19268349Sobriendnl that is generated. We must strip everything past the first ":", 19368349Sobriendnl and everything past the last "/". 19468349SobrienAC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 19568349Sobrienifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 19668349Sobrien<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 19768349Sobrien<<am_indx=1 19868349Sobrienfor am_file in <<$1>>; do 19968349Sobrien case " <<$>>CONFIG_HEADERS " in 20068349Sobrien *" <<$>>am_file "*<<)>> 20168349Sobrien echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 20268349Sobrien ;; 20368349Sobrien esac 20468349Sobrien am_indx=`expr "<<$>>am_indx" + 1` 20568349Sobriendone<<>>dnl>>) 20668349Sobrienchangequote([,]))]) 20768349Sobrien 20880588Sobrien# Define a conditional. 20980588Sobrien 21080588SobrienAC_DEFUN(AM_CONDITIONAL, 21180588Sobrien[AC_SUBST($1_TRUE) 21280588SobrienAC_SUBST($1_FALSE) 21380588Sobrienif $2; then 21480588Sobrien $1_TRUE= 21580588Sobrien $1_FALSE='#' 21680588Sobrienelse 21780588Sobrien $1_TRUE='#' 21880588Sobrien $1_FALSE= 21980588Sobrienfi]) 22080588Sobrien 221