-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
81 lines (69 loc) · 2.16 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([cray-xpmem], [0.1], [http://bugzilla.us.cray.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([include/xpmem.h])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER([config.h])
AM_SILENT_RULES
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_AR
AM_PROG_LIBTOOL
AC_PROG_LN_S
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_C_VOLATILE
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MMAP
AC_CHECK_FUNCS([getpagesize memset])
AC_SUBST([initdir], [${sysconfdir}/init.d])
AC_SUBST([ldsoconfdir], [/etc/ld.so.conf.d])
AC_SUBST([pkgconfigdir], [${libdir}/pkgconfig])
AC_ARG_WITH([default-prefix],
[AS_HELP_STRING([--with-default-prefix=PATH],
[PATH to use in place of ${prefix} for default paths.])],
[AC_SUBST([default_prefix], $withval)],
[AC_SUBST([default_prefix], "")])
AC_ARG_WITH([default-libdir],
[AS_HELP_STRING([--with-default-libdir=PATH],
[Default PATH for libraries.])],
[AC_SUBST([default_libdir], $withval)],
[if test -z "${default_prefix}"
then
AC_MSG_ERROR([Default library path or default prefix must be specified])
else
default_libdir=${libdir//${prefix}/${default_prefix}}
AC_SUBST([default_libdir])
fi])
AC_ARG_WITH([module],
[AS_HELP_STRING([--with-module=PATH],
[use $PATH as name of module file to write.])],
[AC_SUBST([MODULE_PATH], $withval)
AC_SUBST([MODULE_VERSION], [`basename $withval`])],
[AC_MSG_ERROR([Module path must be specified])])
AC_PATH_KERNEL_SOURCE
AC_CONFIG_FILES([Makefile
cray-xpmem.pc
module
include/Makefile
kernel/Kbuild
kernel/Makefile
kernel/xpmem
lib/Makefile
lib/cray-xpmem.conf
test/Makefile
test/run.sh])
AC_OUTPUT