-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
109 lines (90 loc) · 2.6 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
105
106
107
108
109
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([Process-in-Processs], [2.0.0], [[email protected]], [proc-in-proc],
[https://github.com/RIKEN-SysSoft/PiP])
AC_CONFIG_SRCDIR([RELEASE_NOTE])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_HEADERS([include/pip/pip_config.h])
# 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 glibc libdir])
AC_ARG_WITH([glibc-libdir],
[AS_HELP_STRING([--with-glibc-libdir=DIR],
[glibc lib directory @<:@default=/usr/lib64@:>@])])
case "$with_glibc_libdir" in
""|yes|no) have_pipglibc=false; with_glibc_libdir="/usr/lib64";;
*) have_pipglibc=true;;
esac
dynamic_linker=`ls -d "${with_glibc_libdir}"/ld-@<:@0-9@:>@*.so | sed -n '$p'`
glibc_lib=`ls -d "${with_glibc_libdir}"/libc-@<:@0-9@:>@*.so | sed -n '$p'`
if test -d "${with_glibc_libdir}" -a -x "${dynamic_linker}" -a -f "${glibc_lib}"; then
AC_MSG_RESULT([${with_glibc_libdir}])
glibc_libdir="${with_glibc_libdir}"
glibc_incdir="`realpath ${with_glibc_libdir}/../include`"
else
AC_MSG_ERROR([can't find ld.so.])
fi
if ! test -d "${glibc_incdir}" ; then
glibc_incdir="/usr/include"
fi
AC_MSG_RESULT([${glibc_incdir}])
AC_SUBST(prefix)
AC_SUBST(exec_prefix)
AC_SUBST(includedir)
AC_SUBST(libdir)
AC_SUBST(bindir)
AC_SUBST(have_pipglibc)
AC_SUBST(glibc_incdir)
AC_SUBST(glibc_libdir)
AC_SUBST(glibc_lib)
AC_SUBST(dynamic_linker)
prefix_slides=${prefix}/share/slides
AC_SUBST(prefix_slides)
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
fi
AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_CHECK_PROGS([FC],[gfortran g95 g77])
AC_SUBST(FC)
AC_CHECK_PROGS([PYTHON],[python3 python36 python38 python2 python],[false])
if test x"${PYTHON}" == x"false" ; then
AC_MSG_ERROR([can't find python.])
fi
python=`which ${PYTHON}`
AC_SUBST(python)
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([
build/config.mk
release/version.conf
bin/pipcc.in
bin/pips
bin/pip-mode
bin/pip-check
bin/pip-man
doc/latex-inuse/libpip-manpages.tex
])
AC_OUTPUT