File:  [gforth] / gforth / Attic / aclocal.m4
Revision 1.4: download - view: text, annotated - select for diffs
Sun Jul 5 20:55:54 1998 UTC (25 years, 9 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Fixed some .cvsignores
Added missing files

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>