Updates from ddm4
authorBrian Aker <brian@tangent.org>
Mon, 24 Sep 2012 01:36:01 +0000 (21:36 -0400)
committerBrian Aker <brian@tangent.org>
Mon, 24 Sep 2012 01:36:01 +0000 (21:36 -0400)
25 files changed:
bootstrap.sh
configure.ac
libmemcached/csl/parser.cc
libmemcached/csl/scanner.cc
libmemcached/csl/scanner.h
m4/ax_assert.m4 [new file with mode: 0644]
m4/ax_compiler_version.m4
m4/ax_debug.m4 [new file with mode: 0644]
m4/ax_endian.m4 [new file with mode: 0644]
m4/ax_harden_compiler_flags.m4
m4/ax_hex_version.m4 [new file with mode: 0644]
m4/ax_prog_sphinx_build.m4 [new file with mode: 0644]
m4/ax_pthread_timedjoin_np.m4
m4/ax_uuid.m4 [new file with mode: 0644]
m4/ax_vcs_checkout.m4
m4/bottom.m4
m4/debug.m4 [deleted file]
m4/pandora_canonical.m4
m4/pandora_header_assert.m4 [deleted file]
m4/pandora_version.m4 [deleted file]
m4/pandora_warnings.m4 [deleted file]
m4/uuid.m4 [deleted file]
support/include.am
support/libmemcached-fc.spec.in [deleted file]
support/libmemcached.spec.in

index b8c45e5137d50fbd79ea0674094cbac6cd8bb744..eb16db255d8082fa3c9f867035f60e938c364270 100755 (executable)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-if test -n $MAKE; then 
+die() { echo "$@"; exit 1; }
+
+run() {
+  echo "\`$@' $ARGS"
+  $@ $ARGS
+} 
+
+if [ -d .git ]
+then
+  AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+elif [ -d .bzr ]
+then
+  AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+elif [ -d .svn ]
+then
+  AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+elif [ -d .hg ]
+then
+  AUTORECONF_FLAGS="--install --force --verbose -Wall -Werror"
+else
+  AUTORECONF_FLAGS="--install --force --verbose -Wall"
+fi
+
+LIBTOOLIZE_FLAGS="--force --verbose"
+
+if [ $(uname) = "Darwin" ]
+then
+  LIBTOOLIZE=glibtoolize
+elif [ -z "$LIBTOOLIZE" ]
+then 
+  LIBTOOLIZE=libtoolize
+fi
+
+AUTORECONF=autoreconf
+
+# Set ENV DEBUG in order to enable debugging
+if [ -n "$DEBUG" ]
+then 
+  DEBUG="--enable-debug"
+fi
+
+# Set ENV ASSERT in order to enable assert
+if [ -n "$ASSERT" ]
+then 
+  ASSERT="--enable-assert"
+fi
+
+# Set ENV MAKE in order to override "make"
+if [ -z "$MAKE" ]
+then 
   MAKE="make"
 fi
 
-if test -n $MAKE_J; then 
+# Set ENV MAKE_J in order to override "-j2"
+if [ -z "$MAKE_J" ]
+then
   MAKE_J="-j2"
 fi
 
-if test -f configure; then $MAKE $MAKE_J clean; $MAKE $MAKE_J merge-clean; $MAKE $MAKE_J distclean; fi;
+# Set ENV PREFIX in order to set --prefix for ./configure
+if [ -n "$PREFIX" ]
+then 
+  PREFIX="--prefix=$PREFIX"
+fi
+
+if [ -f Makefile ]
+then
+  $MAKE $MAKE_J distclean
+fi
+
+run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute $LIBTOOLIZE"
+run $AUTORECONF $AUTORECONF_FLAGS || die "Can't execute $AUTORECONF"
 
-rm -r -f autom4te.cache/ config.h config.log config.status configure
-./config/autorun.sh
-if [ $(uname) = "Darwin" ];
+# If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV
+if [ $(uname) = "Darwin" ]
 then
-  ./configure CC=clang CXX=clang++ --enable-assert
+  CC=clang CXX=clang++ ./configure $DEBUG $ASSERT $PREFIX || die "configure failed to run"
 else
-  ./configure --enable-assert
+  ./configure $DEBUG $ASSERT $PREFIX || die "configure failed to run"
 fi
 
-if test -z $JENKINS_URL; then 
-$MAKE $MAKE_J
+# Set ENV MAKE_TARGET in order to override default of "all"
+if [ -z "$MAKE_TARGET" ]
+then 
+  MAKE_TARGET="all"
 fi
+
+run $MAKE $MAKE_J $MAKE_TARGET || die "Can't execute make"
index e1b82ba6ac032fcaf61aea50a9a356c6b50a2b93..cb91cb13ae789fd245a56b9fcbfefd78bc56853c 100644 (file)
@@ -26,7 +26,7 @@ AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
 
 AC_CONFIG_SRCDIR([libmemcached/memcached.cc])
 
-PANDORA_CANONICAL_TARGET([no-vc-changelog])
+PANDORA_CANONICAL_TARGET
 AC_CHECK_PROGS([YACC], ['bison'], [:])
 AC_CHECK_PROGS([LEX], ['flex'], [:])
 
@@ -53,7 +53,7 @@ HASHKIT_LIBRARY_VERSION=2:0:0
 AC_SUBST(HASHKIT_LIBRARY_VERSION)
 
 LT_PREREQ([2.2])
-LT_INIT()
+LT_INIT
 LT_LANG([C++])
 LT_LANG([C])
 gl_VISIBILITY
@@ -70,12 +70,12 @@ m4_include([m4/memcached_sasl.m4])
 m4_include([m4/gearmand.m4])
 m4_include([m4/libgearman.m4])
 
-AM_CONDITIONAL(BUILDING_LIBMEMCACHED, true)
-AM_CONDITIONAL(HAVE_LIBMEMCACHED, false)
-AM_CONDITIONAL(HAVE_LIBDRIZZLE, false)
+AM_CONDITIONAL([BUILDING_LIBMEMCACHED], [true])
+AM_CONDITIONAL([HAVE_LIBMEMCACHED], [false])
+AM_CONDITIONAL([HAVE_LIBDRIZZLE], [false])
 AC_DEFINE([HAVE_LIBMEMCACHED], [1], [Enables libmemcached Support])
 
-AM_CONDITIONAL(BUILDING_GEARMAN, false)
+AM_CONDITIONAL([BUILDING_GEARMAN], [false])
 
 AC_SEARCH_LIBS(getopt_long, gnugetopt)
 AC_SEARCH_LIBS(gethostbyname, nsl)
@@ -92,6 +92,17 @@ ENABLE_MEMASLAP
 PROTOCOL_BINARY_TEST
 ENABLE_DEPRECATED
 
+# Checks for programs.
+AX_PROG_SPHINX_BUILD
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+
 AC_CHECK_FUNCS([alarm])
 AC_CHECK_FUNCS([clock_gettime])
 AC_CHECK_FUNCS([dup2])
@@ -180,13 +191,9 @@ dnl The sasl functions should only be visible if we build with sasl support
 dnl
 AS_IF([test "x$ac_enable_sasl" = "xyes"], [
        [ LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1" ]
-       ], [
-           [ LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0" ]
-           ])
+       ],[ LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0" ])
 AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT)
 
-AX_UUID_GENERATE_TIME_SAFE
-
 AC_CHECK_LIB([rt], [clock_gettime], 
              [
               RT_LIB="-lrt"
@@ -244,46 +251,24 @@ AS_IF(test "x$ac_cv_header_winsock2_h" = "xyes",
 SOCKET_SEND_FLAGS
 
 AX_CHECK_LIBRARY([LIBEVENT], [event.h], [event], 
-                 [
-                  LIBEVENT_LDFLAGS="-levent"
-                  ],
-                 [
-                  AC_MSG_WARN([Unable to find libevent])
-                  ])
+                 [LIBEVENT_LDFLAGS="-levent"],
+                 [AC_MSG_WARN([Unable to find libevent])])
 AM_CONDITIONAL(HAVE_LIBEVENT, test "x${ax_cv_have_LIBEVENT}" = "xyes")
 
-dnl Check if we're a little-endian or a big-endian system, needed by hash code
-AC_DEFUN([AC_C_ENDIAN],
-[AC_CACHE_CHECK(for endianness, ac_cv_c_endian,
-[
-  AC_RUN_IFELSE(
-    [AC_LANG_PROGRAM([], [dnl
-        long val = 1;
-        char *c = (char *) &val;
-        exit(*c == 1);
-    ])
-  ],[
-    ac_cv_c_endian=big
-  ],[
-    ac_cv_c_endian=little
-  ])
-])
-if test $ac_cv_c_endian = big; then
-  AC_DEFINE(ENDIAN_BIG, 1, [machine is bigendian])
-fi
-if test $ac_cv_c_endian = little; then
-  AC_DEFINE(ENDIAN_LITTLE, 1, [machine is littleendian])
-fi
-])
-
 AX_CHECK_SOCK_CLOEXEC([AC_DEFINE([HAVE_SOCK_CLOEXEC], [1], [Check for SOCK_CLOEXEC.])],
                        [AC_DEFINE([HAVE_SOCK_CLOEXEC], [0], [Check for SOCK_CLOEXEC.])])
 
-AX_PTHREAD(, [AC_MSG_ERROR(could not find libpthread)])
+AX_UUID_GENERATE_TIME_SAFE
+
 
-AX_HARDEN_CC_COMPILER_FLAGS
+AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])])
+AX_PTHREAD_TIMEDJOIN_NP
 
