2 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h)
5 AM_INIT_AUTOMAKE(ez-ipupdate,3.0.11b7)
8 dnl Checks for programs.
16 dnl Checks for libraries.
18 AC_CHECK_FUNC(gethostbyname)
19 if test $ac_cv_func_gethostbyname = no; then
20 AC_CHECK_LIB(nsl, gethostbyname)
22 AC_CHECK_FUNC(connect)
23 if test $ac_cv_func_connect = no; then
24 AC_CHECK_LIB(socket, connect)
27 AC_CHECK_FUNCS( socket \
57 dnl Checks for header files.
58 AC_CHECK_HEADERS( arpa/inet.h \
72 AC_CHECK_HEADERS( unistd.h \
77 AC_MSG_ERROR(could not locate neccessary system header files) )
79 AC_CHECK_LIB(c, sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST))
81 dnl you need at least to have getopt, but getopt_long will be used if it
83 AC_CHECK_FUNCS(getopt)
84 if test "$ac_cv_func_getopt" != yes; then
85 AC_MSG_ERROR(getopt is needed for this program to work)
88 AC_CHECK_FUNC(getpass, AC_DEFINE(HAVE_GETPASS),
89 [EXTRASRC="$EXTRASRC \$(srcdir)/getpass.c"]
90 [EXTRAOBJ="$EXTRAOBJ \$(srcdir)/getpass.o"] )
92 dnl Get system canonical name
94 AC_DEFINE_UNQUOTED(OS, "${host}")
96 dnl allow selection of the default service
97 dnl the default is to use ez-ip
98 AC_MSG_CHECKING(for user supplied default service)
99 AC_ARG_ENABLE(default-service,
100 [ --enable-default-service=SERVICE
101 the default service type to use
102 possibilities are: ezip, pgpow, justlinux, dhs,
103 dyndns, dyndns-static, ods, tzo, gnudip, easydns, easydns-partner, dyns, hn, zoneedit, heipv6tb],
104 [ use_SERVICE=$enableval;
105 AC_MSG_RESULT(yes) ],
108 AC_MSG_WARN(not setting default service) ] )
109 case "$use_SERVICE" in
110 ezip ) AC_DEFINE(DEF_SERVICE, "ezip");;
111 ez-ip ) AC_DEFINE(DEF_SERVICE, "ezip");;
112 pgpow ) AC_DEFINE(DEF_SERVICE, "pgpow");;
113 penguinpowered ) AC_DEFINE(DEF_SERVICE, "pgpow");;
114 justlinux ) AC_DEFINE(DEF_SERVICE, "justlinux");;
115 dhs ) AC_DEFINE(DEF_SERVICE, "dhs");;
116 dyndns ) AC_DEFINE(DEF_SERVICE, "dyndns");;
117 dyndns-stat ) AC_DEFINE(DEF_SERVICE, "dyndns-stat");;
118 dyndns-static ) AC_DEFINE(DEF_SERVICE, "dyndns-static");;
119 ods ) AC_DEFINE(DEF_SERVICE, "ods");;
120 tzo ) AC_DEFINE(DEF_SERVICE, "tzo");;
121 gnudip ) AC_DEFINE(DEF_SERVICE, "gnudip");;
122 easydns ) AC_DEFINE(DEF_SERVICE, "easydns");;
123 easydns-partner ) AC_DEFINE(DEF_SERVICE, "easydns-partner");;
124 dyns ) AC_DEFINE(DEF_SERVICE, "dyns");;
125 hn ) AC_DEFINE(DEF_SERVICE, "hn");;
126 zoneedit ) AC_DEFINE(DEF_SERVICE, "zoneedit");;
127 heipv6tb ) AC_DEFINE(DEF_SERVICE, "heipv6tb");;
128 null ) AC_DEFINE(DEF_SERVICE, "NULL");;
130 * ) AC_MSG_ERROR(unknown default service type);;
133 dnl check weather we want debugging support
134 dnl the default is to NOT use debugging support
135 AC_MSG_CHECKING(whether user wants debugging support)
137 [ --enable-debug include support for debugging],
139 AC_MSG_RESULT(yes) ],
140 [ AC_MSG_RESULT(no) ] )
142 dnl check weather we want to disable MD5 support
143 AC_MSG_CHECKING(whether user wants to dissable MD5 support)
145 [ --disable-md5 disable MD5 support],
146 [ AC_MSG_RESULT(yes) ],
148 AC_MSG_RESULT(no) ] )