diff configure.ac @ 1464:969b90b1f2f9

Configuration detects proper header files for database dev libraries
author Adam Chlipala <adam@chlipala.net>
date Sun, 29 May 2011 13:31:53 -0400
parents 8524a1709821
children 3d0cc841cafd
line wrap: on
line diff
--- a/configure.ac	Sun May 29 12:44:31 2011 -0400
+++ b/configure.ac	Sun May 29 13:31:53 2011 -0400
@@ -57,11 +57,36 @@
 
 AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes)
 
+if test [-z $PGHEADER]; then
+   AC_CHECK_HEADERS([postgresql/libpq-fe.h],
+                    [PGHEADER=postgresql/libpq-fe.h])
+fi
+
+if test [-z $PGHEADER]; then
+   PGHEADER=libpq-fe.h
+fi
+
+if test [-z $MSHEADER]; then
+   AC_CHECK_HEADERS([mysql/mysql.h],
+                    [MSHEADER=mysql/mysql.h])
+fi
+
+if test [-z $MSHEADER]; then
+   MSHEADER=mysql.h
+fi
+
+if test [-z $SQHEADER]; then
+   SQHEADER=sqlite3.h
+fi
+
 AC_SUBST(BIN)
 AC_SUBST(LIB)
 AC_SUBST(INCLUDE)
 AC_SUBST(SITELISP)
 AC_SUBST(GCCARGS)
+AC_SUBST(PGHEADER)
+AC_SUBST(MSHEADER)
+AC_SUBST(SQHEADER)
 
 AC_CONFIG_FILES([
         Makefile
@@ -79,4 +104,7 @@
   include directory:   INCLUDE        $INCLUDE
   site-lisp directory: SITELISP       $SITELISP
   Extra GCC args:      GCCARGS        $GCCARGS  
+  Postgres C header:   PGHEADER       $PGHEADER
+  MySQL C header:      MSHEADER       $MSHEADER
+  SQLite C header:     SQHEADER       $SQHEADER
 EOF