-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.in
94 lines (75 loc) · 2.16 KB
/
configure.in
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#
# FILE $Id: configure.in 23 2011-04-06 10:16:22Z burlog $
#
# PROJECT KHTML JavaScript compress utility
#
# DESCRIPTION Project configure.
#
# AUTHOR Michal Bukovsky <[email protected]>
#
# LICENSE see COPYING
#
# Copyright (C) Seznam.cz a.s. 2007
# All Rights Reserved
#
# HISTORY
# 2007-03-09 (bukovsky)
# First draft.
#
# initialize autoconf
AC_INIT(kjscompress, 1.1.3, [email protected])
# initialize automake(use AC_INIT's arguments)
AM_INIT_AUTOMAKE(-Wall foreign)
# tell autoconf where to find sources
AC_CONFIG_SRCDIR([src/main.cc])
AC_PREREQ(2.50)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
CPPFLAGS="$CPPFLAGS -D__ENABLE_WSTRING"
# from kde
AM_CONFIG_HEADER([src/kjs/config.h src/kjs/global.h])
AC_CHECK_HEADERS(sys/param.h time.h strings.h limits.h pcreposix.h)
AC_CHECK_FUNCS(gettimeofday)
AC_HEADER_TIME
AC_CHECK_LIB(m, isinf, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_ISINF, 1, [Define if you have isinf])
])
AC_CHECK_LIB(m, finite, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_FINITE, 1, [Define if you have finite])
])
AC_CHECK_LIB(m, _finite, [
AC_DEFINE_UNQUOTED(HAVE_FUNC__FINITE, 1, [Define if you have _finite])
])
AC_CHECK_LIB(m, isnan, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_ISNAN, 1, [Define if you have isnan])
])
AC_CHECK_LIB(pcreposix, pcre_version, [
AC_DEFINE(HAVE_PCREPOSIX, 1, [Define if you have pcreposix libraries and header files.])
LIBS="-lpcre -lpcreposix $LIBS"
])
# end from kde
AC_ARG_ENABLE(optimization,[ --enable-optimization compile optimized without debug logging],[
case "${enableval}" in
no)
AC_MSG_NOTICE([disabling optimization.])
CPPFLAGS="${CPPFLAGS} -DDEBUG=1"
;;
yes)
AC_MSG_NOTICE([enabling optimization.])
CXXEXTRAFLAGS="${CXXEXTRAFLAGS} -O2"
CPPFLAGS="${CPPFLAGS} -UDEBUG -DNDEBUG"
;;
*)
AC_MSG_ERROR([Say yes or no to --enable-optimization.])
;;
esac
], [
CPPFLAGS="${CPPFLAGS} -DDEBUG=1"
])
AC_SUBST(CXXEXTRAFLAGS)
AC_OUTPUT(Makefile version src/Makefile src/kjs/Makefile)