summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-10 20:10:11 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-10 20:10:11 +0000
commita24ab3ae38131265d9ca6dee7db4262bb1630811 (patch)
tree35cd76e3f961a6a07180589e7cc959ad750aacbe
parent26526a80ea45894aa9041e19f52dcc3ad6dedebc (diff)
downloadopenocd_libswd-a24ab3ae38131265d9ca6dee7db4262bb1630811.tar.gz
openocd_libswd-a24ab3ae38131265d9ca6dee7db4262bb1630811.tar.bz2
openocd_libswd-a24ab3ae38131265d9ca6dee7db4262bb1630811.tar.xz
openocd_libswd-a24ab3ae38131265d9ca6dee7db4262bb1630811.zip
Extend configure script to check for environ declaration in stdlib.h.
Patch contributed by Martin Thomas <mthomas@rhrk.uni-kl.de>. git-svn-id: svn://svn.berlios.de/openocd/trunk@1693 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--configure.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index bbd22d1e..a6177e1d 100644
--- a/configure.in
+++ b/configure.in
@@ -788,11 +788,12 @@ AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_RANLIB
-# Look for environ alternatives. Possibility #1: is environ in unistd.h?
-AC_MSG_CHECKING([for environ in unistd.h])
+# Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
+AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
AC_COMPILE_IFELSE([
#define _GNU_SOURCE
#include <unistd.h>
+#include <stdlib.h>
int main(int argc, char **argv) { char **ep = environ; }
], [
AC_MSG_RESULT([yes])