forked from Oliviers-OSS/microcom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
59 lines (50 loc) · 1.69 KB
/
configure.in
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT(microcom, 1.05, oliviers.open.source.softwares@gmail.com)
AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_SRCDIR([microcom.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h syslog.h termios.h unistd.h sys/socket.h sys/ioctl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_C_CONST
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([select strstr memset socket])
# debug
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug mode ],
[case "${enableval}" in
yes) enable_debug="yes";;
no) enable_debug="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],
[enable_debug="no"]
)
if test "$enable_debug" = "yes"; then
AC_DEFINE(_DEBUG_, 1, [Defined if debug mode is enabled (it's easier to check).])
fi
if test "$enable_debug" = "no"; then
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
fi
AC_ARG_ENABLE(modem,
[ --enable-modem enable modem detection in autodetect mode],
[case "${enableval}" in
yes) enable_modem="yes";;
no) enable_modem="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-modem) ;;
esac],
[enable_modem="no"]
)
if test "$enable_modem" = "yes"; then
AC_DEFINE(MODEM_CMD, 1, [Defined if modem mode is enabled])
fi
AC_CONFIG_FILES([Makefile])
AC_OUTPUT