comparison kpathsea/common.ac @ 3172:1f0b06020e36

[project @ 1998-04-24 04:24:34 by jwe]
author jwe
date Fri, 24 Apr 1998 04:24:48 +0000
parents 0d37334d13ab
children
comparison
equal deleted inserted replaced
3171:c925de13bb22 3172:1f0b06020e36
1 dnl Common Autoconf sinclude file for kpathsea-using programs. (Have to 1 dnl Common Autoconf sinclude file for kpathsea-using programs. (Have to
2 dnl use the m4 `sinclude' builtin instead of `include', since Autoconf 2 dnl use the m4 `sinclude' builtin instead of `include', since Autoconf
3 dnl disables `include'.) 3 dnl disables `include'.)
4 4
5 dnl These configure scripts won't work with anything else.
6 AC_PREREQ(2.12)
7
5 dnl Write output here, instead of putting a zillion -D's on the command line. 8 dnl Write output here, instead of putting a zillion -D's on the command line.
6 AC_CONFIG_HEADER(c-auto.h) 9 AC_CONFIG_HEADER(c-auto.h:c-auto.in)
7 10
8 AC_PROG_CC 11 AC_PROG_CC
9 AC_PROG_INSTALL 12 AC_PROG_INSTALL
13 AC_PROG_LN_S
10 AC_PROG_MAKE_SET 14 AC_PROG_MAKE_SET
11 15
12 AC_HEADER_DIRENT 16 AC_HEADER_DIRENT
13 AC_HEADER_STDC 17 AC_HEADER_STDC
14 AC_FUNC_CLOSEDIR_VOID 18 AC_FUNC_CLOSEDIR_VOID
26 sinclude(acklibtool.m4) 30 sinclude(acklibtool.m4)
27 kb_AC_PROG_LIBTOOL 31 kb_AC_PROG_LIBTOOL
28 dnl If the list of functions here changes, also change acconfig.h. */ 32 dnl If the list of functions here changes, also change acconfig.h. */
29 kb_AC_KLIBTOOL_REPLACE_FUNCS(basename putenv strcasecmp strtol strstr) 33 kb_AC_KLIBTOOL_REPLACE_FUNCS(basename putenv strcasecmp strtol strstr)
30 34
31 AC_CHECK_FUNCS(bcopy getwd) 35 AC_CHECK_FUNCS(bcopy getcwd getwd)
32 36
33 AC_C_CONST 37 AC_C_CONST
38
39 # Check whether prototypes work.
40 AC_MSG_CHECKING(whether the compiler accepts prototypes)
41 AC_CACHE_VAL(kb_cv_c_prototypes,
42 [AC_TRY_COMPILE([#include <stdarg.h>], [extern void foo(int i,...);],
43 kb_cv_c_prototypes=yes, kb_cv_c_prototypes=no)])dnl
44 AC_MSG_RESULT($kb_cv_c_prototypes)
45 if test "$kb_cv_c_prototypes" = yes; then
46 AC_DEFINE(HAVE_PROTOTYPES)
47 fi
34 48
35 # This is a GNU libc invention. 49 # This is a GNU libc invention.
36 AC_MSG_CHECKING(whether program_invocation_name is predefined) 50 AC_MSG_CHECKING(whether program_invocation_name is predefined)
37 AC_CACHE_VAL(kb_cv_var_program_inv_name, 51 AC_CACHE_VAL(kb_cv_var_program_inv_name,
38 [AC_TRY_LINK(, 52 [AC_TRY_LINK(,
103 AC_MSG_RESULT($kb_cv_func_putenv_malloc) 117 AC_MSG_RESULT($kb_cv_func_putenv_malloc)
104 if test $kb_cv_func_putenv_malloc = yes; then 118 if test $kb_cv_func_putenv_malloc = yes; then
105 AC_DEFINE(SMART_PUTENV) 119 AC_DEFINE(SMART_PUTENV)
106 fi 120 fi
107 121
122 if test $ac_cv_func_getcwd = yes; then
123 # We only need to run this if we have getcwd.
124 AC_MSG_CHECKING(whether getcwd uses fork or vfork)
125 AC_CACHE_VAL(kb_cv_func_getcwd_forks,
126 [AC_TRY_RUN([
127 int fork() { exit(1); }
128 int vfork() { exit(1); }
129 extern char *getcwd();
130 char path[100];
131 int main() {
132 getcwd(path,100);
133 return 0;
134 }], kb_cv_func_getcwd_forks=no, kb_cv_func_getcwd_forks=yes,
135 kb_cv_func_getcwd_forks=no)])dnl
136 AC_MSG_RESULT($kb_cv_func_getcwd_forks)
137 if test $kb_cv_func_getcwd_forks = yes; then
138 AC_DEFINE(GETCWD_FORKS)
139 fi
140 fi
141
108 # Common --with and --enable options. 142 # Common --with and --enable options.
109 sinclude(../kpathsea/withenable.ac) 143 sinclude(withenable.ac)