diff options
author | Roland McGrath <roland@gnu.org> | 1998-07-19 04:50:39 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-07-19 04:50:39 +0000 |
commit | 437ffbc127e85b2daefd96e655f3aef0b26846a2 (patch) | |
tree | 1ff0a73ea9b382a314c3c32123bd486f79f7f62b /configure.in | |
parent | f71f362f7891bcc981dd6e48d7137c51119238bf (diff) | |
download | mig-437ffbc127e85b2daefd96e655f3aef0b26846a2.tar.gz mig-437ffbc127e85b2daefd96e655f3aef0b26846a2.tar.bz2 mig-437ffbc127e85b2daefd96e655f3aef0b26846a2.zip |
1998-07-19 Roland McGrath <roland@baalperazim.frob.com>
Moved mig out of gnumach into standalone distribution with
vanilla autoconf/automake build arrangement.
* configure.in, Makefile.am: New files.
* mig.in (prefix, exec_prefix, libexecdir): New vars set by configure.
(migcom): Find migcom in ${libexecdir}, and use @MIGCOM@ for its name.
(cpp): Use @TARGET_CC@ -E instead of @CPP@.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..427c47a --- /dev/null +++ b/configure.in @@ -0,0 +1,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.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]) |