mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2b9162e5d
commit
59473af395
@ -233,6 +233,17 @@ case "$enableval" in
|
||||
*) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;;
|
||||
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=== 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(FIND, [find], [find])
|
||||
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(MV, [mv], [mv])
|
||||
AC_PATH_PROG(PAX, [pax], [pax])
|
||||
@ -302,6 +311,16 @@ case "$etags_version" in
|
||||
esac
|
||||
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])
|
||||
|
||||
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 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 by the C++ standard. We always use the <cfoo> versions of <foo.h> C headers.
|
||||
AC_HEADER_STDC
|
||||
|
||||
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
|
||||
dnl Generally we're looking for POSIX headers.
|
||||
AC_HEADER_DIRENT
|
||||
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
|
||||
dnl for which we may not have access to a HAVE_* preprocessor #define.
|
||||
dnl (primarily used in DataTypes.h)
|
||||
AC_CHECK_HEADERS([inttypes.h stdint.h])
|
||||
AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h limits.h link.h])
|
||||
AC_CHECK_HEADERS([malloc.h signal.h stdint.h unistd.h utime.h windows.h])
|
||||
AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/types.h])
|
||||
|
||||
dnl===-----------------------------------------------------------------------===
|
||||
dnl===
|
||||
@ -427,7 +443,7 @@ dnl===-----------------------------------------------------------------------===
|
||||
|
||||
AC_CHECK_FUNCS([backtrace getcwd getpagesize getrusage gettimeofday isatty ])
|
||||
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_FUNC_ALLOCA
|
||||
AC_FUNC_RAND48
|
||||
|
@ -228,9 +228,15 @@
|
||||
/* Define to 1 if you have the `rindex' function. */
|
||||
#undef HAVE_RINDEX
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#undef HAVE_SETRLIMIT
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#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. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@ -296,6 +302,9 @@
|
||||
*/
|
||||
#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. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
@ -317,6 +326,9 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#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'. */
|
||||
#undef HAVE_U_INT64_T
|
||||
|
||||
@ -402,6 +414,9 @@
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#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. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user