Annotation of gforth/aclocal.m4, revision 1.2
1.2 ! anton 1: dnl aclocal.m4 generated automatically by aclocal 1.2
! 2:
1.1 anton 3: dnl AC_CHECK_INT_TYPE macro
4:
5: dnl Copyright (C) 1996 Free Software Foundation, Inc.
6:
7: dnl This file is part of Gforth.
8:
9: dnl Gforth is free software; you can redistribute it and/or
10: dnl modify it under the terms of the GNU General Public License
11: dnl as published by the Free Software Foundation; either version 2
12: dnl of the License, or (at your option) any later version.
13:
14: dnl This program is distributed in the hope that it will be useful,
15: dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
16: dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.dnl See the
17: dnl GNU General Public License for more details.
18:
19: dnl You should have received a copy of the GNU General Public License
20: dnl along with this program; if not, write to the Free Software
21: dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22:
23: dnl AC_CHECK_INT_TYPE(SIZE, DESCRIPTION [, CROSS-SIZE])
24: AC_DEFUN(AC_CHECK_INT_TYPE,
25: [changequote(<<, >>)dnl
26: dnl The name to #define.
27: define(<<AC_TYPE_NAME>>, translit($2_TYPE, [a-z *], [A-Z_P]))dnl
28: dnl The cache variable name.
29: define(<<AC_CV_NAME>>, translit(ac_cv_int_type_$2, [ *], [_p]))dnl
30: changequote([, ])dnl
31: AC_MSG_CHECKING(integer type for $2)
32: AC_CACHE_VAL(AC_CV_NAME,
33: [AC_TRY_RUN([#include <stdio.h>
34: main()
35: {
36: FILE *f=fopen("conftestval", "w");
37: if (!f) exit(1);
38: #define check_size(type) if (sizeof(type)==($1)) fputs(#type, f), exit(0)
39: check_size(int);
40: check_size(short);
41: check_size(char);
42: check_size(long);
43: check_size(long long);
44: fputs("none",f), exit(0);
45: }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3], , , AC_CV_NAME=$3))])dnl
46: AC_MSG_RESULT($AC_CV_NAME)
47: AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
48: undefine([AC_TYPE_NAME])dnl
49: undefine([AC_CV_NAME])dnl
50: ])
1.2 ! anton 51:
! 52: # Do all the work for Automake. This macro actually does too much --
! 53: # some checks are only needed if your package does certain things.
! 54: # But this isn't really a big deal.
! 55:
! 56: # serial 1
! 57:
! 58: dnl Usage:
! 59: dnl AM_INIT_AUTOMAKE(package,version, [no-define])
! 60:
! 61: AC_DEFUN(AM_INIT_AUTOMAKE,
! 62: [AC_REQUIRE([AM_PROG_INSTALL])
! 63: PACKAGE=[$1]
! 64: AC_SUBST(PACKAGE)
! 65: VERSION=[$2]
! 66: AC_SUBST(VERSION)
! 67: dnl test to see if srcdir already configured
! 68: if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
! 69: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
! 70: fi
! 71: ifelse([$3],,
! 72: AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
! 73: AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
! 74: AM_SANITY_CHECK
! 75: AC_ARG_PROGRAM
! 76: dnl FIXME This is truly gross.
! 77: missing_dir=`cd $ac_aux_dir && pwd`
! 78: AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
! 79: AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
! 80: AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
! 81: AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
! 82: AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
! 83: AC_PROG_MAKE_SET])
! 84:
! 85:
! 86: # serial 1
! 87:
! 88: AC_DEFUN(AM_PROG_INSTALL,
! 89: [AC_REQUIRE([AC_PROG_INSTALL])
! 90: test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
! 91: AC_SUBST(INSTALL_SCRIPT)dnl
! 92: ])
! 93:
! 94: #
! 95: # Check to make sure that the build environment is sane.
! 96: #
! 97:
! 98: AC_DEFUN(AM_SANITY_CHECK,
! 99: [AC_MSG_CHECKING([whether build environment is sane])
! 100: # Just in case
! 101: sleep 1
! 102: echo timestamp > conftestfile
! 103: # Do `set' in a subshell so we don't clobber the current shell's
! 104: # arguments. Must try -L first in case configure is actually a
! 105: # symlink; some systems play weird games with the mod time of symlinks
! 106: # (eg FreeBSD returns the mod time of the symlink's containing
! 107: # directory).
! 108: if (
! 109: set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
! 110: if test "$@" = "X"; then
! 111: # -L didn't work.
! 112: set X `ls -t $srcdir/configure conftestfile`
! 113: fi
! 114: test "[$]2" = conftestfile
! 115: )
! 116: then
! 117: # Ok.
! 118: :
! 119: else
! 120: AC_MSG_ERROR([newly created file is older than distributed files!
! 121: Check your system clock])
! 122: fi
! 123: rm -f conftest*
! 124: AC_MSG_RESULT(yes)])
! 125:
! 126: dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
! 127: dnl The program must properly implement --version.
! 128: AC_DEFUN(AM_MISSING_PROG,
! 129: [AC_MSG_CHECKING(for working $2)
! 130: # Run test in a subshell; some versions of sh will print an error if
! 131: # an executable is not found, even if stderr is redirected.
! 132: # Redirect stdin to placate older versions of autoconf. Sigh.
! 133: if ($2 --version) < /dev/null > /dev/null 2>&1; then
! 134: $1=$2
! 135: AC_MSG_RESULT(found)
! 136: else
! 137: $1="$3/missing $2"
! 138: AC_MSG_RESULT(missing)
! 139: fi
! 140: AC_SUBST($1)])
! 141:
! 142: # Like AC_CONFIG_HEADER, but automatically create stamp file.
! 143:
! 144: AC_DEFUN(AM_CONFIG_HEADER,
! 145: [AC_PREREQ([2.12])
! 146: AC_CONFIG_HEADER([$1])
! 147: dnl When config.status generates a header, we must update the stamp-h file.
! 148: dnl This file resides in the same directory as the config header
! 149: dnl that is generated. We must strip everything past the first ":",
! 150: dnl and everything past the last "/".
! 151: AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
! 152: ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
! 153: <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
! 154: <<am_indx=1
! 155: for am_file in <<$1>>; do
! 156: case " <<$>>CONFIG_HEADERS " in
! 157: *" <<$>>am_file "*<<)>>
! 158: echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
! 159: ;;
! 160: esac
! 161: am_indx=`expr "<<$>>am_indx" + 1`
! 162: done<<>>dnl>>)
! 163: changequote([,]))])
! 164:
! 165: # Check to see if we're running under Cygwin32, without using
! 166: # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
! 167: # Otherwise set it to "".
! 168:
! 169: dnl AM_CYGWIN32()
! 170: dnl You might think we can do this by checking for a cygwin32-specific
! 171: dnl cpp define. We can't, because cross-compilers that target
! 172: dnl cygwin32 don't use the .exe suffix. I don't know why.
! 173: AC_DEFUN(AM_CYGWIN32,
! 174: [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
! 175: [cat > conftest.$ac_ext << 'EOF'
! 176: int main () {
! 177: /* Nothing. */
! 178: return 0; }
! 179: EOF
! 180: if AC_TRY_EVAL(ac_link) && test -s conftest.exe; then
! 181: am_cv_cygwin32=yes
! 182: else
! 183: am_cv_cygwin32=no
! 184: fi
! 185: rm -f conftest*])
! 186: EXEEXT=
! 187: test "$am_cv_cygwin32" = yes && EXEEXT=.exe
! 188: AC_SUBST(EXEEXT)])
! 189:
! 190:
! 191: # serial 1
! 192:
! 193: AC_DEFUN(AM_PATH_LISPDIR,
! 194: [# If set to t, that means we are running in a shell under Emacs.
! 195: # If you have an Emacs named "t", then use the full path.
! 196: test "$EMACS" = t && EMACS=
! 197: AC_PATH_PROG(EMACS, emacs xemacs, no)
! 198: if test $EMACS != "no"; then
! 199: AC_MSG_CHECKING([where .elc files should go])
! 200: dnl Set default value
! 201: lispdir="\$(datadir)/emacs/site-lisp"
! 202: if test "x$prefix" = "xNONE"; then
! 203: if test -d $ac_default_prefix/share/emacs/site-lisp; then
! 204: lispdir="\$(prefix)/share/emacs/site-lisp"
! 205: else
! 206: if test -d $ac_default_prefix/lib/emacs/site-lisp; then
! 207: lispdir="\$(prefix)/lib/emacs/site-lisp"
! 208: fi
! 209: fi
! 210: else
! 211: if test -d $prefix/share/emacs/site-lisp; then
! 212: lispdir="\$(prefix)/share/emacs/site-lisp"
! 213: else
! 214: if test -d $prefix/lib/emacs/site-lisp; then
! 215: lispdir="\$(prefix)/lib/emacs/site-lisp"
! 216: fi
! 217: fi
! 218: fi
! 219: AC_MSG_RESULT($lispdir)
! 220: fi
! 221: AC_SUBST(lispdir)])
! 222:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>