configure.ac 1.34 KB
Newer Older
1 2 3 4
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.67])
5
AC_INIT([codes-net], [0.4.0], [http://trac.mcs.anl.gov/projects/codes/newticket],[],[http://www.mcs.anl.gov/projects/codes])
6 7 8 9 10 11 12 13 14

AC_CANONICAL_TARGET
AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST

AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

15
AC_CONFIG_SRCDIR([doc/BUILD_STEPS])
16 17 18 19 20 21 22 23 24
AC_CONFIG_HEADERS([codes_net_config.h])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_RANLIB

25 26
PKG_PROG_PKG_CONFIG

Jonathan Jenkins's avatar
Jonathan Jenkins committed
27 28 29
# Check for C99 
AC_PROG_CC_C99

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
AC_REQUIRE_CPP

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h execinfo.h pthread.h malloc.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT8_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T

50 51 52
# check for codes-base
PKG_CHECK_MODULES_STATIC([CODES_BASE], [codes-base], [],
                  [AC_MSG_ERROR([Could not find working codes-base installation via pkg-config])])
53

54 55 56
if test "x$srcdir" != "x."; then
    AC_CONFIG_LINKS([tests/conf:$srcdir/tests/conf])
fi
57
AC_CONFIG_FILES([Makefile])
58
AC_OUTPUT(maint/codes-net.pc)