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)
7 dnl Checks for programs.
18 AC_PATH_PROG(XML_CONFIG,xml2-config,no)
20 if test $XML_CONFIG = "no"
22 echo "XML library not found (see http://xmlsoft.org/)."
27 dnl Checks for libraries.
30 XML_CFLAGS=`$XML_CONFIG --cflags`
31 XML_LFLAGS=`$XML_CONFIG --libs`
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"
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)
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])
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)
59 # Checks for libraries.
60 AC_CHECK_LIB([pq], [PQexec], [], [AC_MSG_ERROR([Failed to find a suitable libpq.
62 PostgreSQL's libpq needs to be installed.
63 Perhaps you need to specify --with-postgres-lib?
64 ])], -L${with_postgres_lib})
67 CXXFLAGS="$CXXFLAGS $POSTGRES_INCLUDE"
68 LIBS="$LIBS $POSTGRES_LIB"
71 # There is no convenient way to detect libpqxx, so we'll
72 # use fixed paths for the time being.
74 #CXXFLAGS="$CXXFLAGS -I/usr/local/pqxx/include"
75 #LIBS="$LIBS -L/usr/local/pqxx/lib -lpqxx"
77 dnl Checks for header files.
80 AC_CHECK_HEADERS(unistd.h)
82 dnl Checks for typedefs, structures, and compiler characteristics.
85 dnl Checks for library functions.
86 AC_CHECK_FUNCS(strtod strtol strtoul)
88 dnl Edit this to be your web server's document root
90 DocumentRoot=/var/www/html
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)