Logrunner is statically linked for easy deployment.
[gnucomo.git] / configure.in
1
2 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(src/gcm_input/message.h)
4 AM_INIT_AUTOMAKE(GnuCoMo, 0.0.10)
5
6
7 dnl Checks for programs.
8 AC_PROG_CC
9 AC_PROG_CXX
10 AC_PROG_CPP
11 AM_PROG_LEX
12 AC_PROG_INSTALL
13 AC_PROG_LN_S
14 AC_PROG_RANLIB
15 AC_PROG_YACC
16 AC_PROG_AWK
17
18 AC_PATH_PROG(XML_CONFIG,xml2-config,no)
19
20 if test $XML_CONFIG = "no"
21 then
22    echo "XML library not found (see http://xmlsoft.org/)."
23    exit 1;
24 fi
25
26
27 dnl Checks for libraries.
28 AC_PATH_XTRA
29
30 XML_CFLAGS=`$XML_CONFIG --cflags`
31 XML_LFLAGS=`$XML_CONFIG --libs`
32
33 LIBS="$LIBS $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS"
34 LIBS="$LIBS $XML_LFLAGS"
35 #LIBS="$LIBS -L/usr/local/lib $XML_LFLAGS"
36 CFLAGS="$CFLAGS $X_CFLAGS $XML_CFLAGS "
37 CXXFLAGS="$CXXFLAGS  -Wno-deprecated $X_CFLAGS $XML_CFLAGS"
38
39 AC_CHECK_LIB(AXE, main, , AC_MSG_ERROR(AXE Library is not installed))
40 #AC_CHECK_LIB(X11, XOpenDisplay)
41 #AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData)
42 #AC_CHECK_LIB(pthread, pthread_create)
43 AC_CHECK_LIB(xml2, xmlParseFile)
44
45 # PostgreSQL includes and libraries
46 with_postgres_include="-I/usr/include/pqxx"
47 AC_MSG_NOTICE([using PostgreSQL headers at $with_postgres_include])
48 with_postgres_lib="-lpqxx -lpq"
49 AC_MSG_NOTICE([using PostgreSQL libraries at $with_postgres_lib])
50
51 AC_SUBST(with_postgres_lib)
52 AC_SUBST(with_postgres_include)
53 POSTGRES_LIB="${with_postgres_lib}"
54 AC_SUBST(POSTGRES_LIB)
55 POSTGRES_INCLUDE="${with_postgres_include}"
56 AC_SUBST(POSTGRES_INCLUDE)
57
58
59 # Checks for libraries.
60 AC_CHECK_LIB([pq], [PQexec], [], [AC_MSG_ERROR([Failed to find a suitable libpq.
61
62 PostgreSQL's libpq needs to be installed.
63 Perhaps you need to specify --with-postgres-lib?
64 ])], -L${with_postgres_lib})
65
66
67 CXXFLAGS="$CXXFLAGS $POSTGRES_INCLUDE"
68 LIBS="$LIBS $POSTGRES_LIB"
69
70 #
71 #  There is no convenient way to detect libpqxx, so we'll
72 #  use fixed paths for the time being.
73
74 #CXXFLAGS="$CXXFLAGS -I/usr/local/pqxx/include"
75 #LIBS="$LIBS -L/usr/local/pqxx/lib -lpqxx"
76
77 dnl Checks for header files.
78 AC_HEADER_DIRENT
79 AC_HEADER_STDC
80 AC_CHECK_HEADERS(unistd.h)
81
82 dnl Checks for typedefs, structures, and compiler characteristics.
83 AC_C_CONST
84
85 dnl Checks for library functions.
86 AC_CHECK_FUNCS(strtod strtol strtoul)
87
88 dnl Edit this to be your web server's document root
89
90 DocumentRoot=/var/www/html
91
92 #AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile src/web/Makefile)
93 AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile test/Makefile)