1dnl Script taken from cppunit
2dnl
3dnl Process this file with autoconf to produce a configure script.
4AC_INIT(Makefile.am)
5
6# autoconf 2.50 or higher to rebuild aclocal.m4, because the
7# AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro.
8AC_PREREQ(2.53)
9
10# Making releases:
11#   ULXMLRPCPP_MINOR_VERSION += 1; ==> Major changes
12#   ULXMLRPCPP_PATCH_VERSION += 1; ==> Minor changes
13#
14#   ULXMLRPCPP_MICRO_VERSION += 1; ==> take older branches into account!!
15#   ULXMLRPCPP_INTERFACE_AGE += 1;
16#   ULXMLRPCPP_BINARY_AGE    += 1;
17#
18# if any functions have been added, set ULXMLRPCPP_INTERFACE_AGE to 0.
19# if backwards compatibility has been broken, set ULXMLRPCPP_BINARY_AGE and ULXMLRPCPP_INTERFACE_AGE to 0.
20#
21ULXMLRPCPP_MAJOR_VERSION=1
22ULXMLRPCPP_MINOR_VERSION=7
23ULXMLRPCPP_PATCH_VERSION=5
24
25ULXMLRPCPP_MICRO_VERSION=25
26ULXMLRPCPP_INTERFACE_AGE=1
27ULXMLRPCPP_BINARY_AGE=1
28ULXMLRPCPP_VERSION=$ULXMLRPCPP_MAJOR_VERSION.$ULXMLRPCPP_MINOR_VERSION.$ULXMLRPCPP_PATCH_VERSION
29
30AC_SUBST(ULXMLRPCPP_MAJOR_VERSION)
31AC_SUBST(ULXMLRPCPP_MINOR_VERSION)
32AC_SUBST(ULXMLRPCPP_MICRO_VERSION)
33AC_SUBST(ULXMLRPCPP_INTERFACE_AGE)
34AC_SUBST(ULXMLRPCPP_BINARY_AGE)
35AC_SUBST(ULXMLRPCPP_VERSION)
36
37# libtool versioning
38ULXMLRPCPP_LT_RELEASE=$ULXMLRPCPP_MAJOR_VERSION.$ULXMLRPCPP_MINOR_VERSION
39ULXMLRPCPP_LT_CURRENT=`expr $ULXMLRPCPP_MICRO_VERSION - $ULXMLRPCPP_INTERFACE_AGE`
40ULXMLRPCPP_LT_REVISION=$ULXMLRPCPP_INTERFACE_AGE
41ULXMLRPCPP_LT_AGE=`expr $ULXMLRPCPP_BINARY_AGE - $ULXMLRPCPP_INTERFACE_AGE`
42
43AC_SUBST(ULXMLRPCPP_LT_RELEASE)
44AC_SUBST(ULXMLRPCPP_LT_CURRENT)
45AC_SUBST(ULXMLRPCPP_LT_REVISION)
46AC_SUBST(ULXMLRPCPP_LT_AGE)
47
48AC_CONFIG_AUX_DIR(config)
49AM_CONFIG_HEADER(config.h)
50AM_INIT_AUTOMAKE(ulxmlrpcpp, $ULXMLRPCPP_VERSION)
51
52AC_SUBST(all_includes)
53AC_SUBST(all_libraries)
54
55# ----------------------------------------------------------------------------
56
57# Checks for typedefs, structures, and compiler characteristics.
58AC_HEADER_STDBOOL
59AC_C_CONST
60AC_C_INLINE
61AC_TYPE_SIZE_T
62AC_HEADER_TIME
63AC_STRUCT_TM
64
65dnl Checks for programs.
66AC_PROG_MAKE_SET
67AC_PROG_INSTALL
68AC_PROG_YACC
69AC_PROG_CC
70AC_PROG_CPP
71AM_PROG_LEX
72AC_PROG_INSTALL
73AC_PROG_LN_S
74
75# The libtool macro AC_PROG_LIBTOOL checks for the C preprocessor.
76# Configure gets confused if we try to check for a C preprocessor
77# without first checking for the C compiler
78# (see http://sources.redhat.com/ml/autoconf/2001-07/msg00036.html),
79# so we invoke AC_PROG_CC explicitly.
80AC_PROG_CC
81AC_PROG_CXX
82AC_LANG(C++)
83
84AC_LIBTOOL_DLOPEN
85AC_PROG_LIBTOOL
86AC_SUBST(LIBTOOL_DEPS)
87
88EA_EXTRA_LIB=""
89EA_EXTRA_INC=""
90
91# ----------------------------------------------------------------------------
92
93AC_DEFUN([EA_CHECK_WSTRING],
94[
95
96AC_MSG_CHECKING([for std::wstring])
97dnl AC_LANG([C++])
98
99cat > conftest.$ac_ext <<EOF
100#include <string>
101int main()
102{
103  std::wstring s;
104}
105EOF
106
107ac_compile_link='${CXX} $CXXFLAGS $all_includes $all_libraries $CPPFLAGS conftest.$ac_ext'
108if AC_TRY_EVAL(ac_compile_link); then
109  AC_MSG_RESULT(yes)
110  AC_DEFINE(HAVE_WSTRING, 1, [Define if you have the std::wstring type.])
111else
112  AC_MSG_RESULT(no)
113fi
114
115AC_SUBST(HAVE_WSTRING)
116dnl AC_LANG_POP([])
117])
118
119# ----------------------------------------------------------------------------
120
121AC_DEFUN([EA_ENABLE_UNICODE],
122[
123AC_ARG_ENABLE(unicode, [  --enable-unicode        generate library with wchar_t/std::wstring instead of char/std::string])
124
125if test x$enable_unicode = xyes; then
126  echo "*******************************************************"
127  echo "**  Compiling for unicode environment"
128  echo "*******************************************************"
129  AC_DEFINE(ULXR_UNICODE, 1, [Define to compile for unicode environment.])
130else
131  echo "*******************************************************"
132  echo "**  Compiling for non-unicode environment"
133  echo "*******************************************************"
134  AH_TEMPLATE([ULXR_UNICODE],
135   [Define to compile for unicode environment.])
136fi
137  AC_DEFINE(ULXR_UNICODE_ONLY_HELPERS, 1, [Define to compile only the unicode helper methods.])
138])
139
140# ----------------------------------------------------------------------------
141
142AC_DEFUN([EA_ENABLE_LOG4J],
143[
144AC_ARG_ENABLE(log4j, [  --enable-log4j        log to log4j logging host instead of stdout])
145
146if test x$enable_log4j = xyes; then
147  echo "*******************************************************"
148  echo "**  Logging to log4j logging host enabled"
149  echo "*******************************************************"
150  AC_DEFINE(ULXR_LOG4J, 1, [Define to use log4j logging host.])
151else
152  echo "*******************************************************"
153  echo "**  Logging to log4j logging host not enabled"
154  echo "*******************************************************"
155  AH_TEMPLATE([ULXR_LOG4J],
156   [Define to use log4j logging host.])
157fi
158])
159
160# ----------------------------------------------------------------------------
161
162AC_DEFUN([EA_ENABLE_EPOLL],
163[
164AC_ARG_ENABLE(epoll, [  --enable-epoll        enable usage of epoll() system call])
165
166if test x$enable_epoll = xyes; then
167  echo "*******************************************************"
168  echo "**  Using epoll() system call if available"
169  echo "*******************************************************"
170  AC_DEFINE(ULXR_USE_EPOLL, 1, [Define to use epoll() if available.])
171else
172  echo "*******************************************************"
173  echo "**  Never using epoll() system call"
174  echo "*******************************************************"
175  AH_TEMPLATE([ULXR_USE_EPOLL],
176   [Define to use epoll() if available.])
177fi
178])
179
180# ----------------------------------------------------------------------------
181
182dnl ULXMLRPCPP_val='ULXMLRPCPP_HAVE_RTTI'
183dnl AC_ARG_ENABLE(typeinfo-name,
184dnl [  --disable-typeinfo-name disable use of RTTI for class names],
185dnl [
186dnl     test x$enableval = 'xno' && ULXMLRPCPP_val='0'
187dnl ])
188
189dnl ------------------------------------------------------------------------
190dnl Find a file (or one of more files in a list of dirs)
191dnl params: filename path result(NO = none)
192dnl ------------------------------------------------------------------------
193dnl
194AC_DEFUN([EA_FIND_FILE],
195[
196MYPATH=`echo $2 | sed s/\:/\ /g`
197$3=NO
198$4=NO
199for i in $MYPATH;
200do
201  for j in $1;
202  do
203    echo "configure: __oline__: $i/$j" >&AS_MESSAGE_LOG_FD()
204    for f in $i/$j;
205    do
206      if test -r $f; then
207        echo "taking that" >&AS_MESSAGE_LOG_FD()
208        $3=$i
209        $4=`basename $f`
210        break 3
211      fi
212    done
213  done
214done
215])
216
217# ----------------------------------------------------------------------------
218
219AC_DEFUN([EA_CHECK_LIBEXPAT],
220[
221
222# "Unusual" places for expat
223expat_inc_dirs="/usr/local/include"
224expat_lib_dirs="/usr/local/lib"
225
226AC_CHECK_HEADERS(expat.h)
227
228if test "$ac_cv_header_expat_h" != "yes"; then
229  echo "checking for expat.h at unusual places: $expat_inc_dirs"
230  EA_FIND_FILE(expat.h, $expat_inc_dirs, expat_inc, dummy)
231  if test x$expat_inc != xNO; then
232    echo "found expat.h at $expat_inc"
233    EA_EXTRA_INC="$EA_EXTRA_INC -I$expat_inc"
234  else
235    echo "*******************************************************"
236    echo "***  expat.h not found."
237    echo "***  Download expat from http://expat.sourceforge.net"
238    echo "********************************************************"
239    exit 1
240  fi
241fi
242
243AC_CHECK_LIB(expat, XML_ParserCreate, [
244 LIBEXPAT="-lexpat"
245 ac_cv_have_expat=yes
246])
247
248if test "$ac_cv_have_expat" != "yes"; then
249  echo "checking for libexpat.so* at unusual places: $expat_lib_dirs"
250  EA_FIND_FILE(libexpat.so*, $expat_lib_dirs, expat_lib, expat_name)
251  if test x$expat_lib != xNO; then
252    echo "found libexpat.so* as $expat_name at $expat_lib"
253    LIBEXPAT="-lexpat"
254    EA_EXTRA_LIB="$EA_EXTRA_LIB -L$expat_lib"
255  else
256    echo "*******************************************************"
257    echo "***  libexpat.so* not found."
258    echo "***  Download expat from http://expat.sourceforge.net"
259    echo "********************************************************"
260    exit 1
261  fi
262fi
263
264AC_SUBST(LIBEXPAT)
265])
266
267# ----------------------------------------------------------------------------
268
269AC_DEFUN([EA_CHECK_PTHREAD],
270[
271
272ACX_PTHREAD(ac_cv_have_pthread=yes,
273            ac_cv_have_pthread=no)
274LIBPTHREAD="$PTHREAD_LIBS"
275CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
276CC="$PTHREAD_CC"
277
278if test "$ac_cv_have_pthread" != "yes"; then
279  echo "*******************************************************"
280  echo "***  pthread not found."
281  echo "***  multithreaded features are not compiled."
282  echo "********************************************************"
283  AH_TEMPLATE([ULXR_MULTITHREADED],
284    [Define if you have a multithreaded environment.])
285else
286  echo "*******************************************************"
287  echo "***  gthread/pthread found"
288  echo "********************************************************"
289  AC_DEFINE(ULXR_MULTITHREADED, 1,
290    [Define if you have a multithreaded environment.])
291fi
292
293AC_SUBST(LIBPTHREAD)
294])
295
296
297# ----------------------------------------------------------------------------
298
299AC_DEFUN([EA_CHECK_SSL],
300[
301AC_CHECK_HEADERS(openssl/ssl.h)
302
303LIBSSL=""
304
305AC_CHECK_LIB(crypto, main, [
306LIBSSL="-lcrypto"
307])
308
309AC_CHECK_LIB(ssl, SSL_read, [
310LIBSSL="$LIBSSL -lssl"
311ac_cv_have_ssl=yes
312],,"$LIBSSL")
313
314
315if test "$ac_cv_have_ssl" != "yes"; then
316  echo "*******************************************************"
317  echo "***  ssl (OpenSSL) NOT found."
318  echo "***  Ignoring siliently"
319  echo "********************************************************"
320
321  AH_TEMPLATE([ULXR_INCLUDE_SSL_STUFF],
322   [Define to compile with ssl support.])
323
324else
325  echo "*******************************************************"
326  echo "***  ssl (OpenSSL) found."
327  echo "********************************************************"
328  AC_DEFINE(ULXR_INCLUDE_SSL_STUFF, 1, [Define to compile with ssl support.])
329  dnl should fix RedHat problem
330  EA_EXTRA_INC="$EA_EXTRA_INC -I/usr/include/kerberos/"
331  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], [[unsigned x = SSL_ERROR_WANT_ACCEPT; ]])],[AC_DEFINE(ULXR_HAVE_SSL_ERROR_WANT_ACCEPT, 1, Define if your ssl has SSL_ERROR_WANT_ACCEPT)
332  ],[])
333fi
334
335AC_SUBST(LIBSSL)
336])
337
338
339# ----------------------------------------------------------------------------
340
341# ----------------------------------------------------------------------------
342
343AC_DEFUN([EA_CHECK_SOCKET],
344[
345AC_CHECK_HEADERS(sys/socket.h)
346dnl contained in libc by default
347LIBSOCKET=""
348AC_CHECK_LIB(socket, socket, [
349dnl for Solaris
350LIBSOCKET="-lsocket"
351ac_cv_have_socket=yes
352])
353
354AC_SUBST(LIBSOCKET)
355])
356
357# ----------------------------------------------------------------------------
358
359AC_CHECK_LIB(pthread, pthread_join, [
360EA_LIB_PTHREAD="-lpthread"
361])
362
363AC_DEFUN([EA_CHECK_STRCASECMP],
364[
365AC_CHECK_LIB(c, strcasecmp, [
366ac_cv_have_strcasecmp=yes
367AC_DEFINE(HAVE_STRCASECMP, 1, [Define if you have strcasecmp])
368])
369])
370
371# ----------------------------------------------------------------------------
372
373AC_DEFUN([EA_ENABLE_DOXYGEN],
374[
375AC_ARG_ENABLE(doxygen, [  --enable-doxygen        enable documentation generation with doxygen (auto)])
376AC_ARG_ENABLE(dot, [  --enable-dot            use 'dot' to generate graphs in doxygen (auto)])
377AC_ARG_ENABLE(html-docs, [  --enable-html-docs      enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
378AC_ARG_ENABLE(latex-docs, [  --enable-latex-docs     enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
379
380if test "x$enable_doxygen" = xno; then
381        enable_doc=no
382else
383        AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
384        if test x$DOXYGEN = x; then
385                if test "x$enable_doxygen" = xyes; then
386                        AC_MSG_ERROR([could not find doxygen])
387                fi
388                enable_doc=no
389        else
390                enable_doc=yes
391                AC_PATH_PROG(DOT, dot, , $PATH)
392        fi
393fi
394
395AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
396
397if test x$DOT = x; then
398        if test "x$enable_dot" = xyes; then
399                AC_MSG_ERROR([could not find dot])
400        fi
401        enable_dot=no
402else
403        enable_dot=yes
404fi
405
406AC_SUBST(enable_dot)
407AC_SUBST(enable_html_docs)
408AC_SUBST(enable_latex_docs)
409])
410
411# ----------------------------------------------------------------------------
412
413ULXR_FQDN=`hostname -f`
414AC_SUBST(ULXR_FQDN)
415
416dnl ------------------------------------------------------------------------
417
418possible_paths="${HOME}/Documents/src/ups/trunk/bin/fop-0.93 ${PATH}"
419EA_FIND_FILE("fop", $possible_paths, fop_path, fop_bin)
420if test x$fop_path != xNO; then
421  FOP=$fop_path/$fop_bin
422  echo "** $FOP"
423else
424  FOP=fop
425  echo "*******************************************************"
426  echo "***  fop processor not found."
427  echo "********************************************************"
428fi
429
430AC_SUBST(FOP)
431
432dnl ------------------------------------------------------------------------
433
434possible_paths="${PATH}"
435EA_FIND_FILE("pngcrush", $possible_paths, pngcrush_path, pngcrush_bin)
436if test x$pngcrush_path != xNO; then
437  PNGCRUSH=$pngcrush_path/$pngcrush_bin
438  echo "** $PNGCRUSH"
439else
440  PNGCRUSH=pngcrush
441  echo "*******************************************************"
442  echo "***  pngcrush not found."
443  echo "********************************************************"
444fi
445
446AC_SUBST(PNGCRUSH)
447
448# ----------------------------------------------------------------------------
449
450AC_PATH_PROG(BZIP2, bzip2, , $PATH)
451if test x$BZIP2 = x; then
452   echo "********************************************************"
453   echo "**  bzip2 not found, existing gzip is assumed instead"
454   echo "********************************************************"
455   ZIPPER=gzip
456   ZIPPER_EXT=gz
457else
458   ZIPPER=bzip2
459   ZIPPER_EXT=bz2
460fi
461AC_SUBST(ZIPPER)
462AC_SUBST(ZIPPER_EXT)
463
464# ----------------------------------------------------------------------------
465
466AC_DEFUN([EA_ENABLE_DOXYGEN],[
467AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
468if test x$DOXYGEN = x; then
469  DOXYGEN=doxygen
470  echo "*******************************************************"
471  echo "***  doxygen not found."
472  echo "********************************************************"
473fi
474
475AC_SUBST(DOXYGEN)
476
477AC_PATH_PROG(DOT, dot, , $PATH)
478if ! test x$DOT = x; then
479  DOT_PATH=`dirname $DOT`
480  HAVE_DOT=yes
481else
482  DOT_PATH=/usr/bin
483  echo "*******************************************************"
484  echo "***  dot not found."
485  echo "********************************************************"
486  HAVE_DOT=no
487fi
488
489AC_SUBST(DOT_PATH)
490AC_SUBST(DOT)
491AC_SUBST(HAVE_DOT)
492])
493
494dnl ------------------------------------------------------------------------
495
496AC_DEFUN([EA_ENABLE_DOCBOOK],[
497possible_paths="/usr/bin /usr/local/bin"
498EA_FIND_FILE("xsltproc xmlto", $possible_paths, xsltproc_path, xsltproc_bin)
499if test x$xsltproc_path != xNO; then
500  XSLTPROC=$xsltproc_path/$xsltproc_bin
501  echo "** $XSLTPROC"
502else
503  XSLTPROC=xsltproc
504  echo "*******************************************************"
505  echo "***  xsl processor not found."
506  echo "********************************************************"
507fi
508
509AC_SUBST(XSLTPROC)
510
511])
512
513# ----------------------------------------------------------------------------
514
515AC_DEFUN([AC_C_BIGENDIAN_CROSS],
516[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
517[ac_cv_c_bigendian=unknown
518# See if sys/param.h defines the BYTE_ORDER macro.
519AC_TRY_COMPILE([#include <sys/types.h>
520#include <sys/param.h>], [
521#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
522 bogus endian macros
523#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
524AC_TRY_COMPILE([#include <sys/types.h>
525#include <sys/param.h>], [
526#if BYTE_ORDER != BIG_ENDIAN
527 not big endian
528#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
529if test $ac_cv_c_bigendian = unknown; then
530AC_TRY_RUN([main () {
531  /* Are we little or big endian?  From Harbison&Steele.  */
532  union
533  {
534    long l;
535    char c[sizeof (long)];
536  } u;
537  u.l = 1;
538  exit (u.c[sizeof (long) - 1] == 1);
539}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
540[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
541fi])
542if test $ac_cv_c_bigendian = unknown; then
543AC_MSG_CHECKING(to probe for byte ordering)
544[
545cat >conftest.c <<EOF
546short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
547short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
548void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
549short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
550short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
551void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
552int main() { _ascii (); _ebcdic (); return 0; }
553EOF
554] if test -f conftest.c ; then
555     if ${CC-cc} -c conftest.c -o conftest.o && test -f conftest.o ; then
556        if test `grep -l BIGenDianSyS conftest.o` ; then
557           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
558           ac_cv_c_bigendian=yes
559        fi
560        if test `grep -l LiTTleEnDian conftest.o` ; then
561           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
562           if test $ac_cv_c_bigendian = yes ; then
563            ac_cv_c_bigendian=unknown;
564           else
565            ac_cv_c_bigendian=no
566           fi
567        fi
568        echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
569     fi
570  fi
571AC_MSG_RESULT($ac_cv_c_bigendian)
572fi
573if test $ac_cv_c_bigendian = yes; then
574  AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
575  BYTEORDER=4321
576else
577  BYTEORDER=1234
578fi
579AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
580if test $ac_cv_c_bigendian = unknown; then
581  AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
582fi
583])
584
585# ----------------------------------------------------------------------------
586
587EA_ENABLE_EPOLL
588EA_ENABLE_DOCBOOK
589EA_ENABLE_DOXYGEN
590EA_CHECK_WSTRING
591EA_ENABLE_UNICODE
592EA_ENABLE_LOG4J
593EA_CHECK_LIBEXPAT
594EA_CHECK_SOCKET
595EA_CHECK_STRCASECMP
596EA_CHECK_PTHREAD
597EA_ENABLE_DOXYGEN
598EA_CHECK_SSL
599
600AC_SUBST(EA_EXTRA_INC)
601AC_SUBST(EA_EXTRA_LIB)
602
603# Checks for header files.
604AC_HEADER_STDC
605AC_CHECK_HEADERS([arpa/inet.h \
606                  fcntl.h \
607                  netdb.h \
608                  netinet/in.h \
609                  stddef.h \
610                  stdlib.h \
611                  string.h \
612                  strings.h \
613                  sys/socket.h \
614                  sys/systeminfo.h \
615                  sys/time.h \
616                  sys/epoll.h \
617                  unistd.h \
618                  krb5.h \
619])
620
621# Checks for library functions.
622AC_C_BIGENDIAN_CROSS
623AC_FUNC_FORK
624AC_PROG_GCC_TRADITIONAL
625AC_FUNC_MALLOC
626AC_FUNC_MKTIME
627AC_FUNC_REALLOC
628AC_FUNC_SELECT_ARGTYPES
629AC_TYPE_SIGNAL
630AC_FUNC_STAT
631AC_FUNC_STRTOD
632AC_CHECK_FUNCS([gethostbyaddr gethostbyname gethostname gethost getnameinfo \
633                getaddrinfo\
634                memmove memset select socket strcasecmp strchr strdup \
635                strerror strtol sysinfo ctime_r ftime gettimeofday])
636
637AM_ICONV
638
639# ----------------------------------------------------------------------------
640
641AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdio>]], [[char *s; int len; std::sprintf(s, "%d", len );]])],[AC_DEFINE(HAVE_STD_SPRINTF, 1, Define if you have std::sprintf)
642],[])
643
644# ----------------------------------------------------------------------------
645
646AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <ctime>]], [[time_t tm; std::ctime(&tm);]])],[AC_DEFINE(HAVE_STD_CTIME, 1, Define if you have std:ctime)
647],[])
648
649# ----------------------------------------------------------------------------
650
651ULXR_VERSION_NUMBER=`printf "0x00%02x%02x%02x"  $ULXMLRPCPP_MAJOR_VERSION $ULXMLRPCPP_MINOR_VERSION $ULXMLRPCPP_PATCH_VERSION`
652AC_DEFINE_UNQUOTED(ULXR_VERSION_NUMBER, [$ULXR_VERSION_NUMBER], [version as long int])
653AC_SUBST(ULXR_VERSION_NUMBER)
654
655AH_VERBATIM([ULXR_DATADIR],
656[/* root directory for the built-in http server, primarily for non-gnu systems */
657#if !defined(ULXR_DATADIR)
658# define ULXR_DATADIR "c:\\ulxmlrpcpp"
659#endif])
660
661AH_VERBATIM([ULXR_VERSION],
662[# define ULXR_VERSION  VERSION
663])
664
665AH_VERBATIM([ULXMLRPCPP_VERSION],
666[# define ULXMLRPCPP_VERSION VERSION
667])
668
669AH_VERBATIM([ULXR_PACKAGE],
670[# define ULXR_PACKAGE  PACKAGE
671])
672
673AH_VERBATIM([ULXR_ENABLE_GET_PEERNAME],
674[# define ULXR_ENABLE_GET_PEERNAME 1
675])
676
677AH_TEMPLATE([ULXR_USE_INTRINSIC_VALUE_TYPES],
678[define if you want to automatically create Value()s from int, bool, ..])
679
680AH_TEMPLATE([ULXR_STRUCT_MEMBER_FROM_NAME_VALUE],
681[define if you want to create a Struct::Member like this: ("name" << value) ])
682
683AH_TEMPLATE([ULXR_NO_WSA_STARTUP],
684[define if WinSocket already started somewhere else.])
685
686AH_TEMPLATE([ULXR_OMIT_TCP_STUFF],
687[define if you want to omit tcp/ip and http stuff.])
688
689AH_TEMPLATE([ULXR_USE_WXSTRING],
690[use WxWindows strings instead of basic_string.])
691
692AH_TEMPLATE([ULXR_ENABLE_DNS_LOOKUP],
693[Call gethostbyaddr() to get host name. Default: use ip addr + port])
694
695AH_TEMPLATE([ULXR_DEBUG_OUTPUT],
696[debugging: show debug information.])
697
698AH_TEMPLATE([ULXR_SHOW_CONTENT],
699[debugging: show transfered data.])
700
701AH_TEMPLATE([ULXR_SHOW_HTTP],
702[debugging: show http header contents.])
703
704AH_TEMPLATE([ULXR_SHOW_WRITE],
705[debugging: show each written character.])
706
707AH_TEMPLATE([ULXR_SHOW_READ],
708[debugging: show each read characters.])
709
710AH_TEMPLATE([ULXR_SHOW_XML],
711[debugging: show xml data.])
712
713AH_TEMPLATE([DEBUG],
714[Define to turn debugging globally on.])
715
716AH_TEMPLATE([ULXR_REUSE_SOCKET],
717[Define to re-use a server socket (saves time while debugging).])
718
719# ----------------------------------------------------------------------------
720
721AC_OUTPUT(\
722  \
723  ulxmlrpcpp.doxygen
724  ulxmlrpcpp.pc
725  Makefile \
726  config/Makefile \
727  expat/Makefile \
728  stubber/Makefile \
729  stubber/ulxr2xml/Makefile \
730  stubber/xml2ulxr/Makefile \
731  stubber/xml2ulxr/orig-meth/Makefile \
732  stubber/xml2ulxr/new-meth/Makefile \
733  ulxmlrpcpp/Makefile \
734  \
735  rpm/Makefile \
736  rpm/ulxmlrpcpp-generic.spec \
737  rpm/fedora/Makefile \
738  \
739  bcb5/Makefile \
740  bcb5/libexpat/Makefile \
741  \
742  bcb6/Makefile \
743  bcb6/libexpat/Makefile \
744  \
745  contrib/Makefile \
746  contrib/java-demo/Makefile \
747  \
748  msvc/Makefile \
749  msvc/ulxmlrpcpp/Makefile \
750  msvc71/Makefile \
751  msvc71/ulxmlrpcpp/Makefile \
752  \
753  ulxmlrpcpp/contrib/Makefile \
754  ulxmlrpcpp/apps/Makefile \
755  ulxmlrpcpp/httpd/Makefile \
756  ulxmlrpcpp/po/Makefile \
757  ulxmlrpcpp/tests/Makefile \
758  ulxmlrpcpp/tests/foo-cert.pem \
759  ulxmlrpcpp/tests/stressing-server.sh \
760  ulxmlrpcpp/tests/stressing-client.sh \
761  ulxmlrpcpp/tests/contrib/Makefile \
762  ulxmlrpcpp/tests/contrib/ca-cert.pem \
763  ulxmlrpcpp/tests/contrib/nosignedcert.pem \
764  ulxmlrpcpp/tests/contrib/sessioncert.pem \
765  ulxmlrpcpp/tests/contrib/signedcert2.pem \
766  ulxmlrpcpp/tests/contrib/signedcerta.pem \
767  ulxmlrpcpp/tests/contrib/signedcert.pem \
768  \
769  ulxmlrpcpp/docs/Makefile \
770  ulxmlrpcpp/docs/api/Makefile \
771  ulxmlrpcpp/docs/en/Makefile \
772  ulxmlrpcpp/docs/en/img/Makefile \
773  ulxmlrpcpp/docs/en/common/Makefile \
774  ulxmlrpcpp/docs/en/images/Makefile \
775  ulxmlrpcpp/docs/en/images/callouts/Makefile \
776)
777