summaryrefslogtreecommitdiff
path: root/configure.ac
blob: d992264ab25249e98c886e57f4529931f2cd25f4 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
dnl configure script for GNU MIG.

AC_PREREQ([2.53])

AC_INIT([GNU MIG], [1.8], [bug-hurd@gnu.org])
AC_CONFIG_SRCDIR([migcom.c])
AC_CONFIG_AUX_DIR([build-aux])

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_ARG_PROGRAM

AM_INIT_AUTOMAKE(
  [gnu]
  [dist-xz]
dnl Don't define `PACKAGE' and `VERSION'.
  [no-define]
)

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])],
                            [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_YACC

yacc_is_bison=`$YACC --version | head -n 1 | cut '-d ' -f1`
[if [ x"$yacc_is_bison" != x"bison" ]; then ]
	AC_MSG_ERROR([yacc is not provided by bison, check your alternative conf or your packages])
[fi]

AM_PROG_LEX
AC_PROG_AWK
AC_PROG_INSTALL

dnl Checks for header files.
AC_HEADER_STDC

dnl Checks for library functions.
AC_FUNC_VPRINTF


[if [ "$target" = "$host" ]; then
  TARGET_CC='${CC}'
else]
  AC_CHECK_PROG([TARGET_CC], [$target_alias-gcc], [$target_alias-gcc], [none])
  [if [ x"$TARGET_CC" != x"$target_alias"-gcc ]; then]
    AC_MSG_ERROR([could not find a compiler for the target you requested])
  [fi
fi]
dnl These two are just for the user's convenience.
AC_SUBST([TARGET_CPPFLAGS])
AC_SUBST([TARGET_CFLAGS])

[MIGCOM=`echo migcom | sed "$program_transform_name"`]
AC_SUBST([MIGCOM])
[MIG=`echo mig | sed "$program_transform_name"`]
AC_SUBST([MIG])

AC_OUTPUT([Makefile mig tests/Makefile \
           tests/good/Makefile \
           tests/generate-only/Makefile \
           tests/bad/Makefile])