File: configure.in

package info (click to toggle)
mig-m68k-gnu 1.0-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 680 kB
  • ctags: 998
  • sloc: ansic: 6,776; sh: 1,937; yacc: 560; lex: 269; makefile: 62; awk: 45
file content (61 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (2)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(migcom.c)
AC_PREREQ(2.12)

AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM dnl needs SYSTEM, not just HOST and TARGET

AM_INIT_AUTOMAKE(mig, 1.0)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
AC_PROG_AWK
AC_PROG_INSTALL

dnl Checks for header files.
AC_STDC_HEADERS

dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_HAVE_FUNCS(vprintf)

AC_MSG_CHECKING(for target compiler)
if test "x$TARGET_CC" != x; then
  # User set it.
  AC_MSG_RESULT([$TARGET_CC])
elif test "$target" = "$host"; then
  TARGET_CC='${CC}'
  AC_MSG_RESULT([native, using host compiler])
else
  [mig_target=`echo "$target" | sed 's/[^a-zA-Z0-9_]/_/g'`]
  AC_CACHE_VAL(mig_cv_${mig_target}_CC, [ dnl
    ac_word="${target_alias}-gcc"
    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    for ac_dir in $PATH; do
      test -z "$ac_dir" && ac_dir=.
      if test -f $ac_dir/$ac_word; then
	eval mig_cv_${mig_target}_CC='$ac_word'
	break
      fi
    done
    IFS="$ac_save_ifs"])
  eval TARGET_CC=\"\$mig_cv_${mig_target}_CC\"
  if test "x$TARGET_CC" = x; then
    AC_MSG_RESULT([${target_alias}-gcc not found])
    TARGET_CC='${CC}'
    AC_MSG_WARN([using host compiler ($CC) for target $target])
  else
    AC_MSG_RESULT([${TARGET_CC}])
  fi
fi
AC_SUBST(TARGET_CC)
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)

AC_OUTPUT([Makefile mig])