[Rprotobuf-commits] r884 - pkg

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 25 00:33:30 CET 2014


Author: murray
Date: 2014-03-25 00:33:30 +0100 (Tue, 25 Mar 2014)
New Revision: 884

Modified:
   pkg/ChangeLog
   pkg/configure
   pkg/configure.in
Log:
If we can't find the protobuf headers with default CXXFLAGS and
CPPFLAGS, add -I/usr/local/include to them and try again so that this
is more likely to work out of the box.



Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2014-03-24 21:04:04 UTC (rev 883)
+++ pkg/ChangeLog	2014-03-24 23:33:30 UTC (rev 884)
@@ -4,7 +4,10 @@
 	  TestEnumWithDupValue.  This causes problems with the newest
 	  libprotobuf-2.5 which now wants an option to be specified to
 	  enable enum aliasing like this.
-
+	* configure.in: if we can't find the libproto headers with the
+	  default CPPFLAGS/CXXFLAGS, manually add /usr/local/include and try
+	  again.
+	
 2014-03-10  Murray Stokely  <mstokely at google.com>
 
 	* src/DescriptorPoolLookup.cpp (rprotobuf): Import all top-level

Modified: pkg/configure
===================================================================
--- pkg/configure	2014-03-24 21:04:04 UTC (rev 883)
+++ pkg/configure	2014-03-24 23:33:30 UTC (rev 884)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for RProtoBuf 0.3.
+# Generated by GNU Autoconf 2.69 for RProtoBuf 0.4.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='RProtoBuf'
 PACKAGE_TARNAME='rprotobuf'
-PACKAGE_VERSION='0.3'
-PACKAGE_STRING='RProtoBuf 0.3'
+PACKAGE_VERSION='0.4'
+PACKAGE_STRING='RProtoBuf 0.4'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1234,7 +1234,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures RProtoBuf 0.3 to adapt to many kinds of systems.
+\`configure' configures RProtoBuf 0.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1295,7 +1295,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of RProtoBuf 0.3:";;
+     short | recursive ) echo "Configuration of RProtoBuf 0.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1377,7 +1377,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-RProtoBuf configure 0.3
+RProtoBuf configure 0.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1667,7 +1667,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by RProtoBuf $as_me 0.3, which was
+It was created by RProtoBuf $as_me 0.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3806,6 +3806,8 @@
 
 ## check for header and ability to link
 ## first for headers Debian has in libprotobuf-dev
+protobuf_common_header=google/protobuf/stubs/common.h
+protobuf_common_header_cache_var=`$as_echo "ac_cv_header_$protobuf_common_header" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
 if ${ac_cv_path_GREP+:} false; then :
@@ -4065,14 +4067,37 @@
 done
 
 
-ac_fn_cxx_check_header_mongrel "$LINENO" "google/protobuf/stubs/common.h" "ac_cv_header_google_protobuf_stubs_common_h" "$ac_includes_default"
-if test "x$ac_cv_header_google_protobuf_stubs_common_h" = xyes; then :
+as_ac_Header=`$as_echo "ac_cv_header_$protobuf_common_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$protobuf_common_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 
 else
+
+#		AC_MSG_ERROR([ERROR: ProtoBuf headers required; use '-Iincludedir' in CXXFLAGS for unusual locations.])
+		# If it didn't work, try adding /usr/local directly then trying again
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Protobuf headers not found with default CXXFLAGS and CPPFLAGS, manually trying /usr/local/include" >&5
+$as_echo "$as_me: WARNING: Protobuf headers not found with default CXXFLAGS and CPPFLAGS, manually trying /usr/local/include" >&2;}
+		CPPFLAGS="${protobuf_cxxflags} ${CPPFLAGS} -I/usr/local/include"
+		CXXFLAGS="${protobuf_cxxflags} ${CXXFLAGS} -I/usr/local/include -L/usr/local/lib"
+		# unset the cache variable for this particular header
+		# check, so we can check again with different defaults
+		# specified.
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unsetting $protobuf_common_header_cache_var" >&5
+$as_echo "$as_me: WARNING: Unsetting $protobuf_common_header_cache_var" >&2;}
+		{ eval $protobuf_common_header_cache_var=; unset $protobuf_common_header_cache_var;}
+		as_ac_Header=`$as_echo "ac_cv_header_$protobuf_common_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$protobuf_common_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+
+else
   as_fn_error $? "ERROR: ProtoBuf headers required; use '-Iincludedir' in CXXFLAGS for unusual locations." "$LINENO" 5
 fi
 
 
+
+fi
+
+
 ## second for headers Debian has in libprotoc-dev
 ac_fn_cxx_check_header_mongrel "$LINENO" "google/protobuf/compiler/code_generator.h" "ac_cv_header_google_protobuf_compiler_code_generator_h" "$ac_includes_default"
 if test "x$ac_cv_header_google_protobuf_compiler_code_generator_h" = xyes; then :
@@ -4786,7 +4811,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by RProtoBuf $as_me 0.3, which was
+This file was extended by RProtoBuf $as_me 0.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -4839,7 +4864,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-RProtoBuf config.status 0.3
+RProtoBuf config.status 0.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: pkg/configure.in
===================================================================
--- pkg/configure.in	2014-03-24 21:04:04 UTC (rev 883)
+++ pkg/configure.in	2014-03-24 23:33:30 UTC (rev 884)
@@ -8,7 +8,7 @@
 AC_PREREQ(2.61)
 
 # Process this file with autoconf to produce a configure script.
-AC_INIT([RProtoBuf],[0.3])
+AC_INIT([RProtoBuf],[0.4])
 m4_include([m4/m4-ax_cxx_compile_stdcxx_0x.m4])
 
 # We are using C++
@@ -67,8 +67,22 @@
 
 ## check for header and ability to link
 ## first for headers Debian has in libprotobuf-dev
-AC_CHECK_HEADER(google/protobuf/stubs/common.h,,
-                [AC_MSG_ERROR([ERROR: ProtoBuf headers required; use '-Iincludedir' in CXXFLAGS for unusual locations.])])
+protobuf_common_header=google/protobuf/stubs/common.h
+protobuf_common_header_cache_var=AS_TR_SH([ac_cv_header_$protobuf_common_header])
+AC_CHECK_HEADER([$protobuf_common_header],,
+                [
+		# If it didn't work, try adding /usr/local directly then trying again
+		AC_MSG_WARN([Protobuf headers not found with default CXXFLAGS and CPPFLAGS, manually trying /usr/local/include])
+		CPPFLAGS="${protobuf_cxxflags} ${CPPFLAGS} -I/usr/local/include"
+		CXXFLAGS="${protobuf_cxxflags} ${CXXFLAGS} -I/usr/local/include -L/usr/local/lib"
+		# unset the cache variable for this particular header
+		# check, so we can check again with different defaults
+		# specified.
+		AC_MSG_WARN([Unsetting $protobuf_common_header_cache_var])
+		AS_UNSET([$protobuf_common_header_cache_var])
+		AC_CHECK_HEADER([$protobuf_common_header],,
+		[AC_MSG_ERROR([ERROR: ProtoBuf headers required; use '-Iincludedir' in CXXFLAGS for unusual locations.])])
+		])
 ## second for headers Debian has in libprotoc-dev
 AC_CHECK_HEADER(google/protobuf/compiler/code_generator.h,,
                 [AC_MSG_ERROR([ERROR: ProtoBuf compiler headers required; use '-Iincludedir' in CXXFLAGS for unusual locations.])])



More information about the Rprotobuf-commits mailing list