-AX_DEBUG
+AX_ENDIAN
+AX_HEX_VERSION
+AX_ASSERT
+AX_CXX_COMPILER_VERSION
+AX_HARDEN_COMPILER_FLAGS
 
 AC_CONFIG_FILES([
   Makefile
@@ -294,7 +279,6 @@ AC_CONFIG_FILES([
   libmemcached-2.0/configure.h
   support/libmemcached.pc
   support/libmemcached.spec
-  support/libmemcached-fc.spec
   ])
 AC_OUTPUT
 
index 0ff94b776926ae828b9d3b850d97e738f5c62adf..6653819bcf8aac96f5201c29b185af9d01bb2301 100644 (file)
@@ -1563,28 +1563,28 @@ yyreduce:
     {
         case 4:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 201 "libmemcached/csl/parser.yy"
     { }
     break;
 
   case 5:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 203 "libmemcached/csl/parser.yy"
     { }
     break;
 
   case 6:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 205 "libmemcached/csl/parser.yy"
     { }
     break;
 
   case 7:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 207 "libmemcached/csl/parser.yy"
     {
             context->set_end();
@@ -1594,7 +1594,7 @@ yyreduce:
 
   case 8:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 212 "libmemcached/csl/parser.yy"
     {
             context->rc= MEMCACHED_PARSE_USER_ERROR;
@@ -1604,7 +1604,7 @@ yyreduce:
 
   case 9:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 217 "libmemcached/csl/parser.yy"
     {
             memcached_reset(context->memc);
@@ -1613,7 +1613,7 @@ yyreduce:
 
   case 10:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 221 "libmemcached/csl/parser.yy"
     {
             yydebug= 1;
@@ -1622,7 +1622,7 @@ yyreduce:
 
   case 11:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 225 "libmemcached/csl/parser.yy"
     {
             if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS)
@@ -1634,7 +1634,7 @@ yyreduce:
 
   case 12:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 236 "libmemcached/csl/parser.yy"
     {
             if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number)))))
@@ -1649,7 +1649,7 @@ yyreduce:
 
   case 13:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 246 "libmemcached/csl/parser.yy"
     {
             if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number)))))
@@ -1664,7 +1664,7 @@ yyreduce:
 
   case 14:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 256 "libmemcached/csl/parser.yy"
     {
             if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, uint32_t((yyvsp[(3) - (3)].number)))))
@@ -1678,7 +1678,7 @@ yyreduce:
 
   case 15:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 265 "libmemcached/csl/parser.yy"
     {
             memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size);
