aboutsummaryrefslogtreecommitdiff
path: root/configure.in
blob: 98dd6452efd1f05c5dec80aee13983f95d0531c3 (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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ltrace.c)
AC_CONFIG_HEADER(config.h)

dnl Check host system type
AC_CANONICAL_HOST
HOST_OS="$host_os"
AC_SUBST(HOST_OS)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

dnl Checks for libraries.
AC_CHECK_LIB(iberty, cplus_demangle,,,)

AC_MSG_CHECKING(ltrace version)
changequote(<<, >>)
ltrace_version=`sed -n '1s/ltrace (\([0-9.]\+\)).*/\1/p' ${srcdir}/debian/changelog`
sed -e "s/@VERSION@/${ltrace_version}/g" \
	< ${srcdir}/ltrace.spec.in > ${srcdir}/ltrace.spec
changequote([, ])
dnl AC_DEFINE_UNQUOTED(VERSION,"$ltrace_version")
AC_MSG_RESULT($ltrace_version)

dnl
dnl The following stuff may be useful, but I don't use it now.
dnl

dnl   dnl Checks for header files.
AC_HEADER_STDC
dnl   AC_HEADER_SYS_WAIT
dnl   AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h)
AC_CHECK_HEADERS(getopt.h)
dnl   
dnl   dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_PID_T
dnl   AC_HEADER_TIME
dnl   AC_STRUCT_TM
dnl   
dnl   dnl Checks for library functions.
dnl   AC_FUNC_MMAP
dnl   AC_TYPE_SIGNAL
dnl   AC_FUNC_VPRINTF
dnl   AC_CHECK_FUNCS(gettimeofday strdup strerror strspn)
AC_CHECK_FUNCS(getopt getopt_long)

AC_OUTPUT(Makefile)