3 # Shell script to create a link to the appropriate OS-specific header file.
7 # Get the OS type, and check that there is a make file for it.
9 os=`$scripts/os-type -generic` || exit 1
11 if test ! -r ../OS/Makefile-$os
13 echo "*** Sorry - operating system $os is not supported"
14 echo "*** See OS/Makefile-* for supported systems" 1>&2
19 # Ensure there is an OS-specific header file, and link it to os.h. There should
20 # always be one if there is a make file for the OS, so its absence is somewhat
23 if test ! -r ../OS/os.h-$os
25 echo "*** Build error: OS/os.h-$os file is missing"
31 # In order to accomodate for the fudge below, copy the file instead of
32 # symlinking it. Otherwise we pollute the clean copy with the fudge.
33 cp -p ../OS/os.h-$os os.h || exit 1
35 # Special-purpose fudge for older versions of Linux (pre 2.1.15) that
36 # use the structure name "options" instead of "ip_options".
38 if [ "$os" != "Linux" -a "$os" != "Linux-libc5" ] ; then exit 0; fi
40 grep ip_options /usr/include/linux/ip.h >/dev/null
41 if [ $? = 0 ] ; then exit 0; fi
45 /* Fudge added because this Linux doesn't appear to have a definition
46 for ip_options in /usr/include/linux/ip.h. */
48 #define ip_options options
51 # End of Configure-os.h