forked from storaged-project/libbytesize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
59 lines (44 loc) · 1.94 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
# configure.ac for libbytesize
AC_INIT([libbytesize], [0.1], [[email protected]])
# Disable building static libraries.
# This needs to be set before initializing automake
AC_DISABLE_STATIC
AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability])
AM_GNU_GETTEXT_VERSION([0.19.1])
AM_GNU_GETTEXT([external])
AC_CONFIG_MACRO_DIR([m4])
AM_PATH_PYTHON
AM_PROG_AR
AC_PROG_CC
LT_INIT
AC_CONFIG_FILES([Makefile src/Makefile src/bytesize.pc \
po/Makefile.in \
src/python/Makefile src/python/gi/Makefile src/python/gi/overrides/Makefile \
dist/Makefile dist/libbytesize.spec \
docs/Makefile docs/libbytesize-docs.xml \
tests/Makefile])
LIBBYTESIZE_PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.2])
LIBBYTESIZE_PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.42.2])
m4_ifdef([GOBJECT_INTROSPECTION_CHECK],
[GOBJECT_INTROSPECTION_CHECK([1.3.0])],
[found_introspection=no
AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
# Complain if introspection was not enabled
AS_IF([test "x$found_introspection" = xyes], [:],
[LIBBYTESIZE_SOFT_FAILURE([GObject introspection must be enabled])])
AC_PATH_PROG([PYTHON3], [python3], [no])
AS_IF([test "x$PYTHON3" == "xno"], [LIBBYTESIZE_SOFT_FAILURE([\
The python3 program was not found in the search path. Please ensure that it is installed and its directory is included in the search path.])],
[:])
AC_SUBST([PYTHON3_EXEC_PREFIX], ['${exec_prefix}'])
PYTHON3_EXECDIR=`$PYTHON3 -c "import distutils.sysconfig; \
print(distutils.sysconfig.get_python_lib(1,0,prefix='$PYTHON3_EXEC_PREFIX'))"`
AC_SUBST(py3execdir, $PYTHON3_EXECDIR)
AM_CONDITIONAL(USE_PYTHON3, test ${use_python3} = "yes")
AC_CHECK_LIB(gmp, __gmpz_init)
AC_CHECK_HEADERS([langinfo.h gmp.h],
[],
[LIBBYTESIZE_SOFT_FAILURE([Header file $ac_header not found.])],
[])
AC_OUTPUT
LIBBYTESIZE_FAILURES