2 # Copyright (c) The Exim Maintainters 2022
3 # SPDX-License-Identifier: GPL-2.0-or-later
6 # Shell script to create a link to the appropriate OS-specific header file.
10 # Get the OS type, and check that there is a make file for it.
12 os=`$scripts/os-type -generic` || exit 1
14 if test ! -r ../OS/Makefile-$os
16 echo "*** Sorry - operating system $os is not supported"
17 echo "*** See OS/Makefile-* for supported systems" 1>&2
22 # Ensure there is an OS-specific header file, and link it to os.h. There should
23 # always be one if there is a make file for the OS, so its absence is somewhat
26 if test ! -r ../OS/os.h-$os
28 echo "*** Build error: OS/os.h-$os file is missing"
34 # In order to accommodate for the fudge below, copy the file instead of
35 # symlinking it. Otherwise we pollute the clean copy with the fudge.
36 cp -p ../OS/os.h-$os os.h || exit 1
38 # Special-purpose fudge for older versions of Linux (pre 2.1.15) that
39 # use the structure name "options" instead of "ip_options".
41 if [ "$os" != "Linux" -a "$os" != "Linux-libc5" ] ; then exit 0; fi
43 grep ip_options /usr/include/linux/ip.h >/dev/null
44 if [ $? = 0 ] ; then exit 0; fi
48 /* Fudge added because this Linux doesn't appear to have a definition
49 for ip_options in /usr/include/linux/ip.h. */
51 #define ip_options options
54 # End of Configure-os.h