diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-11-05 05:14:12 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-02 02:55:22 -0500 |
commit | 4b0bb6ab5af5ed4a01dbd227ab1b6dd3a4a1b0c3 (patch) | |
tree | 57a363356a59fa7a40a3c9f39fa4d85f05df4b87 | |
parent | 3f9d06181c7e2a6796707b9a492eb1bba86107b3 (diff) | |
download | haskell-4b0bb6ab5af5ed4a01dbd227ab1b6dd3a4a1b0c3.tar.gz |
Move function checks to RTS configure
Some of these functions are used in `base` too, but we can copy the
checks over to its configure if that's an issue.
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | rts/configure.ac | 22 |
2 files changed, 22 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index 076676a02d..7e08abb746 100644 --- a/configure.ac +++ b/configure.ac @@ -900,28 +900,6 @@ AC_SUBST(TargetWordSize) AC_C_BIGENDIAN([TargetWordBigEndian=YES],[TargetWordBigEndian=NO]) AC_SUBST(TargetWordBigEndian) -FP_CHECK_FUNC([WinExec], - [@%:@include <windows.h>], [WinExec("",0)]) - -FP_CHECK_FUNC([GetModuleFileName], - [@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)]) - -dnl ** check for more functions -dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too. -AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r sched_setaffinity sched_getaffinity setlocale uselocale]) - -dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if -dnl ** _POSIX_C_SOURCE is defined -AC_CHECK_DECLS([ctime_r], , , -[#define _POSIX_SOURCE 1 -#define _POSIX_C_SOURCE 199506L -#include <time.h>]) - -dnl On Linux we should have program_invocation_short_name -AC_CHECK_DECLS([program_invocation_short_name], , , -[#define _GNU_SOURCE 1 -#include <errno.h>]) - dnl ** check for mingwex library AC_CHECK_LIB( [mingwex], diff --git a/rts/configure.ac b/rts/configure.ac index 758e978d66..1e29fe836e 100644 --- a/rts/configure.ac +++ b/rts/configure.ac @@ -33,6 +33,28 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host]) FPTOOLS_SET_PLATFORM_VARS([host], [Host]) FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host]) +FP_CHECK_FUNC([WinExec], + [@%:@include <windows.h>], [WinExec("",0)]) + +FP_CHECK_FUNC([GetModuleFileName], + [@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)]) + +dnl ** check for more functions +dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too. +AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r sched_setaffinity sched_getaffinity setlocale uselocale]) + +dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if +dnl ** _POSIX_C_SOURCE is defined +AC_CHECK_DECLS([ctime_r], , , +[#define _POSIX_SOURCE 1 +#define _POSIX_C_SOURCE 199506L +#include <time.h>]) + +dnl On Linux we should have program_invocation_short_name +AC_CHECK_DECLS([program_invocation_short_name], , , +[#define _GNU_SOURCE 1 +#include <errno.h>]) + dnl ** check for mingwex library AC_CHECK_LIB( [mingwex], |