-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
155 lines (136 loc) · 4.05 KB
/
configure.in
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ez-ipupdate.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(ez-ipupdate,3.0.11b7)
dnl Checks for programs.
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_TYPE_SIGNAL
dnl Checks for libraries.
AC_CHECK_FUNC(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
AC_CHECK_LIB(nsl, gethostbyname)
fi
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect)
fi
AC_CHECK_FUNCS( socket \
strdup \
getopt_long \
gethostbyaddr \
getservbyname \
inet_addr \
inet_ntoa \
snprintf \
vfprintf \
stat \
vsprintf \
vsnprintf \
strerror \
strftime \
wait \
waitpid \
getpid \
fork \
vfork \
getuid \
geteuid \
setuid \
seteuid \
getgid \
getegid \
setgid \
setegid \
inet_aton \
herror )
dnl Checks for header files.
AC_CHECK_HEADERS( arpa/inet.h \
sys/types.h \
sys/time.h \
sys/stat.h \
fcntl.h \
signal.h \
syslog.h \
pwd.h \
stdarg.h \
grp.h \
errno.h \
sys/sockio.h \
sys/wait.h \
getopt.h )
AC_CHECK_HEADERS( unistd.h \
netinet/in.h \
netdb.h \
sys/socket.h
,,
AC_MSG_ERROR(could not locate neccessary system header files) )
AC_CHECK_LIB(c, sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST))
dnl you need at least to have getopt, but getopt_long will be used if it
dnl is present
AC_CHECK_FUNCS(getopt)
if test "$ac_cv_func_getopt" != yes; then
AC_MSG_ERROR(getopt is needed for this program to work)
fi
AC_CHECK_FUNC(getpass, AC_DEFINE(HAVE_GETPASS),
[EXTRASRC="$EXTRASRC \$(srcdir)/getpass.c"]
[EXTRAOBJ="$EXTRAOBJ \$(srcdir)/getpass.o"] )
dnl Get system canonical name
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED(OS, "${host}")
dnl allow selection of the default service
dnl the default is to use ez-ip
AC_MSG_CHECKING(for user supplied default service)
AC_ARG_ENABLE(default-service,
[ --enable-default-service=SERVICE
the default service type to use
possibilities are: ezip, pgpow, justlinux, dhs,
dyndns, dyndns-static, ods, tzo, gnudip, easydns, easydns-partner, dyns, hn, zoneedit, heipv6tb],
[ use_SERVICE=$enableval;
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no)
use_SERVICE=null
AC_MSG_WARN(not setting default service) ] )
case "$use_SERVICE" in
ezip ) AC_DEFINE(DEF_SERVICE, "ezip");;
ez-ip ) AC_DEFINE(DEF_SERVICE, "ezip");;
pgpow ) AC_DEFINE(DEF_SERVICE, "pgpow");;
penguinpowered ) AC_DEFINE(DEF_SERVICE, "pgpow");;
justlinux ) AC_DEFINE(DEF_SERVICE, "justlinux");;
dhs ) AC_DEFINE(DEF_SERVICE, "dhs");;
dyndns ) AC_DEFINE(DEF_SERVICE, "dyndns");;
dyndns-stat ) AC_DEFINE(DEF_SERVICE, "dyndns-stat");;
dyndns-static ) AC_DEFINE(DEF_SERVICE, "dyndns-static");;
ods ) AC_DEFINE(DEF_SERVICE, "ods");;
tzo ) AC_DEFINE(DEF_SERVICE, "tzo");;
gnudip ) AC_DEFINE(DEF_SERVICE, "gnudip");;
easydns ) AC_DEFINE(DEF_SERVICE, "easydns");;
easydns-partner ) AC_DEFINE(DEF_SERVICE, "easydns-partner");;
dyns ) AC_DEFINE(DEF_SERVICE, "dyns");;
hn ) AC_DEFINE(DEF_SERVICE, "hn");;
zoneedit ) AC_DEFINE(DEF_SERVICE, "zoneedit");;
heipv6tb ) AC_DEFINE(DEF_SERVICE, "heipv6tb");;
null ) AC_DEFINE(DEF_SERVICE, "NULL");;
"" ) ;;
* ) AC_MSG_ERROR(unknown default service type);;
esac
dnl check weather we want debugging support
dnl the default is to NOT use debugging support
AC_MSG_CHECKING(whether user wants debugging support)
AC_ARG_ENABLE(debug,
[ --enable-debug include support for debugging],
[ AC_DEFINE(DEBUG)
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no) ] )
dnl check weather we want to disable MD5 support
AC_MSG_CHECKING(whether user wants to dissable MD5 support)
AC_ARG_ENABLE(md5,
[ --disable-md5 disable MD5 support],
[ AC_MSG_RESULT(yes) ],
[ AC_DEFINE(USE_MD5)
AC_MSG_RESULT(no) ] )
AC_SUBST(EXTRASRC)
AC_SUBST(EXTRAOBJ)
AC_OUTPUT(Makefile)