source: trunk/third/sed/configure.in @ 17271

Revision 17271, 3.0 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17270, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(sed/sed.c)
3AM_CONFIG_HEADER(config.h:config_h.in)
4AC_PREREQ(2.12)dnl (not tested with anything older)
5AM_INIT_AUTOMAKE(sed, 3.02)
6AC_PROG_CC
7AC_PROG_RANLIB
8
9dnl Solaris 2.6 needs special compilation flags to support large files
10dnl (i.e. files larger than 2 GB).
11dnl This code frament taken from the configure.in file from patch-2.5.
12dnl Hopefully someday it will be handled directly by autoconf
13dnl without having to include this mess here.
14# If available, prefer support for large files unless the user specified
15# one of the CPPFLAGS, LDFLAGS, or LIBS variables.
16AC_MSG_CHECKING(whether large file support needs explicit enabling)
17ac_getconfs=''
18ac_result=yes
19ac_set=''
20ac_shellvars='CPPFLAGS LDFLAGS LIBS'
21for ac_shellvar in $ac_shellvars; do
22  case $ac_shellvar in
23  CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
24  *) ac_lfsvar=LFS_$ac_shellvar ;;
25  esac
26  eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
27  (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
28  ac_getconf=`getconf $ac_lfsvar`
29  ac_getconfs=$ac_getconfs$ac_getconf
30  eval ac_test_$ac_shellvar=\$ac_getconf
31done
32case "$ac_result$ac_getconfs" in
33yes) ac_result=no ;;
34esac
35case "$ac_result$ac_set" in
36yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
37esac
38AC_MSG_RESULT($ac_result)
39case $ac_result in
40yes)
41  for ac_shellvar in $ac_shellvars; do
42    eval $ac_shellvar=\$ac_test_$ac_shellvar
43  done ;;
44esac
45
46AC_MINIX
47AC_AIX
48AC_CHECK_LIB(cposix,strerror)
49
50AC_STDC_HEADERS
51AC_CHECK_HEADERS(string.h stdlib.h limits.h unistd.h memory.h sys/types.h)
52AC_C_CONST
53AC_TYPE_SIZE_T
54
55AC_MSG_CHECKING(which regex library to use)
56ac_regex_lib=lib/regex.o
57AC_ARG_WITH(regex,
58   [  --with-regex=REGEX-LIB  specify an alternative regex implementation],
59   [case "$withval" in yes|no) ;; *) ac_regex_lib="$withval" ;; esac])
60case "$ac_regex_lib" in
61  lib/regex.o) LIBOBJS="$LIBOBJS regex.o" ;;
62  ""|no) ;;
63  *) LIBS="$LIBS $ac_regex_lib" ;;
64esac
65case "$ac_regex_lib" in
66  "") AC_MSG_RESULT(using system's regex) ;;
67  *)  AC_MSG_RESULT(using $ac_regex_lib)  ;;
68esac
69
70case " $LIBOBJS " in
71  *\ regex.o\ *)
72    ac_cv_func_regnexec=yes
73    ac_cv_func_regexec=yes
74    cat >> confdefs.h <<\EOF
75#define HAVE_REGNEXEC 1
76#define HAVE_REGEXEC 1
77EOF
78    AC_DEFINE(USE_REGEX_GNU_H)
79    ;;
80  *)
81    AC_CHECK_HEADERS(regex.h)
82    case "$ac_cv_header_regex_h" in
83      yes) ;;
84      *)
85        AC_MSG_ERROR(dnl
86<regex.h> header is required for use with non-default regex implementation)
87        ;;
88    esac
89    AC_CHECK_FUNCS(regnexec regexec)
90    ;;
91esac
92case "$ac_cv_func_regnexec $ac_cv_func_regexec" in
93  *yes*) ;;
94  *) AC_MSG_ERROR(at least one of regexec() or regnexec() must be supported) ;;
95esac
96
97AC_FUNC_ALLOCA
98AC_FUNC_MMAP
99AC_FUNC_VPRINTF
100
101AC_REPLACE_FUNCS(memchr memcmp memmove strerror)
102AC_CHECK_FUNCS(isatty  bcopy bzero isascii memcpy)
103
104AC_ARG_PROGRAM
105AC_OUTPUT(Makefile djgpp/Makefile doc/Makefile dnl
106lib/Makefile sed/Makefile testsuite/Makefile
107dnl testsuite/version.good:testsuite/version.gin dnl
108)
Note: See TracBrowser for help on using the repository browser.