@@ -1687,7 +1687,7 @@ yyreduce:
 
   case 16:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 269 "libmemcached/csl/parser.yy"
     {
             context->memc->configure.initial_pool_size= uint32_t((yyvsp[(2) - (2)].number));
@@ -1696,7 +1696,7 @@ yyreduce:
 
   case 17:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 273 "libmemcached/csl/parser.yy"
     {
             context->memc->configure.max_pool_size= uint32_t((yyvsp[(2) - (2)].number));
@@ -1705,7 +1705,7 @@ yyreduce:
 
   case 19:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 281 "libmemcached/csl/parser.yy"
     {
             if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL))
@@ -1722,7 +1722,7 @@ yyreduce:
 
   case 20:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 293 "libmemcached/csl/parser.yy"
     {
             memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true);
@@ -1731,7 +1731,7 @@ yyreduce:
 
   case 21:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 297 "libmemcached/csl/parser.yy"
     {
             // Check to see if DISTRIBUTION has already been set
@@ -1749,7 +1749,7 @@ yyreduce:
 
   case 22:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 310 "libmemcached/csl/parser.yy"
     {
             // Check to see if DISTRIBUTION has already been set
@@ -1767,7 +1767,7 @@ yyreduce:
 
   case 23:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 323 "libmemcached/csl/parser.yy"
     {
             if (context->set_hash((yyvsp[(2) - (2)].hash)) == false)
@@ -1779,7 +1779,7 @@ yyreduce:
 
   case 24:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 330 "libmemcached/csl/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS)
@@ -1791,7 +1791,7 @@ yyreduce:
 
   case 25:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 337 "libmemcached/csl/parser.yy"
     {
             if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS)
@@ -1805,7 +1805,7 @@ yyreduce:
 
   case 26:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 346 "libmemcached/csl/parser.yy"
     {
           }
@@ -1813,7 +1813,7 @@ yyreduce:
 
   case 27:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 352 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS;
@@ -1822,7 +1822,7 @@ yyreduce:
 
   case 28:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 356 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT;
@@ -1831,7 +1831,7 @@ yyreduce:
 
   case 29:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 360 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK;
@@ -1840,7 +1840,7 @@ yyreduce:
 
   case 30:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 364 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK;
@@ -1849,7 +1849,7 @@ yyreduce:
 
   case 31:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 368 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH;
@@ -1858,7 +1858,7 @@ yyreduce:
 
   case 32:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 372 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS;
@@ -1867,7 +1867,7 @@ yyreduce:
 
   case 33:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 376 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT;
@@ -1876,7 +1876,7 @@ yyreduce:
 
   case 34:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 380 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT;
@@ -1885,7 +1885,7 @@ yyreduce:
 
   case 35:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 384 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT;
@@ -1894,7 +1894,7 @@ yyreduce:
 
   case 36:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 388 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT;
@@ -1903,7 +1903,7 @@ yyreduce:
 
   case 37:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 392 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE;
@@ -1912,7 +1912,7 @@ yyreduce:
 
   case 38:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 396 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE;
@@ -1921,7 +1921,7 @@ yyreduce:
 
   case 39:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 403 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL;
@@ -1930,7 +1930,7 @@ yyreduce:
 
   case 40:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 407 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
@@ -1939,7 +1939,7 @@ yyreduce:
 
   case 41:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 411 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
@@ -1948,7 +1948,7 @@ yyreduce:
 
   case 42:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 415 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY;
@@ -1957,7 +1957,7 @@ yyreduce:
 
   case 43:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 419 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ;
@@ -1966,7 +1966,7 @@ yyreduce:
 
   case 44:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 423 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS;
@@ -1975,7 +1975,7 @@ yyreduce:
 
   case 45:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 427 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS;
@@ -1984,7 +1984,7 @@ yyreduce:
 
   case 46:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 431 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY;
@@ -1993,7 +1993,7 @@ yyreduce:
 
   case 47:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 435 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE;
@@ -2002,7 +2002,7 @@ yyreduce:
 
   case 48:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 439 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE;
@@ -2011,7 +2011,7 @@ yyreduce:
 
   case 49:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 443 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP;
@@ -2020,7 +2020,7 @@ yyreduce:
 
   case 50:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 447 "libmemcached/csl/parser.yy"
     {
             (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY;
@@ -2029,35 +2029,35 @@ yyreduce:
 
   case 51:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 453 "libmemcached/csl/parser.yy"
     { (yyval.number)= MEMCACHED_DEFAULT_PORT;}
     break;
 
   case 52:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 455 "libmemcached/csl/parser.yy"
     { }
     break;
 
   case 53:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 459 "libmemcached/csl/parser.yy"
     { (yyval.number)= 1; }
     break;
 
   case 54:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 461 "libmemcached/csl/parser.yy"
     { }
     break;
 
   case 55:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 466 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MD5;
@@ -2066,7 +2066,7 @@ yyreduce:
 
   case 56:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 470 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_CRC;
@@ -2075,7 +2075,7 @@ yyreduce:
 
   case 57:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 474 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_64;
@@ -2084,7 +2084,7 @@ yyreduce:
 
   case 58:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 478 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_64;
@@ -2093,7 +2093,7 @@ yyreduce:
 
   case 59:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 482 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1_32;
@@ -2102,7 +2102,7 @@ yyreduce:
 
   case 60:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 486 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_FNV1A_32;
@@ -2111,7 +2111,7 @@ yyreduce:
 
   case 61:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 490 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_HSIEH;
@@ -2120,7 +2120,7 @@ yyreduce:
 
   case 62:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 494 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_MURMUR;
@@ -2129,7 +2129,7 @@ yyreduce:
 
   case 63:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 498 "libmemcached/csl/parser.yy"
     {
             (yyval.hash)= MEMCACHED_HASH_JENKINS;
@@ -2138,7 +2138,7 @@ yyreduce:
 
   case 64:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 505 "libmemcached/csl/parser.yy"
     {
             (yyval.string)= (yyvsp[(1) - (1)].string);
@@ -2147,7 +2147,7 @@ yyreduce:
 
   case 65:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 509 "libmemcached/csl/parser.yy"
     {
             (yyval.string)= (yyvsp[(1) - (1)].string);
@@ -2156,7 +2156,7 @@ yyreduce:
 
   case 66:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 516 "libmemcached/csl/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT;
@@ -2165,7 +2165,7 @@ yyreduce:
 
   case 67:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 520 "libmemcached/csl/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA;
@@ -2174,7 +2174,7 @@ yyreduce:
 
   case 68:
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 524 "libmemcached/csl/parser.yy"
     {
             (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM;
@@ -2183,7 +2183,7 @@ yyreduce:
 
 
 
-/* Line 1821 of yacc.c  */
+/* Line 1806 of yacc.c  */
 #line 2188 "libmemcached/csl/parser.cc"
       default: break;
     }
index 15cd46d6d1017bef76877de56427255c926636d8..34adff2fbb555ae5336a05faaa0328e19cea542a 100644 (file)
@@ -77,7 +77,6 @@ typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
 #else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
@@ -201,11 +200,6 @@ typedef void* yyscan_t;
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
 #define EOB_ACT_CONTINUE_SCAN 0
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
@@ -228,6 +222,11 @@ typedef size_t yy_size_t;
 
 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
 
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
@@ -245,7 +244,7 @@ struct yy_buffer_state
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         */
-       yy_size_t yy_n_chars;
+       int yy_n_chars;
 
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
@@ -324,7 +323,7 @@ static void config__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanne
 
 YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
 YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
 void *config_alloc (yy_size_t ,yyscan_t yyscanner );
 void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -375,7 +374,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
  */
 #define YY_DO_BEFORE_ACTION \
        yyg->yytext_ptr = yy_bp; \
-       yyleng = (yy_size_t) (yy_cp - yy_bp); \
+       yyleng = (size_t) (yy_cp - yy_bp); \
        yyg->yy_hold_char = *yy_cp; \
        *yy_cp = '\0'; \
        yyg->yy_c_buf_p = yy_cp;
@@ -1103,7 +1102,7 @@ static yyconst flex_int16_t yy_chk[1815] =
 #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM)
 
 #define YY_NO_INPUT 1
-#line 1107 "libmemcached/csl/scanner.cc"
+#line 1106 "libmemcached/csl/scanner.cc"
 
 #define INITIAL 0
 
@@ -1132,8 +1131,8 @@ struct yyguts_t
     size_t yy_buffer_stack_max; /**< capacity of stack. */
     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
     char yy_hold_char;
-    yy_size_t yy_n_chars;
-    yy_size_t yyleng_r;
+    int yy_n_chars;
+    int yyleng_r;
     char *yy_c_buf_p;
     int yy_init;
     int yy_start;
@@ -1186,7 +1185,7 @@ FILE *config_get_out (yyscan_t yyscanner );
 
 void config_set_out  (FILE * out_str ,yyscan_t yyscanner );
 
-yy_size_t config_get_leng (yyscan_t yyscanner );
+int config_get_leng (yyscan_t yyscanner );
 
 char *config_get_text (yyscan_t yyscanner );
 
@@ -1194,6 +1193,10 @@ int config_get_lineno (yyscan_t yyscanner );
 
 void config_set_lineno (int line_number ,yyscan_t yyscanner );
 
+int config_get_column  (yyscan_t yyscanner );
+
+void config_set_column (int column_no ,yyscan_t yyscanner );
+
 YYSTYPE * config_get_lval (yyscan_t yyscanner );
 
 void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -1238,7 +1241,7 @@ static int input (yyscan_t yyscanner );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -1249,7 +1252,7 @@ static int input (yyscan_t yyscanner );
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               yy_size_t n; \
+               unsigned n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -1341,7 +1344,7 @@ YY_DECL
 
 
 
-#line 1345 "libmemcached/csl/scanner.cc"
+#line 1348 "libmemcached/csl/scanner.cc"
 
     yylval = yylval_param;
 
@@ -1784,7 +1787,7 @@ YY_RULE_SETUP
 #line 229 "libmemcached/csl/scanner.l"
 ECHO;
        YY_BREAK
-#line 1788 "libmemcached/csl/scanner.cc"
+#line 1791 "libmemcached/csl/scanner.cc"
 case YY_STATE_EOF(INITIAL):
        yyterminate();
 
@@ -1972,7 +1975,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
        else
                {
-                       yy_size_t num_to_read =
+                       int num_to_read =
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
                while ( num_to_read <= 0 )
@@ -1986,7 +1989,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                        if ( b->yy_is_our_buffer )
                                {
-                               yy_size_t new_size = b->yy_buf_size * 2;
+                               int new_size = b->yy_buf_size * 2;
 
                                if ( new_size <= 0 )
                                        b->yy_buf_size += b->yy_buf_size / 8;
@@ -2017,7 +2020,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                /* Read in more data. */
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
-                       yyg->yy_n_chars, num_to_read );
+                       yyg->yy_n_chars, (size_t) num_to_read );
 
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
                }
@@ -2143,7 +2146,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
                else
                        { /* need more input */
-                       yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+                       int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
                        ++yyg->yy_c_buf_p;
 
                        switch ( yy_get_next_buffer( yyscanner ) )
@@ -2167,7 +2170,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
                                case EOB_ACT_END_OF_FILE:
                                        {
                                        if ( config_wrap(yyscanner ) )
-                                               return 0;
+                                               return EOF;
 
                                        if ( ! yyg->yy_did_buffer_switch_on_eof )
                                                YY_NEW_FILE;
@@ -2425,7 +2428,7 @@ void config_pop_buffer_state (yyscan_t yyscanner)
  */
 static void config_ensure_buffer_stack (yyscan_t yyscanner)
 {
-       yy_size_t num_to_alloc;
+       int num_to_alloc;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
        if (!yyg->yy_buffer_stack) {
@@ -2523,11 +2526,12 @@ YY_BUFFER_STATE config__scan_string (yyconst char * yystr , yyscan_t yyscanner)
  * @param yyscanner The scanner object.
  * @return the newly allocated buffer state object.
  */
-YY_BUFFER_STATE config__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE config__scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
 {
        YY_BUFFER_STATE b;
        char *buf;
-       yy_size_t n, i;
+       yy_size_t n;
+       int i;
     
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = _yybytes_len + 2;
@@ -2637,7 +2641,7 @@ FILE *config_get_out  (yyscan_t yyscanner)
 /** Get the length of the current token.
  * @param yyscanner The scanner object.
  */
-yy_size_t config_get_leng  (yyscan_t yyscanner)
+int config_get_leng  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     return yyleng;
index 571360b2a6b5dc918d1547383b136950a2b7e300..34c5a3ac5c66dff3f5b2b6dddfa2bfa787169e0d 100644 (file)
@@ -81,7 +81,6 @@ typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
 #else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
@@ -192,7 +191,7 @@ struct yy_buffer_state
        /* Number of characters read into yy_ch_buf, not including EOB
         * characters.
         */
-       yy_size_t yy_n_chars;
+       int yy_n_chars;
 
        /* Whether we "own" the buffer - i.e., we know we created it,
         * and can realloc() it to grow it, and should free() it to
@@ -236,7 +235,7 @@ void config_pop_buffer_state (yyscan_t yyscanner );
 
 YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
 YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
-YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
 
 void *config_alloc (yy_size_t ,yyscan_t yyscanner );
 void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner );
@@ -291,7 +290,7 @@ FILE *config_get_out (yyscan_t yyscanner );
 
 void config_set_out  (FILE * out_str ,yyscan_t yyscanner );
 
-yy_size_t config_get_leng (yyscan_t yyscanner );
+int config_get_leng (yyscan_t yyscanner );
 
 char *config_get_text (yyscan_t yyscanner );
 
@@ -299,6 +298,10 @@ int config_get_lineno (yyscan_t yyscanner );
 
 void config_set_lineno (int line_number ,yyscan_t yyscanner );
 
+int config_get_column  (yyscan_t yyscanner );
+
+void config_set_column (int column_no ,yyscan_t yyscanner );
+
 YYSTYPE * config_get_lval (yyscan_t yyscanner );
 
 void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
@@ -367,6 +370,6 @@ extern int config_lex \
 #line 229 "libmemcached/csl/scanner.l"
 
 
-#line 371 "libmemcached/csl/scanner.h"
+#line 374 "libmemcached/csl/scanner.h"
 #undef config_IN_HEADER
 #endif /* config_HEADER_H */
diff --git a/m4/ax_assert.m4 b/m4/ax_assert.m4
new file mode 100644 (file)
index 0000000..7ee26d0
--- /dev/null
@@ -0,0 +1,63 @@
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_ASSERT
+#
+# DESCRIPTION
+#
+#   --enable-assert
+#
+# LICENSE
+#
+#  Copyright (C) 2012 Brian Aker
+#  All rights reserved.
+#  
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions are
+#  met:
+#  
+#      * Redistributions of source code must retain the above copyright
+#  notice, this list of conditions and the following disclaimer.
+#  
+#      * Redistributions in binary form must reproduce the above
+#  copyright notice, this list of conditions and the following disclaimer
+#  in the documentation and/or other materials provided with the
+#  distribution.
+#  
+#      * The names of its contributors may not be used to endorse or
+#  promote products derived from this software without specific prior
+#  written permission.
+#  
+#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#serial 1
+
+AC_DEFUN([AX_ASSERT],[
+    AC_ARG_ENABLE([assert],
+      [AS_HELP_STRING([--enable-assert],
+        [Add assert code/turns off optimizations (yes|no) @<:@default=no@:>@])],[
+      ax_enable_assert=yes
+      dnl enable assert()
+      AC_DEFINE(DASSERT,[1],[Define to 1 to enable assertging code.])
+      ],[
+      ax_enable_assert=no
+      AC_DEFINE(DASSERT,[0],[Define to 1 to enable assertging code.])
+      ])
+
+    AC_MSG_CHECKING([for assert])
+    AC_MSG_RESULT([$ax_enable_assert])
+    ])
+
index 7f6708d5dd8f2ad5007c28e1630e4a35d1aa41be..a277a9e7a7c12458da1782888a565f922a41c12a 100644 (file)
@@ -1,36 +1,80 @@
-AC_DEFUN([AX_C_COMPILER_VERSION],[
-
-    dnl Print version of C compiler
-    AC_MSG_CHECKING("C Compiler version--$GCC")
-    AS_IF([test "$GCC" = "yes"],[
-      CC_VERSION=`$CC --version | sed 1q` ],[
-      test "$SUNCC" = "yes"],[
-      CC_VERSION=`$CC -V 2>&1 | sed 1q` ],[
-      test "$CLANG" = "yes"],[
-      CC_VERSION=`$CC --version 2>&1 | sed 1q` ],[
-      CC_VERSION=""
-      ])
-    AC_MSG_RESULT("$CC_VERSION")
-    AC_SUBST(CC_VERSION)
-    ])
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_C_COMPILER_VERSION
+#   AX_CXX_COMPILER_VERSION
+#
+# DESCRIPTION
+#
+#   Capture version of C/C++ compiler
+#
+# LICENSE
+#
+#  Copyright (C) 2012 Brian Aker
+#  All rights reserved.
+#  
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions are
+#  met:
+#  
+#      * Redistributions of source code must retain the above copyright
+#  notice, this list of conditions and the following disclaimer.
+#  
+#      * Redistributions in binary form must reproduce the above
+#  copyright notice, this list of conditions and the following disclaimer
+#  in the documentation and/or other materials provided with the
+#  distribution.
+#  
+#      * The names of its contributors may not be used to endorse or
+#  promote products derived from this software without specific prior
+#  written permission.
+#  
+#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#serial 3
 
+  AC_DEFUN([AX_C_COMPILER_VERSION],[
+      AC_REQUIRE([AX_COMPILER_VENDOR])
+      AC_MSG_CHECKING("C Compiler version")
 
-AC_DEFUN([AX_CXX_COMPILER_VERSION], [
+      AC_CHECK_DECL([__GNUC_PATCHLEVEL__],[GNUCC="yes"], [GNUCC="no"])
+      AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"],[SUNCC="no"])
+      AC_CHECK_DECL([__ICC], [INTELCC="yes"],[INTELCC="no"])
+      AC_CHECK_DECL([__clang__], [CLANG="yes"],[CLANG="no"])
 
-    dnl Check C version while at it
-    AC_REQUIRE([AX_C_COMPILER_VERSION])
+      ax_cc_version=unknown
+      AS_IF([test "$ax_cc_version" = "unknown"],[AS_IF([test "$SUNCC" = "yes"],[ax_cc_version=`$CC -V 2>&1 | sed 1q`])])
+      AS_IF([test "$ax_cc_version" = "unknown"],[AS_IF([test "$CLANG" = "yes"],[ax_cc_version=`$CC --version 2>&1 | sed 1q` ])])
+      AS_IF([test "$ax_cc_version" = "unknown"],[AS_IF([test "$INTELCC" = "yes"],[ax_cc_version=`$CC --version 2>&1 | sed 1q` ])])
+      AS_IF([test "$ax_cc_version" = "unknown"],[AS_IF([test "$GNUCC" = "yes"],[ax_cc_version=`$CC --version | sed 1q` ])])
 
-    dnl Print version of CXX compiler
-    AC_MSG_CHECKING("C++ Compiler version")
-    AS_IF([test "$GCC" = "yes"],[
-      CXX_VERSION=`$CXX --version | sed 1q` ],[
-      test "$SUNCC" = "yes"],[
-      CXX_VERSION=`$CXX -V 2>&1 | sed 1q` ],[
-      test "$CLANG" = "yes"],[
-      CXX_VERSION=`$CXX --version 2>&1 | sed 1q` ],[
-      CXX_VERSION=""
+      AC_MSG_RESULT(["$ax_cc_version"])
+      AC_SUBST([CC_VERSION],["$ax_cc_version"])
       ])
-    AC_MSG_RESULT("$CXX_VERSION")
-    AC_SUBST(CXX_VERSION)
-  ])
 
+  AC_DEFUN([AX_CXX_COMPILER_VERSION], [
+      AC_REQUIRE([AX_C_COMPILER_VERSION])
+      AC_MSG_CHECKING("C++ Compiler version")
+
+      ax_cxx_version=unknown
+      AS_IF([test "$ax_cxx_version" = "unknown"],[AS_IF([test "$GNUCC" = "yes"],[ax_cxx_version=`$CXX --version | sed 1q`])])
+      AS_IF([test "$ax_cxx_version" = "unknown"],[AS_IF([test "$SUNCC" = "yes"],[ax_cxx_version=`$CXX -V 2>&1 | sed 1q`])])
+      AS_IF([test "$ax_cxx_version" = "unknown"],[AS_IF([test "$CLANG" = "yes"],[ax_cxx_version=`$CXX --version 2>&1 | sed 1q`])])
+      AS_IF([test "$ax_cxx_version" = "unknown"],[AS_IF([test "$INTELCC" = "yes"],[ax_cc_version=`$CCX --version 2>&1 | sed 1q` ])])
+
+      AC_MSG_RESULT(["$ax_cxx_version"])
+      AC_SUBST([CXX_VERSION], ["$ax_cxx_version"])
+      ])
diff --git a/m4/ax_debug.m4 b/m4/ax_debug.m4
new file mode 100644 (file)
index 0000000..2f78b71
--- /dev/null
@@ -0,0 +1,67 @@
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_DEBUG
+#
+# DESCRIPTION
+#
+#   --enable-debug
+#
+# LICENSE
+#
+#  Copyright (C) 2012 Brian Aker
+#  All rights reserved.
+#  
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that the following conditions are
+#  met:
+#  
+#      * Redistributions of source code must retain the above copyright
+#  notice, this list of conditions and the following disclaimer.
+#  
+#      * Redistributions in binary form must reproduce the above
+#  copyright notice, this list of conditions and the following disclaimer
+#  in the documentation and/or other materials provided with the
+#  distribution.
+#  
+#      * The names of its contributors may not be used to endorse or
+#  promote products derived from this software without specific prior
+#  written permission.
+#  
+#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#serial 1
+
+AC_DEFUN([AX_DEBUG],[
+    AC_ARG_ENABLE([debug],
+      [AS_HELP_STRING([--enable-debug],
+        [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],[
+      ax_enable_debug=yes
+      dnl Debugging. No optimization.
+      AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
+      AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
+      AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.])
+      ],[
+      ax_enable_debug=no
+      dnl Optimized version. No debug
+      AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
+      AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
+      AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.])
+      ])
+
+    AC_MSG_CHECKING([for debug])
+    AC_MSG_RESULT([$ax_enable_debug])
+    ])
diff --git a/m4/ax_endian.m4 b/m4/ax_endian.m4
new file mode 100644 (file)
index 0000000..ee23fbd
--- /dev/null
@@ -0,0 +1,35 @@
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_ENDIAN
+#
+# DESCRIPTION
+#
+#   Generate to defines describing endian.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 1
+AC_DEFUN([AX_ENDIAN],[
+    AC_C_BIGENDIAN([
+      AC_DEFINE([WORDS_BIGENDIAN],[1],[machine is big-endian])
+      AC_DEFINE([ENDIAN_BIG],[1],[machine is big-endian])
+      AC_DEFINE([ENDIAN_LITTLE],[0],[machine is little-endian])],[ 
+      ],[ 
+      AC_DEFINE([WORDS_BIGENDIAN],[0],[machine is big-endian])
+      AC_DEFINE([ENDIAN_BIG],[0],[machine is big-endian])
+      AC_DEFINE([ENDIAN_LITTLE],[1],[machine is little-endian])
+      ],[ 
+      AC_MSG_ERROR([unable to determine endian])
+      ]) 
+    ])
index 6eeb7c91871d1e46007e50f5628a4c4a99397a5a..6fa20c17f541c1da812a086f1ea3bcc1a105760c 100644 (file)
@@ -1,10 +1,10 @@
 # ===========================================================================
-#      http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+#      https://github.com/BrianAker/ddm4/
 # ===========================================================================
 #
 # SYNOPSIS
 #
-#   AX_HARDEN_COMPILER_FLAGS
+#   AX_HARDEN_COMPILER_FLAGS, AX_HARDEN_LINKER_FLAGS, AX_HARDEN_CC_COMPILER_FLAGS, AX_HARDEN_CXX_COMPILER_FLAGS 
 #
 # DESCRIPTION
 #
 # AX_APPEND_COMPILE_FLAGS([-Wlong-long]) -- Don't turn on for compatibility issues memcached_stat_st
 
 #serial 2
+
   AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [
       AC_REQUIRE([AX_CHECK_LINK_FLAG])
       AC_REQUIRE([AX_VCS_CHECKOUT])
       AC_REQUIRE([AX_DEBUG])
+      AC_REQUIRE([AX_CXX_COMPILER_VERSION])
 
       AS_IF([test "$ac_cv_vcs_checkout" = yes], [
           AX_CHECK_LINK_FLAG([-Werror])
       AX_CHECK_LINK_FLAG([-pie])
       ])
 
-  AC_DEFUN([AX_HARDEN_C_COMPILER_FLAGS], [
+  AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS], [
       AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
       AC_REQUIRE([AX_HARDEN_LINKER_FLAGS])
 
       AC_LANG_PUSH([C])
-      AS_IF([test "$ax_with_debug" = yes], [
-        AX_APPEND_COMPILE_FLAGS([-O0])],[
+      CFLAGS=
+
+      AX_APPEND_COMPILE_FLAGS([-g])
+      AS_IF([test "$ax_enable_debug" = yes], [
+        AX_APPEND_COMPILE_FLAGS([-ggdb])
+        AX_APPEND_COMPILE_FLAGS([-O0])
+        ],[
         AX_APPEND_COMPILE_FLAGS([-O2])
         ])
 
       ac_cv_warnings_as_errors=no
       AS_IF([test "$ac_cv_vcs_checkout" = yes], [
         AX_APPEND_COMPILE_FLAGS([-Werror])
+        AX_APPEND_COMPILE_FLAGS([-Wpragmas])
         ac_cv_warnings_as_errors=yes
+        ],[
+        AX_APPEND_COMPILE_FLAGS([-Wno-pragmas])
         ])
 
       AX_APPEND_COMPILE_FLAGS([-Wall])
       AX_APPEND_COMPILE_FLAGS([-Wextra])
       AX_APPEND_COMPILE_FLAGS([-std=c99])
-      AX_APPEND_COMPILE_FLAGS([-Wpragmas])
       dnl Anything below this comment please keep sorted.
       AX_APPEND_COMPILE_FLAGS([--paramssp-buffer-size=1])
       AX_APPEND_COMPILE_FLAGS([-Waddress])
       AX_APPEND_COMPILE_FLAGS([-Warray-bounds])
       AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast])
-      AX_APPEND_COMPILE_FLAGS([-Wc++-compat])
+      dnl AX_APPEND_COMPILE_FLAGS([-Wc++-compat])
       AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts])
       AX_APPEND_COMPILE_FLAGS([-Wcomment])
       AX_APPEND_COMPILE_FLAGS([-Wfloat-equal])
       AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
       AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all])
       AX_APPEND_COMPILE_FLAGS([-fwrapv])
-      AX_APPEND_COMPILE_FLAGS([-ggdb])
       AC_LANG_POP
 
       ])
 
-  AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS], [
-      AC_REQUIRE([AX_HARDEN_C_COMPILER_FLAGS])
+  AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS], [
+      AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
       AC_LANG_PUSH([C++])
+      CXXFLAGS=
 
-      AS_IF([test "$ax_with_debug" = yes], [
-        AX_APPEND_COMPILE_FLAGS([-O0])],[
+      AX_APPEND_COMPILE_FLAGS([-g])
+      AS_IF([test "$ax_enable_debug" = yes], [
+        AX_APPEND_COMPILE_FLAGS([-O0])
+        AX_APPEND_COMPILE_FLAGS([-ggdb])
+        ],[
         AX_APPEND_COMPILE_FLAGS([-O2])
         AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2])
         ])
 
       AS_IF([test "$ac_cv_vcs_checkout" = yes], [
         AX_APPEND_COMPILE_FLAGS([-Werror])
+        AX_APPEND_COMPILE_FLAGS([-Wpragmas])
+        ],[
+        AX_APPEND_COMPILE_FLAGS([-Wno-pragmas])
         ])
 
       AX_APPEND_COMPILE_FLAGS([-Wall])
       AX_APPEND_COMPILE_FLAGS([-Wextra])
-      AX_APPEND_COMPILE_FLAGS([-Wpragmas])
       dnl Anything below this comment please keep sorted.
       AX_APPEND_COMPILE_FLAGS([--paramssp-buffer-size=1])
       AX_APPEND_COMPILE_FLAGS([-Waddress])
       AX_APPEND_COMPILE_FLAGS([-Wformat-security])
       AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all])
       AX_APPEND_COMPILE_FLAGS([-fwrapv])
-      AX_APPEND_COMPILE_FLAGS([-ggdb])
       AC_LANG_POP
   ])
+
+  AC_DEFUN([AX_HARDEN_COMPILER_FLAGS], [
+      AC_REQUIRE([AX_HARDEN_CXX_COMPILER_FLAGS])
+      ])
diff --git a/m4/ax_hex_version.m4 b/m4/ax_hex_version.m4
new file mode 100644 (file)
index 0000000..6130ccc
--- /dev/null
@@ -0,0 +1,31 @@
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_HEX_VERSION
+#
+# DESCRIPTION
+#
+#   Generate version information in HEX format.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 1
+AC_DEFUN([AX_HEX_VERSION],[
+    AC_CACHE_CHECK([generate HEX_VERSION], [ax_cv_hex_version],[
+      ax_cv_hex_version=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
+      ])
+    AC_SUBST([HEX_VERSION],["$ax_cv_hex_version"])
+    AC_DEFINE([HEX_VERSION],[1],[HEX representation of VERSION])
+    ])
+
diff --git a/m4/ax_prog_sphinx_build.m4 b/m4/ax_prog_sphinx_build.m4
new file mode 100644 (file)
index 0000000..713281b
--- /dev/null
@@ -0,0 +1,44 @@
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PROG_SPHINX_BUILD
+#
+# DESCRIPTION
+#
+#   Look for sphinx-build
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 1
+
+  AC_DEFUN([AX_PROG_SPHINX_BUILD], [
+      AC_CHECK_PROGS([PERL], [perl])
+      AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
+      AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
+      AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
+
+      AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
+      AS_IF([test "x${SPHINXBUILD}" != "x:"],[
+        AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
+
+          ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+          AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
+            [ac_cv_recent_sphinx=no])
+          rm -rf conftest.d
+          ])
+        ])
+
+      AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
+      AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
+      AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
+      ])
index a0e6c253c168df75ab9322c2837d2e8a870105d7..d6f0467ae20618adf35b6cb2d717c5895256d82b 100644 (file)
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 3
+#serial 4
 
-AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
-         AC_REQUIRE([AX_PTHREAD])
-         AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
-                        save_LDFLAGS="$LDFLAGS"
-                        LDFLAGS="$PTHREAD_LIBS"
-                        AC_LANG_PUSH([C])
-                        AC_LINK_IFELSE([
-                                       AC_LANG_PROGRAM([
+  AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
+      AC_REQUIRE([AX_PTHREAD])
+      AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$PTHREAD_LIBS"
+        AC_LANG_PUSH([C])
+        AC_LINK_IFELSE([
+          AC_LANG_PROGRAM([
 #ifndef _GNU_SOURCE 
 #define _GNU_SOURCE 
 #endif
 
 #include <stdlib.h> 
 #include <pthread.h>
-                                                       ], [
-                                                       pthread_t thread;
-                                                       pthread_timedjoin_np(thread, NULL);
-                                                       ])],
-                                       [ax_cv_pthread_timedjoin_np=yes],
-                                       [])
+            ], [
+            pthread_t thread;
+            pthread_timedjoin_np(thread, NULL);
+            ])],
+          [ax_cv_pthread_timedjoin_np=yes],
+          [])
 
-                        AC_LANG_POP
-                        LDFLAGS="$save_LDFLAGS"
+        AC_LANG_POP
+        LDFLAGS="$save_LDFLAGS"
 
-         ])
+      ])
 
