configure.in 1.83 KB
Newer Older
Guillaume Melquiond's avatar
Guillaume Melquiond committed
1
AC_INIT([Flocq], [2.5.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
        [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])
23
24
25
26
27
28
29
if test ! "$COQC"; then
   COQC=`which ${COQBIN}coqc`
   if test ! "$COQC"; then
      AC_MSG_RESULT([not found])
      AC_MSG_ERROR([missing Coq compiler])
   fi
fi
Guillaume Melquiond's avatar
Guillaume Melquiond committed
30
31
32
33
AC_MSG_RESULT([$COQC])

AC_ARG_VAR(COQDEP, [Coq dependency analyzer command [coqdep]])
AC_MSG_CHECKING([for coqdep])
34
35
36
37
38
39
40
if test ! "$COQDEP"; then
   COQDEP=`which ${COQBIN}coqdep`
   if test ! "$COQDEP"; then
      AC_MSG_RESULT([not found])
      AC_MSG_ERROR([missing Coq dependency analyzer])
   fi
fi
Guillaume Melquiond's avatar
Guillaume Melquiond committed
41
42
43
44
AC_MSG_RESULT([$COQDEP])

AC_ARG_VAR(COQDOC, [Coq documentation generator command [coqdoc]])
AC_MSG_CHECKING([for coqdoc])
45
46
47
48
49
50
if test ! "$COQDOC"; then
   COQDOC=`which ${COQBIN}coqdoc`
   if test ! "$COQDOC"; then
      AC_MSG_RESULT([not found])
   fi
fi
Guillaume Melquiond's avatar
Guillaume Melquiond committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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