2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([can-utils], [trunk], [socketcan-core@lists.berlios.de])
6 AC_CONFIG_SRCDIR([lib.c])
7 AC_CONFIG_MACRO_DIR([config/m4])
8 AC_CONFIG_AUX_DIR([config/autoconf])
14 CFLAGS="${CFLAGS} -Wall"
17 # Checks for programs.
20 #AM_MISSING_PROG(PERL, perl, $missing_dir)
28 AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
32 # Checks for header files.
54 # Checks for typedefs, structures, and compiler characteristics.
62 # Checks for library functions.
81 AC_CHECK_DECL(SO_RXQ_OVFL,,
82 [AC_DEFINE([SO_RXQ_OVFL], [40], [SO_RXQ_OVFL])]
84 AC_CHECK_DECL(PF_CAN,,
85 [AC_DEFINE([PF_CAN], [29], [PF_CAN])]
87 AC_CHECK_DECL(AF_CAN,,
88 [AC_DEFINE([AF_CAN], [PF_CAN], [AF_CAN])]
95 AC_MSG_CHECKING([whether to enable debugging])
97 AS_HELP_STRING([--enable-debug], [enable debugging [[default=no]]]),
99 (y | yes) CONFIG_DEBUG=yes ;;
100 (*) CONFIG_DEBUG=no ;;
103 AC_MSG_RESULT([${CONFIG_DEBUG}])
104 if test "${CONFIG_DEBUG}" = "yes"; then
105 CFLAGS="${CFLAGS} -Wsign-compare -Wfloat-equal -Wformat-security -g -O1"
106 AC_DEFINE(DEBUG, 1, [debugging])
108 CFLAGS="${CFLAGS} -O2"