-         AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
-               AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],[
-               AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])
-               ])
-         ])
+      AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
+          AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],[
+          AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])
+          ])
+      ])
 
diff --git a/m4/ax_uuid.m4 b/m4/ax_uuid.m4
new file mode 100644 (file)
index 0000000..5f272e1
--- /dev/null
@@ -0,0 +1,93 @@
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_UUID
+#   AX_UUID_GENERATE_TIME_SAFE
+#
+# DESCRIPTION
+#
+#   Check for uuid, and uuid_generate_time_safe support.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 4
+
+AC_DEFUN([AX_UUID], [
+    AC_CHECK_HEADER([uuid/uuid.h], [
+      AC_CACHE_CHECK([check to see if -luuid is not needed], [ax_cv_libuuid_is_required], [
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+            uuid_t out;
+            uuid_generate(out);
+            ])],
+          [ax_cv_libuuid_is_required=no],
+          [ax_cv_libuuid_is_required=maybe],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        ])
+
+      AS_IF([test "$ax_cv_libuuid_is_required" = maybe], [
+        AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_works], [
+          save_LIBS="$LIBS"
+          LIBS="-luuid $LIBS"
+          AC_LANG_PUSH([C])
+          AC_RUN_IFELSE([
+            AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+              uuid_t out;
+              uuid_generate(out);
+              ])],
+            [ax_cv_libuuid_works=yes],
+            [ax_cv_libuuid_works=no],
+            [AC_MSG_WARN([test program execution failed])])
+          AC_LANG_POP
+          LIBS="$save_LIBS"
+          ])
+        AS_IF([test "$ax_cv_libuuid_works" = yes], [
+          AC_SUBST([LIBUUID_LDFLAGS],[-luuid])])
+        ])
+
+      AS_IF([test "$ax_cv_libuuid_is_required" = no], [UUID_UUID_H=yes])
+      AS_IF([test "$ax_cv_libuuid_works" = yes], [UUID_UUID_H=yes])
+      ])
+
+  AS_IF([test "$UUID_UUID_H" = yes], [
+      AC_DEFINE([HAVE_UUID_UUID_H], [1], [Have uuid/uuid.h])
+      ],[
+      AC_DEFINE([HAVE_UUID_UUID_H], [0], [Have uuid/uuid.h])
+      ])
+  ])
+
+  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE], [
+      AC_REQUIRE([AX_UUID])
+      AC_CACHE_CHECK([for uuid_generate_time_safe], [ax_cv_uuid_generate_time_safe], [
+        save_LIBS="$LIBS"
+        LIBS="$LIBUUID_LDFLAGS $LIBS"
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+            uuid_t out;
+            uuid_generate_time_safe(out);
+            ])],
+          [ax_cv_uuid_generate_time_safe=yes],
+          [ax_cv_uuid_generate_time_safe=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        LIBS="$save_LIBS"
+        ])
+
+      AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],[
+        AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],[
+        AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])
+        ])
+      ])
index 08bd37465bb3ee79eaed26507b718edf88355e53..7a48561c501bcf98131aa4dc656c6387bd3a591e 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#serial 1
+#serial 2
+
 AC_DEFUN([AX_VCS_CHECKOUT],[
     AC_CACHE_CHECK([for vcs checkout], [ac_cv_vcs_checkout], [
       AS_IF([test -d ".bzr"],[ac_cv_vcs_checkout=yes])
       AS_IF([test -d ".svn"],[ac_cv_vcs_checkout=yes])
       AS_IF([test -d ".hg"], [ac_cv_vcs_checkout=yes])
       AS_IF([test -d ".git"],[ac_cv_vcs_checkout=yes])
+      ],[
+      ac_cv_vcs_checkout=no
       ])
-
-    AS_IF([test "$ac_cv_vcs_checkout" = yes], [])
     ])
