File: configure.in

package info (click to toggle)
ax25-tools 0.0.5-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,360 kB
  • ctags: 751
  • sloc: ansic: 11,724; sh: 2,157; makefile: 209
file content (81 lines) | stat: -rw-r--r-- 2,597 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ax25/ax25d.c)

dnl Check what system we have
AC_CANONICAL_SYSTEM

dnl For automake
VERSION=0.0.5
PACKAGE=ax25-tools
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

AM_CONFIG_HEADER(config.h)



dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL

dnl Checks for libraries.
AC_SUBST(Z_LIB)
AC_SUBST(AX25_LIB)
AC_SUBST(AX25IO_LIB)
AC_SUBST(NCURSES_LIB)
AC_SUBST(UTIL_LIB)
AC_CHECK_LIB(z, zlibVersion,Z_LIB="-lz",Z_LIB=)
AC_CHECK_LIB(ax25, ax25_config_load_ports, AX25_LIB="-lax25", AC_MSG_ERROR(Could not find the libax25 libraries; aborting))
AC_CHECK_LIB(ncurses, initscr,NCURSES_LIB="-lncurses",NCURSES_LIB=)
AC_CHECK_LIB(util, openpty, UTIL_LIB="-lutil",UTIL_LIB=)

dnl AC_PATH_XTRA

dnl Checks for header files.
dnl AC_PATH_X
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h paths.h strings.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h zlib.h )
AC_SUBST(DMASCC)
AC_CHECK_HEADERS(linux/dmascc.h, DMASCC="dmascc", DMASCC="")

dnl Checks for working glibc 2.1 headers
AC_MSG_CHECKING(for working netax25/ax25.h header file)
AC_EGREP_HEADER(ax25_fwd_struct, netax25/ax25.h,AC_DEFINE(HAVE_NETAX25_AX25_H) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING(for working netrom/netrom.h header file)
AC_EGREP_HEADER(unsigned int ndigis, netrom/netrom.h,AC_DEFINE(HAVE_NETROM_NETROM_H) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
AC_MSG_CHECKING(for working netrose/rose.h header file)
AC_EGREP_HEADER(rose_facilities_struct, netrose/rose.h,AC_DEFINE(HAVE_NETROSE_ROSE_H) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_SETPGRP
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_FUNC_WAIT3
AC_CHECK_FUNCS(gethostname gettimeofday mkdir select socket strdup strerror strspn strstr strtol strtoul uname)

dnl Check for i386+ machines
AC_MSG_CHECKING(for i386 target)
case "$target_cpu" in
i386|i486|i586|i686) AC_MSG_RESULT(yes) ; i386_target=true ;;
*) AC_MSG_RESULT(no, i386 tools not built) ; i386_target=false ;;
esac
AM_CONDITIONAL(I386_TARGET, test x$i386_target = xtrue)

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

AC_OUTPUT(netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile yamdrv/Makefile dmascc/Makefile)