add patch to support dccifd directly from ACL system - thanks to Wolfgang Breyha
[exim.git] / src / scripts / Configure-os.h
CommitLineData
61ec970d 1#! /bin/sh
6a8f9482 2# $Cambridge: exim/src/scripts/Configure-os.h,v 1.2 2008/01/17 13:03:35 tom Exp $
61ec970d
PH
3
4# Shell script to create a link to the appropriate OS-specific header file.
5
6scripts=../scripts
7
8# Get the OS type, and check that there is a make file for it.
9
10os=`$scripts/os-type -generic` || exit 1
11
12if test ! -r ../OS/Makefile-$os
13then echo ""
14 echo "*** Sorry - operating system $os is not supported"
15 echo "*** See OS/Makefile-* for supported systems" 1>&2
16 echo ""
17 exit 1;
18fi
19
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
22# disastrous.
23
24if test ! -r ../OS/os.h-$os
25then echo ""
26 echo "*** Build error: OS/os.h-$os file is missing"
27 echo ""
28 exit 1;
29fi
30rm -f os.h
6a8f9482
TK
31
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.
34cp -a ../OS/os.h-$os os.h || exit 1
61ec970d
PH
35
36# Special-purpose fudge for older versions of Linux (pre 2.1.15) that
37# use the structure name "options" instead of "ip_options".
38
39if [ "$os" != "Linux" -a "$os" != "Linux-libc5" ] ; then exit 0; fi
40
41grep ip_options /usr/include/linux/ip.h >/dev/null
42if [ $? = 0 ] ; then exit 0; fi
43
44cat >>os.h <<End
45
46/* Fudge added because this Linux doesn't appear to have a definition
47for ip_options in /usr/include/linux/ip.h. */
48
49#define ip_options options
50End
51
52# End of Configure-os.h