2 # $Cambridge: exim/src/scripts/Configure-os.h,v 1.3 2008/04/13 09:22:45 tom Exp $
4 # Shell script to create a link to the appropriate OS-specific header file.
8 # Get the OS type, and check that there is a make file for it.
10 os=`$scripts/os-type -generic` || exit 1
12 if test ! -r ../OS/Makefile-$os
14 echo "*** Sorry - operating system $os is not supported"
15 echo "*** See OS/Makefile-* for supported systems" 1>&2
20 # Ensure there is an OS-specific header file, and link it to os.h. There should
21 # always be one if there is a make file for the OS, so its absence is somewhat
24 if test ! -r ../OS/os.h-$os
26 echo "*** Build error: OS/os.h-$os file is missing"
32 # In order to accomodate for the fudge below, copy the file instead of
33 # symlinking it. Otherwise we pollute the clean copy with the fudge.
34 cp -p ../OS/os.h-$os os.h || exit 1
36 # Special-purpose fudge for older versions of Linux (pre 2.1.15) that
37 # use the structure name "options" instead of "ip_options".
39 if [ "$os" != "Linux" -a "$os" != "Linux-libc5" ] ; then exit 0; fi
41 grep ip_options /usr/include/linux/ip.h >/dev/null
42 if [ $? = 0 ] ; then exit 0; fi
46 /* Fudge added because this Linux doesn't appear to have a definition
47 for ip_options in /usr/include/linux/ip.h. */
49 #define ip_options options
52 # End of Configure-os.h