summaryrefslogtreecommitdiffstats
path: root/kxsldbg/configure.in.in
blob: b4f1ef5e2706897861d9e409c5a3547388daef90 (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
LIBXSLT_REQUIRED_VERSION="1.0.18"
AC_SUBST(LIBXSLT_REQUIRED_VERSION)

dnl
dnl Math detection
dnl

AC_CHECK_HEADERS(sys/types.h unistd.h string.h)
AC_CHECK_HEADERS(ieeefp.h nan.h math.h fp_class.h float.h ansidecl.h)
AC_CHECK_HEADERS(time.h sys/stat.h stdarg.h)
AC_CHECK_FUNCS(stat _stat)

AC_CHECK_FUNC(isnan, , AC_CHECK_LIB(m, isnan,
  [M_LIBS="-lm"; AC_DEFINE(HAVE_ISNAN)]))

AC_CHECK_FUNC(isinf, , AC_CHECK_LIB(m, isinf,
  [M_LIBS="-lm"; AC_DEFINE(HAVE_ISINF)]))

AC_CHECK_FUNC(pow, , AC_CHECK_LIB(m, pow,
  [M_LIBS="-lm"; AC_DEFINE(HAVE_POW)]))

AC_CHECK_FUNC(floor, , AC_CHECK_LIB(m, pow,
  [M_LIBS="-lm"; AC_DEFINE(HAVE_FLOOR)]))

AC_CHECK_FUNC(fabs, , AC_CHECK_LIB(m, pow,
  [M_LIBS="-lm"; AC_DEFINE(HAVE_FABS)]))
AC_CHECK_FUNCS(gettimeofday)
AC_CHECK_FUNCS(mktime localtime asctime)

AH_TEMPLATE(USE_DOCS_MACRO)
AH_TEMPLATE(TIMESTAMP)
AH_TEMPLATE(WITH_DEBUG_HELP)
AH_TEMPLATE(WITH_XSLDBG_DEBUG)
AH_TEMPLATE(XSLDBG_BIN)
AH_TEMPLATE(USE_XSLDBG_AS_THREAD)
AH_TEMPLATE(HAVE_INCLUDE_FIX)

AH_TEMPLATE(_GNU_SOURCE)
AH_TEMPLATE(HAVE_ISINF)
AH_TEMPLATE(HAVE_ISNAN)
AH_TEMPLATE(HAVE_POW)
AH_TEMPLATE(HAVE_FLOOR)
AH_TEMPLATE(HAVE_FABS)
AH_TEMPLATE(HAVE_QT)
AH_TEMPLATE(HAVE_PTHREAD)
AH_TEMPLATE(HAVE_READLINE)
AH_TEMPLATE(HAVE_HISTORY)

dnl
dnl how are we to invoke xsldbg, or the other stylesheet processor (xsltproc?)
dnl

AC_DEFINE(XSLDBG_BIN, "xsldbg")


dnl
dnl Do we have we fix for included xml files
dnl

save_LDFLAGS="$LDFLAGS"
save_CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS $LIBXML_LIBS"
CFLAGS="$CFLAGS $LIBXML_CFLAGS"

AC_CHECK_LIB(xml2, xmlSetEntityReferenceFunc,
  [AC_DEFINE(HAVE_INCLUDE_FIX)],
  [AC_MSG_RESULT(
!!Warning!!  The version of libxml2 installed does not support
  debugging of files included as entities. Test 10 will be skipped
  as it will fail.   You will not be able to set breakpoints on external
        entities. Try upgrading your libxml2.
  See also --enable-includefix)
  RUNTEST10="false"
  ])
  
LDFLAGS="$save_LDFLAGS"
CFLAGS="$save_CFLAGS" 

AC_ARG_ENABLE([includefix], 
              [  --enable-includefix     Do you want to force the use of include fix (no)], [do_include_fix=$enableval], [do_include_fix="no"])

if test "x$do_include_fix" = "xyes"; then
   AC_DEFINE(HAVE_INCLUDE_FIX)
   AC_MSG_RESULT(Forcing the use if include fix)
fi



XSLDBG_MAJOR_VERSION=3
XSLDBG_MINOR_VERSION=1
XSLDBG_MICRO_VERSION=7
XSLDBG_VERSION=$XSLDBG_MAJOR_VERSION.$XSLDBG_MINOR_VERSION.$XSLDBG_MICRO_VERSION
XSLDBG_VERSION_INFO=`expr $XSLDBG_MAJOR_VERSION + \
$XSLDBG_MINOR_VERSION`:$XSLDBG_MICRO_VERSION:$XSLDBG_MINOR_VERSION

XSLDBG_VERSION_NUMBER=`expr $XSLDBG_MAJOR_VERSION \* 10000 + \
$XSLDBG_MINOR_VERSION \* 100 + $XSLDBG_MICRO_VERSION`
AC_SUBST(XSLDBG_MAJOR_VERSION)
AC_SUBST(XSLDBG_MINOR_VERSION)
AC_SUBST(XSLDBG_MICRO_VERSION)
AC_SUBST(XSLDBG_VERSION)
AC_SUBST(XSLDBG_VERSION_INFO)
AC_SUBST(XSLDBG_VERSION_NUMBER)


dnl
dnl We must run xsldbg as a thread
dnl
AC_CHECK_HEADERS(pthread.h,
    AC_DEFINE(HAVE_PTHREAD)
    AVE_PTHREAD=1
    SE_XSLDBG_AS_THREAD=1
    AC_DEFINE(USE_XSLDBG_AS_THREAD),
    AC_MSG_ERROR(PThread library not found)
)
XSLDBG_INCLUDEDIR="`pwd`/kxsldbg/kxsldbgpart"

dnl Where is the xsldbg documentation stored
dnl
docs_macro=true
AC_ARG_ENABLE(docs_macro,
  [  --enable-docs-macro     Use a compiler macro to specify where documentation is (PREFIX/doc/xsldbg/)],
  [docs_macro=$enableval], [docs_macro="yes"])

if test "x$docs_macro" = "xyes"; then
       AC_DEFINE(USE_DOCS_MACRO, 1)
       if test "x$prefix" != "x"
       then
       AC_MSG_RESULT(xsldbg will look for installed documentation in ${prefix}/doc/xsldbg)
       else
       AC_MSG_RESULT(xsldbg will look for installed documentation in ${ac_default_prefix}doc/xsldbg/)
       fi
       DOCS_PATH="${prefix}/doc/xsldbg"
AC_SUBST(DOCS_PATH)

else
       AC_MSG_RESULT(

       !!Warning!! Using a environment variable for specifiying location of documentation.
       On non risc os systems :  XSLDBG_DOCS_DIR
       On risc os systems : XSLDebugDocs\$Dir
       See --enable-docs-macro in ./configure
       )
fi


dnl include extra debugging for xsldbg?
AC_ARG_ENABLE([xsldbg-debugging], 
              [  --enable-xsldbg-debugging     Do you want to enable lots of debugging messages in xsldbg (no)], [do_xsldbg_debugging=$enableval], [do_xsldbg_debugging="no"])

if test "x$do_xsldbg_debugging" = "xyes"; then
   AC_DEFINE(WITH_XSLDBG_DEBUG)
   AC_MSG_RESULT(Enabling lots of debug messages in xsldbg)
fi




AC_MSG_RESULT(Using xsldbg as a part of kxsldbg)

dnl
dnl Check for readline and history
dnl
XSLDBG_EXTRA_LIBS=""
dnl AC_CHECK_HEADERS(readline/readline.h, [
dnl        AC_DEFINE(HAVE_READLINE)
dnl        XSLDBG_EXTRA_LIBS="-lreadline -lncurses"])
dnl AC_CHECK_HEADER(readline/history.h, [
dnl         AC_DEFINE(HAVE_HISTORY)
dnl        XSLDBG_EXTRA_LIBS="$XSLDBG_EXTRA_LIBS -lhistory"])

AC_SUBST(XSLDBG_INCLUDEDIR)
AC_SUBST(XSLDBG_EXTRA_LIBS)
XSLDBG_CFLAGS="-I${XSLDBG_INCLUDEDIR} ${LIBXSLT_CFLAGS} "
AC_SUBST(XSLDBG_CFLAGS)
AC_SUBST(XSLDBG_PREFIX)