-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure
executable file
·41 lines (39 loc) · 1.06 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# build configuration for nsnotifyd
#
# Written by Tony Finch <[email protected]> in Cambridge.
#
# Permission is hereby granted to use, copy, modify, and/or
# distribute this software for any purpose with or without fee.
#
# This software is provided 'as is', without warranty of any kind.
# In no event shall the authors be liable for any damages arising
# from the use of this software.
#
# SPDX-License-Identifier: 0BSD OR MIT-0
if echo '#include <resolv.h>' |
cc -E -dM - |
grep 'define __RES 200' >/dev/null
then
cp Makefile.in Makefile
echo 'Using system resolver'
elif
echo '#include <resolv.h>' |
cc -E -dM -I/usr/include/bind - |
grep 'define __RES 200' >/dev/null
then
# old Debian with libbind4-dev
sed ' s|^LIBFLAGS=.*|LIBFLAGS=-I/usr/include/bind|;
s|^LIBS=.*|LIBS=-lbind|;
' <Makefile.in >Makefile
echo 'Using libbind4'
else
sed ' s|^LIBDEPS=.*|LIBDEPS=${RESLIB}|;
s|^LIBFLAGS=.*|LIBFLAGS=-I${RES}/include -L${RES}|;
s|^LIBS=.*|LIBS=-lbind|;
' <Makefile.in >Makefile
make resconfig
echo 'Using static libbind'
fi
echo 'Now run make...'