20 |
# |
# |
21 |
# Nicolas Burrus <nes@lrde.epita.fr>, 2002 |
# Nicolas Burrus <nes@lrde.epita.fr>, 2002 |
22 |
# |
# |
23 |
|
# $Id$ |
24 |
|
# |
25 |
|
|
26 |
# Autoconf 2.53 needed so that buggy PATH_SEPARATOR is fixed. |
# Autoconf 2.53 needed so that buggy PATH_SEPARATOR is fixed. |
27 |
AC_PREREQ(2.53) |
AC_PREREQ(2.53) |
28 |
|
|
29 |
AC_INIT(penggy, 0.1) |
AC_INIT(penggy, 0.1.0) |
30 |
|
AC_CONFIG_HEADER([config.h]) |
31 |
|
|
32 |
# Auxiliary files |
# Auxiliary files |
33 |
AC_CONFIG_AUX_DIR(config) |
AC_CONFIG_AUX_DIR(config) |
|
AC_CONFIG_FILES(config/Makefile) |
|
34 |
|
|
35 |
AM_INIT_AUTOMAKE([foreign 1.6 dist-bzip2]) |
AM_INIT_AUTOMAKE([gnu 1.6 dist-bzip2]) |
36 |
|
AM_MAINTAINER_MODE |
37 |
|
|
38 |
# Check host type |
# Check host type |
39 |
AC_CANONICAL_HOST |
AC_CANONICAL_HOST |
42 |
# CFLAGS must be defined to avoid AC_PROG_CC adding default FLAGS |
# CFLAGS must be defined to avoid AC_PROG_CC adding default FLAGS |
43 |
CFLAGS=$CFLAGS |
CFLAGS=$CFLAGS |
44 |
AC_LANG_C |
AC_LANG_C |
45 |
|
|
46 |
|
# Checks for programs. |
47 |
AC_PROG_CC |
AC_PROG_CC |
48 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
|
AC_PROG_AWK |
|
49 |
AC_PROG_RANLIB |
AC_PROG_RANLIB |
50 |
AC_PROG_YACC |
AC_PROG_YACC |
|
AC_PROG_LN_S |
|
51 |
|
|
52 |
# CFLAGS |
# CFLAGS |
53 |
if test "$GCC" = yes; then |
if test "$GCC" = yes; then |
54 |
CFLAGS="$CFLAGS -Wall" |
CFLAGS="$CFLAGS -Wall" |
55 |
fi |
fi |
56 |
|
|
|
# Look for auxiliary programs |
|
|
AC_PROG_RANLIB |
|
|
|
|
57 |
# Check arch specific source directory |
# Check arch specific source directory |
58 |
# Use @ARCH_DIR@ in Makefile.am files. |
# Use @ARCH_DIR@ in Makefile.am files. |
59 |
case "$host" in |
case "$host" in |
74 |
AC_SUBST([ARCH_DIR]) |
AC_SUBST([ARCH_DIR]) |
75 |
|
|
76 |
#Checks for libraries. |
#Checks for libraries. |
77 |
#Replace `main' with a function in -le: |
# FIXME: Replace `main' with a function in `-lc': |
78 |
AC_CHECK_LIB(e, main) |
AC_CHECK_LIB([c], [main]) |
|
#Replace `main' with a function in -links: |
|
|
AC_CHECK_LIB(inks, main) |
|
79 |
|
|
80 |
|
|
81 |
#Checks for header files. |
# Checks for header files. |
82 |
|
AC_FUNC_ALLOCA |
83 |
AC_HEADER_STDC |
AC_HEADER_STDC |
84 |
AC_HEADER_STDBOOL |
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h libintl.h netdb.h netinet/in.h stdio_ext.h sys/ioctl.h sys/time.h syslog.h termios.h]) |
85 |
AC_CHECK_HEADERS([argz.h arpa/inet.h fcntl.h langinfo.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdio_ext.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h linux/if_tun.h]) |
|
86 |
|
# Customized checks |
87 |
|
AC_CHECK_HEADERS([assert.h byteswap.h ctype.h errno.h linux/if_tun.h net/if.h net/if_tun.h netinet/in_systm.h netinet/ip.h net/net_globals.h net/ppp_defs.h signal.h stdarg.h stdio.h sys/byteorder.h sys/uio.h]) |
88 |
|
|
89 |
#Checks for typedefs, structures, and compiler characteristics. |
|
90 |
|
# Checks for typedefs, structures, and compiler characteristics. |
91 |
|
AC_HEADER_STDBOOL |
92 |
AC_C_CONST |
AC_C_CONST |
93 |
|
AC_C_INLINE |
94 |
AC_TYPE_PID_T |
AC_TYPE_PID_T |
95 |
AC_TYPE_SIZE_T |
AC_TYPE_SIZE_T |
96 |
AC_HEADER_TIME |
AC_HEADER_TIME |
|
|
|
|
#Checks for library functions. |
|
|
AC_C_INLINE |
|
97 |
AC_C_VOLATILE |
AC_C_VOLATILE |
98 |
AC_FUNC_ALLOCA |
|
99 |
AC_FUNC_MMAP |
# Checks for library functions. |
100 |
AC_FUNC_REALLOC |
AM_GNU_GETTEXT |
101 |
|
AM_GNU_GETTEXT_VERSION(0.11.5) |
102 |
AC_FUNC_FORK |
AC_FUNC_FORK |
103 |
AC_PROG_GCC_TRADITIONAL |
AC_PROG_GCC_TRADITIONAL |
104 |
AC_FUNC_MALLOC |
AC_FUNC_MALLOC |
105 |
|
AC_FUNC_MMAP |
106 |
|
AC_FUNC_REALLOC |
107 |
|
AC_FUNC_SELECT_ARGTYPES |
108 |
AC_TYPE_SIGNAL |
AC_TYPE_SIGNAL |
109 |
AC_FUNC_STAT |
AC_FUNC_STAT |
110 |
AC_FUNC_VPRINTF |
AC_FUNC_VPRINTF |
111 |
AC_FUNC_SELECT_ARGTYPES |
AC_CHECK_FUNCS([bzero dup2 gethostbyname inet_ntoa memchr memmove memset nl_langinfo select socket strchr strcspn strerror strrchr strstr strtol]) |
|
AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify bzero dup2 getcwd gethostbyname getopt_long inet_ntoa memchr memmove mempcpy memset munmap nl_langinfo putenv select setlocale socket stpcpy strcasecmp strchr strcspn strdup strerror strrchr strstr strtol strtoul]) |
|
112 |
|
|
113 |
AM_CONDITIONAL(NEED_GETOPT, test "$ac_cv_func_getopt_long" != yes) |
# Customized checks |
114 |
|
AC_CHECK_FUNCS([getopt_long]) |
115 |
|
|
116 |
AM_GNU_GETTEXT([no-libtool]) |
|
117 |
AM_GNU_GETTEXT_VERSION(0.11.5) |
|
118 |
AM_ICONV |
AM_CONDITIONAL(NEED_GETOPT, test "$ac_cv_func_getopt_long" != yes) |
119 |
|
|
120 |
AC_ARG_WITH(confdir, |
AC_ARG_WITH(confdir, |
121 |
AC_HELP_STRING([--with-confdir=PATH], [set configuration path (/etc/penggy)]), |
AC_HELP_STRING([--with-confdir=PATH], [set configuration path (/etc/penggy)]), |
191 |
if test "$modem" = yes; then |
if test "$modem" = yes; then |
192 |
AC_DEFINE([WITH_MODEM],,[ Enable/disable modem driver ]) |
AC_DEFINE([WITH_MODEM],,[ Enable/disable modem driver ]) |
193 |
GUILE_FLAGS |
GUILE_FLAGS |
194 |
|
AC_CHECK_HEADERS([guile/gh.h]) |
195 |
CFLAGS="$CFLAGS $GUILE_CFLAGS" |
CFLAGS="$CFLAGS $GUILE_CFLAGS" |
196 |
LDFLAGS="$LDFLAGS $GUILE_LDFLAGS" |
LDFLAGS="$LDFLAGS $GUILE_LDFLAGS" |
197 |
AC_MSG_CHECKING(whether scm_eval conforms to R5RS) |
AC_MSG_CHECKING(whether scm_eval conforms to R5RS) |
358 |
]) |
]) |
359 |
fi |
fi |
360 |
|
|
|
|
|
|
# Ask for config.h. |
|
|
AM_CONFIG_HEADER(config.h) |
|
361 |
|
|
362 |
# Output Files |
# Output Files |
363 |
AC_CONFIG_FILES([ Makefile |
AC_CONFIG_FILES([Makefile |
364 |
intl/Makefile |
config/Makefile |
365 |
po/Makefile.in |
doc/Makefile |
366 |
m4/Makefile |
doc/config/Makefile |
367 |
doc/Makefile |
include/Makefile |
368 |
doc/config/Makefile |
include/cable/Makefile |
369 |
lib/Makefile |
include/dsl/Makefile |
370 |
src/Makefile |
include/fdo/Makefile |
371 |
src/iptunnel/Makefile |
include/iptunnel/Makefile |
372 |
src/fdo/Makefile |
include/l2tp/Makefile |
373 |
src/modem/Makefile |
include/modem/Makefile |
374 |
src/tcpip/Makefile |
include/p3/Makefile |
375 |
src/cable/Makefile |
include/tcpip/Makefile |
376 |
src/dsl/Makefile |
include/tun/Makefile |
377 |
src/tun/Makefile |
intl/Makefile |
378 |
src/tun/linux/Makefile |
lib/Makefile |
379 |
src/tun/openbsd/Makefile |
m4/Makefile |
380 |
src/tun/freebsd/Makefile |
src/Makefile |
381 |
src/p3/Makefile |
src/cable/Makefile |
382 |
src/l2tp/Makefile |
src/dsl/Makefile |
383 |
include/Makefile |
src/fdo/Makefile |
384 |
include/fdo/Makefile |
src/iptunnel/Makefile |
385 |
include/iptunnel/Makefile |
src/l2tp/Makefile |
386 |
include/modem/Makefile |
src/modem/Makefile |
387 |
include/tcpip/Makefile |
src/p3/Makefile |
388 |
include/cable/Makefile |
src/tcpip/Makefile |
389 |
include/dsl/Makefile |
src/tun/Makefile |
390 |
include/tun/Makefile |
src/tun/freebsd/Makefile |
391 |
include/p3/Makefile |
src/tun/linux/Makefile |
392 |
include/l2tp/Makefile]) |
src/tun/openbsd/Makefile |
393 |
|
po/Makefile.in]) |
394 |
AC_OUTPUT |
AC_OUTPUT |