[mapserver-commits] r12336 - in trunk/mapserver/mapcache: . src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:17:51 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:17:50 -0700 (Fri, 26 Aug 2011)
New Revision: 12336
Modified:
trunk/mapserver/mapcache/Makefile.inc.in
trunk/mapserver/mapcache/configure.in
trunk/mapserver/mapcache/src/lock.c
Log:
output supplied mimetype
thomas.bonfort | 2011-03-11 14:53:11 +0100 (Fri, 11 Mar 2011)
Modified: trunk/mapserver/mapcache/Makefile.inc.in
===================================================================
--- trunk/mapserver/mapcache/Makefile.inc.in 2011-08-26 11:17:46 UTC (rev 12335)
+++ trunk/mapserver/mapcache/Makefile.inc.in 2011-08-26 11:17:50 UTC (rev 12336)
@@ -42,7 +42,9 @@
CAIRO_LIB=@CAIRO_LIB@
CAIRO_ENABLED=@CAIRO_ENABLED@
-INCLUDES=-I../include $(CAIRO_ENABLED) $(CAIRO_INC) $(CURL_CFLAGS) $(PNG_INC) $(JPEG_INC) $(GDAL_INC) $(GDAL_ENABLED) $(APR_INC) $(APU_INC) $(MEMCACHE_ENABLED) $(PCRE_CFLAGS) $(PCRE_ENABLED)
+MISC_ENABLED=@MISC_ENABLED@
+
+INCLUDES=-I../include $(MISC_ENABLED) $(CAIRO_ENABLED) $(CAIRO_INC) $(CURL_CFLAGS) $(PNG_INC) $(JPEG_INC) $(GDAL_INC) $(GDAL_ENABLED) $(APR_INC) $(APU_INC) $(MEMCACHE_ENABLED) $(PCRE_CFLAGS) $(PCRE_ENABLED)
LIBS=$(CURL_LIBS) $(CAIRO_LIB) $(PNG_LIB) $(JPEG_LIB) $(GDAL_LIB) $(APR_LIBS) $(APU_LIBS) $(PCRE_LIBS)
Modified: trunk/mapserver/mapcache/configure.in
===================================================================
--- trunk/mapserver/mapcache/configure.in 2011-08-26 11:17:46 UTC (rev 12335)
+++ trunk/mapserver/mapcache/configure.in 2011-08-26 11:17:50 UTC (rev 12336)
@@ -20,6 +20,9 @@
TARGETS=
+
+AC_SUBST(MISC_ENABLED)
+
# macro that is used to parse a --with-apxs parameter
AC_DEFUN([APXS_CHECK],[
AC_SUBST(APXS)
@@ -552,14 +555,26 @@
AC_SUBST(JPEG_LIB,$JPEG_LIB)
])
+AC_DEFUN([LOCKMECH_CHECK],[
+ AC_ARG_WITH(lock_mechanism,
+ AC_HELP_STRING([--with-lock-mechanism=file|semaphore],[Specify the locking mechanism to use, either file based or posix-semaphore based.]),
+ ,with_lock_mechanism='file')
+ if test "x$with_lock_mechanism" = "xsemaphore"; then
+ AC_CHECK_HEADER([semaphore.h],,[AC_MSG_ERROR([cannot find semaphore.h])])
+ AC_CHECK_HEADER([fcntl.h],,[AC_MSG_ERROR([cannot find fcntl.h])])
+ MISC_ENABLED="-DUSE_SEMLOCK $MISC_ENABLED"
+ else
+ if test "x$with_lock_mechanism" != "xfile"; then
+ AC_MSG_ERROR([lock mechanism can only be one of (file) or (semaphore). got $with_lock_mechanism])
+ fi
+ fi
+])
DEBUG_CHECK
+LOCKMECH_CHECK
-AC_CHECK_HEADER([semaphore.h],,[AC_MSG_ERROR([cannot find semaphore.h])])
-AC_CHECK_HEADER([fcntl.h],,[AC_MSG_ERROR([cannot find fcntl.h])])
-
AC_ARG_ENABLE(module,
AC_HELP_STRING([--enable-module],[Enable apache module building]),
,
@@ -598,6 +613,8 @@
AC_SUBST(GDAL_INC,$GDAL_CFLAGS)
AC_SUBST(GDAL_LIB,$GDAL_LIBS)
+AC_SUBST(MISC_ENABLED,$MISC_ENABLED)
+
CURL_CHECK
# Write config.status and the Makefile
Modified: trunk/mapserver/mapcache/src/lock.c
===================================================================
--- trunk/mapserver/mapcache/src/lock.c 2011-08-26 11:17:46 UTC (rev 12335)
+++ trunk/mapserver/mapcache/src/lock.c 2011-08-26 11:17:50 UTC (rev 12336)
@@ -17,12 +17,14 @@
#include "geocache.h"
#include <apr_file_io.h>
#include <apr_strings.h>
+
+
+
+
+#ifdef USE_SEMLOCK
#include <semaphore.h>
#include <errno.h>
#include <fcntl.h>
-
-
-#ifdef USE_SEMLOCK
static const char *alphabet = "abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789"
More information about the mapserver-commits
mailing list