| 1 | # Process this file with autoconf to produce a configure script.
|
|---|
| 2 | #
|
|---|
| 3 | # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
|---|
| 4 | # 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
|---|
| 5 | # This file is part of GNU Make.
|
|---|
| 6 | #
|
|---|
| 7 | # GNU Make is free software; you can redistribute it and/or modify it under
|
|---|
| 8 | # the terms of the GNU General Public License as published by the Free Software
|
|---|
| 9 | # Foundation; either version 3 of the License, or (at your option) any later
|
|---|
| 10 | # version.
|
|---|
| 11 | #
|
|---|
| 12 | # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
|
|---|
| 13 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|---|
| 14 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|---|
| 15 | # details.
|
|---|
| 16 | #
|
|---|
| 17 | # You should have received a copy of the GNU General Public License along with
|
|---|
| 18 | # this program. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 19 |
|
|---|
| 20 | AC_INIT([GNU make],[3.81.90],[bug-make@gnu.org])
|
|---|
| 21 |
|
|---|
| 22 | AC_PREREQ(2.59)
|
|---|
| 23 | AC_REVISION([[$Id: configure.in,v 1.148 2007/07/04 19:35:17 psmith Exp $]])
|
|---|
| 24 |
|
|---|
| 25 | # Autoconf setup
|
|---|
| 26 | AC_CONFIG_AUX_DIR(config)
|
|---|
| 27 | AC_CONFIG_SRCDIR(vpath.c)
|
|---|
| 28 | AC_CONFIG_HEADERS(config.h)
|
|---|
| 29 |
|
|---|
| 30 | # Automake setup
|
|---|
| 31 | AM_INIT_AUTOMAKE([1.9])
|
|---|
| 32 |
|
|---|
| 33 | # Checks for programs.
|
|---|
| 34 | AC_PROG_CC
|
|---|
| 35 | AC_PROG_INSTALL
|
|---|
| 36 | AC_PROG_RANLIB
|
|---|
| 37 | AC_PROG_CPP
|
|---|
| 38 | AC_CHECK_PROG(AR, ar, ar, ar)
|
|---|
| 39 | # Perl is needed for the test suite (only)
|
|---|
| 40 | AC_CHECK_PROG(PERL, perl, perl, perl)
|
|---|
| 41 |
|
|---|
| 42 | # Specialized system macros
|
|---|
| 43 | AC_CANONICAL_HOST
|
|---|
| 44 | AC_AIX
|
|---|
| 45 | AC_ISC_POSIX
|
|---|
| 46 | AC_MINIX
|
|---|
| 47 |
|
|---|
| 48 | # kmk does not need gettext (yet)
|
|---|
| 49 | ## Enable gettext, in "external" mode.
|
|---|
| 50 | #
|
|---|
| 51 | #AM_GNU_GETTEXT_VERSION(0.14.1)
|
|---|
| 52 | #AM_GNU_GETTEXT([external])
|
|---|
| 53 |
|
|---|
| 54 | # This test must come as early as possible after the compiler configuration
|
|---|
| 55 | # tests, because the choice of the file model can (in principle) affect
|
|---|
| 56 | # whether functions and headers are available, whether they work, etc.
|
|---|
| 57 | AC_SYS_LARGEFILE
|
|---|
| 58 |
|
|---|
| 59 | # Checks for libraries.
|
|---|
| 60 | AC_SEARCH_LIBS(getpwnam, [sun])
|
|---|
| 61 |
|
|---|
| 62 | # Checks for header files.
|
|---|
| 63 | AC_HEADER_STDC
|
|---|
| 64 | AC_HEADER_DIRENT
|
|---|
| 65 | AC_HEADER_STAT
|
|---|
| 66 | AC_HEADER_TIME
|
|---|
| 67 | AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
|
|---|
| 68 | memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h)
|
|---|
| 69 |
|
|---|
| 70 | # Set a flag if we have an ANSI C compiler
|
|---|
| 71 | if test "$ac_cv_prog_cc_stdc" != no; then
|
|---|
| 72 | AC_DEFINE(HAVE_ANSI_COMPILER, 1,
|
|---|
| 73 | [Define to 1 if your compiler conforms to the ANSI C standard.])
|
|---|
| 74 | fi
|
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 | # Determine what kind of variadic function calls we support
|
|---|
| 78 | AC_CHECK_HEADERS(stdarg.h varargs.h, break)
|
|---|
| 79 |
|
|---|
| 80 | AM_PROG_CC_C_O
|
|---|
| 81 | AC_C_CONST
|
|---|
| 82 | AC_TYPE_SIGNAL
|
|---|
| 83 | AC_TYPE_UID_T
|
|---|
| 84 | AC_TYPE_PID_T
|
|---|
| 85 |
|
|---|
| 86 | # Find some definition for uintmax_t
|
|---|
| 87 |
|
|---|
| 88 | AC_CHECK_TYPE(uintmax_t,,[
|
|---|
| 89 | uintmax_t="unsigned long"
|
|---|
| 90 | AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"])
|
|---|
| 91 | AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,
|
|---|
| 92 | [Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])])
|
|---|
| 93 |
|
|---|
| 94 | # Find out whether our struct stat returns nanosecond resolution timestamps.
|
|---|
| 95 |
|
|---|
| 96 | AC_STRUCT_ST_MTIM_NSEC
|
|---|
| 97 | AC_MSG_CHECKING([whether to use high resolution file timestamps])
|
|---|
| 98 | AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
|
|---|
| 99 | make_cv_file_timestamp_hi_res=no
|
|---|
| 100 | if test "$ac_cv_struct_st_mtim_nsec" != no; then
|
|---|
| 101 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|---|
| 102 | # if HAVE_INTTYPES_H
|
|---|
| 103 | # include <inttypes.h>
|
|---|
| 104 | # endif]],
|
|---|
| 105 | [[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])],
|
|---|
| 106 | [make_cv_file_timestamp_hi_res=yes],
|
|---|
| 107 | [])
|
|---|
| 108 | fi])
|
|---|
| 109 | AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
|
|---|
| 110 | if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|---|
| 111 | val=1
|
|---|
| 112 | else
|
|---|
| 113 | val=0
|
|---|
| 114 | fi
|
|---|
| 115 | AC_DEFINE_UNQUOTED(FILE_TIMESTAMP_HI_RES, $val,
|
|---|
| 116 | [Use high resolution file timestamps if nonzero.])
|
|---|
| 117 |
|
|---|
| 118 | if test "$make_cv_file_timestamp_hi_res" = yes; then
|
|---|
| 119 | # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
|---|
| 120 | # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
|---|
| 121 | AC_SEARCH_LIBS(clock_gettime, [rt posix4])
|
|---|
| 122 | if test "$ac_cv_search_clock_gettime" != no; then
|
|---|
| 123 | AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
|
|---|
| 124 | [Define to 1 if you have the clock_gettime function.])
|
|---|
| 125 | fi
|
|---|
| 126 | fi
|
|---|
| 127 |
|
|---|
| 128 | # Check for DOS-style pathnames.
|
|---|
| 129 | pds_AC_DOS_PATHS
|
|---|
| 130 |
|
|---|
| 131 | # See if we have a standard version of gettimeofday(). Since actual
|
|---|
| 132 | # implementations can differ, just make sure we have the most common
|
|---|
| 133 | # one.
|
|---|
| 134 | AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
|
|---|
| 135 | [ac_cv_func_gettimeofday=no
|
|---|
| 136 | AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
|
|---|
| 137 | int main ()
|
|---|
| 138 | {
|
|---|
| 139 | struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
|
|---|
| 140 | exit (gettimeofday (&t, 0) != 0
|
|---|
| 141 | || t.tv_sec < 0 || t.tv_usec < 0);
|
|---|
| 142 | }]])],
|
|---|
| 143 | [ac_cv_func_gettimeofday=yes],
|
|---|
| 144 | [ac_cv_func_gettimeofday=no],
|
|---|
| 145 | [ac_cv_func_gettimeofday="no (cross-compiling)"])])
|
|---|
| 146 | if test "$ac_cv_func_gettimeofday" = yes; then
|
|---|
| 147 | AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
|
|---|
| 148 | [Define to 1 if you have a standard gettimeofday function])
|
|---|
| 149 | fi
|
|---|
| 150 |
|
|---|
| 151 | AC_CHECK_FUNCS( strdup mkstemp mktemp fdopen \
|
|---|
| 152 | bsd_signal dup2 getcwd realpath sigsetmask sigaction \
|
|---|
| 153 | getgroups seteuid setegid setlinebuf setreuid setregid \
|
|---|
| 154 | getrlimit setrlimit setvbuf pipe strerror strsignal \
|
|---|
| 155 | lstat readlink atexit)
|
|---|
| 156 |
|
|---|
| 157 | AC_FUNC_SETVBUF_REVERSED
|
|---|
| 158 |
|
|---|
| 159 | # Rumor has it that strcasecmp lives in -lresolv on some odd systems.
|
|---|
| 160 | # It doesn't hurt much to use our own if we can't find it so I don't
|
|---|
| 161 | # make the effort here.
|
|---|
| 162 | AC_CHECK_FUNCS(strcasecmp strcmpi stricmp)
|
|---|
| 163 |
|
|---|
| 164 | # strcoll() is used by the GNU glob library
|
|---|
| 165 | AC_FUNC_STRCOLL
|
|---|
| 166 |
|
|---|
| 167 | AC_FUNC_ALLOCA
|
|---|
| 168 | AC_FUNC_FORK([])
|
|---|
| 169 | AC_FUNC_VPRINTF
|
|---|
| 170 | AC_FUNC_CLOSEDIR_VOID
|
|---|
| 171 |
|
|---|
| 172 | AC_FUNC_GETLOADAVG
|
|---|
| 173 |
|
|---|
| 174 | # AC_FUNC_GETLOADAVG is documented to set the NLIST_STRUCT value, but it
|
|---|
| 175 | # doesn't. So, we will.
|
|---|
| 176 |
|
|---|
| 177 | if test "$ac_cv_header_nlist_h" = yes; then
|
|---|
| 178 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
|
|---|
| 179 | [[struct nlist nl;
|
|---|
| 180 | nl.n_name = "string";
|
|---|
| 181 | return 0;]])],
|
|---|
| 182 | [make_cv_nlist_struct=yes],
|
|---|
| 183 | [make_cv_nlist_struct=no])
|
|---|
| 184 | if test "$make_cv_nlist_struct" = yes; then
|
|---|
| 185 | AC_DEFINE(NLIST_STRUCT, 1,
|
|---|
| 186 | [Define to 1 if struct nlist.n_name is a pointer rather than an array.])
|
|---|
| 187 | fi
|
|---|
| 188 | fi
|
|---|
| 189 |
|
|---|
| 190 | AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
|
|---|
| 191 | [AC_INCLUDES_DEFAULT
|
|---|
| 192 | #include <signal.h>
|
|---|
| 193 | /* NetBSD declares sys_siglist in unistd.h. */
|
|---|
| 194 | #if HAVE_UNISTD_H
|
|---|
| 195 | # include <unistd.h>
|
|---|
| 196 | #endif
|
|---|
| 197 | ])
|
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 | # Check out the wait reality.
|
|---|
| 201 | AC_CHECK_HEADERS(sys/wait.h,,,[[#include <sys/types.h>]])
|
|---|
| 202 | AC_CHECK_FUNCS(waitpid wait3)
|
|---|
| 203 | AC_MSG_CHECKING(for union wait)
|
|---|
| 204 | AC_CACHE_VAL(make_cv_union_wait, [dnl
|
|---|
| 205 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
|---|
| 206 | #include <sys/wait.h>]],
|
|---|
| 207 | [[union wait status; int pid; pid = wait (&status);
|
|---|
| 208 | #ifdef WEXITSTATUS
|
|---|
| 209 | /* Some POSIXoid systems have both the new-style macros and the old
|
|---|
| 210 | union wait type, and they do not work together. If union wait
|
|---|
| 211 | conflicts with WEXITSTATUS et al, we don't want to use it at all. */
|
|---|
| 212 | if (WEXITSTATUS (status) != 0) pid = -1;
|
|---|
| 213 | #ifdef WTERMSIG
|
|---|
| 214 | /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
|
|---|
| 215 | -- blow chunks here --
|
|---|
| 216 | #endif
|
|---|
| 217 | #endif
|
|---|
| 218 | #ifdef HAVE_WAITPID
|
|---|
| 219 | /* Make sure union wait works with waitpid. */
|
|---|
| 220 | pid = waitpid (-1, &status, 0);
|
|---|
| 221 | #endif
|
|---|
| 222 | ]])],
|
|---|
| 223 | [make_cv_union_wait=yes],
|
|---|
| 224 | [make_cv_union_wait=no])])
|
|---|
| 225 | if test "$make_cv_union_wait" = yes; then
|
|---|
| 226 | AC_DEFINE(HAVE_UNION_WAIT, 1,
|
|---|
| 227 | [Define to 1 if you have the \`union wait' type in <sys/wait.h>.])
|
|---|
| 228 | fi
|
|---|
| 229 | AC_MSG_RESULT($make_cv_union_wait)
|
|---|
| 230 |
|
|---|
| 231 |
|
|---|
| 232 | # If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
|
|---|
| 233 | if test "$PATH_SEPARATOR" = ';'; then
|
|---|
| 234 | AC_DEFINE(HAVE_DOS_PATHS, 1,
|
|---|
| 235 | [Define to 1 if your system requires backslashes or drive specs in pathnames.])
|
|---|
| 236 | fi
|
|---|
| 237 |
|
|---|
| 238 |
|
|---|
| 239 | # See if the user wants to use pmake's "customs" distributed build capability
|
|---|
| 240 |
|
|---|
| 241 | AC_SUBST(REMOTE) REMOTE=stub
|
|---|
| 242 | use_customs=false
|
|---|
| 243 | AC_ARG_WITH(customs,
|
|---|
| 244 | AC_HELP_STRING([--with-customs=DIR],
|
|---|
| 245 | [enable remote jobs via Customs--see README.customs]),
|
|---|
| 246 | [case $withval in
|
|---|
| 247 | n|no) : ;;
|
|---|
| 248 | *) make_cppflags="$CPPFLAGS"
|
|---|
| 249 | case $withval in
|
|---|
| 250 | y|ye|yes) : ;;
|
|---|
| 251 | *) CPPFLAGS="$CPPFLAGS -I$with_customs/include/customs"
|
|---|
| 252 | make_ldflags="$LDFLAGS -L$with_customs/lib" ;;
|
|---|
| 253 | esac
|
|---|
| 254 | CF_NETLIBS
|
|---|
| 255 | AC_CHECK_HEADER(customs.h,
|
|---|
| 256 | [use_customs=true
|
|---|
| 257 | REMOTE=cstms
|
|---|
| 258 | LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
|
|---|
| 259 | [with_customs=no
|
|---|
| 260 | CPPFLAGS="$make_cppflags" make_badcust=yes])
|
|---|
| 261 | ;;
|
|---|
| 262 | esac])
|
|---|
| 263 | # Tell automake about this, so it can include the right .c files.
|
|---|
| 264 | AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true)
|
|---|
| 265 |
|
|---|
| 266 | # See if the user asked to handle case insensitive file systems.
|
|---|
| 267 |
|
|---|
| 268 | AH_TEMPLATE(HAVE_CASE_INSENSITIVE_FS, [Use case insensitive file names])
|
|---|
| 269 | AC_ARG_ENABLE(case-insensitive-file-system,
|
|---|
| 270 | AC_HELP_STRING([--enable-case-insensitive-file-system],
|
|---|
| 271 | [assume file systems are case insensitive]),
|
|---|
| 272 | [case $enableval in
|
|---|
| 273 | yes) AC_DEFINE(HAVE_CASE_INSENSITIVE_FS) ;;
|
|---|
| 274 | esac])
|
|---|
| 275 |
|
|---|
| 276 | # See if we can handle the job server feature, and if the user wants it.
|
|---|
| 277 |
|
|---|
| 278 | AC_ARG_ENABLE(job-server,
|
|---|
| 279 | AC_HELP_STRING([--disable-job-server],
|
|---|
| 280 | [disallow recursive make communication during -jN]),
|
|---|
| 281 | [make_cv_job_server="$enableval" user_job_server="$enableval"],
|
|---|
| 282 | [make_cv_job_server="yes"])
|
|---|
| 283 |
|
|---|
| 284 | has_wait_nohang=yes
|
|---|
| 285 | case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
|
|---|
| 286 | no/no) has_wait_nohang=no ;;
|
|---|
| 287 | esac
|
|---|
| 288 |
|
|---|
| 289 | AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [
|
|---|
| 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])])
|
|---|
| 294 |
|
|---|
| 295 | if test "$make_cv_sa_restart" != no; then
|
|---|
| 296 | AC_DEFINE(HAVE_SA_RESTART, 1,
|
|---|
| 297 | [Define to 1 if <signal.h> defines the SA_RESTART constant.])
|
|---|
| 298 | fi
|
|---|
| 299 |
|
|---|
| 300 | # enable make_cv_sa_restart for OS/2 so that the jobserver will be enabled,
|
|---|
| 301 | # but do it after HAVE_SA_RESTART has been defined.
|
|---|
| 302 | case "$host_os" in
|
|---|
| 303 | os2*) make_cv_sa_restart=yes ;;
|
|---|
| 304 | esac
|
|---|
| 305 |
|
|---|
| 306 | case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in
|
|---|
| 307 | yes/yes/yes/yes/yes)
|
|---|
| 308 | AC_DEFINE(MAKE_JOBSERVER, 1,
|
|---|
| 309 | [Define to 1 to enable job server support in GNU make.]);;
|
|---|
| 310 | esac
|
|---|
| 311 |
|
|---|
| 312 | # if we have both lstat() and readlink() then we can support symlink
|
|---|
| 313 | # timechecks.
|
|---|
| 314 | case "$ac_cv_func_lstat/$ac_cv_func_readlink" in
|
|---|
| 315 | yes/yes)
|
|---|
| 316 | AC_DEFINE(MAKE_SYMLINKS, 1,
|
|---|
| 317 | [Define to 1 to enable symbolic link timestamp checking.]);;
|
|---|
| 318 | esac
|
|---|
| 319 |
|
|---|
| 320 | # Find the SCCS commands, so we can include them in our default rules.
|
|---|
| 321 |
|
|---|
| 322 | AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
|
|---|
| 323 | if test -f /usr/sccs/get; then
|
|---|
| 324 | make_cv_path_sccs_get=/usr/sccs/get
|
|---|
| 325 | else
|
|---|
| 326 | make_cv_path_sccs_get=get
|
|---|
| 327 | fi])
|
|---|
| 328 | AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"],
|
|---|
| 329 | [Define to the name of the SCCS 'get' command.])
|
|---|
| 330 |
|
|---|
| 331 | ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
|
|---|
| 332 | if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
|
|---|
| 333 | test -f s.conftest; then
|
|---|
| 334 | # We successfully created an SCCS file.
|
|---|
| 335 | AC_CACHE_CHECK(if SCCS get command understands -G, make_cv_sys_get_minus_G, [
|
|---|
| 336 | if $make_cv_path_sccs_get -Gconftoast s.conftest >/dev/null 2>&1 &&
|
|---|
| 337 | test -f conftoast; then
|
|---|
| 338 | make_cv_sys_get_minus_G=yes
|
|---|
| 339 | else
|
|---|
| 340 | make_cv_sys_get_minus_G=no
|
|---|
| 341 | fi])
|
|---|
| 342 | case "$make_cv_sys_get_minus_G" in
|
|---|
| 343 | yes) AC_DEFINE(SCCS_GET_MINUS_G, 1,
|
|---|
| 344 | [Define to 1 if the SCCS 'get' command understands the '-G<file>' option.]);;
|
|---|
| 345 | esac
|
|---|
| 346 | fi
|
|---|
| 347 | rm -f s.conftest conftoast
|
|---|
| 348 |
|
|---|
| 349 | # Check the system to see if it provides GNU glob. If not, use our
|
|---|
| 350 | # local version.
|
|---|
| 351 |
|
|---|
| 352 | AC_MSG_CHECKING(if system libc has GNU glob)
|
|---|
| 353 | AC_CACHE_VAL(make_cv_sys_gnu_glob, [
|
|---|
| 354 | AC_EGREP_CPP(gnu glob,[
|
|---|
| 355 | #include <features.h>
|
|---|
| 356 | #include <glob.h>
|
|---|
| 357 | #include <fnmatch.h>
|
|---|
| 358 |
|
|---|
| 359 | #define GLOB_INTERFACE_VERSION 1
|
|---|
| 360 | #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
|
|---|
| 361 | # include <gnu-versions.h>
|
|---|
| 362 | # if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
|
|---|
| 363 | gnu glob
|
|---|
| 364 | # endif
|
|---|
| 365 | #endif
|
|---|
| 366 | ], [AC_MSG_RESULT(yes)
|
|---|
| 367 | make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
|
|---|
| 368 | AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
|
|---|
| 369 | AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
|
|---|
| 370 | make_cv_sys_gnu_glob=no])])
|
|---|
| 371 | # Tell automake about this, so it can build the right .c files.
|
|---|
| 372 | AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
|
|---|
| 373 |
|
|---|
| 374 | # Let the makefile know what our build host is
|
|---|
| 375 |
|
|---|
| 376 | AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information. (not used by kmk)])
|
|---|
| 377 | MAKE_HOST="$host"
|
|---|
| 378 | AC_SUBST(MAKE_HOST)
|
|---|
| 379 |
|
|---|
| 380 | w32_target_env=no
|
|---|
| 381 | AM_CONDITIONAL([WINDOWSENV], false)
|
|---|
| 382 |
|
|---|
| 383 | case "$host" in
|
|---|
| 384 | *-*-mingw32)
|
|---|
| 385 | AM_CONDITIONAL(WINDOWSENV, true)
|
|---|
| 386 | w32_target_env=yes
|
|---|
| 387 | AC_DEFINE([WINDOWS32], [1], [Use platform specific coding])
|
|---|
| 388 | AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding])
|
|---|
| 389 | ;;
|
|---|
| 390 | esac
|
|---|
| 391 |
|
|---|
| 392 | AC_DEFINE_UNQUOTED(PATH_SEPARATOR_CHAR,'$PATH_SEPARATOR',[Define to the character that separates directories in PATH.])
|
|---|
| 393 |
|
|---|
| 394 | # Include the Maintainer's Makefile section, if it's here.
|
|---|
| 395 |
|
|---|
| 396 | MAINT_MAKEFILE=/dev/null
|
|---|
| 397 | if test -r "$srcdir/maintMakefile"; then
|
|---|
| 398 | MAINT_MAKEFILE="$srcdir/maintMakefile"
|
|---|
| 399 | fi
|
|---|
| 400 | AC_SUBST_FILE(MAINT_MAKEFILE)
|
|---|
| 401 |
|
|---|
| 402 | # Allow building with dmalloc
|
|---|
| 403 | AM_WITH_DMALLOC
|
|---|
| 404 |
|
|---|
| 405 | # Forcibly disable SET_MAKE. If it's set it breaks things like the test
|
|---|
| 406 | # scripts, etc.
|
|---|
| 407 | SET_MAKE=
|
|---|
| 408 |
|
|---|
| 409 | # Sanity check and inform the user of what we found
|
|---|
| 410 |
|
|---|
| 411 | case "$make_badcust" in
|
|---|
| 412 | yes) echo
|
|---|
| 413 | echo "WARNING: --with-customs specified but no customs.h could be found;"
|
|---|
| 414 | echo " disabling Customs support."
|
|---|
| 415 | echo ;;
|
|---|
| 416 | esac
|
|---|
| 417 |
|
|---|
| 418 | case "$with_customs" in
|
|---|
| 419 | ""|n|no|y|ye|yes) ;;
|
|---|
| 420 | *) if test -f "$with_customs/lib/libcustoms.a"; then
|
|---|
| 421 | :
|
|---|
| 422 | else
|
|---|
| 423 | echo
|
|---|
| 424 | echo "WARNING: '$with_customs/lib' does not appear to contain the"
|
|---|
| 425 | echo " Customs library. You must build and install Customs"
|
|---|
| 426 | echo " before compiling GNU make."
|
|---|
| 427 | echo
|
|---|
| 428 | fi ;;
|
|---|
| 429 | esac
|
|---|
| 430 |
|
|---|
| 431 | case "$has_wait_nohang" in
|
|---|
| 432 | no) echo
|
|---|
| 433 | echo "WARNING: Your system has neither waitpid() nor wait3()."
|
|---|
| 434 | echo " Without one of these, signal handling is unreliable."
|
|---|
| 435 | echo " You should be aware that running GNU make with -j"
|
|---|
| 436 | echo " could result in erratic behavior."
|
|---|
| 437 | echo ;;
|
|---|
| 438 | esac
|
|---|
| 439 |
|
|---|
| 440 | case "$make_cv_job_server/$user_job_server" in
|
|---|
| 441 | no/yes) echo
|
|---|
| 442 | echo "WARNING: Make job server requires a POSIX-ish system that"
|
|---|
| 443 | echo " supports the pipe(), sigaction(), and either"
|
|---|
| 444 | echo " waitpid() or wait3() functions. Your system doesn't"
|
|---|
| 445 | echo " appear to provide one or more of those."
|
|---|
| 446 | echo " Disabling job server support."
|
|---|
| 447 | echo ;;
|
|---|
| 448 | esac
|
|---|
| 449 |
|
|---|
| 450 |
|
|---|
| 451 | # Specify what files are to be created.
|
|---|
| 452 | #we can safely drop doc and po when bootstrapping kmk.
|
|---|
| 453 | #AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile w32/Makefile)
|
|---|
| 454 | AC_CONFIG_FILES(Makefile glob/Makefile config/Makefile w32/Makefile)
|
|---|
| 455 |
|
|---|
| 456 | # OK, do it!
|
|---|
| 457 |
|
|---|
| 458 | AC_OUTPUT
|
|---|
| 459 |
|
|---|
| 460 | # We only generate the build.sh if we have a build.sh.in; we won't have
|
|---|
| 461 | # one before we've created a distribution.
|
|---|
| 462 | if test -f "$srcdir/build.sh.in"; then
|
|---|
| 463 | ./config.status --file build.sh
|
|---|
| 464 | chmod +x build.sh
|
|---|
| 465 | fi
|
|---|
| 466 |
|
|---|
| 467 | dnl Local Variables:
|
|---|
| 468 | dnl comment-start: "dnl "
|
|---|
| 469 | dnl comment-end: ""
|
|---|
| 470 | dnl comment-start-skip: "\\bdnl\\b\\s *"
|
|---|
| 471 | dnl compile-command: "make configure config.h.in"
|
|---|
| 472 | dnl End:
|
|---|