diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-02-28 01:43:17 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2000-02-28 01:43:17 +0000 |
commit | 332344acbb5068ae4568b3b504b8f76a3c43c48a (patch) | |
tree | ac4ce34abad621479eed7e4f16bba83d59f3bd08 | |
parent | 54467b98f528f1f908f63b859447d9fc97775cfe (diff) |
have hasgot -i read always sys/types.h (needed by FreeBSD)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rwxr-xr-x | config/auto-aux/hasgot | 8 | ||||
-rwxr-xr-x | configure | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/config/auto-aux/hasgot b/config/auto-aux/hasgot index 7ecb6e1b0..32cb4b4f0 100755 --- a/config/auto-aux/hasgot +++ b/config/auto-aux/hasgot @@ -4,9 +4,15 @@ opts="" libs="$cclibs" args=$* rm -f hasgot.c +sys_types_included="no" while : ; do case "$1" in - -i) echo "#include <$2>" >> hasgot.c; shift;; + -i) if test "$HAS_SYS_TYPES_H" = "yes" && test "$sys_types_included" = "no" + then + echo "#include <sys/types.h>" >> hasgot.c; + sys_types_included="yes"; + fi + echo "#include <$2>" >> hasgot.c; shift;; -t) echo "$2 the_$2;" >> hasgot.c; shift;; -l*|-L*) libs="$libs $1";; -*) opts="$opts $1";; @@ -429,6 +429,16 @@ fi echo '#define OCAML_OS_TYPE "Unix"' >> s.h +# If this system has <sys/types.h>, include it in all hasgot tests +# (FreeBSD 3.x requires it for many headers) + +if sh ./hasgot -i sys/types.h; then + echo "sys/types.h found." + echo "#define HAS_SYS_TYPES_H" >> s.h + HAS_SYS_TYPES_H=yes + export HAS_SYS_TYPES_H +fi + # Find a good byte move function if sh ./runtest -Dcopy=memmove -Dreverse bytecopy.c; then |