-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
85 lines (71 loc) · 1.92 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(hss/hss.c)
AC_CONFIG_HEADER(config.h)
dnl AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required.
AC_PROG_MAKE_SET
AC_ARG_PROGRAM
PACKAGE=hssutils
VERSION=0.1.2
PACKAGE_VERSION="$PACKAGE-$VERSION"
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(PACKAGE_VERSION)
if test "$LDFLAGS" = "" ; then
LDFLAGS=-L/usr/local/lib ; export LDFLAGS
fi
if test "$CPPFLAGS" = "" ; then
CPPFLAGS=-I/usr/local/include ; export CPPFLAGS
fi
dnl --- programs
AC_PATH_PROG(LN, ln, ln)
dnl AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(RM, rm, rm)
dnl AC_PATH_PROG(PERL, perl)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_LN_S
dnl ---- pre-checks for library functions.
AC_CHECK_FUNCS(strerror)
dnl ---- checks for libraries.
AC_CHECK_LIB(gnumalloc, malloc)
dnl AC_CHECK_LIB(socket, socket)
dnl AC_CHECK_LIB(nsl, gethostbyname)
dnl ---- checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(bstring.h fcntl.h memory.h string.h sys/file.h unistd.h)
dnl ---- checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIGNAL
dnl AC_TYPE_PID_T
dnl ---- checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_ALLOCA
dnl AC_CHECK_FUNCS(select socket gettimeofday)
AC_ARG_ENABLE(siodev,
[ --enable-siodev=DEVFILE serial device.])
case "$enable_siodev" in
yes | no | "") enable_siodev=/dev/cuaa0 ;;
esac
AC_SUBST(enable_siodev)
AC_ARG_ENABLE(siospeed,
[ --enable-siospeed=BPS serial speed.])
case "$enable_siospeed" in
yes | no | "") enable_siospeed=115200 ;;
esac
AC_SUBST(enable_siospeed)
AC_OUTPUT([Makefile hss/Makefile psxfer/Makefile],
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])