[Box Backup-dev] COMMIT r296 - box/trunk/infrastructure/m4

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Mon Jan 2 00:53:10 GMT 2006


Author: martin
Date: 2006-01-02 00:53:08 +0000 (Mon, 02 Jan 2006)
New Revision: 296

Modified:
   box/trunk/infrastructure/m4/ax_path_bdb.m4
Log:
Try and bodge round the scary mess Berkeley DB has left us. This possible fix is for FreeBSD which fails to compile db.h

Modified: box/trunk/infrastructure/m4/ax_path_bdb.m4
===================================================================
--- box/trunk/infrastructure/m4/ax_path_bdb.m4	2005-12-31 14:04:39 UTC (rev 295)
+++ box/trunk/infrastructure/m4/ax_path_bdb.m4	2006-01-02 00:53:08 UTC (rev 296)
@@ -163,7 +163,11 @@
     AC_PREPROC_IFELSE([
       AC_LANG_SOURCE([[
 #include <db.h>
+#ifdef DB_VERSION_MAJOR
 AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+#else
+AX_PATH_BDB_STUFF 1,0,0
+#endif
       ]])
     ],[
       # Extract version from preprocessor output.
@@ -364,9 +368,14 @@
   (void) argv;
   db_version(&major,&minor,&patch);
   if (argc > 1)
+#ifdef DB_VERSION_MAJOR
     printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
   if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
       DB_VERSION_PATCH == patch)
+#else
+    printf("1.0.0\n");
+  if (major == 1)
+#endif
     return 0;
   else
     return 1;
@@ -424,9 +433,14 @@
   (void) argv;
   db_version(&major,&minor,&patch);
   if (argc > 1)
+#ifdef DB_VERSION_MAJOR
     printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
   if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
       DB_VERSION_PATCH == patch)
+#else
+    printf("1.0.0\n");
+  if (major == 1)
+#endif
     return 0;
   else
     return 1;
@@ -483,7 +497,11 @@
 {
   (void) argv;
   if (argc > 1)
+#ifdef DB_VERSION_MAJOR
     printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+#else
+    printf("1.0.0\n");
+#endif
   return 0;
 }
     ]])




More information about the Boxbackup-dev mailing list