X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=64922bb68227883657a27106451f0cb16938800b;hb=182b16bccea2eab1a8af93a6246db3d391e436c7;hp=9bcbe615f15f0431e09c6ad819f509dd657b4842;hpb=18abe9c04d5fc1695ad3657bc3180f92b892a871;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index 9bcbe61..64922bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1061,41 +1061,11 @@ FP_CHECK_CONSTS([E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EADV EAFNOSUPPORT EAGAIN dnl ** can we open files in binary mode? FP_CHECK_CONST([O_BINARY], [#include ], [0]) -dnl ** check for GetModuleFileName and WinExec (windows only) -dnl Old: AC_CHECK_FUNCS(WinExec GetModuleFileName) dnl Windows -dnl Doesn't work because the linker can't see the functions if -dnl you omit the #include . (I've no idea why not...) - -FPTOOLS_TRY_LINK_NOWARN(,[ -#if HAVE_WINDOWS_H -#include -#endif -main() { - WinExec("",0); - exit(0); -} -], -[have_winexec=1], -[have_winexec=0]) -if test "$have_winexec" = "1"; then - AC_DEFINE([HAVE_WINEXEC], [1], [Define to 1 if you have the WinExec function.]) -fi +FP_CHECK_FUNC([WinExec], + [@%:@include ], [WinExec("",0)]) -FPTOOLS_TRY_LINK_NOWARN(,[ -#if HAVE_WINDOWS_H -#include -#endif -main() { - char* dir; - GetModuleFileName((HMODULE)0,dir,0); - exit(0); -} -], -[have_getmodulefilename=1], -[have_getmodulefilename=0]) -if test "$have_getmodulefilename" = "1"; then -AC_DEFINE([HAVE_GETMODULEFILENAME], [1], [Define to 1 if you have the GetModuleFileName function.]) -fi +FP_CHECK_FUNC([GetModuleFileName], + [@%:@include ], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)]) dnl ** check return type of signal handlers dnl Foo: assumes we can use prototypes. @@ -1228,7 +1198,7 @@ else fi dnl ** check for math library -AC_CHECK_LIB([m], [main], [LIBM="-lm"], [LIBM=]) +AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"], [LIBM=]) AC_SUBST([LIBM]) dnl ** check for X Window System @@ -1339,8 +1309,6 @@ else AC_SUBST(HaveRtldNow) fi -FPTOOLS_CHECK_LIB_NOWARN(m, atan) - dnl ---------- usleep ---------- dnl --- stolen from guile configure --- dnl --- FIXME: /usr/include/unistd.h can't be right?