tpop3d-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tpop3d-discuss] configure options for mysql


From: Kevin Bonner
Subject: [tpop3d-discuss] configure options for mysql
Date: Fri, 27 Dec 2002 19:30:51 -0500
User-agent: KMail/1.4.1

I am currently testing tpop3d 1.4.2 on a server with mysql RPM's installed.  I 
had a problem where the mysql libraries and headers were not installed in the 
proper locations for the configure script to detect them.  Instead of 
cluttering my system with symlinks, I decided to create a patch so that one 
can specify the location of the libraries and headers.  The defaults I chose 
will not change the way the configure script currently behaves (using 
/usr/include/mysql for includes and /usr/lib/mysql for libraries).  The 
following is an example of how to specify these options:

./configure --enable-auth-mysql --with-mysql-include-dir=/usr/include/mysql 
--with-mysql-lib-dir=/usr/lib

Below are patches for 1.4.2 and CVS versions.  For both, you need to run the 
bootstrap script so that it creates the configure script again.  Please let 
me know if there are any problems I may have overlooked.

Thanks,
Kevin Bonner

<1.4.2 patch>
diff -urN tpop3d-1.4.2.orig/configure.in tpop3d-1.4.2/configure.in
--- tpop3d-1.4.2.orig/configure.in      Thu Jun 27 16:08:46 2002
+++ tpop3d-1.4.2/configure.in   Fri Dec 27 19:00:57 2002
@@ -62,13 +62,21 @@
     [enable_auth_mysql=$enableval],
     [enable_auth_mysql="no"])
 
-AC_ARG_WITH(mysql-root,
-        [    --with-mysql-root=DIR     Set root of MySQL distribution used by 
auth_mysql.
-                              Should contain include/mysql/mysql.h and
-                              lib/mysql/libmysqlclient.so [default=/usr]
+AC_ARG_WITH(mysql-include-dir,
+        [  --with-mysql-include-dir=DIR     Set MySQL include directory
+                                   Should contain mysql.h
+                                   [default=/usr/include/mysql]
 ],
-    [mysql_root=$withval],
-    [mysql_root="/usr"])
+    [mysql_include_dir=$withval],
+    [mysql_include_dir="/usr/include/mysql"])
+
+AC_ARG_WITH(mysql-lib-dir,
+        [  --with-mysql-lib-dir=DIR         Set MySQL library directory
+                                   Should contain libmysqlclient.so
+                                   [default=/usr/lib/mysql]
+],
+    [mysql_lib_dir=$withval],
+    [mysql_lib_dir="/usr/lib/mysql"])
 
 AC_ARG_ENABLE(auth-ldap,
         [  --enable-auth-ldap      Enable authentication against an LDAP 
directory.
@@ -344,9 +352,9 @@
 dnl Set up stuff for auth-mysql.
 if test x"$enable_auth_mysql" = x"yes"
 then
-    LDFLAGS="$LDFLAGS -L$mysql_root/lib/mysql"
+    LDFLAGS="$LDFLAGS -L$mysql_lib_dir"
     dnl Also have to do CPPFLAGS, so that AC_CHECK_HEADER works...
-    CPPFLAGS="$CPPFLAGS -I$mysql_root/include/mysql"
+    CPPFLAGS="$CPPFLAGS -I$mysql_include_dir"
 fi
 
 dnl auth-ldap.
@@ -587,6 +595,7 @@
 fi
 
 AC_SUBST(ac_aux_dir)
-AC_SUBST(mysql_root)
+AC_SUBST(mysql_include_dir)
+AC_SUBST(mysql_lib_dir)
 
 AC_OUTPUT(Makefile init.d/Makefile config/Makefile)
</1.4.2 patch>



<CVS patch>
diff -urN tpop3d.orig/configure.in tpop3d/configure.in
--- tpop3d.orig/configure.in    Sun Nov 10 08:45:47 2002
+++ tpop3d/configure.in Fri Dec 27 19:09:24 2002
@@ -62,13 +62,21 @@
     [enable_auth_mysql=$enableval],
     [enable_auth_mysql="no"])
 
-AC_ARG_WITH(mysql-root,
-        [    --with-mysql-root=DIR     Set root of MySQL distribution used by 
auth_mysql.
-                              Should contain include/mysql/mysql.h and
-                              lib/mysql/libmysqlclient.so [default=/usr]
+AC_ARG_WITH(mysql-include-dir,
+        [  --with-mysql-include-dir=DIR     Set MySQL include directory
+                                   Should contain mysql.h
+                                   [default=/usr/include/mysql]
+],
+    [mysql_include_dir=$withval],
+    [mysql_include_dir="/usr/include/mysql"])
+
+AC_ARG_WITH(mysql-lib-dir,
+        [  --with-mysql-lib-dir=DIR         Set MySQL library directory
+                                   Should contain libmysqlclient.so
+                                   [default=/usr/lib/mysql]
 ],
-    [mysql_root=$withval],
-    [mysql_root="/usr"])
+    [mysql_lib_dir=$withval],
+    [mysql_lib_dir="/usr/lib/mysql"])
 
 AC_ARG_ENABLE(auth-ldap,
         [  --enable-auth-ldap      Enable authentication against an LDAP 
directory.
@@ -400,9 +408,9 @@
 dnl Set up stuff for auth-mysql.
 if test x"$enable_auth_mysql" = x"yes"
 then
-    LDFLAGS="$LDFLAGS -L$mysql_root/lib/mysql"
+    LDFLAGS="$LDFLAGS -L$mysql_lib_dir"
     dnl Also have to do CPPFLAGS, so that AC_CHECK_HEADER works...
-    CPPFLAGS="$CPPFLAGS -I$mysql_root/include/mysql"
+    CPPFLAGS="$CPPFLAGS -I$mysql_include_dir"
 fi
 
 dnl auth-ldap.
</CVS patch>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]