While running configure, I noticed some noise about `OPT_FEATURE_FLAGS:
command not found`. And indeed, it uses wrong braces around
OPT_FEATURE_FLAGS in code that converts --enable-{fts4,rtree,etc} into
defines.
In shell (configure.ac is shell code!), ${foo} expands variable foo,
but $(foo) runs *command* foo and uses its output as expansion.
(Don't confuse with makefiles, where *both* $(foo) and ${foo} expands
make variable foo!)
Patch below.

--- sqlite3-3.19.2/configure.ac.orig    2017-06-02 12:59:06.000000000 +0300
+++ sqlite3-3.19.2/configure.ac 2017-06-02 13:56:39.000000000 +0300
@@ -628,7 +628,7 @@
   [enable_memsys5=yes],[enable_memsys5=no])
 AC_MSG_CHECKING([whether to support MEMSYS5])
 if test "${enable_memsys5}" = "yes"; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MEMSYS5"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS5"
   AC_MSG_RESULT([yes])
 else
   AC_MSG_RESULT([no])
@@ -638,7 +638,7 @@
   [enable_memsys3=yes],[enable_memsys3=no])
 AC_MSG_CHECKING([whether to support MEMSYS3])
 if test "${enable_memsys3}" = "yes" -a "${enable_memsys5}" = "no"; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_MEMSYS3"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS3"
   AC_MSG_RESULT([yes])
 else
   AC_MSG_RESULT([no])
@@ -650,20 +650,20 @@
       [Enable the FTS3 extension]),
       [enable_fts3=yes],[enable_fts3=no])
 if test "${enable_fts3}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS3"
 fi
 AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4],
       [Enable the FTS4 extension]),
       [enable_fts4=yes],[enable_fts4=no])
 if test "${enable_fts4}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS4"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS4"
   AC_SEARCH_LIBS([log],[m])
 fi
 AC_ARG_ENABLE(fts5, AC_HELP_STRING([--enable-fts5],
       [Enable the FTS5 extension]),
       [enable_fts5=yes],[enable_fts5=no])
 if test "${enable_fts5}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS5"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS5"
   AC_SEARCH_LIBS([log],[m])
 fi
 
@@ -673,7 +673,7 @@
       [Enable the JSON1 extension]),
       [enable_json1=yes],[enable_json1=no])
 if test "${enable_json1}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_JSON1"
 fi
 
 #########
@@ -682,7 +682,7 @@
       [Enable the RTREE extension]),
       [enable_rtree=yes],[enable_rtree=no])
 if test "${enable_rtree}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_RTREE"
 fi
 
 #########
@@ -691,12 +691,12 @@
       [Enable the SESSION extension]),
       [enable_session=yes],[enable_session=no])
 if test "${enable_session}" = "yes" ; then
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION"
-  OPT_FEATURE_FLAGS="$(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_SESSION"
+  OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_PREUPDATE_HOOK"
 fi
 
 #########
-# attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) 
parameter
+# attempt to duplicate any OMITS and ENABLES into the ${OPT_FEATURE_FLAGS} 
parameter
 for option in $CFLAGS $CPPFLAGS
 do
   case $option in
@@ -707,7 +707,7 @@
 AC_SUBST(OPT_FEATURE_FLAGS)
 
 
-# attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
+# attempt to remove any OMITS and ENABLES from the ${CFLAGS} parameter
 ac_temp_CFLAGS=""
 for option in $CFLAGS
 do
@@ -720,7 +720,7 @@
 CFLAGS=$ac_temp_CFLAGS
 
 
-# attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
+# attempt to remove any OMITS and ENABLES from the ${CPPFLAGS} parameter
 ac_temp_CPPFLAGS=""
 for option in $CPPFLAGS
 do
@@ -733,7 +733,7 @@
 CPPFLAGS=$ac_temp_CPPFLAGS
 
 
-# attempt to remove any OMITS and ENABLES from the $(BUILD_CFLAGS) parameter
+# attempt to remove any OMITS and ENABLES from the ${BUILD_CFLAGS} parameter
 ac_temp_BUILD_CFLAGS=""
 for option in $BUILD_CFLAGS
 do

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to