index 6306aee178a873508c98976a5ea32c86dfba1019..135cb976dcc7436022e76af2307d8205847e15f2 100644 (file)
@@ -31,12 +31,6 @@ typedef unsigned long int ulong;
  
 #define RVERSION "1.4.13"
 
-#ifdef WORDS_BIGENDIAN 
-# define ENDIAN_BIG 1
-#else
-# define ENDIAN_LITTLE 1
-#endif
 ])
 
 ])dnl CONFIG_EXTRA
diff --git a/m4/debug.m4 b/m4/debug.m4
deleted file mode 100644 (file)
index 7bdbeba..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-AC_DEFUN([AX_DEBUG],[
-  AC_ARG_WITH([debug],
-    [AS_HELP_STRING([--with-debug],
-       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
-    [ax_with_debug=$withval],
-    [ax_with_debug=no])
-  AS_IF([test "$ax_with_debug" = "yes"],[
-    # Debugging. No optimization.
-    AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
-    AC_DEFINE(DEBUG, [ 1 ], [Define to 1 to enable debugging code.])
-  ],[
-    # Optimized version. No debug
-    AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
-    AC_DEFINE(DEBUG, [ 0 ], [Define to 1 to enable debugging code.])
-  ])
-])
index 9f6d514c5d46621300e062ec5eb52aed4757bdd3..7c5f6b9c095cf1aa413b4be735331caf9379ebae 100644 (file)
@@ -41,10 +41,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
         m4_undefine([PCT_DONT_SUPPRESS_INCLUDE])
         m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes])
       ],
