For PR351:

* Make sure all headers used by lib/System have checks
* Use "standard" autoconf checks for certain problematic headers
For PR432:
* Resurrect --with-llvmgccdir so a specific llvm-gcc/llvm-g++ installation
  can be specified.

llvm-svn: 19142
This commit is contained in:
Reid Spencer 2004-12-25 07:31:29 +00:00
parent f365c33b62
commit 8bc110c097
3 changed files with 925 additions and 625 deletions

View File

@ -233,6 +233,17 @@ case "$enableval" in
*) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;; *) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;;
esac esac
dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.
AC_ARG_WITH(llvmgccdir,
AS_HELP_STRING([--with-llvmgccdir],
[Specify location of llvm-gcc install dir (default searches PATH)]),,
withval=default)
case "$withval" in
default) WITH_LLVMGCCDIR=default ;;
/*) WITH_LLVMGCCDIR=$withval ;;
*) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;;
esac
dnl===-----------------------------------------------------------------------=== dnl===-----------------------------------------------------------------------===
dnl=== dnl===
dnl=== SECTION 4: Check for programs we need and that they are the right version dnl=== SECTION 4: Check for programs we need and that they are the right version
@ -254,8 +265,6 @@ AC_PATH_PROG(CP, [cp], [cp])
AC_PATH_PROG(DATE, [date], [date]) AC_PATH_PROG(DATE, [date], [date])
AC_PATH_PROG(FIND, [find], [find]) AC_PATH_PROG(FIND, [find], [find])
AC_PATH_PROG(GREP, [grep], [grep]) AC_PATH_PROG(GREP, [grep], [grep])
AC_PATH_PROG(LLVMGCC, [llvm-gcc], [llvm-gcc])
AC_PATH_PROG(LLVMGXX, [llvm-g++], [llvm-g++])
AC_PATH_PROG(MKDIR,[mkdir],[mkdir]) AC_PATH_PROG(MKDIR,[mkdir],[mkdir])
AC_PATH_PROG(MV, [mv], [mv]) AC_PATH_PROG(MV, [mv], [mv])
AC_PATH_PROG(PAX, [pax], [pax]) AC_PATH_PROG(PAX, [pax], [pax])
@ -302,6 +311,16 @@ case "$etags_version" in
esac esac
AC_SUBST(ETAGSFLAGS,$ETAGSFLAGS) AC_SUBST(ETAGSFLAGS,$ETAGSFLAGS)
if test "$WITH_LLVMGCCDIR" != "default" ; then
AC_PATH_PROG(LLVMGCC, [llvm-gcc], [llvm-gcc])
AC_PATH_PROG(LLVMGXX, [llvm-g++], [llvm-g++])
else
LLVMGCC=$WITH_LLVMGCCDIR/bin/llvm-gcc
LLVMGXX=$WITH_LLVMGCCDIR/bin/llvm-g++
AC_SUBST(LLVMGCC,$LLVMGCC)
AC_SUBST(LLVMGXX,$LLVMGXX)
fi
AC_MSG_CHECKING([tool compatibility]) AC_MSG_CHECKING([tool compatibility])
dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as
@ -386,23 +405,20 @@ dnl=== SECTION 6: Check for header files
dnl=== dnl===
dnl===-----------------------------------------------------------------------=== dnl===-----------------------------------------------------------------------===
dnl First, use autoconf provided macros for specific headers that we need
dnl We don't check for ancient stuff or things that are guaranteed to be there dnl We don't check for ancient stuff or things that are guaranteed to be there
dnl by the C++ standard. We always use the <cfoo> versions of <foo.h> C headers. dnl by the C++ standard. We always use the <cfoo> versions of <foo.h> C headers.
AC_HEADER_STDC dnl Generally we're looking for POSIX headers.
AC_HEADER_DIRENT
dnl However, we do need some system specific header files. Generally we're
dnl looking for POSIX headers.
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([sys/time.h sys/mman.h sys/resource.h sys/time.h sys/types.h])
AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h limits.h link.h])
AC_CHECK_HEADERS([malloc.h unistd.h windows.h])
AC_HEADER_TIME
AC_HEADER_MMAP_ANONYMOUS AC_HEADER_MMAP_ANONYMOUS
AC_HEADER_STAT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
dnl Check for things that need to be included in public headers, and so AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h limits.h link.h])
dnl for which we may not have access to a HAVE_* preprocessor #define. AC_CHECK_HEADERS([malloc.h signal.h stdint.h unistd.h utime.h windows.h])
dnl (primarily used in DataTypes.h) AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/types.h])
AC_CHECK_HEADERS([inttypes.h stdint.h])
dnl===-----------------------------------------------------------------------=== dnl===-----------------------------------------------------------------------===
dnl=== dnl===
@ -427,7 +443,7 @@ dnl===-----------------------------------------------------------------------===
AC_CHECK_FUNCS([backtrace getcwd getpagesize getrusage gettimeofday isatty ]) AC_CHECK_FUNCS([backtrace getcwd getpagesize getrusage gettimeofday isatty ])
AC_CHECK_FUNCS([mkdtemp mkstemp mktemp ]) AC_CHECK_FUNCS([mkdtemp mkstemp mktemp ])
AC_CHECK_FUNCS([realpath strdup strtoq strtoll sysconf ]) AC_CHECK_FUNCS([realpath setrlimit strdup strtoq strtoll sysconf ])
AC_C_PRINTF_A AC_C_PRINTF_A
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
AC_FUNC_RAND48 AC_FUNC_RAND48

1487
llvm/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -228,9 +228,15 @@
/* Define to 1 if you have the `rindex' function. */ /* Define to 1 if you have the `rindex' function. */
#undef HAVE_RINDEX #undef HAVE_RINDEX
/* Define to 1 if you have the `setrlimit' function. */
#undef HAVE_SETRLIMIT
/* Define if you have the shl_load function. */ /* Define if you have the shl_load function. */
#undef HAVE_SHL_LOAD #undef HAVE_SHL_LOAD
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
@ -296,6 +302,9 @@
*/ */
#undef HAVE_SYS_NDIR_H #undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */ /* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H #undef HAVE_SYS_RESOURCE_H
@ -317,6 +326,9 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define to 1 if the system has the type `u_int64_t'. */ /* Define to 1 if the system has the type `u_int64_t'. */
#undef HAVE_U_INT64_T #undef HAVE_U_INT64_T
@ -402,6 +414,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */ STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION #undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS