X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=15b3c8547aa23c3340eea56d029dbe9fcad2719a;hb=f2bfd33806f1339ecd16eb76b0146544b65dc68e;hp=d7f4a4f71b84071cbb0896e0ebd1c7e50ee250b1;hpb=a8ad2066bf5efa534fccb945da63aad366b989d9;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index d7f4a4f..15b3c85 100644 --- a/configure.ac +++ b/configure.ac @@ -558,6 +558,16 @@ dnl ** check for patch dnl if GNU patch is named gpatch, look for it first AC_PATH_PROGS(PatchCmd,gpatch patch, patch) +dnl ** check for dtrace (currently only implemented for Mac OS X) +HaveDtrace=NO +AC_PATH_PROG(DtraceCmd,dtrace) +if test -n "$DtraceCmd"; then + if test "x$TargetOS_CPP-$TargetVendor_CPP" == "xdarwin-apple"; then + HaveDtrace=YES + fi +fi +AC_SUBST(HaveDtrace) + AC_PATH_PROG(HSCOLOUR,HsColour) # HsColour is passed to Cabal, so we need a native path if test "x$HostPlatform" = "xi386-unknown-mingw32" && \ @@ -606,7 +616,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/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/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 @@ -713,18 +723,22 @@ if test $HaveLibMingwEx = YES ; then AC_DEFINE([HAVE_MINGWEX], [1], [Define to 1 if you have the mingwex library.]) fi -dnl ** check whether this machine has BFD and liberty installed (used for debugging) -dnl the order of these tests matters: bfd needs liberty -AC_CHECK_LIB(iberty, xmalloc) -AC_CHECK_LIB(bfd, bfd_init) - dnl ** check for math library +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_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno]) if test x"$fp_libm_not_needed" = xdunno; then AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=]) fi AC_SUBST([LIBM]) +dnl ** check whether this machine has BFD and liberty installed (used for debugging) +dnl the order of these tests matters: bfd needs liberty +AC_CHECK_LIB(iberty, xmalloc) +AC_CHECK_LIB(bfd, bfd_init) + dnl ################################################################ dnl Check for libraries dnl ################################################################