Added GRANTS in the database for the admin group.
[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 -L/usr/local/lib $XML_LFLAGS"
35 CFLAGS="$CFLAGS $X_CFLAGS $XML_CFLAGS "
36 CXXFLAGS="$CXXFLAGS  -Wno-deprecated $X_CFLAGS $XML_CFLAGS"
37
38 AC_CHECK_LIB(AXE, main, , AC_MSG_ERROR(AXE Library is not installed))
39 #AC_CHECK_LIB(X11, XOpenDisplay)
40 #AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData)
41 #AC_CHECK_LIB(pthread, pthread_create)
42 AC_CHECK_LIB(xml2, xmlParseFile)
43
44 # Find PostgreSQL includes and libraries
45 AC_PATH_PROGS(PG_CONFIG, pqxx-config)
46 if test -z "$PG_CONFIG" || test ! -r "$PG_CONFIG"; then
47         AC_MSG_ERROR([libpqxx configuration script was not found])
48 fi
49 with_postgres_include=`$PG_CONFIG --cflags`
50 AC_MSG_NOTICE([using PostgreSQL headers at $with_postgres_include])
51 with_postgres_lib=`$PG_CONFIG --libs`
52 AC_MSG_NOTICE([using PostgreSQL libraries at $with_postgres_lib])
53
54 AC_SUBST(with_postgres_lib)
55 AC_SUBST(with_postgres_include)
56 POSTGRES_LIB="${with_postgres_lib}"
57 AC_SUBST(POSTGRES_LIB)
58 POSTGRES_INCLUDE="${with_postgres_include}"
59 AC_SUBST(POSTGRES_INCLUDE)
60
61
62 # Checks for libraries.
63 AC_CHECK_LIB([pq], [PQexec], [], [AC_MSG_ERROR([Failed to find a suitable libpq.
64
65 PostgreSQL's libpq needs to be installed.
66 Perhaps you need to specify --with-postgres-lib?
67 ])], -L${with_postgres_lib})
68
69
70 CXXFLAGS="$CXXFLAGS $POSTGRES_INCLUDE"
71 LIBS="$LIBS $POSTGRES_LIB"
72
73 #
74 #  There is no convenient way to detect libpqxx, so we'll
75 #  use fixed paths for the time being.
76
77 CXXFLAGS="$CXXFLAGS -I/usr/local/pqxx/include"
78 LIBS="$LIBS -L/usr/local/pqxx/lib -lpqxx"
79
80 dnl Checks for header files.
81 AC_HEADER_DIRENT
82 AC_HEADER_STDC
83 AC_CHECK_HEADERS(unistd.h)
84
85 dnl Checks for typedefs, structures, and compiler characteristics.
86 AC_C_CONST
87
88 dnl Checks for library functions.
89 AC_CHECK_FUNCS(strtod strtol strtoul)
90
91 dnl Edit this to be your web server's document root
92
93 DocumentRoot=/var/www/html
94
95 #AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile src/web/Makefile)
96 AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile)