summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-07-22 07:28:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-07-22 07:28:09 -0700
commitbf36536c9fa398161b24668ad1c29f12f86556e8 (patch)
tree04b6d6632d97c12728ee052c99d8a2a8eb34a14c /configure
parentf2d83d19a09f68864209cc1568a59be70a7bfdbc (diff)
downloadtxr-bf36536c9fa398161b24668ad1c29f12f86556e8.tar.gz
txr-bf36536c9fa398161b24668ad1c29f12f86556e8.tar.bz2
txr-bf36536c9fa398161b24668ad1c29f12f86556e8.zip
* configure: Add a check, in the case that we cannot make an
executable, whether this is due to being required to use C99. For instance, the Solaris environment requires compilation using the C99 dialect if _XOPEN_SOURCE is set to 600 or higher. * debug.c: When compiling as C99, we have to obey the special C99 conventions for instantiating inline functions. * hash.c: Likewise. * lib.c: Likewise. * parser.y: Likewise. * unwind.c: Likewise.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure b/configure
index 70417b34..c9209ff0 100755
--- a/configure
+++ b/configure
@@ -704,14 +704,22 @@ int main(void)
!
if ! conftest ; then
- printf "failed\n\n"
- printf "Errors from compilation: \n\n"
- cat conftest.err
- exit 1
+ printf "failed\n"
+ printf "Checking whether the failure is due to a requirement to use C99 ... "
+ if conftest EXTRA_FLAGS=-std=c99 ; then
+ printf "yes\n"
+ lang_flags="$(echo "$lang_flags" | sed -e 's/-ansi/-std=c99/')"
+ else
+ printf "no\n\n"
+ conftest && true
+ printf "Errors from compilation: \n\n"
+ cat conftest.err
+ exit 1
+ fi
+else
+ printf "okay\n"
fi
-printf "okay\n"
-
printf "Checking whether executables have that idiotic .exe suffix ... "
if ls conftest.exe > /dev/null 2>&1 ; then