source: gaycko/trunk/configure.ac @ 4722

Last change on this file since 4722 was 4721, checked in by Jean-Yves Lamoureux, 9 years ago
  • Added V8 compilation flags (--with-v8-path=PATH)
File size: 2.6 KB
Line 
1AC_INIT(gaycko, 01)
2AC_PREREQ(2.50)
3AC_CONFIG_AUX_DIR(.auto)
4
5
6AC_CANONICAL_SYSTEM
7AM_INIT_AUTOMAKE([no-define tar-ustar])
8dnl AM_MAINTAINER_MODE
9
10AM_CONFIG_HEADER(config.h)
11
12LT_MAJOR="0"
13LT_MINOR="1"
14LT_MICRO="0"
15AC_SUBST(LT_MAJOR)
16AC_SUBST(LT_MINOR)
17AC_SUBST(LT_MICRO)
18LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
19AC_SUBST(LT_VERSION)
20
21
22AM_PROG_CC_C_O
23AC_PROG_CPP
24AC_PROG_CXX
25AC_PROG_CXXCPP
26OBJC="${CC}"
27AM_PROG_AS
28
29AC_LIBTOOL_WIN32_DLL
30AM_PROG_LIBTOOL
31AC_LIBTOOL_CXX
32
33AC_C_CONST
34AC_C_INLINE
35AC_TYPE_SIGNAL
36
37dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
38dnl now otherwise it might be set in an obscure if statement. Same thing for
39dnl PKG_PROG_PKG_CONFIG which needs to be called first.
40AC_EGREP_CPP(yes, foo)
41PKG_PROG_PKG_CONFIG()
42m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
43if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
44  export PKG_CONFIG_LIBDIR=/dev/null
45fi
46
47AC_MSG_CHECKING(for suffix of libraries)
48case "$shrext_cmds" in
49  .dll) eval LT_SUFFIX="-$LT_MAJOR$shrext_cmds" ;;
50  "") LT_SUFFIX=".so.$LT_MAJOR" ;;
51  *) eval LT_SUFFIX="$shrext_cmds.$LT_MAJOR" ;;
52esac
53AC_MSG_RESULT($LT_SUFFIX)
54AC_SUBST(LT_SUFFIX)
55
56AC_ARG_WITH([v8-path],
57[AS_HELP_STRING([--with-v8-path=PATH],[V8 path])],
58[V8=$withval],
59)
60AC_SUBST([V8])
61
62
63AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h endian.h unistd.h  errno.h locale.h getopt.h dlfcn.h termios.h)
64AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons)
65AC_CHECK_FUNCS(usleep gettimeofday atexit)
66
67
68
69CACA_INCLUDES="  `pkg-config --cflags caca`"
70CACA_LIBS="  `pkg-config --libs caca`"
71
72have_caca=no
73save_CFLAGS=${CFLAGS}
74AC_CHECK_LIB(caca,      caca_create_canvas,
75        [AC_CHECK_HEADERS([caca.h],have_caca=yes,
76        AC_MSG_RESULT(You have libcaca but not the development headers))],
77        AC_MSG_RESULT(libcaca not found),)
78AC_MSG_CHECKING([for libcaca]) 
79AC_MSG_RESULT([$have_caca])
80
81
82XML2_INCLUDES="`xml2-config  --cflags`"
83XML2_LIBS="`xml2-config  --libs `"
84CURL_INCLUDES=""
85CURL_LIBS="-lcurl"
86TIDY_INCLUDES="-I/usr/include/tidy"
87TIDY_LIBS="-ltidy"
88V8_INCLUDES="-I${V8}/includes"
89V8_LIBS="-L${V8}/ -lv8_g"
90CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -std=c99 -O0 -g -ggdb"
91
92
93AC_SUBST(CACA_LIBS)
94AC_SUBST(CACA_INCLUDES)
95AC_SUBST(XML2_LIBS)
96AC_SUBST(XML2_INCLUDES)
97AC_SUBST(CURL_INCLUDES)
98AC_SUBST(CURL_LIBS)
99AC_SUBST(TIDY_INCLUDES)
100AC_SUBST(TIDY_LIBS)
101AC_SUBST(V8_INCLUDES)
102AC_SUBST(V8_LIBS)
103
104AC_SUBST(LIBS)
105
106AC_MSG_RESULT([${LIBS}])
107
108AC_CONFIG_FILES([
109  Makefile
110  src/Makefile
111])
112AC_OUTPUT
113
Note: See TracBrowser for help on using the repository browser.