source: trunk/athena/lib/athdir/configure.ac @ 25907

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
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.67])
5AC_INIT([libathdir], [10.0.2], [debathena@mit.edu])
6AM_INIT_AUTOMAKE([foreign -Wall])
7AM_MAINTAINER_MODE([enable])
8m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9AC_CONFIG_MACRO_DIR([m4])
10AC_CONFIG_SRCDIR([src/athdir.c])
11AC_CONFIG_HEADERS([config.h])
12
13# Checks for programs.
14AC_PROG_CXX
15AC_PROG_AWK
16AC_PROG_CC
17AC_PROG_CPP
18AC_PROG_INSTALL
19AC_PROG_LN_S
20AC_PROG_MAKE_SET
21AC_PROG_RANLIB
22# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
23m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
24LT_INIT
25AC_PROG_LIBTOOL
26
27# Checks for libraries.
28
29# Checks for header files.
30AC_CHECK_HEADERS([stdlib.h string.h sys/param.h])
31
32# Checks for typedefs, structures, and compiler characteristics.
33
34# Checks for library functions.
35AC_FUNC_MALLOC
36AC_FUNC_REALLOC
37AC_CHECK_FUNCS([strchr])
38
39# More stuff
40AS_IF([test x"$ATHENA_SYS" = x], [AC_MSG_ERROR([ATHENA_SYS must be set])])
41AC_DEFINE_UNQUOTED([ATHSYS], ["$ATHENA_SYS"], [Define the Athena System Version])
42
43AC_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"'])
58AC_DEFINE_UNQUOTED([HOSTTYPE], [$hosttype], [Define the type of the Athena System])
59
60
61AC_CONFIG_FILES([Makefile
62                 src/Makefile
63                 src/athdir.pc
64])
65AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.