1#
2# DeepThought: This package provides functions for multiplication and other computations in finitely generated nilpotent groups based on the Deep Thought algorithm.
3#
4# This file is part of the build system of a GAP kernel extension.
5# Requires GNU autoconf, GNU automake and GNU libtool.
6#
7
8dnl ##
9dnl ## Setup autoconf
10dnl ##
11AC_PREREQ([2.68])
12AC_INIT([DeepThought], m4_esyscmd([tr -d '\n' < VERSION]))
13AC_CONFIG_SRCDIR([src/DeepThought.c])
14AC_CONFIG_HEADER([src/pkgconfig.h:cnf/pkgconfig.h.in])
15AC_CONFIG_MACRO_DIR([m4])
16AC_CONFIG_AUX_DIR([cnf])
17m4_include([m4/ac_find_gap.m4])
18
19dnl ##
20dnl ## Get canonical host info
21dnl ##
22AC_CANONICAL_HOST
23
24dnl ##
25dnl ## Setup automake
26dnl ##
27AM_INIT_AUTOMAKE([1.11 -Wall foreign subdir-objects])
28AM_SILENT_RULES([yes])
29AM_PROG_AR
30
31dnl ##
32dnl ## Set the language
33dnl ##
34AC_PROG_CC
35AC_LANG([C])
36
37dnl ##
38dnl ## Setup libtool (for building the GAP kernel extension)
39dnl ##
40LT_PREREQ([2.4.2])
41LT_INIT([disable-static dlopen win32-dll])
42
43dnl ##
44dnl ## Locate the GAP root dir
45dnl ##
46AC_FIND_GAP
47
48dnl ##
49dnl ## Detect Windows resp. Cygwin
50dnl ##
51case $host_os in
52  *cygwin* ) CYGWIN=yes;;
53         * ) CYGWIN=no;;
54esac
55AM_CONDITIONAL([SYS_IS_CYGWIN], [test "$CYGWIN" = "yes"])
56if test "$CYGWIN" = "yes"; then
57  AC_DEFINE(SYS_IS_CYGWIN32, 1, are we on CYGWIN?)
58else
59  AC_DEFINE(SYS_IS_CYGWIN32, 0, are we on CYGWIN?)
60fi
61
62dnl ##
63dnl ## Rebuild configure if VERSION file changes
64dnl ##
65AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
66
67dnl ##
68dnl ## Output everything
69dnl ##
70AC_CONFIG_FILES([Makefile])
71AC_OUTPUT
72