Search
lxdream.org :: lxdream/acinclude.m4 :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename acinclude.m4
changeset 1199:62d0a21fac1c
prev1198:407659e01ef0
next1200:3b2097efa97d
author nkeynes
date Wed Dec 21 12:15:06 2011 +1000 (8 years ago)
permissions -rw-r--r--
last change Add checks for -msse3 and -mfpmath=sse before adding them (in case the
compiler doesn't actually support them)
Tweak configure for forward compatibility with more recent autoconfs
Update config.guess + config.sub to more recent versions
file annotate diff log raw
1.1 --- a/acinclude.m4 Fri Dec 16 10:08:45 2011 +1000
1.2 +++ b/acinclude.m4 Wed Dec 21 12:15:06 2011 +1000
1.3 @@ -15,6 +15,8 @@
1.4 AC_MSG_RESULT([yes])
1.5 $1 ], [
1.6 AC_MSG_RESULT([no])
1.7 + $2 ], [
1.8 + AC_MSG_RESULT([no])
1.9 $2 ])
1.10 ])
1.11
1.12 @@ -69,7 +71,9 @@
1.13 AC_MSG_RESULT([yes])
1.14 $1 ], [
1.15 AC_MSG_RESULT([no])
1.16 - $2 ])
1.17 + $2 ], [
1.18 + AC_MSG_RESULT([no])
1.19 + $2 ] )
1.20 ])
1.21
1.22 # AC_CC_VERSION([if-gcc], [if-icc],[if-other])
1.23 @@ -111,6 +115,40 @@
1.24 fi
1.25 ]);
1.26
1.27 +# Check if the given C compiler flag is supported, and if so add it to CFLAGS
1.28 +AC_DEFUN([AC_CHECK_CFLAG], [
1.29 +AC_LANG_PUSH([C])
1.30 +AC_MSG_CHECKING([if $CC supports $1])
1.31 +save_CFLAGS="$CFLAGS"
1.32 +CFLAGS="$1 $CFLAGS"
1.33 +AC_COMPILE_IFELSE([
1.34 + AC_LANG_SOURCE([int main() { return 0; }])], [
1.35 + AC_MSG_RESULT([yes])
1.36 + $2 ], [
1.37 + CFLAGS="$save_CFLAGS"
1.38 + AC_MSG_RESULT([no])
1.39 + $3 ])
1.40 +AC_LANG_POP([C])
1.41 +])
1.42 +
1.43 +# Check if the given OBJC compiler flag is supported, and if so add it to OBJCFLAGS
1.44 +AC_DEFUN([AC_CHECK_OBJCFLAG], [
1.45 +AC_LANG_PUSH([Objective C])
1.46 +AC_MSG_CHECKING([if $OBJC supports $1])
1.47 +save_OBJCFLAGS="$OBJCFLAGS"
1.48 +OBJCFLAGS="$1 $OBJCFLAGS"
1.49 +AC_COMPILE_IFELSE([
1.50 + AC_LANG_SOURCE([int main() { return 0; }])], [
1.51 + AC_MSG_RESULT([yes])
1.52 + $2 ], [
1.53 + OBJCFLAGS="$save_OBJCFLAGS"
1.54 + AC_MSG_RESULT([no])
1.55 + $3 ])
1.56 +AC_LANG_POP([Objective C])
1.57 +])
1.58 +
1.59 +
1.60 +
1.61 # AC_HAVE_OBJC([if-present],[if-not-present])
1.62 # Check if we have a working Objective-C compiler
1.63 AC_DEFUN([AC_HAVE_OBJC], [
.