Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
2a71c0ab
Commit
2a71c0ab
authored
Jun 30, 2001
by
sof
Browse files
[project @ 2001-06-30 00:00:49 by sof]
Tidy up the handling of -mno-cygwin.
parent
e23c5e81
Changes
2
Hide whitespace changes
Inline
Side-by-side
aclocal.m4
View file @
2a71c0ab
dnl $Id: aclocal.m4,v 1.7
6
2001/06/
28 11:47:03 simonmar
Exp $
dnl $Id: aclocal.m4,v 1.7
7
2001/06/
30 00:00:49 sof
Exp $
dnl
dnl Extra autoconf macros for the Glasgow fptools
dnl
...
...
@@ -1066,19 +1066,20 @@ fi
])
dnl
dnl Check to see whether CC (gcc) supports
the -mwin32
option.
dnl Check to see whether CC (gcc) supports
a particular
option.
dnl
AC_DEFUN(FPTOOLS_CC_MWIN32,
[AC_CACHE_CHECK([whether $CC accepts -mwin32], ac_cv_cc_supports_mwin32,
AC_DEFUN(FPTOOLS_CC_FLAG,
[save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mwin32"
AC_CACHE_CHECK([whether $CC accepts $1], [ac_cv_cc_$2],
[CFLAGS="$CFLAGS $1"
AC_LANG_C
AC_TRY_COMPILE(,[int main(){return(0);}], ac_cv_cc_supports_mwin32=yes, ac_cv_cc_supports_mwin32=no)
CFLAGS="$CFLAGS_save"])
if test "$ac_cv_cc_supports_mwin32" = yes; then
CC_MWIN32_FLAG="-mwin32";
AC_TRY_COMPILE(,[int main(){return(0);}],
[ac_cv_cc_$2=yes],
[ac_cv_cc_$2=no])
])
if test "$ac_cv_cc_$2"x = "yesx"; then
$2=$extra_flag;
else
CC_MWIN32_FLAG=""
;
$2=$extra_flag
;
fi;
AC_SUBST(CC_MWIN32_FLAG)
])
configure.in
View file @
2a71c0ab
...
...
@@ -511,20 +511,6 @@ esac
dnl ** does #! path/to/perl work? (sometimes it's too long...)
FPTOOLS_SHEBANG_PERL
dnl ** set up extra GCC options on Win32
case $HostOS_CPP in
cygwin32|mingw32)
STD_CC_OPTS="-mno-cygwin $CC_MWIN32_FLAG"
CFLAGS="$STD_CC_OPTS $CFLAGS"
CPPFLAGS="$STD_CC_OPTS $CPPFLAGS"
;;
*)
STD_CC_OPTS=""
;;
esac
SRC_CC_OPTS="-O $STD_CC_OPTS"
AC_SUBST(SRC_CC_OPTS)
dnl ** look for GCC and find out which version
dnl Figure out which C compiler to use. Gcc is preferred.
dnl If gcc, make sure it's at least 2.1
...
...
@@ -532,17 +518,17 @@ dnl
AC_PROG_CC
FPTOOLS_HAVE_GCC
dnl ** does the C compiler support option -mwin32 ?
FPTOOLS_CC_MWIN32
dnl ** figure out how to invoke cpp directly (gcc -E is no good)
AC_PROG_CPP
dnl ** set up extra GCC options on Win32
case $HostOS_CPP in
cygwin32|mingw32)
CPP="$CPP $STD_CC_OPTS"
esac
dnl ** does the C compiler support the following options?
FPTOOLS_CC_FLAG(-mwin32,CC_SUPPORTS_MWIN32)
FPTOOLS_CC_FLAG(-mno-cygwin,CC_SUPPORTS_MNO_CYGWIN)
EXTRA_CC_OPTS="$CC_SUPPORTS_MNO_CYGWIN $CC_SUPPORTS_MWIN32"
SRC_CC_OPTS="-O $EXTRA_CC_OPTS"
CPPFLAGS="$EXTRA_CC_OPTS $CPPFLAGS"
AC_SUBST(SRC_CC_OPTS)
dnl ** figure out how to do context diffs
FPTOOLS_PROG_DIFF
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment