configure.in 1.53 KB
Newer Older
Guillaume Melquiond's avatar
Guillaume Melquiond committed
1
AC_INIT([Flocq], [2.2.2],
Guillaume Melquiond's avatar
Guillaume Melquiond committed
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
        [Sylvie Boldo <sylvie.boldo@inria.fr>, Guillaume Melquiond <guillaume.melquiond@inria.fr>],
        [flocq])

m4_divert_push(99)
if test "$ac_init_help" = "long"; then
  ac_init_help=short
fi
m4_divert_pop(99)

m4_divert_push([HELP_ENABLE])
Fine tuning of the installation directory:
AS_HELP_STRING([--libdir=DIR], [library @<:@DIR=`$COQC -where`/user-contrib/Flocq@:>@])
m4_divert_pop([HELP_ENABLE])

AC_PROG_CXX

AC_ARG_VAR(COQBIN, [path to Coq executables [empty]])
if test ${COQBIN##*/}; then COQBIN=$COQBIN/; fi

AC_ARG_VAR(COQC, [Coq compiler command [coqc]])
AC_MSG_CHECKING([for coqc])
if test ! "$COQC"; then COQC=`which ${COQBIN}coqc`; fi
AC_MSG_RESULT([$COQC])

AC_ARG_VAR(COQDEP, [Coq dependency analyzer command [coqdep]])
AC_MSG_CHECKING([for coqdep])
if test ! "$COQDEP"; then COQDEP=`which ${COQBIN}coqdep`; fi
AC_MSG_RESULT([$COQDEP])

AC_ARG_VAR(COQDOC, [Coq documentation generator command [coqdoc]])
AC_MSG_CHECKING([for coqdoc])
if test ! "$COQDOC"; then COQDOC=`which ${COQBIN}coqdoc`; fi
AC_MSG_RESULT([$COQDOC])

if test "$libdir" = '${exec_prefix}/lib'; then
  libdir="`$COQC -where`/user-contrib/Flocq"
fi

AC_MSG_NOTICE([building remake...])
case `uname -s` in
MINGW*)
	$CXX -Wall -O2 -o remake.exe remake.cpp -lws2_32
	if test $? != 0; then AC_MSG_FAILURE([failed]); fi
	AC_SUBST([REMAKE], [./remake.exe])
	;;
*)
	$CXX -Wall -O2 -o remake remake.cpp
	if test $? != 0; then AC_MSG_FAILURE([failed]); fi
	AC_SUBST([REMAKE], [./remake])
	;;
esac

AC_CONFIG_FILES([Remakefile src/Flocq_version.v])
AC_OUTPUT