-      [no-vc-changelog], [
-        m4_undefine([PCT_NO_VC_CHANGELOG])
-        m4_define([PCT_NO_VC_CHANGELOG],[yes])
-      ],
       [version-from-vc], [
         m4_undefine([PCT_VERSION_FROM_VC])
         m4_define([PCT_VERSION_FROM_VC],[yes])
@@ -176,8 +172,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
 
   PANDORA_HAVE_GCC_ATOMICS
 
-  PANDORA_HEADER_ASSERT
-
   PANDORA_WARNINGS(PCT_ALL_ARGS)
 
   PANDORA_ENABLE_DTRACE
@@ -185,26 +179,6 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[
   AC_LIB_PREFIX
   PANDORA_HAVE_BETTER_MALLOC
 
-  AC_CHECK_PROGS([PERL], [perl])
-  AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
-  AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
-  AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
-
-  AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
-  AS_IF([test "x${SPHINXBUILD}" != "x:"],[
-    AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
-    
-    ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
-    AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
-          [ac_cv_recent_sphinx=no])
-    rm -rf conftest.d
-    ])
-  ])
-
-  AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
-  AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
-  AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
-
   m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[
     AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}"
   ],[
diff --git a/m4/pandora_header_assert.m4 b/m4/pandora_header_assert.m4
deleted file mode 100644 (file)
index f72f2d5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl PANDORA_HEADER_ASSERT
-dnl ----------------
-dnl Check whether to enable assertions.
-AC_DEFUN([PANDORA_HEADER_ASSERT],
-[
-  AC_CHECK_HEADERS(assert.h)
-  AC_MSG_CHECKING([whether to enable assertions])
-  AC_ARG_ENABLE([assert],
-    [AS_HELP_STRING([--enable-assert],
-       [Turn on assertions])],
-    [ac_cv_assert="yes"],
-    [ac_cv_assert="no"])
-  AC_MSG_RESULT([$ac_cv_assert])
-
-  AS_IF([test "$ac_cv_assert" = "no"], 
-    [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
-])
-
diff --git a/m4/pandora_version.m4 b/m4/pandora_version.m4
deleted file mode 100644 (file)
index ee0bfb2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_VERSION],[
-
-  PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \
-    awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
-  AC_SUBST([PANDORA_HEX_VERSION])
-])
diff --git a/m4/pandora_warnings.m4 b/m4/pandora_warnings.m4
deleted file mode 100644 (file)
index 91343dc..0000000
+++ /dev/null
@@ -1,430 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl AC_PANDORA_WARNINGS([less-warnings|warnings-always-on])
-dnl   less-warnings turn on a limited set of warnings
-dnl   warnings-always-on always set warnings=error regardless of tarball/vc
-
-dnl @TODO: remove less-warnings option as soon as Drizzle is clean enough to
-dnl        allow it
-AC_DEFUN([PANDORA_WARNINGS],[
-  m4_define([PW_LESS_WARNINGS],[no])
-  m4_define([PW_WARN_ALWAYS_ON],[no])
-  ifdef([m4_define],,[define([m4_define],   defn([define]))])
-  ifdef([m4_undefine],,[define([m4_undefine],   defn([undefine]))])
-  m4_foreach([pw_arg],[$*],[
-    m4_case(pw_arg,
-      [less-warnings],[
-        m4_undefine([PW_LESS_WARNINGS])
-        m4_define([PW_LESS_WARNINGS],[yes])
-      ],
-      [warnings-always-on],[
-        m4_undefine([PW_WARN_ALWAYS_ON])
-        m4_define([PW_WARN_ALWAYS_ON],[yes])
-    ]) 
-  ])
-
-  m4_if(PW_WARN_ALWAYS_ON, [yes],
-    [ac_cv_warnings_as_errors=yes],
-    AS_IF([test "$pandora_building_from_vc" = "yes"],
-          [ac_cv_warnings_as_errors=yes],
-          [ac_cv_warnings_as_errors=no]))
-
-  AC_ARG_ENABLE([gcc-profile-mode],
-      [AS_HELP_STRING([--enable-gcc-profile-mode],
-         [Toggle gcc profile mode @<:@default=off@:>@])],
-      [ac_gcc_profile_mode="$enableval"],
-      [ac_gcc_profile_mode="no"])
-
-  AC_ARG_ENABLE([profiling],
-      [AS_HELP_STRING([--enable-profiling],
-         [Toggle profiling @<:@default=off@:>@])],
-      [ac_profiling="$enableval"],
-      [ac_profiling="no"])
-
-  AC_ARG_ENABLE([coverage],
-      [AS_HELP_STRING([--enable-coverage],
-         [Toggle coverage @<:@default=off@:>@])],
-      [ac_coverage="$enableval"],
-      [ac_coverage="no"])
-
-  AS_IF([test "$GCC" = "yes"],[
-
-    AS_IF([test "$ac_profiling" = "yes"],[
-      CC_PROFILING="-pg"
-      GCOV_LIBS="-pg -lgcov"
-      save_LIBS="${LIBS}"
-      LIBS=""
-      AC_CHECK_LIB(c_p, read)
-      LIBC_P="${LIBS}"
-      LIBS="${save_LIBS}"
-      AC_SUBST(LIBC_P)
-    ],[
-      CC_PROFILING=" "
-    ])
-
-    AS_IF([test "$ac_coverage" = "yes"],
-          [
-            CC_COVERAGE="--coverage"
-            GCOV_LIBS="-lgcov"
-          ])
-
-
-        
-    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],[
-      W_FAIL="-Werror"
-      SPHINX_WARNINGS="-W -n"
-      INTLTOOL_WARNINGS="yes"
-    ])
-
-    AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option],
-      [ac_cv_safe_to_use_fdiagnostics_show_option_],
-      [save_CFLAGS="$CFLAGS"
-       CFLAGS="-fdiagnostics-show-option ${AM_CFLAGS} ${CFLAGS}"
-       AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([],[])],
-         [ac_cv_safe_to_use_fdiagnostics_show_option_=yes],
-         [ac_cv_safe_to_use_fdiagnostics_show_option_=no])
-       CFLAGS="$save_CFLAGS"])
-
-    AS_IF([test "$ac_cv_safe_to_use_fdiagnostics_show_option_" = "yes"],
-          [
-            F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
-          ])
-
-    AC_CACHE_CHECK([whether it is safe to use -floop-parallelize-all],
-      [ac_cv_safe_to_use_floop_parallelize_all_],
-      [save_CFLAGS="$CFLAGS"
-       CFLAGS="-Werror -floop-parallelize-all ${AM_CFLAGS} ${CFLAGS}"
-       AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([],[])],
-         [ac_cv_safe_to_use_floop_parallelize_all_=yes],
-         [ac_cv_safe_to_use_floop_parallelize_all_=no])
-       CFLAGS="$save_CFLAGS"])
-
-    AS_IF([test "$ac_cv_safe_to_use_floop_parallelize_all_" = "yes"],
-          [
-            F_LOOP_PARALLELIZE_ALL="-floop-parallelize-all"
-          ])
-
-    NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing"
-    NO_SHADOW="-Wno-shadow"
-
-    AS_IF([test "$INTELCC" = "yes"],[
-      m4_if(PW_LESS_WARNINGS,[no],[
-        BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188"
-      ],[
-        dnl 2203 is like old-style-cast
-        dnl 1684 is like strict-aliasing
-        dnl 188 is about using enums as bitfields
-        dnl 1683 is a warning about _EXPLICIT_ casting, which we want
-        BASE_WARNINGS="-w1 -Werror -Wcheck -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 188,981,2259,2203,1683,1684"
-      ])
-      CC_WARNINGS="${BASE_WARNINGS}"
-      CXX_WARNINGS="${BASE_WARNINGS}"
-      PROTOSKIP_WARNINGS="-diag-disable 188,981,967,2259,1683,1684,2203"
-      
-    ],[
-      m4_if(PW_LESS_WARNINGS,[no],[
-        BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing -Wswitch-enum "
-        CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
-        CXX_WARNINGS_FULL=""
-        NO_OLD_STYLE_CAST="-Wno-old-style-cast"
-        NO_EFF_CXX="-Wno-effc++"
-      ],[
-        BASE_WARNINGS_FULL="${NO_STRICT_ALIASING}"
-      ])
-
-      AS_IF([test "${ac_cv_assert}" = "no"],
-            [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wextra],
-        [ac_cv_safe_to_use_Wextra_],
-        [save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wextra_=yes],
-        [ac_cv_safe_to_use_Wextra_=no])
-      CFLAGS="$save_CFLAGS"])
-
-      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow -Wparentheses ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
-      AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
-            [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
-            [BASE_WARNINGS="${BASE_WARNINGS} -W"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wformat],
-        [ac_cv_safe_to_use_wformat_],
-        [save_CFLAGS="$CFLAGS"
-         dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
-         dnl conversion warnings to all the tarball folks
-         CFLAGS="-Wformat -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <stdint.h>
-#include <inttypes.h>
-void foo();
-void foo()
-{
-  uint64_t test_u= 0;
-  printf("This is a %" PRIu64 "test\n", test_u);
-}
-           ]],[[
-foo();
-           ]])],
-           [ac_cv_safe_to_use_wformat_=yes],
-           [ac_cv_safe_to_use_wformat_=no])
-         CFLAGS="$save_CFLAGS"])
-      AS_IF([test "$ac_cv_safe_to_use_wformat_" = "yes"],[
-        BASE_WARNINGS="${BASE_WARNINGS} -Wformat -Wno-format-nonliteral -Wformat-security"
-        BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wformat=2 -Wno-format-nonliteral -Wformat-security"
-        ],[
-        BASE_WARNINGS="${BASE_WARNINGS} -Wno-format"
-        BASE_WARNINGS_FULL="${BASE_WARNINGS_FULL} -Wno-format"
-      ])
-
-
-      AC_CACHE_CHECK([whether it is safe to use -Wconversion],
-        [ac_cv_safe_to_use_wconversion_],
-        [save_CFLAGS="$CFLAGS"
-         dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
-         dnl conversion warnings to all the tarball folks
-         CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([[
-#include <stdbool.h>
-void foo(bool a)
-{
-  (void)a;
-}
-           ]],[[
-foo(0);
-           ]])],
-           [ac_cv_safe_to_use_wconversion_=yes],
-           [ac_cv_safe_to_use_wconversion_=no])
-         CFLAGS="$save_CFLAGS"])
-  
-      AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"],
-        [W_CONVERSION="-Wconversion"
-        AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons],
-          [ac_cv_safe_to_use_Wconversion_],
-          [save_CFLAGS="$CFLAGS"
-           dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
-           dnl conversion warnings to all the tarball folks
-           CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-           AC_COMPILE_IFELSE(
-             [AC_LANG_PROGRAM(
-               [[
-#include <netinet/in.h>
-               ]],[[
-uint16_t x= htons(80);
-               ]])],
-             [ac_cv_safe_to_use_Wconversion_=yes],
-             [ac_cv_safe_to_use_Wconversion_=no])
-           CFLAGS="$save_CFLAGS"])
-  
-        AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"],
-              [NO_CONVERSION="-Wno-conversion"])
-      ])
-
-      CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align -Wsign-compare ${CC_WARNINGS_FULL}"
-      CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Wsign-compare ${CXX_WARNINGS_FULL}"
-
-      AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++],
-        [ac_cv_safe_to_use_Wmissing_declarations_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wmissing_declarations_=yes],
-        [ac_cv_safe_to_use_Wmissing_declarations_=no])
-        CXXFLAGS="$save_CXXFLAGS"
-        AC_LANG_POP()
-      ])
-      AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wframe-larger-than],
-        [ac_cv_safe_to_use_Wframe_larger_than_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="-Werror -pedantic -Wframe-larger-than=32768 ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wframe_larger_than_=yes],
-        [ac_cv_safe_to_use_Wframe_larger_than_=no])
-        CXXFLAGS="$save_CXXFLAGS"
-        AC_LANG_POP()
-      ])
-      AS_IF([test "$ac_cv_safe_to_use_Wframe_larger_than_" = "yes"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wframe-larger-than=32768"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++],
-        [ac_cv_safe_to_use_Wredundant_decls_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([
-template <typename E> struct C { void foo(); };
-template <typename E> void C<E>::foo() { }
-template <> void C<int>::foo();
-            AC_INCLUDES_DEFAULT])],
-            [ac_cv_safe_to_use_Wredundant_decls_=yes],
-            [ac_cv_safe_to_use_Wredundant_decls_=no])
-         CXXFLAGS="${save_CXXFLAGS}"
-         AC_LANG_POP()])
-      AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])
-
-      AC_CACHE_CHECK([whether it is safe to use -Wattributes from C++],
-        [ac_cv_safe_to_use_Wattributes_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([
-#include <google/protobuf/message.h>
-#include <google/protobuf/descriptor.h>
-
-
-const ::google::protobuf::EnumDescriptor* Table_TableOptions_RowType_descriptor();
-enum Table_TableOptions_RowType {
-  Table_TableOptions_RowType_ROW_TYPE_DEFAULT = 0,
-  Table_TableOptions_RowType_ROW_TYPE_FIXED = 1,
-  Table_TableOptions_RowType_ROW_TYPE_DYNAMIC = 2,
-  Table_TableOptions_RowType_ROW_TYPE_COMPRESSED = 3,
-  Table_TableOptions_RowType_ROW_TYPE_REDUNDANT = 4,
-  Table_TableOptions_RowType_ROW_TYPE_COMPACT = 5,
-  Table_TableOptions_RowType_ROW_TYPE_PAGE = 6
-};
-
-namespace google {
-namespace protobuf {
-template <>
-inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
-  return Table_TableOptions_RowType_descriptor();
-}
-}
-}
-            ])],
-            [ac_cv_safe_to_use_Wattributes_=yes],
-            [ac_cv_safe_to_use_Wattributes_=no])
-          CXXFLAGS="${save_CXXFLAGS}"
-          AC_LANG_POP()])
-      AC_CACHE_CHECK([whether it is safe to use -Wno-attributes],
-        [ac_cv_safe_to_use_Wno_attributes_],
-        [save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wno_attributes_=yes],
-        [ac_cv_safe_to_use_Wno_attributes_=no])
-      CFLAGS="$save_CFLAGS"])
-
-      dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off
-      dnl by using that. 
-      AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[
-        AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[
-          CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
-          NO_ATTRIBUTES="-Wno-attributes"])])
-  
-  
-      NO_REDUNDANT_DECLS="-Wno-redundant-decls"
-      dnl TODO: Figure out a better way to deal with this:
-      PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
-      NO_WERROR="-Wno-error"
-      PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive"
-      PERMISSIVE_C_WARNINGS="-Wno-error -Wno-redundant-decls"
-      AS_IF([test "$host_vendor" = "apple"],[
-        BOOSTSKIP_WARNINGS="-Wno-uninitialized"
-      ])
-    ])
-  ])
-
-  AS_IF([test "$SUNCC" = "yes"],[
-
-    AS_IF([test "$ac_profiling" = "yes"],
-          [CC_PROFILING="-xinstrument=datarace"])
-
-    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],
-          [W_FAIL="-errwarn=%all"])
-
-    AC_CACHE_CHECK([whether E_PASTE_RESULT_NOT_TOKEN is usable],
-      [ac_cv_paste_result],
-      [
-        save_CFLAGS="${CFLAGS}"
-        CFLAGS="-errwarn=%all -erroff=E_PASTE_RESULT_NOT_TOKEN ${CFLAGS}"
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([
-            AC_INCLUDES_DEFAULT
-          ],[
-            int x= 0;])],
-          [ac_cv_paste_result=yes],
-          [ac_cv_paste_result=no])
-        CFLAGS="${save_CFLAGS}"
-      ])
-    AS_IF([test $ac_cv_paste_result = yes],
-      [W_PASTE_RESULT=",E_PASTE_RESULT_NOT_TOKEN"])
-
-
-    m4_if(PW_LESS_WARNINGS, [no],[
-      CC_WARNINGS_FULL="-erroff=E_STATEMENT_NOT_REACHED,E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
-      CXX_WARNINGS_FULL="-erroff=inllargeuse"
-    ],[
-      CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR,E_STATEMENT_NOT_REACHED"
-      CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint"
-    ])
-
-    CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}"
-    CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}"
-    PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit"
-    BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem"
-    PERMISSIVE_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem,notused,badargtype2w,wunreachable"
-    INNOBASE_SKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit,wunreachable"
-    NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
-    NO_WERROR="-errwarn=%none"
-
-  ])
-
-  AC_SUBST(NO_CONVERSION)
-  AC_SUBST(NO_REDUNDANT_DECLS)
-  AC_SUBST(NO_UNREACHED)
-  AC_SUBST(NO_SHADOW)
-  AC_SUBST(NO_STRICT_ALIASING)
-  AC_SUBST(NO_EFF_CXX)
-  AC_SUBST(NO_OLD_STYLE_CAST)
-  AC_SUBST(PROTOSKIP_WARNINGS)
-  AC_SUBST(INNOBASE_SKIP_WARNINGS)
-  AC_SUBST(BOOSTSKIP_WARNINGS)
-  AC_SUBST(PERMISSIVE_WARNINGS)
-  AC_SUBST(PERMISSIVE_C_WARNINGS)
-  AC_SUBST(NO_WERROR)
-  AC_SUBST([GCOV_LIBS])
-  AC_SUBST([SPHINX_WARNINGS])
-  AC_SUBST([INTLTOOL_WARNINGS])
-
-])
diff --git a/m4/uuid.m4 b/m4/uuid.m4
deleted file mode 100644 (file)
index 67d5fa3..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-# ===========================================================================
-# http://
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_UUID
-#   AX_UUID_GENERATE_TIME_SAFE
-#
-# DESCRIPTION
-#
-#   Check for uuid, and uuid_generate_time_safe support.
-#
-# LICENSE
-#
-#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 3
-
-AC_DEFUN([AX_UUID], [
-    AC_CHECK_HEADER([uuid/uuid.h], [
-      AC_CACHE_CHECK([check to see if -luuid is not needed], [ax_cv_libuuid_is_required], [
-        AC_LANG_PUSH([C])
-        AC_RUN_IFELSE([
-          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
-            uuid_t out;
-            uuid_generate(out);
-            ])],
-          [ax_cv_libuuid_is_required=no],
-          [ax_cv_libuuid_is_required=maybe],
-         [AC_MSG_WARN([test program execution failed])])
-        AC_LANG_POP
-        ])
-
-      AS_IF([test "$ax_cv_libuuid_is_required" = maybe], [
-        AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_works], [
-          save_LIBS="$LIBS"
-          LIBS="-luuid $LIBS"
-          AC_LANG_PUSH([C])
-          AC_RUN_IFELSE([
-            AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
-              uuid_t out;
-              uuid_generate(out);
-              ])],
-            [ax_cv_libuuid_works=yes],
-            [ax_cv_libuuid_works=no],
-           [AC_MSG_WARN([test program execution failed])])
-          AC_LANG_POP
-          LIBS="$save_LIBS"
-          ])
-        AS_IF([test "$ax_cv_libuuid_works" = yes], [
-          AC_SUBST([LIBUUID_LDFLAGS],[-luuid])])
-        ])
-
-      AS_IF([test "$ax_cv_libuuid_is_required" = no], [UUID_UUID_H=yes])
-      AS_IF([test "$ax_cv_libuuid_works" = yes], [UUID_UUID_H=yes])
-      ])
-
-  AS_IF([test "$UUID_UUID_H" = yes], [
-      AC_DEFINE([HAVE_UUID_UUID_H], [1], [Have uuid/uuid.h])
-      ],[
-      AC_DEFINE([HAVE_UUID_UUID_H], [0], [Have uuid/uuid.h])
-      ])
-  ])
-
-  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE], [
-      AC_REQUIRE([AX_UUID])
-      AC_CACHE_CHECK([for uuid_generate_time_safe], [ax_cv_uuid_generate_time_safe], [
-        save_LIBS="$LIBS"
-        LIBS="$LIBUUID_LDFLAGS $LIBS"
-        AC_LANG_PUSH([C])
-        AC_RUN_IFELSE([
-          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
-            uuid_t out;
-            uuid_generate_time_safe(out);
-            ])],
-          [ax_cv_uuid_generate_time_safe=yes],
-          [ax_cv_uuid_generate_time_safe=no],
-         [AC_MSG_WARN([test program execution failed])])
-        AC_LANG_POP
-        LIBS="$save_LIBS"
-        ])
-
-      AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],[
-        AC_DEFINE(HAVE_UUID_GENERATE_TIME_SAFE,[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],[
-        AC_DEFINE(HAVE_UUID_GENERATE_TIME_SAFE,[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])
-        ])
-      ])
index c2df4a99915461423eac72f25832aa02313e5e4f..0d81ba71322988380cc206cf429888e916d85254 100644 (file)
@@ -2,10 +2,8 @@
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-EXTRA_DIST+= \
-            support/libmemcached.spec \
-            support/libmemcached-fc.spec.in \
-            support/set_benchmark.sh 
+EXTRA_DIST+= support/libmemcached.spec
+EXTRA_DIST+= support/set_benchmark.sh 
 
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = support/libmemcached.pc
+pkgconfigdir= $(libdir)/pkgconfig
+pkgconfig_DATA= support/libmemcached.pc
diff --git a/support/libmemcached-fc.spec.in b/support/libmemcached-fc.spec.in
deleted file mode 100644 (file)
index a1d4b3f..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-Name:      libmemcached
-Summary:   memcached C library and command line tools
-Version: @VERSION@
-Release:   1%{?dist}
-License:   BSD
-Group:     System Environment/Libraries
-URL:       http://libmemcached.org/
-Source0:   http://download.tangent.org/libmemcached-%{version}.tar.gz
-
-# For test suite
-BuildRequires: memcached
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-
-%description
-libmemcached, http://libmemcached.org/, is a C client library to the memcached server
-(http://danga.com/memcached). It has been designed to be light on memory
-usage, and provide full access to server side methods.
-
-It also implements several command line tools:
-
-memcat - Copy the value of a key to standard output.
-memflush - Flush the contents of your servers.
-memrm - Remove a key(s) from the serrver.
-memstat - Dump the stats of your servers to standard output.
-memslap - Generate testing loads on a memcached cluster.
-memcp - Copy files to memcached servers.
-memerror - Creates human readable messages from libmemecached error codes.
-
-
-%package devel
-Summary: Header files and development libraries for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-This package contains the header files and development libraries
-for %{name}. If you like to develop programs using %{name}, 
-you will need to install %{name}-devel.
-
-
-%prep
-%setup -q
-
-%{__mkdir} examples
-%{__cp} tests/*.{c,cc,cpp,h} examples/
-
-
-%build
-%configure
-%{__make}
-
-
-%install
-%{__rm} -rf %{buildroot}
-%{__make} install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
-
-
-%check
-# test suite cannot run in mock (same port use for memcache server on all arch)
-# 1 test seems to fail.. 
-#%{__make} test
-
-
-%clean
-%{__rm} -rf %{buildroot}
-
-
-%post -p /sbin/ldconfig
-
-
-%postun -p /sbin/ldconfig
-
-%files
-%defattr (-,root,root,-) 
-%doc AUTHORS COPYING NEWS README THANKS TODO
-%{_bindir}/mem*
-%exclude %{_libdir}/libmemcached.a
-%exclude %{_libdir}/libmemcached.la
-%exclude %{_libdir}/libmemcachedutil.a
-%exclude %{_libdir}/libmemcachedutil.la
-%{_libdir}/libmemcached.so.*
-%{_libdir}/libmemcachedutil.so.*
-%{_mandir}/man1/mem*
-
-
-%files devel
-%defattr (-,root,root,-) 
-%doc examples
-%{_includedir}/libmemcached
-%{_libdir}/libmemcached.so
-%{_libdir}/libmemcachedutil.so
-%{_libdir}/pkgconfig/libmemcached.pc
-%{_mandir}/man3/libmemcached*.3.gz
-%{_mandir}/man3/memcached_*.3.gz
-
-
-%changelog
-* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1
-- Initial RPM from Brian Aker spec
-- create -devel subpackage
-- add %%post %%postun %%check section
-
index 7500fcbf3578c5718b0c0910c1fcdb2f00290c3d..8dd8ec9d39111ef744837c2a71db9a1975aa3d65 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmemcached
 Summary:   memcached C library and command line tools
-Version: @VERSION@
+Version:   @VERSION@
 Release:   1
 License:   BSD
 Group:     System Environment/Libraries