-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
104 lines (85 loc) · 2.81 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([PiP-Testsuite], [1.0.0], [pip@ml.riken.jp], [pip-testsuite],
[https://github.com/RIKEN-SysSoft/PiP-Testsuite])
AC_CONFIG_SRCDIR([RELEASE_NOTE])
AC_CONFIG_AUX_DIR([build])
# Specialized system macros
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
case "$target_os" in
linux*) true;;
*) AC_MSG_ERROR([Unsupported OS]);;
esac
case "$target" in
x86_64-*) true;;
aarch64-*) true;;
*) AC_MSG_ERROR([Unsupported target CPU architecture]);;
esac;
# srcdir_top
cwd=`dirname $0`;
srcdir_top=`realpath $cwd`;
AC_SUBST(srcdir_top)
# Checks for command line options
AC_MSG_CHECKING([for pip installation])
AC_ARG_WITH([pip],
[AS_HELP_STRING([--with-pip=DIR], [PiP installed directory])])
case "${with_pip}" in
""|yes|no) AC_MSG_ERROR([--with-pip is a mandatory option]);;
esac
if test -d "${with_pip}/include" \
-a '(' -d "${with_pip}/lib64" -a -x "${with_pip}/lib64/libpip.so" -o \
-d "${with_pip}/lib" -a -x "${with_pip}/lib/libpip.so" ')' \
-a -d "${with_pip}/bin" -a -x "${with_pip}/bin/pipcc"; then
if test -f "${with_pip}/include/pip.h"; then
pipincdir="${with_pip}/include"
elif test -f "${with_pip}/include/pip/pip.h"; then
pipincdir="${with_pip}/include/pip"
else
AC_MSG_ERROR([--with-pip doesn't seem to be a PiP directory])
fi
pver_str=`grep PACKAGE_VERSION ${pipincdir}/pip_config.h 2> /dev/null`
if test -z "${pver_str}"; then
AC_MSG_ERROR([pip_config.h ???])
fi
pip_version=`echo ${pver_str} | cut -d ' ' -f 3 | cut -d '"' -f 2`
pip_version_major=`echo ${pip_version} | cut -d '.' -f 1`
pip_version_minor=`echo ${pip_version} | cut -d '.' -f 2`
pip_version_subminor=`echo ${pip_version} | cut -d '.' -f 3`
if test -d "${with_pip}/lib64" -a -x "${with_pip}/lib64/libpip.so"; then
PIP_LIBDIR="${with_pip}/lib64"
elif test -d "${with_pip}/lib" -a -x "${with_pip}/lib/libpip.so"; then
PIP_LIBDIR="${with_pip}/lib"
else
AC_MSG_ERROR([cannot determine PIP_LIBDIR])
fi
else
AC_MSG_ERROR([--with-pip doesn't seem to be a PiP directory])
fi
AC_MSG_RESULT([${with_pip}])
AC_MSG_RESULT([PIP_VERSION_MAJOR=${pip_version_major}])
AC_SUBST(with_pip)
AC_SUBST(pip_version)
AC_SUBST(pip_version_major)
AC_SUBST(pip_version_minor)
AC_SUBST(pip_version_subminor)
AC_SUBST(PIP_LIBDIR)
# Checks for programs.
AC_PROG_CC()
AC_PROG_CXX()
if test x"$GCC" = x"yes"; then
CFLAGS="$CFLAGS -Wall"
fi
AC_CHECK_PROGS([FC],[gfortran g95 g77])
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([
release/version.conf
build/config.mk
config.sh
])
AC_OUTPUT