-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
executable file
·41 lines (41 loc) · 1.31 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
AC_PREREQ(2.59)
AC_INIT(mynx, 1.0, [])
platform=`uname -s|sed -e 's/^\([[a-zA-Z0-9]]*\)[[^a-zA-Z0-9]].*/\1/'`
echo "platform is... $platform"
my_configure_command="$[]0 $[]@"
AC_CHECK_TOOL(autoconf_tool, autoconf)
if test ${autoconf_tool:-no} != 'no' -a \( aclocal.m4 -nt configure -o configure.in -nt configure \); then
echo 'Rebuilding the configure script first...'
autoconf -f
echo 'Restarting configure script...'
echo $my_configure_command
exec $my_configure_command
fi
AC_SUBST(platform, $platform)
AC_CONFIG_SRCDIR($PACKAGE_NAME.c)
AC_CONFIG_FILES(makefile)
AC_ARG_ENABLE(w32,
[AC_HELP_STRING([--disable-w32],[generate Cygwin binary in Cygwin environment])]
)
if test $platform = 'CYGWIN' -a ${enable_w32:-yes} != 'no' ; then
CFLAGS="-mno-cygwin ${CFLAGS}"
LIBS="-lws2_32 ${LIBS}"
fi
AC_PROG_CC
AC_HEADER_STDC
AC_SEARCH_LIBS(socket, [socket nsl],[AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_SOCKET])])])
AC_CHECK_HEADERS(
[arpa/inet.h netdb.h netinet/in.h sys/socket.h sys/ioctl.h],
[], [AC_MSG_FAILURE([Missing required I/O header.], 1)]
)
AC_CHECK_HEADERS([windows.h winsock2.h])
AC_OUTPUT()
echo
echo $PACKAGE_STRING
echo
AC_MSG_RESULT([ platform...: $platform])
AC_MSG_RESULT([ prefix.....: $prefix])
AC_MSG_RESULT([ CFLAGS.....: $CFLAGS])
AC_MSG_RESULT([ LDFLAGS....: $LDFLAGS])
AC_MSG_RESULT([ LIBS.......: $LIBS])
echo