Skip to content
Snippets Groups Projects
Commit 02efc181 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

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.
parent fded7dd4
No related branches found
No related tags found
No related merge requests found
......@@ -905,28 +905,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 math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
......
......@@ -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 math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment