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