X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=2739394cfeb20c558a16d4eb23362bd1bea2973f;hb=170a6564229788618fb86fbb3be6662bf8e566a0;hp=2be74e64e9116fcc67a4b6cc605e44799517b0f5;hpb=30fad70245d9ddfae0b781460bc51468a01f92f6;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index 2be74e6..2739394 100644 --- a/configure.ac +++ b/configure.ac @@ -319,12 +319,6 @@ x86_64-apple-darwin) ;; esac -FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS]) -FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_LD_OPTS_STAGE0]) -FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_LD_OPTS_STAGE1]) -# Stage 3 won't be supported by cross-compilation -FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_LD_OPTS_STAGE2]) - checkArch() { case $1 in alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|sparc|sparc64|vax|x86_64) @@ -562,6 +556,13 @@ dnl Figure out which C compiler to use. Gcc is preferred. dnl If gcc, make sure it's at least 2.1 dnl FP_HAVE_GCC + +FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS]) +FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_LD_OPTS_STAGE0]) +FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_LD_OPTS_STAGE1]) +# Stage 3 won't be supported by cross-compilation +FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_LD_OPTS_STAGE2]) + FP_GCC_EXTRA_FLAGS dnl ** figure out how to invoke cpp directly (gcc -E is no good) @@ -668,7 +669,7 @@ dnl off_t, because it will affect the result of that test. AC_SYS_LARGEFILE dnl ** check for specific header (.h) files that we are interested in -AC_CHECK_HEADERS([bfd.h ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/mman.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h sched.h]) +AC_CHECK_HEADERS([bfd.h ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/cpuset.h sys/mman.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h sched.h]) dnl ** check if it is safe to include both and AC_HEADER_TIME @@ -780,8 +781,11 @@ dnl Keep that check as early as possible. dnl as we need to know whether we need libm dnl for math functions or not dnl (see http://hackage.haskell.org/trac/ghc/ticket/3730) -AC_SEARCH_LIBS(atan, m, - [AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])]) +AC_CHECK_LIB(m, atan, HaveLibM=YES, HaveLibM=NO) +if test $HaveLibM = YES +then + AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm]) +fi dnl ** check whether this machine has BFD and liberty installed (used for debugging) dnl the order of these tests matters: bfd needs liberty @@ -875,6 +879,10 @@ AC_TRY_LINK_FUNC(printf\$LDBLStub, [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).]) ]) +dnl ** check for eventfd which is needed by the I/O manager +AC_CHECK_HEADERS([sys/eventfd.h]) +AC_CHECK_FUNCS([eventfd]) + # test for GTK+ AC_PATH_PROGS([GTK_CONFIG], [pkg-config]) if test -n "$GTK_CONFIG"; then