Revision 25907,
1.6 KB
checked in by achernya, 11 years ago
(diff) |
Update configure.ac to have more checks, also fix the HOSTTYPE_* brokeness to actually work
|
Rev | Line | |
---|
[25905] | 1 | # -*- Autoconf -*- |
---|
| 2 | # Process this file with autoconf to produce a configure script. |
---|
[13786] | 3 | |
---|
[25905] | 4 | AC_PREREQ([2.67]) |
---|
| 5 | AC_INIT([libathdir], [10.0.2], [debathena@mit.edu]) |
---|
[25906] | 6 | AM_INIT_AUTOMAKE([foreign -Wall]) |
---|
[25905] | 7 | AM_MAINTAINER_MODE([enable]) |
---|
| 8 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
---|
| 9 | AC_CONFIG_MACRO_DIR([m4]) |
---|
| 10 | AC_CONFIG_SRCDIR([src/athdir.c]) |
---|
| 11 | AC_CONFIG_HEADERS([config.h]) |
---|
| 12 | |
---|
| 13 | # Checks for programs. |
---|
[25907] | 14 | AC_PROG_CXX |
---|
| 15 | AC_PROG_AWK |
---|
[13786] | 16 | AC_PROG_CC |
---|
[25907] | 17 | AC_PROG_CPP |
---|
[13786] | 18 | AC_PROG_INSTALL |
---|
[25907] | 19 | AC_PROG_LN_S |
---|
| 20 | AC_PROG_MAKE_SET |
---|
| 21 | AC_PROG_RANLIB |
---|
[25905] | 22 | # automake 1.12 seems to require this, but automake 1.11 doesn't recognize it |
---|
| 23 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
---|
| 24 | LT_INIT |
---|
[24538] | 25 | AC_PROG_LIBTOOL |
---|
[13786] | 26 | |
---|
[25905] | 27 | # Checks for libraries. |
---|
| 28 | |
---|
| 29 | # Checks for header files. |
---|
| 30 | AC_CHECK_HEADERS([stdlib.h string.h sys/param.h]) |
---|
| 31 | |
---|
| 32 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 33 | |
---|
| 34 | # Checks for library functions. |
---|
| 35 | AC_FUNC_MALLOC |
---|
| 36 | AC_FUNC_REALLOC |
---|
| 37 | AC_CHECK_FUNCS([strchr]) |
---|
| 38 | |
---|
| 39 | # More stuff |
---|
| 40 | AS_IF([test x"$ATHENA_SYS" = x], [AC_MSG_ERROR([ATHENA_SYS must be set])]) |
---|
| 41 | AC_DEFINE_UNQUOTED([ATHSYS], ["$ATHENA_SYS"], [Define the Athena System Version]) |
---|
| 42 | |
---|
[25907] | 43 | AC_ARG_WITH([hosttype], |
---|
| 44 | [AS_HELP_STRING([--with-hosttype], |
---|
| 45 | [machtype for compatibility])], |
---|
| 46 | [ |
---|
| 47 | case $withval in |
---|
| 48 | linux) withval='"linux"';; |
---|
| 49 | sun4) withval='"sun4"';; |
---|
| 50 | inbsd) withval='"inbsd"';; |
---|
| 51 | yes) withval='"linux"';; |
---|
| 52 | no) withval=NULL;; |
---|
| 53 | *) AC_MSG_ERROR([invalid hosttype specified]);; |
---|
| 54 | esac |
---|
| 55 | hosttype=$withval |
---|
| 56 | ], |
---|
| 57 | [hosttype='"linux"']) |
---|
| 58 | AC_DEFINE_UNQUOTED([HOSTTYPE], [$hosttype], [Define the type of the Athena System]) |
---|
[25905] | 59 | |
---|
[25907] | 60 | |
---|
[25905] | 61 | AC_CONFIG_FILES([Makefile |
---|
| 62 | src/Makefile |
---|
| 63 | src/athdir.pc |
---|
| 64 | ]) |
---|
[24532] | 65 | AC_OUTPUT |
---|
Note: See
TracBrowser
for help on using the repository browser.