Changeset 609 for branches/GNU/src/binutils/libiberty/configure.in
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/libiberty/configure.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 2 2 3 3 AC_PREREQ(2.13) 4 AC_INIT(pexecute.c) 4 AC_INIT(xmalloc.c) 5 6 # This works around the fact that libtool configuration may change LD 7 # for this particular configuration, but some shells, instead of 8 # keeping the changes in LD private, export them just because LD is 9 # exported. We don't use libtool yet, but some day we might, so... 10 ORIGINAL_LD_FOR_MULTILIBS=$LD 5 11 6 12 dnl We use these options to decide which functions to include. 7 13 AC_ARG_WITH(target-subdir, 8 [ --with-target-subdir=SUBDIR Configuring in a subdirectory]) 14 [ --with-target-subdir=SUBDIR Configuring in a subdirectory for target]) 15 AC_ARG_WITH(build-subdir, 16 [ --with-build-subdir=SUBDIR Configuring in a subdirectory for build]) 9 17 AC_ARG_WITH(cross-host, 10 18 [ --with-cross-host=HOST Configuring with a cross compiler]) … … 13 21 14 22 if test "${srcdir}" = "."; then 15 if test -z "${with_target_subdir}"; then 23 if test -n "${with_build_subdir}"; then 24 libiberty_topdir="${srcdir}/../.." 25 with_target_subdir= 26 elif test -z "${with_target_subdir}"; then 16 27 libiberty_topdir="${srcdir}/.." 17 28 else … … 25 36 libiberty_topdir="${srcdir}/.." 26 37 fi 38 AC_SUBST(libiberty_topdir) 27 39 AC_CONFIG_AUX_DIR($libiberty_topdir) 40 41 dnl Very limited version of automake's enable-maintainer-mode 42 43 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 44 dnl maintainer-mode is disabled by default 45 AC_ARG_ENABLE(maintainer-mode, 46 [ --enable-maintainer-mode 47 enable make rules and dependencies not useful 48 (and sometimes confusing) to the casual installer], 49 maintainer_mode=$enableval, 50 maintainer_mode=no) 51 52 AC_MSG_RESULT($maintainer_mode) 53 54 if test "$maintainer_mode" = "yes"; then 55 MAINT='' 56 NOTMAINT='#' 57 else 58 MAINT='#' 59 NOTMAINT='' 60 fi 61 AC_SUBST(MAINT)dnl 62 AC_SUBST(NOTMAINT)dnl 63 64 # Do we have a single-tree copy of texinfo? Even if we do, we can't 65 # rely on it - libiberty is built before texinfo. 66 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ) 67 if test "x$MAKEINFO" = "x"; then 68 MAKEINFO="@echo makeinfo missing; true" 69 BUILD_INFO= 70 else 71 BUILD_INFO=info 72 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in 73 x*\ [[1-3]].* ) 74 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" 75 BUILD_INFO= 76 AC_MSG_WARN([ 77 *** Makeinfo is too old. Info documentation will not be built.]) 78 ;; 79 esac 80 fi 81 AC_SUBST(MAKEINFO) 82 AC_SUBST(BUILD_INFO) 83 84 AC_CHECK_PROG(PERL, perl, perl, ) 85 if test x"$PERL" = x""; then 86 HAVE_PERL='#' 87 else 88 HAVE_PERL='' 89 fi 90 AC_SUBST(HAVE_PERL) 28 91 29 92 AC_CANONICAL_HOST … … 39 102 LIB_AC_PROG_CC 40 103 104 AC_PROG_CC_C_O 105 # autoconf is lame and doesn't give us any substitution variable for this. 106 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then 107 NO_MINUS_C_MINUS_O=yes 108 else 109 OUTPUT_OPTION='-o $@' 110 fi 111 AC_SUBST(NO_MINUS_C_MINUS_O) 112 AC_SUBST(OUTPUT_OPTION) 113 41 114 AC_ISC_POSIX 42 115 AC_C_CONST … … 70 143 # able to link anything, it had better be able to at least compile 71 144 # something. 72 AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h )145 AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h) 73 146 AC_HEADER_SYS_WAIT 74 147 AC_HEADER_TIME 75 148 76 149 libiberty_AC_DECLARE_ERRNO 150 151 AC_CHECK_TYPE(uintptr_t, unsigned long) 152 # Given the above check, we always have uintptr_t or a fallback 153 # definition. So define HAVE_UINTPTR_T in case any imported code 154 # relies on it. 155 AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.]) 156 157 AC_TYPE_PID_T 77 158 78 159 # This is the list of functions which libiberty will provide if they … … 88 169 funcs="$funcs calloc" 89 170 funcs="$funcs clock" 171 funcs="$funcs ffs" 90 172 funcs="$funcs getcwd" 91 173 funcs="$funcs getpagesize" … … 96 178 funcs="$funcs memcpy" 97 179 funcs="$funcs memmove" 180 funcs="$funcs mempcpy" 98 181 funcs="$funcs memset" 99 182 funcs="$funcs mkstemps" … … 103 186 funcs="$funcs rindex" 104 187 funcs="$funcs setenv" 188 funcs="$funcs snprintf" 105 189 funcs="$funcs sigsetmask" 190 funcs="$funcs stpcpy" 191 funcs="$funcs stpncpy" 106 192 funcs="$funcs strcasecmp" 107 193 funcs="$funcs strchr" … … 117 203 funcs="$funcs vfprintf" 118 204 funcs="$funcs vprintf" 205 funcs="$funcs vsnprintf" 119 206 funcs="$funcs vsprintf" 120 207 funcs="$funcs waitpid" … … 122 209 # Also in the old function.def file: alloca, vfork, getopt. 123 210 124 vars="sys_errlist sys_nerr sys_siglist "211 vars="sys_errlist sys_nerr sys_siglist _system_configuration" 125 212 126 213 checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" 214 checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp" 215 checkfuncs="$checkfuncs getsysinfo table sysctl" 127 216 128 217 # These are neither executed nor required, but they help keep … … 131 220 AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock) 132 221 AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy) 133 AC_CHECK_FUNCS(memmove mem set putenv random rename rindex sigsetmask)134 AC_CHECK_FUNCS(strcasecmp setenv st rchr strdup strncasecmp strrchr strstr)222 AC_CHECK_FUNCS(memmove mempcpy memset putenv random rename rindex sigsetmask) 223 AC_CHECK_FUNCS(strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr) 135 224 AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf) 136 225 AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal) 137 AC_CHECK_FUNCS(sysconf times sbrk gettimeofday) 226 AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs snprintf vsnprintf) 227 AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl) 228 AC_CHECK_FUNCS(realpath canonicalize_file_name) 138 229 AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) 139 230 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) 140 231 AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.]) 232 AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.]) 141 233 fi 142 234 143 235 # For each of these functions, if the host does not provide the 144 236 # function we want to put FN.o in LIBOBJS, and if the host does 145 # provide the function, we want to define HAVE_FN in config.h. Also, 146 # if the host does not provide alloca, we set ALLOCA to alloca.o 237 # provide the function, we want to define HAVE_FN in config.h. 147 238 148 239 setobjs= 149 240 CHECK= 241 target_header_dir= 150 242 if test -n "${with_target_subdir}"; then 151 243 … … 159 251 160 252 if test "x${with_newlib}" = "xyes"; then 161 ALLOCA="alloca.o"162 253 LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" 163 254 … … 183 274 fi 184 275 276 # We may wish to install the target headers somewhere. 277 AC_ARG_ENABLE(install-libiberty, 278 [ --enable-install-libiberty Install headers for end users], 279 enable_install_libiberty=$enableval, 280 enable_install_libiberty=no)dnl 281 282 # Option parsed, now set things appropriately. 283 case x"$enable_install_libiberty" in 284 xyes|x) 285 target_header_dir=libiberty 286 ;; 287 xno) 288 target_header_dir= 289 ;; 290 *) 291 # This could be sanity-checked in various ways... 292 target_header_dir="${enable_install_libiberty}" 293 ;; 294 esac 295 296 185 297 else 186 298 … … 191 303 192 304 AC_SUBST(CHECK) 305 AC_SUBST(target_header_dir) 306 307 case "${host}" in 308 *-*-cygwin* | *-*-mingw*) 309 AC_DEFINE_NOAUTOHEADER(HAVE_SYS_ERRLIST) 310 AC_DEFINE_NOAUTOHEADER(HAVE_SYS_NERR) 311 ;; 312 esac 193 313 194 314 if test -z "${setobjs}"; then … … 272 392 ;; 273 393 394 *-*-*vms*) 395 # Under VMS, vfork works very different than on Unix. The standard test 396 # won't work, and it isn't easily adaptable. It makes more sense to 397 # just force it. 398 ac_cv_func_vfork_works=yes 399 ;; 400 274 401 esac 275 402 … … 278 405 AC_PROG_CC_WORKS 279 406 AC_REPLACE_FUNCS($funcs) 280 281 case "${host}" in 282 *-*-interix) 283 # On Interix, it wrongly concludes that the MSVC compiler supports alloca. 284 # (MSVC does on Win32, not on Interix.) 285 # This should be temporary. 286 287 ac_cv_header_alloca_h=no 288 ac_cv_func_alloca_works=no 289 ALLOCA=alloca.o 290 cat >> confdefs.h <<\EOF 291 #define C_ALLOCA 1 292 EOF 293 cat >> confdefs.h <<EOF 294 #define STACK_DIRECTION -1 295 EOF 296 ;; 297 *) 298 AC_FUNC_ALLOCA 299 ;; 300 esac 301 407 libiberty_AC_FUNC_C_ALLOCA 302 408 AC_FUNC_VFORK 303 409 if test $ac_cv_func_vfork_works = no; then 304 410 LIBOBJS="$LIBOBJS vfork.o" 305 411 fi 412 # We only need _doprnt if we might use it to implement v*printf. 413 if test $ac_cv_func_vprintf != yes \ 414 || test $ac_cv_func_vfprintf != yes \ 415 || test $ac_cv_func_vsprintf != yes; then 416 AC_REPLACE_FUNCS(_doprnt) 417 else 418 AC_CHECK_FUNCS(_doprnt) 419 fi 420 306 421 for v in $vars; do 307 422 AC_MSG_CHECKING([for $v]) 308 423 AC_CACHE_VAL(libiberty_cv_var_$v, 309 [AC_TRY_LINK([int *p;], [extern int $v ; p = &$v;],424 [AC_TRY_LINK([int *p;], [extern int $v []; p = $v;], 310 425 [eval "libiberty_cv_var_$v=yes"], 311 426 [eval "libiberty_cv_var_$v=no"])]) … … 319 434 done 320 435 AC_CHECK_FUNCS($checkfuncs) 321 fi 436 libiberty_NEED_DECLARATION(canonicalize_file_name) 437 fi 438 439 # Figure out which version of pexecute to use. 440 case "${host}" in 441 *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;; 442 *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;; 443 *-*-msdos*) pexecute=pex-msdos.o ;; 444 *-*-os2-emx*) pexecute=pex-os2.o ;; 445 *) pexecute=pex-unix.o ;; 446 esac 447 AC_SUBST(pexecute) 322 448 323 449 libiberty_AC_FUNC_STRNCMP … … 336 462 [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h 337 463 if test -n "$CONFIG_FILES"; then 338 if test -n "${with_ target_subdir}"; then464 if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then 339 465 # FIXME: We shouldn't need to set ac_file 340 466 ac_file=Makefile 467 LD="${ORIGINAL_LD_FOR_MULTILIBS}" 341 468 . ${libiberty_topdir}/config-ml.in 342 469 fi … … 346 473 target=${target} 347 474 with_target_subdir=${with_target_subdir} 475 with_build_subdir=${with_build_subdir} 348 476 with_multisubdir=${with_multisubdir} 349 477 ac_configure_args="--enable-multilib ${ac_configure_args}" 350 478 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 479 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" 351 480 libiberty_topdir=${libiberty_topdir} 352 481 ) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.