-
Notifications
You must be signed in to change notification settings - Fork 44
/
configure.ac
49 lines (37 loc) · 1.09 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT()
# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
# Locating Erlang
AM_WITH_ERLANG
# Check for 32-bit or 64-bit Erlang
AC_LANG(Erlang)
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([],[dnl
halt(case erlang:system_info(wordsize) of
8 -> 0; 4 -> 1 end)])],
[AC_MSG_NOTICE(found 64-bit Erlang)
CBIT=-m64],
[AC_MSG_NOTICE(found 32-bit Erlang)
CBIT=-m32])
# where to install Erlang applications
AC_ERLANG_SUBST_INSTALL_LIB_DIR
# Checks for typedefs, structures, and compiler characteristics.
#AC_C_CONST
# Checks for library functions.
#AC_FUNC_MALLOC
#AC_HEADER_STDC
# Check Erlang headers are installed
#AC_CHECK_HEADER(erl_driver.h,,[AC_MSG_ERROR([cannot find Erlang header files])])
CFLAGS="$CFLAGS $CBIT"
LD_SHARED="$LD_SHARED $CBIT"
AC_CONFIG_FILES([Makefile
c_src/suffixtree/Makefile
c_src/gsuffixtree/Makefile])
AC_OUTPUT