forked from ashkang/jcal
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.ac
72 lines (59 loc) · 2.3 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AM_INIT_AUTOMAKE
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PATH_PROG(CP, cp, /bin/cp)
AC_PATH_PROG(RM, rm, /bin/rm)
AC_PATH_PROG(RMDIR, rmdir, /bin/rmdir)
# Checks for header files.
AC_CHECK_HEADERS([time.h limits.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_STRUCT_TIMEZONE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_CHECK_FUNCS([gettimeofday localtime_r memset strcasecmp strchr strstr tzset])
AC_CONFIG_FILES([Makefile
libjalali/Makefile
test_kit/Makefile
test_kit/jalali/Makefile
test_kit/jtime/Makefile
man/Makefile
src/Makefile
])
PYTHON_COMPAT=( python2.7 python2.6 )
AC_ARG_ENABLE([pyjalali],
AC_HELP_STRING([--enbale-pyjalali], [Install Python bindings (pyjalali)]),
[case $enableval in
yes|no) installpyjalali=$enableval ;;
*) AC_MSG_ERROR([Bad value $enableval for --enable-pyjalali]) ;;
esac], installpyjalali="no")
AC_ARG_WITH([python],
AC_HELP_STRING([--with-python], [Python implementation to install python bindings for]),
[foundimpl=0
withpython=$withval
for impl in ${PYTHON_COMPAT@<:@@@:>@}; do
test "x$impl" = "x$withval" && foundimpl=1
done
test $foundimpl -eq 1 || test "x$withpython" = "xauto" || AC_MSG_ERROR([
Unsupported python implementation $withval supplied by --with-python])
unset foundimpl], withpython="auto")
if test $installpyjalali = "yes"; then
if test "x$withpython" == "xauto"; then
AC_PATH_PROG(PYTHON, python ${PYTHON_COMPAT@<:@@@:>@} )
else
PYTHON=$withpython
fi
AM_PATH_PYTHON
fi
AM_CONDITIONAL([WANT_PYJALALI], [test $installpyjalali = "yes"])
AC_PATH_PROG(RM, rm, $FALSE)
RM="$RM -f"
AC_OUTPUT