1 | # -*- Autoconf -*- |
---|
2 | # Process this file with autoconf to produce a configure script. |
---|
3 | |
---|
4 | AC_PREREQ([2.65]) |
---|
5 | AC_INIT([libathdir], [10.1], [debathena@mit.edu]) |
---|
6 | AM_INIT_AUTOMAKE([foreign -Wall]) |
---|
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. |
---|
14 | AC_PROG_CC |
---|
15 | # automake 1.12 seems to require this, but automake 1.11 doesn't recognize it |
---|
16 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
---|
17 | LT_INIT |
---|
18 | |
---|
19 | # Checks for libraries. |
---|
20 | |
---|
21 | # Checks for header files. |
---|
22 | AC_CHECK_HEADERS([stdlib.h string.h sys/param.h]) |
---|
23 | |
---|
24 | # Checks for typedefs, structures, and compiler characteristics. |
---|
25 | |
---|
26 | # Checks for library functions. |
---|
27 | AC_FUNC_MALLOC |
---|
28 | AC_FUNC_REALLOC |
---|
29 | AC_CHECK_FUNCS([strchr]) |
---|
30 | |
---|
31 | # More stuff |
---|
32 | AS_IF([test x"$ATHENA_SYS" = x], [AC_MSG_ERROR([ATHENA_SYS must be set])]) |
---|
33 | AC_DEFINE_UNQUOTED([ATHSYS], ["$ATHENA_SYS"], [Define the Athena System Version]) |
---|
34 | |
---|
35 | AC_ARG_WITH([hosttype], |
---|
36 | [AS_HELP_STRING([--with-hosttype], |
---|
37 | [machtype for compatibility])], |
---|
38 | [ |
---|
39 | case $withval in |
---|
40 | linux) withval='"linux"';; |
---|
41 | sun4) withval='"sun4"';; |
---|
42 | inbsd) withval='"inbsd"';; |
---|
43 | yes) withval='"linux"';; |
---|
44 | no) withval=NULL;; |
---|
45 | *) AC_MSG_ERROR([invalid hosttype specified]);; |
---|
46 | esac |
---|
47 | hosttype=$withval |
---|
48 | ], |
---|
49 | [hosttype='"linux"']) |
---|
50 | AC_DEFINE_UNQUOTED([HOSTTYPE], [$hosttype], [Define the type of the Athena System]) |
---|
51 | |
---|
52 | |
---|
53 | AC_CONFIG_FILES([Makefile |
---|
54 | src/Makefile |
---|
55 | src/athdir.pc |
---|
56 | ]) |
---|
57 | AC_OUTPUT |
---|