summaryrefslogtreecommitdiffstats
path: root/configure.in
blob: a6ce88edf7b56532f0dd05984f06cb0058347d39 (plain)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(axlib.h)
AXLIB_MAJOR_VERSION=0
AXLIB_MINOR_VERSION=0
AXLIB_MICRO_VERSION=8
AXLIB_VERSION=$AXLIB_MAJOR_VERSION.$AXLIB_MINOR_VERSION.$AXLIB_MICRO_VERSION

dnl For automake
VERSION=$AXLIB_VERSION
PACKAGE=libax25

AM_INIT_AUTOMAKE($PACKAGE, $VERSION)

AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB
AM_PROG_LIBTOOL

dnl Checks for libraries.

AC_FUNC_SETPGRP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(socket strdup strerror strspn)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h unistd.h zlib.h)

dnl Checks for working glibc 2.1 headers
AC_MSG_CHECKING(for working netax25/ax25.h header file)
AC_HEADER_EGREP(ax25_fwd_struct, netax25/ax25.h, has_ax25=yes, has_ax25=no)
if test "$has_ax25" = "yes" ; then
  AC_DEFINE(HAVE_NETAX25_AX25_H)
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for working netrom/netrom.h header file)
AC_HEADER_EGREP(unsigned int ndigis, netrom/netrom.h, has_netrom=yes, has_netrom=no)
if test "$has_netrom" = "yes" ; then
  AC_DEFINE(HAVE_NETROM_NETROM_H)
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(for working netrose/rose.h header file)
AC_HEADER_EGREP(rose_facilities_struct, netrose/rose.h, has_rose=yes, has_rose=no)
if test "$has_rose" = "yes" ; then
  AC_DEFINE(HAVE_NETROSE_ROSE_H)
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
fi

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Only use -Wall if we have gcc
if test "x$GCC" = "xyes"; then
  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
    CFLAGS="$CFLAGS -Wall"
  fi
fi

dnl Checks for library functions.
AC_OUTPUT(Makefile)