-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
119 lines (108 loc) · 3.73 KB
/
configure.ac
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
# (c) 2006 Quest Software, Inc. All rights reserved.
AC_INIT([dnsupdate],
[1.3.5.]esyscmd(svnversion -n . /trunk || echo 0),
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([dnsupdate.c])
AC_CONFIG_FILES([Makefile ipwatchd/Makefile])
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT([/opt/quest])
# Note: these directory changes makes the --help output wrong
AC_SUBST([mandir], ['${prefix}/man'])
AC_SUBST([sysconfdir], ['/etc${prefix}'])
AC_PROG_SED
# look for Apple's universal binary support
AC_PROG_CC
AC_ARG_ENABLE([universal-binary],
[AC_HELP_STRING([--enable-universal-binary=auto],
[Apple universal binary support])],,
[enable_universal_binary=auto])
have_universal_binary=no
if test x"$enable_universal_binary" != x"no"; then
AC_CANONICAL_HOST
AC_PATH_PROG([XCODE_SELECT], [xcode-select], [false])
AC_MSG_CHECKING([for universal binary support])
case $host in *-apple-darwin*)
mysave_CFLAGS="$CFLAGS"
mysave_CFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS -arch ppc -arch i386 -mmacosx-version-min=10.4"
LDFLAGS="$LDFLAGS -arch ppc -arch i386"
if test x"$XCODE_SELECT" != x"false"; then
xcodedir=`"$XCODE_SELECT" -print-path`
else
xcodedir=/Developer
fi
SDKdir="$xcodedir/SDKs/MacOSX10.4u.sdk"
if test -d "$SDKdir"; then
LDFLAGS="$LDFLAGS -isysroot $SDKdir"
fi
AC_LINK_IFELSE([int main(){return 0;}],[have_universal_binary=yes])
if test $have_universal_binary = no; then
LDFLAGS="$mysave_LDFLAGS"
CFLAGS="$mysave_CFLAGS"
fi
unset SDKdir xcodedir
esac
AC_MSG_RESULT($have_universal_binary)
fi
case "$have_universal_binary:$enable_universal_binary" in
no:yes) AC_MSG_ERROR([no universal binary support on this host]) ;;
yes:*) AC_MSG_WARN([disabling dependency tracking])
AM_CONDITIONAL([AMDEP],[false]) # automake-1.9.6
AM_CONDITIONAL([am__fastdepCC],[false])
AMDEPBACKSLASH=
;;
esac
AC_C_CONST
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS([netdb.h unistd.h sys/socket.h errno.h netinet/in.h fcntl.h])
AC_CHECK_HEADERS([signal.h syslog.h sys/un.h sys/types.h sys/wait.h sys/poll.h])
AC_CHECK_HEADERS([netinet/in.h arpa/inet.h])
AC_PATH_PROG([VASCONFIG], [vas-config], [no], [/opt/quest/bin:$PATH])
if test x"$VASCONFIG" = x"no"; then
AC_MSG_ERROR([vas-config was not found; is the VAS SDK installed?])
fi
AC_SUBST([VASCONFIG])
AC_PROG_LN_S
AC_PATH_PROG([WGET], [wget], [false])
AC_SUBST([WGET])
AC_PATH_PROG([CURL], [curl], [false])
AC_SUBST([CURL])
# In lieu of libtool knowing how to link properly, we need to tell AIX's
# linker to link dynamically, to avoid statically linking libvas.
case "$ac_cv_host" in
*-*-aix*)
old_LDFLAGS="$LDFLAGS"
LDFLAGS="-Wl,-brtl $LDFLAGS"
AC_MSG_CHECKING([whether -Wl,-brtl works in LDFLAGS])
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; }])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
LDFLAGS="$old_LDFLAGS"])
esac
AC_CHECK_FUNC([getaddrinfo])
AC_CHECK_FUNC([vsyslog])
AC_CHECK_FUNC([getopt], [], [AC_LIBOBJ([getopt])])
dnl AC_CHECK_FUNCS([err errx warn warnx], [], [AC_LIBOBJ([err]) ; break])
AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_CHECK_FUNC([socketpair])
AC_FUNC_FORK
AC_CHECK_TYPE([socklen_t],[AC_DEFINE([HAVE_SOCKLEN_T],[1],[socklen_t])],,[
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
AC_TYPE_SIGNAL
AC_CANONICAL_HOST
AC_MSG_CHECKING([ipwatchd needed])
case $host in
*-*-darwin*) with_ipwatchd=yes;;
*) with_ipwatchd=no;;
esac
AC_MSG_RESULT($with_ipwatchd)
WITH_IPWATCHD=$with_ipwatchd
AC_SUBST([WITH_IPWATCHD])
AM_CONDITIONAL([WITH_IPWATCHD], test $with_ipwatchd = yes)
AC_OUTPUT