diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-02-02 05:59:28 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-02-02 05:59:28 +0000 |
commit | 11ef647e270d8e8a1b4bd60354c258d527770140 (patch) | |
tree | 978da9d5deb932f9ae4a5c9d4b9fe78f1c62c948 /m4 | |
parent | 92297630f98f962de746ac54773fab52ce84a7a3 (diff) | |
download | grep-11ef647e270d8e8a1b4bd60354c258d527770140.tar.gz |
new files fo configuration.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/Makefile.am | 10 | ||||
-rw-r--r-- | m4/cygwin.m4 | 23 | ||||
-rw-r--r-- | m4/djgpp.m4 | 9 | ||||
-rw-r--r-- | m4/dosfile.m4 | 12 | ||||
-rw-r--r-- | m4/envsep.m4 | 20 | ||||
-rw-r--r-- | m4/glibc.m4 | 33 | ||||
-rw-r--r-- | m4/init.m4 | 2 | ||||
-rw-r--r-- | m4/isc-posix.m4 | 16 | ||||
-rw-r--r-- | m4/mingw32.m4 | 9 | ||||
-rw-r--r-- | m4/regex.m4 | 20 |
10 files changed, 141 insertions, 13 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am index bdb9b09d..77aa2063 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1,12 +1,20 @@ ## Process this file with automake to create Makefile.in AUTOMAKE_OPTIONS = no-dependencies -EXTRA_DIST = gettext.m4 \ +EXTRA_DIST = cygwin.m4 \ + djgpp.m4 \ + dosfile.m4 \ + envsep.m4 \ + gettext.m4 \ + glibc.m4 \ header.m4 \ init.m4 \ install.m4 \ + isc-posix.m4 \ lcmessage.m4 \ lfs.m4 \ + mingw32.m4 \ missing.m4 \ progtest.m4 \ + regex.m4 \ sanity.m4 diff --git a/m4/cygwin.m4 b/m4/cygwin.m4 index d994a03c..d1294901 100644 --- a/m4/cygwin.m4 +++ b/m4/cygwin.m4 @@ -1,12 +1,13 @@ -# Check to see if we're running under Cygwin32, without using -# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes". -# Otherwise set it to "no". - -dnl AM_CYGWIN32() -AC_DEFUN(AM_CYGWIN32, -[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32, -[AC_TRY_COMPILE(,[return __CYGWIN32__;], -am_cv_cygwin32=yes, am_cv_cygwin32=no) +dnl Check for Cygwin. This is a way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_CYGWIN, +[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin, +[AC_TRY_COMPILE(,[ +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__;], +ac_cv_cygwin=yes, ac_cv_cygwin=no) rm -f conftest*]) -CYGWIN32= -test "$am_cv_cygwin32" = yes && CYGWIN32=yes]) +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes]) diff --git a/m4/djgpp.m4 b/m4/djgpp.m4 new file mode 100644 index 00000000..98b4b555 --- /dev/null +++ b/m4/djgpp.m4 @@ -0,0 +1,9 @@ +dnl Check for DJGPP. we use DJ_GPP a the variable +dnl EXEEXXT +AC_DEFUN(AC_DJGPP, +[AC_CACHE_CHECK(for DJGPP environment, ac_cv_djgpp, +[AC_TRY_COMPILE(,[ return __DJGPP__;], +ac_cv_djgpp=yes, ac_cv_djgpp=no) +rm -f conftest*]) +DJGPP= +test "$ac_cv_djgpp" = yes && DJGPP=yes]) diff --git a/m4/dosfile.m4 b/m4/dosfile.m4 new file mode 100644 index 00000000..1e85900c --- /dev/null +++ b/m4/dosfile.m4 @@ -0,0 +1,12 @@ +# Check to see if we use dir\file name conventtion +# If so, set macro HAVE_DOS_FILE_NAMES +dnl AC_DOSFILE() +AC_DEFUN(AC_DOSFILE, +[AC_CACHE_CHECK([for dos file convention], ac_cv_dosfile, +[if test -d ".\."; then + ac_cv_dosfile=yes + AC_DEFINE(HAVE_DOS_FILE_NAMES) +else + ac_cv_dosfile=no +fi +])]) diff --git a/m4/envsep.m4 b/m4/envsep.m4 new file mode 100644 index 00000000..71c51ea9 --- /dev/null +++ b/m4/envsep.m4 @@ -0,0 +1,20 @@ +# Check to see the separator for the environment variables +# and set SEP to ";" or default ":" + +dnl AC_SEP() +dnl SEP +AC_DEFUN(AC_SEP, +[AC_REQUIRE([AC_CYGWIN]) +AC_REQUIRE([AC_MINGW32]) +AC_REQUIRE([AC_DJGPP]) +AC_MSG_CHECKING([for environ var separator]) +AC_CACHE_VAL(ac_cv_sep, +[if test "$CYGWIN" = yes || test "$MINGW32" = yes || "$DJGPP" = yes ; then + ac_cv_sep=yes +else + ac_cv_sep=no +fi]) +SEP=":" +test "$ac_cv_sep" = yes && SEP=";" +AC_MSG_RESULT(${ac_cv_sep}) +AC_SUBST(SEP)]) diff --git a/m4/glibc.m4 b/m4/glibc.m4 new file mode 100644 index 00000000..802b2331 --- /dev/null +++ b/m4/glibc.m4 @@ -0,0 +1,33 @@ +dnl From Gordon Matzigkeit. +dnl Test for the GNU C Library. +dnl FIXME: this should migrate into libit. + +AC_DEFUN(AM_GLIBC, + [ + AC_CACHE_CHECK(whether we are using the GNU C Library, + ac_cv_gnu_library, + [AC_EGREP_CPP([Thanks for using GNU], + [ +#include <features.h> +#ifdef __GNU_LIBRARY__ + Thanks for using GNU +#endif + ], + ac_cv_gnu_library=yes, + ac_cv_gnu_library=no) + ] + ) + AC_CACHE_CHECK(for version 2 of the GNU C Library, + ac_cv_glibc, + [AC_EGREP_CPP([Thanks for using GNU too], + [ +#include <features.h> +#ifdef __GLIBC__ + Thanks for using GNU too +#endif + ], + ac_cv_glibc=yes, ac_cv_glibc=no) + ] + ) + ] +) @@ -8,7 +8,7 @@ dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, -[AC_REQUIRE([AM_PROG_INSTALL]) +[AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4 new file mode 100644 index 00000000..7f4a166d --- /dev/null +++ b/m4/isc-posix.m4 @@ -0,0 +1,16 @@ +#serial 1 +dnl This test replaces the one in autoconf. +dnl Currently this macro should have the same name as the autoconf macro +dnl because gettext's gettext.m4 (distributed in the automake package) +dnl still uses it. Otherwise, the use in gettext.m4 makes autoheader +dnl give these diagnostics: +dnl configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +dnl configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) +AC_DEFUN(AC_ISC_POSIX, + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) diff --git a/m4/mingw32.m4 b/m4/mingw32.m4 new file mode 100644 index 00000000..60662c54 --- /dev/null +++ b/m4/mingw32.m4 @@ -0,0 +1,9 @@ +dnl Check for mingw32. This is another way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_MINGW32, +[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32, +[AC_TRY_COMPILE(,[return __MINGW32__;], +ac_cv_mingw32=yes, ac_cv_mingw32=no) +rm -f conftest*]) +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes]) diff --git a/m4/regex.m4 b/m4/regex.m4 new file mode 100644 index 00000000..5b0d9d44 --- /dev/null +++ b/m4/regex.m4 @@ -0,0 +1,20 @@ +dnl Even packages that don't use regex.c can use this macro. +dnl Of course, for them it doesn't do anything. +dnl Derived from code in GNU grep. +dnl Derived from code in GNU fileutils ;-). + +AC_DEFUN(AC_WITH_REGEX, +[AC_REQUIRE([AM_GLIBC]) +AC_CACHE_CHECK([whether compiling regex.c], ac_cv_with_regex, +[ # By default, don't use the included regex.c on systems with glibc 2 +test "$ac_cv_glibc" = yes && default=no || default=yes + AC_ARG_WITH(included-regex, + [ --without-included-regex don't compile regex; this is the default on + systems with version 2 of the GNU C library + (use with caution on other system)], + ac_cv_with_regex=$withval, + ac_cv_with_regex=$default) +if test "$ac_cv_with_regex" = yes; then + LIBOBJS="$LIBOBJS regex.o" +fi +])]) |