| 1 |
AC_PREREQ([2.59]) |
| 2 |
AC_INIT([ax25-apps],[0.0.8-rc5],[[email protected]]) |
| 3 |
AC_CONFIG_SRCDIR(ax25ipd/config.c) |
| 4 |
AM_INIT_AUTOMAKE([1.7]) |
| 5 |
|
| 6 |
AC_CONFIG_HEADERS(config.h) |
| 7 |
|
| 8 |
dnl Checks for programs. |
| 9 |
AC_PROG_AWK |
| 10 |
AC_PROG_CC |
| 11 |
AC_PROG_INSTALL |
| 12 |
AC_PROG_LN_S |
| 13 |
AC_PROG_GCC_TRADITIONAL |
| 14 |
|
| 15 |
dnl Checks for libraries. |
| 16 |
AC_SUBST(AX25_LIB) |
| 17 |
AC_SUBST(NCURSES_LIB) |
| 18 |
AC_CHECK_LIB(ax25, ax25_config_load_ports, AX25_LIB="-lax25", AC_MSG_ERROR(Could not find the libax25 libraries; aborting)) |
| 19 |
AC_CHECK_LIB(ncursesw, initscr,NCURSES_LIB="-lncursesw", AC_MSG_ERROR(Could not find the ncursesw library; aborting)) |
| 20 |
|
| 21 |
dnl Checks for working glibc 2.1 headers |
| 22 |
AC_CHECK_TYPES([struct ax25_fwd_struct], [], |
| 23 |
[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])], |
| 24 |
[[#include <netax25/ax25.h>]]) |
| 25 |
AC_CHECK_MEMBER([struct nr_route_struct.ndigis], [], |
| 26 |
[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])], |
| 27 |
[[#include <netrom/netrom.h>]]) |
| 28 |
AC_CHECK_TYPES([struct rose_facilities_struct], [], |
| 29 |
[AC_MSG_ERROR([Both glibc and libax25 are too old or both installed])], |
| 30 |
[[#include <netax25/ax25.h> /* Or <netrose/rose.h> will blow up */ |
| 31 |
#include <netrose/rose.h> |
| 32 |
]]) |
| 33 |
|
| 34 |
dnl Checks for header files. |
| 35 |
AC_HEADER_DIRENT |
| 36 |
AC_HEADER_STDC |
| 37 |
AC_HEADER_SYS_WAIT |
| 38 |
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h) |
| 39 |
|
| 40 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 41 |
AC_C_CONST |
| 42 |
AC_C_INLINE |
| 43 |
AC_TYPE_OFF_T |
| 44 |
AC_HEADER_TIME |
| 45 |
AC_STRUCT_TM |
| 46 |
|
| 47 |
dnl Checks for library functions. |
| 48 |
AC_FUNC_MEMCMP |
| 49 |
AC_FUNC_UTIME_NULL |
| 50 |
AC_FUNC_VPRINTF |
| 51 |
AC_CHECK_FUNCS(gettimeofday mktime select socket strdup strerror strspn strstr strtol strtoul uname) |
| 52 |
|
| 53 |
|
| 54 |
dnl Only use -Wall if we have gcc |
| 55 |
if test "x$GCC" = "xyes"; then |
| 56 |
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then |
| 57 |
CFLAGS="$CFLAGS -Wall" |
| 58 |
fi |
| 59 |
fi |
| 60 |
|
| 61 |
basever=$(echo $PACKAGE_VERSION | sed -e 's@-.*$@@') |
| 62 |
AC_SUBST(BASEVERSION, [$basever]) |
| 63 |
extraver=$(echo $PACKAGE_VERSION | sed -e 's@@<:@^-@:>@*-@@' -e 's@-@_@') |
| 64 |
AC_SUBST(EXTRAVERSION, [$extraver]) |
| 65 |
|
| 66 |
AC_CONFIG_FILES([call/Makefile ax25ipd/Makefile listen/Makefile Makefile ax25rtd/Makefile ax25mond/Makefile ax25-apps.spec]) |
| 67 |
AC_OUTPUT |