]>
Commit | Line | Data |
---|---|---|
7ed1a089 | 1 | # Process this file with autoconf to produce a configure script. |
586daef9 | 2 | # |
798ebd24 | 3 | # Copyright (C) 1993-2016 Free Software Foundation, Inc. |
586daef9 PS |
4 | # This file is part of GNU Make. |
5 | # | |
891ebd4d PS |
6 | # GNU Make is free software; you can redistribute it and/or modify it under |
7 | # the terms of the GNU General Public License as published by the Free Software | |
8 | # Foundation; either version 3 of the License, or (at your option) any later | |
9 | # version. | |
586daef9 PS |
10 | # |
11 | # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY | |
891ebd4d PS |
12 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
13 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
14 | # details. | |
586daef9 PS |
15 | # |
16 | # You should have received a copy of the GNU General Public License along with | |
891ebd4d | 17 | # this program. If not, see <http://www.gnu.org/licenses/>. |
63dff1e0 | 18 | |
ec619801 | 19 | AC_INIT([GNU make],[4.2],[bug-make@gnu.org]) |
63dff1e0 | 20 | |
85c78857 | 21 | AC_PREREQ([2.69]) |
7ed1a089 PS |
22 | |
23 | # Autoconf setup | |
c992c4d8 PS |
24 | AC_CONFIG_AUX_DIR([config]) |
25 | AC_CONFIG_SRCDIR([vpath.c]) | |
26 | AC_CONFIG_HEADERS([config.h]) | |
7ed1a089 PS |
27 | |
28 | # Automake setup | |
4792e154 | 29 | # We have to enable "foreign" because ChangeLog is auto-generated |
bd30df44 PS |
30 | # We cannot enable -Werror because gettext 0.18.1 has invalid content |
31 | # When we update gettext to 0.18.3 or better we can add it again. | |
85c78857 | 32 | AM_INIT_AUTOMAKE([1.15 foreign -Werror -Wall]) |
7ed1a089 PS |
33 | |
34 | # Checks for programs. | |
d2a3e9ca | 35 | AC_USE_SYSTEM_EXTENSIONS |
c0c67164 | 36 | AC_PROG_CC |
1fa7491d | 37 | AC_PROG_INSTALL |
2c64fb22 | 38 | AC_PROG_RANLIB |
7ed1a089 | 39 | AC_PROG_CPP |
c992c4d8 | 40 | AC_CHECK_PROG([AR], [ar], [ar], [ar]) |
7ed1a089 | 41 | # Perl is needed for the test suite (only) |
c992c4d8 | 42 | AC_CHECK_PROG([PERL], [perl], [perl], [perl]) |
7ed1a089 | 43 | |
d2a3e9ca PS |
44 | # Needed for w32/Makefile.am |
45 | AM_PROG_AR | |
46 | ||
7ed1a089 PS |
47 | # Specialized system macros |
48 | AC_CANONICAL_HOST | |
1fa7491d RM |
49 | AC_AIX |
50 | AC_ISC_POSIX | |
51 | AC_MINIX | |
e2403327 | 52 | |
7ed1a089 | 53 | # Enable gettext, in "external" mode. |
85c78857 | 54 | AM_GNU_GETTEXT_VERSION([0.19.4]) |
7ed1a089 | 55 | AM_GNU_GETTEXT([external]) |
0d366b66 | 56 | |
7ed1a089 PS |
57 | # This test must come as early as possible after the compiler configuration |
58 | # tests, because the choice of the file model can (in principle) affect | |
59 | # whether functions and headers are available, whether they work, etc. | |
27255c5b | 60 | AC_SYS_LARGEFILE |
e2403327 | 61 | |
7ed1a089 | 62 | # Checks for libraries. |
c992c4d8 | 63 | AC_SEARCH_LIBS([getpwnam], [sun]) |
7ed1a089 PS |
64 | |
65 | # Checks for header files. | |
dea9990b RM |
66 | AC_HEADER_STDC |
67 | AC_HEADER_DIRENT | |
7ed1a089 PS |
68 | AC_HEADER_STAT |
69 | AC_HEADER_TIME | |
c992c4d8 | 70 | AC_CHECK_HEADERS([stdlib.h locale.h unistd.h limits.h fcntl.h string.h \ |
85c78857 PS |
71 | memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h \ |
72 | sys/select.h]) | |
7ed1a089 PS |
73 | |
74 | AM_PROG_CC_C_O | |
7ed1a089 PS |
75 | AC_C_CONST |
76 | AC_TYPE_SIGNAL | |
77 | AC_TYPE_UID_T | |
78 | AC_TYPE_PID_T | |
4f8be4bb PS |
79 | AC_TYPE_OFF_T |
80 | AC_TYPE_SIZE_T | |
81 | AC_TYPE_SSIZE_T | |
82 | AC_TYPE_UINTMAX_T | |
4a5550c8 | 83 | |
7ed1a089 | 84 | # Find out whether our struct stat returns nanosecond resolution timestamps. |
1fa7491d | 85 | |
1a82956e | 86 | AC_STRUCT_ST_MTIM_NSEC |
c992c4d8 PS |
87 | AC_CACHE_CHECK([whether to use high resolution file timestamps], |
88 | [make_cv_file_timestamp_hi_res], | |
89 | [ make_cv_file_timestamp_hi_res=no | |
90 | AS_IF([test "$ac_cv_struct_st_mtim_nsec" != no], | |
91 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
92 | #if HAVE_INTTYPES_H | |
93 | # include <inttypes.h> | |
94 | #endif]], | |
8a3436c6 | 95 | [[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])], |
c992c4d8 PS |
96 | [make_cv_file_timestamp_hi_res=yes]) |
97 | ])]) | |
98 | AS_IF([test "$make_cv_file_timestamp_hi_res" = yes], [val=1], [val=0]) | |
99 | AC_DEFINE_UNQUOTED([FILE_TIMESTAMP_HI_RES], [$val], | |
8a3436c6 | 100 | [Use high resolution file timestamps if nonzero.]) |
1a82956e | 101 | |
c992c4d8 PS |
102 | AS_IF([test "$make_cv_file_timestamp_hi_res" = yes], |
103 | [ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. | |
1a82956e | 104 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. |
c992c4d8 PS |
105 | AC_SEARCH_LIBS([clock_gettime], [rt posix4]) |
106 | AS_IF([test "$ac_cv_search_clock_gettime" != no], | |
107 | [ AC_DEFINE([HAVE_CLOCK_GETTIME], [1], | |
8a3436c6 | 108 | [Define to 1 if you have the clock_gettime function.]) |
c992c4d8 PS |
109 | ]) |
110 | ]) | |
2c64fb22 | 111 | |
1a5beef5 PS |
112 | # Check for DOS-style pathnames. |
113 | pds_AC_DOS_PATHS | |
dea9990b | 114 | |
4a5550c8 PS |
115 | # See if we have a standard version of gettimeofday(). Since actual |
116 | # implementations can differ, just make sure we have the most common | |
117 | # one. | |
c992c4d8 | 118 | AC_CACHE_CHECK([for standard gettimeofday], [ac_cv_func_gettimeofday], |
4a5550c8 | 119 | [ac_cv_func_gettimeofday=no |
955899ef PS |
120 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h> |
121 | int main () | |
8a3436c6 PS |
122 | { |
123 | struct timeval t; t.tv_sec = -1; t.tv_usec = -1; | |
124 | exit (gettimeofday (&t, 0) != 0 | |
125 | || t.tv_sec < 0 || t.tv_usec < 0); | |
126 | }]])], | |
127 | [ac_cv_func_gettimeofday=yes], | |
128 | [ac_cv_func_gettimeofday=no], | |
129 | [ac_cv_func_gettimeofday="no (cross-compiling)"])]) | |
c992c4d8 PS |
130 | AS_IF([test "$ac_cv_func_gettimeofday" = yes], |
131 | [ AC_DEFINE([HAVE_GETTIMEOFDAY], [1], | |
8a3436c6 | 132 | [Define to 1 if you have a standard gettimeofday function]) |
c992c4d8 | 133 | ]) |
4a5550c8 | 134 | |
c992c4d8 | 135 | AC_CHECK_FUNCS([strdup strndup mkstemp mktemp fdopen fileno \ |
8a3436c6 | 136 | dup dup2 getcwd realpath sigsetmask sigaction \ |
49ca261b | 137 | getgroups seteuid setegid setlinebuf setreuid setregid \ |
d2516343 | 138 | getrlimit setrlimit setvbuf pipe strerror strsignal \ |
85c78857 | 139 | lstat readlink atexit isatty ttyname pselect]) |
2c64fb22 | 140 | |
fba20a77 PS |
141 | # We need to check declarations, not just existence, because on Tru64 this |
142 | # function is not declared without special flags, which themselves cause | |
143 | # other problems. We'll just use our own. | |
f263ff4c PS |
144 | AC_CHECK_DECLS([bsd_signal], [], [], [[#define _GNU_SOURCE 1 |
145 | #include <signal.h>]]) | |
fba20a77 | 146 | |
fd1dd7c3 PS |
147 | AC_FUNC_FORK |
148 | ||
1f16ee5c | 149 | AC_FUNC_SETVBUF_REVERSED |
9052b52d | 150 | |
52ebc531 PS |
151 | # Rumor has it that strcasecmp lives in -lresolv on some odd systems. |
152 | # It doesn't hurt much to use our own if we can't find it so I don't | |
153 | # make the effort here. | |
c992c4d8 | 154 | AC_CHECK_FUNCS([strcasecmp strncasecmp strcmpi strncmpi stricmp strnicmp]) |
52ebc531 | 155 | |
9052b52d PS |
156 | # strcoll() is used by the GNU glob library |
157 | AC_FUNC_STRCOLL | |
158 | ||
dea9990b | 159 | AC_FUNC_ALLOCA |
2c64fb22 | 160 | AC_FUNC_CLOSEDIR_VOID |
9052b52d | 161 | |
c992c4d8 PS |
162 | # See if the user wants to add (or not) GNU Guile support |
163 | PKG_PROG_PKG_CONFIG | |
164 | AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile], | |
165 | [Support GNU Guile for embedded scripting])]) | |
166 | ||
167 | # For some strange reason, at least on Ubuntu, each version of Guile | |
168 | # comes with it's own PC file so we have to specify them as individual | |
169 | # packages. Ugh. | |
170 | AS_IF([test "x$with_guile" != xno], | |
171 | [ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes], | |
172 | [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes], | |
fca11f60 | 173 | [have_guile=no])]) |
c992c4d8 PS |
174 | ]) |
175 | ||
176 | AS_IF([test "$have_guile" = yes], | |
177 | [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])]) | |
178 | ||
179 | AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes]) | |
180 | ||
27255c5b | 181 | AC_FUNC_GETLOADAVG |
1fa7491d | 182 | |
9052b52d PS |
183 | # AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it |
184 | # doesn't. So, we will. | |
185 | ||
c992c4d8 PS |
186 | AS_IF([test "$ac_cv_header_nlist_h" = yes], |
187 | [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]], | |
8a3436c6 | 188 | [[struct nlist nl; |
955899ef PS |
189 | nl.n_name = "string"; |
190 | return 0;]])], | |
8a3436c6 PS |
191 | [make_cv_nlist_struct=yes], |
192 | [make_cv_nlist_struct=no]) | |
c992c4d8 PS |
193 | AS_IF([test "$make_cv_nlist_struct" = yes], |
194 | [ AC_DEFINE([NLIST_STRUCT], [1], | |
52ebc531 | 195 | [Define to 1 if struct nlist.n_name is a pointer rather than an array.]) |
c992c4d8 PS |
196 | ]) |
197 | ]) | |
9052b52d | 198 | |
1e9dc3ce PS |
199 | AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , , |
200 | [AC_INCLUDES_DEFAULT | |
201 | #include <signal.h> | |
28078b51 PS |
202 | /* NetBSD declares sys_siglist in unistd.h. */ |
203 | #if HAVE_UNISTD_H | |
204 | # include <unistd.h> | |
205 | #endif | |
206 | ]) | |
955899ef | 207 | |
7ed1a089 | 208 | |
dea9990b | 209 | # Check out the wait reality. |
c992c4d8 PS |
210 | AC_CHECK_HEADERS([sys/wait.h],[],[],[[#include <sys/types.h>]]) |
211 | AC_CHECK_FUNCS([waitpid wait3]) | |
212 | AC_CACHE_CHECK([for union wait], [make_cv_union_wait], | |
213 | [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | |
955899ef PS |
214 | #include <sys/wait.h>]], |
215 | [[union wait status; int pid; pid = wait (&status); | |
2603a605 RM |
216 | #ifdef WEXITSTATUS |
217 | /* Some POSIXoid systems have both the new-style macros and the old | |
cd493b3d | 218 | union wait type, and they do not work together. If union wait |
2603a605 | 219 | conflicts with WEXITSTATUS et al, we don't want to use it at all. */ |
955899ef | 220 | if (WEXITSTATUS (status) != 0) pid = -1; |
d525f4dd | 221 | #ifdef WTERMSIG |
955899ef PS |
222 | /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */ |
223 | -- blow chunks here -- | |
d525f4dd | 224 | #endif |
2603a605 | 225 | #endif |
d870f4df | 226 | #ifdef HAVE_WAITPID |
955899ef PS |
227 | /* Make sure union wait works with waitpid. */ |
228 | pid = waitpid (-1, &status, 0); | |
d870f4df | 229 | #endif |
955899ef PS |
230 | ]])], |
231 | [make_cv_union_wait=yes], | |
c992c4d8 PS |
232 | [make_cv_union_wait=no]) |
233 | ]) | |
234 | AS_IF([test "$make_cv_union_wait" = yes], | |
235 | [ AC_DEFINE([HAVE_UNION_WAIT], [1], | |
23c2b99e | 236 | [Define to 1 if you have the 'union wait' type in <sys/wait.h>.]) |
c992c4d8 | 237 | ]) |
1fa7491d | 238 | |
2603a605 | 239 | |
1a5beef5 | 240 | # If we're building on Windows/DOS/OS/2, add some support for DOS drive specs. |
c992c4d8 PS |
241 | AS_IF([test "$PATH_SEPARATOR" = ';'], |
242 | [ AC_DEFINE([HAVE_DOS_PATHS], [1], | |
52ebc531 | 243 | [Define to 1 if your system requires backslashes or drive specs in pathnames.]) |
c992c4d8 | 244 | ]) |
1a5beef5 | 245 | |
7ed1a089 | 246 | # See if the user wants to use pmake's "customs" distributed build capability |
c992c4d8 | 247 | AC_SUBST([REMOTE]) REMOTE=stub |
7ed1a089 | 248 | use_customs=false |
c992c4d8 | 249 | AC_ARG_WITH([customs], |
bd716a1e BRF |
250 | [AC_HELP_STRING([--with-customs=DIR], |
251 | [enable remote jobs via Customs--see README.customs])], | |
c992c4d8 PS |
252 | [ AS_CASE([$withval], [n|no], [:], |
253 | [make_cppflags="$CPPFLAGS" | |
254 | AS_CASE([$withval], | |
255 | [y|ye|yes], [:], | |
256 | [CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs" | |
257 | make_ldflags="$LDFLAGS -L$with_customs/lib"]) | |
258 | CF_NETLIBS | |
259 | AC_CHECK_HEADER([customs.h], | |
260 | [use_customs=true | |
8a3436c6 | 261 | REMOTE=cstms |
c992c4d8 PS |
262 | LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"], |
263 | [with_customs=no | |
264 | CPPFLAGS="$make_cppflags" make_badcust=yes]) | |
265 | ]) | |
266 | ]) | |
267 | ||
7ed1a089 | 268 | # Tell automake about this, so it can include the right .c files. |
c992c4d8 | 269 | AM_CONDITIONAL([USE_CUSTOMS], [test "$use_customs" = true]) |
7ed1a089 | 270 | |
9d153cc1 | 271 | # See if the user asked to handle case insensitive file systems. |
c992c4d8 PS |
272 | AH_TEMPLATE([HAVE_CASE_INSENSITIVE_FS], [Use case insensitive file names]) |
273 | AC_ARG_ENABLE([case-insensitive-file-system], | |
9d153cc1 | 274 | AC_HELP_STRING([--enable-case-insensitive-file-system], |
8a3436c6 | 275 | [assume file systems are case insensitive]), |
c992c4d8 | 276 | [AS_IF([test "$enableval" = yes], [AC_DEFINE([HAVE_CASE_INSENSITIVE_FS])])]) |
9d153cc1 | 277 | |
7ed1a089 | 278 | # See if we can handle the job server feature, and if the user wants it. |
c992c4d8 | 279 | AC_ARG_ENABLE([job-server], |
7ed1a089 | 280 | AC_HELP_STRING([--disable-job-server], |
9052b52d | 281 | [disallow recursive make communication during -jN]), |
4e7ee4fc | 282 | [make_cv_job_server="$enableval" user_job_server="$enableval"], |
fc0fe410 PS |
283 | [make_cv_job_server="yes"]) |
284 | ||
c992c4d8 PS |
285 | AS_IF([test "$ac_cv_func_waitpid" = no && test "$ac_cv_func_wait3" = no], |
286 | [has_wait_nohang=no], | |
287 | [has_wait_nohang=yes]) | |
4e7ee4fc | 288 | |
c992c4d8 | 289 | AC_CACHE_CHECK([for SA_RESTART], [make_cv_sa_restart], [ |
955899ef PS |
290 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], |
291 | [[return SA_RESTART;]])], | |
292 | [make_cv_sa_restart=yes], | |
293 | [make_cv_sa_restart=no])]) | |
be8c3dbc | 294 | |
c992c4d8 PS |
295 | AS_IF([test "$make_cv_sa_restart" != no], |
296 | [ AC_DEFINE([HAVE_SA_RESTART], [1], | |
52ebc531 | 297 | [Define to 1 if <signal.h> defines the SA_RESTART constant.]) |
c992c4d8 | 298 | ]) |
ce2c6ead | 299 | |
dc2a6ceb | 300 | # Only allow jobserver on systems that support it |
c992c4d8 PS |
301 | AS_CASE([/$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/], |
302 | [*/no/*], [make_cv_job_server=no]) | |
e334942e | 303 | |
cb0bedc3 | 304 | # Also supported on OS2 and MinGW |
c992c4d8 | 305 | AS_CASE([$host_os], [os2*|mingw*], [make_cv_job_server=yes]) |
fc0fe410 | 306 | |
cb0bedc3 | 307 | # If we support it and the user didn't disable it, build with jobserver |
c992c4d8 PS |
308 | AS_CASE([/$make_cv_job_server/$user_job_server/], |
309 | [*/no/*], [: no jobserver], | |
310 | [AC_DEFINE(MAKE_JOBSERVER, 1, | |
311 | [Define to 1 to enable job server support in GNU make.]) | |
312 | ]) | |
dc2a6ceb | 313 | |
7670c84f PS |
314 | # If dl*() functions are supported we can enable the load operation |
315 | AC_CHECK_DECLS([dlopen, dlsym, dlerror], [], [], | |
316 | [[#include <dlfcn.h>]]) | |
317 | ||
318 | AC_ARG_ENABLE([load], | |
319 | AC_HELP_STRING([--disable-load], | |
320 | [disable support for the 'load' operation]), | |
321 | [make_cv_load="$enableval" user_load="$enableval"], | |
322 | [make_cv_load="yes"]) | |
323 | ||
a7cac0f0 | 324 | AS_CASE([/$ac_cv_have_decl_dlopen/$ac_cv_have_decl_dlsym/$ac_cv_have_decl_dlerror/], |
7670c84f PS |
325 | [*/no/*], [make_cv_load=no]) |
326 | ||
a7cac0f0 AH |
327 | # We might need -ldl |
328 | AS_IF([test "$make_cv_load" = yes], [ | |
329 | AC_SEARCH_LIBS([dlopen], [dl], [], [make_cv_load=]) | |
330 | ]) | |
331 | ||
7670c84f PS |
332 | AS_CASE([/$make_cv_load/$user_load/], |
333 | [*/no/*], [make_cv_load=no], | |
334 | [AC_DEFINE(MAKE_LOAD, 1, | |
335 | [Define to 1 to enable 'load' support in GNU make.]) | |
336 | ]) | |
337 | ||
7670c84f PS |
338 | # If we want load support, we might need to link with export-dynamic. |
339 | # See if we can figure it out. Unfortunately this is very difficult. | |
340 | # For example passing -rdynamic to the SunPRO linker gives a warning | |
341 | # but succeeds and creates a shared object, not an executable! | |
342 | AS_IF([test "$make_cv_load" = yes], [ | |
343 | AC_MSG_CHECKING([If the linker accepts -Wl,--export-dynamic]) | |
344 | old_LDFLAGS="$LDFLAGS" | |
345 | LDFLAGS="$LDFLAGS -Wl,--export-dynamic" | |
330d97a9 | 346 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])], |
7670c84f PS |
347 | [AC_MSG_RESULT([yes]) |
348 | AC_SUBST([AM_LDFLAGS], [-Wl,--export-dynamic])], | |
349 | [AC_MSG_RESULT([no]) | |
350 | AC_MSG_CHECKING([If the linker accepts -rdynamic]) | |
351 | LDFLAGS="$old_LDFLAGS -rdynamic" | |
330d97a9 | 352 | AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){}])], |
7670c84f PS |
353 | [AC_MSG_RESULT([yes]) |
354 | AC_SUBST([AM_LDFLAGS], [-rdynamic])], | |
355 | [AC_MSG_RESULT([no])]) | |
356 | ]) | |
357 | LDFLAGS="$old_LDFLAGS" | |
358 | ]) | |
359 | ||
d2516343 PS |
360 | # if we have both lstat() and readlink() then we can support symlink |
361 | # timechecks. | |
c992c4d8 | 362 | AS_IF([test "$ac_cv_func_lstat" = yes && test "$ac_cv_func_readlink" = yes], |
7670c84f PS |
363 | [ AC_DEFINE([MAKE_SYMLINKS], [1], |
364 | [Define to 1 to enable symbolic link timestamp checking.]) | |
c992c4d8 | 365 | ]) |
d2516343 | 366 | |
306462f0 PS |
367 | # Find the SCCS commands, so we can include them in our default rules. |
368 | ||
c992c4d8 PS |
369 | AC_CACHE_CHECK([for location of SCCS get command], [make_cv_path_sccs_get], [ |
370 | AS_IF([test -f /usr/sccs/get], | |
371 | [make_cv_path_sccs_get=/usr/sccs/get], | |
372 | [make_cv_path_sccs_get=get]) | |
373 | ]) | |
374 | AC_DEFINE_UNQUOTED([SCCS_GET], ["$make_cv_path_sccs_get"], | |
8a3436c6 | 375 | [Define to the name of the SCCS 'get' command.]) |
84f38c9c | 376 | |
1bc63e8c | 377 | ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later. |
c992c4d8 PS |
378 | AS_IF([(/usr/sccs/admin -n s.conftest || admin -n s.conftest) >/dev/null 2>&1 && |
379 | test -f s.conftest], | |
380 | [ # We successfully created an SCCS file. | |
381 | AC_CACHE_CHECK([if SCCS get command understands -G], [make_cv_sys_get_minus_G], | |
382 | [AS_IF([$make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 && | |
383 | test -f conftoast], | |
384 | [make_cv_sys_get_minus_G=yes], | |
385 | [make_cv_sys_get_minus_G=no]) | |
386 | ]) | |
387 | AS_IF([test "$make_cv_sys_get_minus_G" = yes], | |
388 | [AC_DEFINE([SCCS_GET_MINUS_G], [1], | |
389 | [Define to 1 if the SCCS 'get' command understands the '-G<file>' option.]) | |
390 | ]) | |
391 | ]) | |
1bc63e8c | 392 | rm -f s.conftest conftoast |
ada45284 | 393 | |
306462f0 PS |
394 | # Check the system to see if it provides GNU glob. If not, use our |
395 | # local version. | |
c992c4d8 PS |
396 | AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob], |
397 | [ AC_EGREP_CPP([gnu glob],[ | |
a66668aa | 398 | #include <features.h> |
84f38c9c PS |
399 | #include <glob.h> |
400 | #include <fnmatch.h> | |
401 | ||
402 | #define GLOB_INTERFACE_VERSION 1 | |
306462f0 | 403 | #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 |
84f38c9c | 404 | # include <gnu-versions.h> |
306462f0 | 405 | # if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION |
8572d6ad | 406 | gnu glob |
84f38c9c | 407 | # endif |
c992c4d8 PS |
408 | #endif], |
409 | [make_cv_sys_gnu_glob=yes], | |
410 | [make_cv_sys_gnu_glob=no])]) | |
411 | AS_IF([test "$make_cv_sys_gnu_glob" = no], | |
412 | [ GLOBINC='-I$(srcdir)/glob' | |
e2f16fdf | 413 | GLOBLIB=glob/libglob.a |
c992c4d8 PS |
414 | ]) |
415 | AC_SUBST([GLOBINC]) | |
416 | AC_SUBST([GLOBLIB]) | |
e2f16fdf | 417 | |
306462f0 | 418 | # Tell automake about this, so it can build the right .c files. |
c992c4d8 | 419 | AM_CONDITIONAL([USE_LOCAL_GLOB], [test "$make_cv_sys_gnu_glob" = no]) |
306462f0 PS |
420 | |
421 | # Let the makefile know what our build host is | |
84f38c9c | 422 | |
c992c4d8 | 423 | AC_DEFINE_UNQUOTED([MAKE_HOST],["$host"],[Build host information.]) |
c8003673 | 424 | MAKE_HOST="$host" |
c992c4d8 | 425 | AC_SUBST([MAKE_HOST]) |
82f0c549 | 426 | |
9d153cc1 | 427 | w32_target_env=no |
c992c4d8 | 428 | AM_CONDITIONAL([WINDOWSENV], [false]) |
9d153cc1 | 429 | |
c992c4d8 PS |
430 | AS_CASE([$host], |
431 | [*-*-mingw32], | |
432 | [AM_CONDITIONAL([WINDOWSENV], [true]) | |
9d153cc1 PS |
433 | w32_target_env=yes |
434 | AC_DEFINE([WINDOWS32], [1], [Use platform specific coding]) | |
435 | AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding]) | |
c992c4d8 | 436 | ]) |
9d153cc1 | 437 | |
c992c4d8 PS |
438 | AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'], |
439 | [Define to the character that separates directories in PATH.]) | |
7595f38f | 440 | |
306462f0 PS |
441 | # Include the Maintainer's Makefile section, if it's here. |
442 | ||
9e6ba6a1 | 443 | MAINT_MAKEFILE=/dev/null |
c992c4d8 PS |
444 | AS_IF([test -r "$srcdir/maintMakefile"], |
445 | [ MAINT_MAKEFILE="$srcdir/maintMakefile" | |
446 | ]) | |
447 | AC_SUBST_FILE([MAINT_MAKEFILE]) | |
9e6ba6a1 | 448 | |
7ed1a089 PS |
449 | # Allow building with dmalloc |
450 | AM_WITH_DMALLOC | |
1fa7491d | 451 | |
f29b86c3 PS |
452 | # Forcibly disable SET_MAKE. If it's set it breaks things like the test |
453 | # scripts, etc. | |
454 | SET_MAKE= | |
a9166bb7 | 455 | |
7ed1a089 | 456 | # Sanity check and inform the user of what we found |
a9166bb7 | 457 | |
c992c4d8 PS |
458 | AS_IF([test "x$make_badcust" = xyes], [ |
459 | echo | |
460 | echo "WARNING: --with-customs specified but no customs.h could be found;" | |
461 | echo " disabling Customs support." | |
462 | echo | |
463 | ]) | |
464 | ||
465 | AS_CASE([$with_customs], | |
466 | [""|n|no|y|ye|yes], [:], | |
467 | [AS_IF([test -f "$with_customs/lib/libcustoms.a"], [:], | |
468 | [ echo | |
469 | echo "WARNING: '$with_customs/lib' does not appear to contain the" | |
470 | echo " Customs library. You must build and install Customs" | |
471 | echo " before compiling GNU make." | |
472 | echo | |
473 | ])]) | |
474 | ||
475 | AS_IF([test "x$has_wait_nohang" = xno], | |
476 | [ echo | |
477 | echo "WARNING: Your system has neither waitpid() nor wait3()." | |
478 | echo " Without one of these, signal handling is unreliable." | |
479 | echo " You should be aware that running GNU make with -j" | |
480 | echo " could result in erratic behavior." | |
481 | echo | |
482 | ]) | |
2c64fb22 | 483 | |
c992c4d8 PS |
484 | AS_IF([test "x$make_cv_job_server" = xno && test "x$user_job_server" = xyes], |
485 | [ echo | |
486 | echo "WARNING: Make job server requires a POSIX-ish system that" | |
487 | echo " supports the pipe(), sigaction(), and either" | |
488 | echo " waitpid() or wait3() functions. Your system doesn't" | |
489 | echo " appear to provide one or more of those." | |
490 | echo " Disabling job server support." | |
491 | echo | |
492 | ]) | |
7ed1a089 | 493 | |
7670c84f PS |
494 | AS_IF([test "x$make_cv_load" = xno && test "x$user_load" = xyes], |
495 | [ echo | |
496 | echo "WARNING: 'load' support requires a POSIX-ish system that" | |
497 | echo " supports the dlopen(), dlsym(), and dlerror() functions." | |
498 | echo " Your system doesn't appear to provide one or more of these." | |
499 | echo " Disabling 'load' support." | |
500 | echo | |
501 | ]) | |
502 | ||
7ed1a089 | 503 | # Specify what files are to be created. |
c992c4d8 | 504 | AC_CONFIG_FILES([Makefile glob/Makefile po/Makefile.in config/Makefile \ |
107ab16b | 505 | doc/Makefile w32/Makefile tests/config-flags.pm]) |
9d153cc1 | 506 | |
7ed1a089 PS |
507 | # OK, do it! |
508 | ||
509 | AC_OUTPUT | |
510 | ||
dff0be9e PS |
511 | # We only generate the build.sh if we have a build.sh.in; we won't have |
512 | # one before we've created a distribution. | |
c992c4d8 PS |
513 | AS_IF([test -f "$srcdir/build.sh.in"], |
514 | [ ./config.status --file build.sh | |
dff0be9e | 515 | chmod +x build.sh |
c992c4d8 | 516 | ]) |
7ed1a089 | 517 | |
1fa7491d | 518 | dnl Local Variables: |
ce25808c | 519 | dnl comment-start: "dnl " |
1fa7491d RM |
520 | dnl comment-end: "" |
521 | dnl comment-start-skip: "\\bdnl\\b\\s *" | |
50f2c1fb | 522 | dnl compile-command: "make configure config.h.in" |
1fa7491d | 523 | dnl End: |