[91512] trunk/base

jmr at macports.org jmr at macports.org
Tue Apr 3 16:13:05 PDT 2012


Revision: 91512
          https://trac.macports.org/changeset/91512
Author:   jmr at macports.org
Date:     2012-04-03 16:13:04 -0700 (Tue, 03 Apr 2012)
Log Message:
-----------
look for sqlite3 in standard locations before trying pkg-config (#30932)

Modified Paths:
--------------
    trunk/base/aclocal.m4
    trunk/base/configure

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2012-04-03 22:47:18 UTC (rev 91511)
+++ trunk/base/aclocal.m4	2012-04-03 23:13:04 UTC (rev 91512)
@@ -810,21 +810,23 @@
 		   [  sqlite3prefix=$withval ])
 
 	if test "x$sqlite3prefix" = "x"; then
-		AC_PATH_PROG([PKG_CONFIG], [pkg-config])
-		if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then
-		    # assume it's somewhere like /usr that needs no extra flags
-		    AC_CHECK_HEADER(sqlite3.h, [], [AC_MSG_ERROR([cannot find sqlite3 header])])
-            CFLAGS_SQLITE3=""
-		    LDFLAGS_SQLITE3="-lsqlite3"
-        else
-            CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3)
-            LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
-            # for tclsqlite below
-            mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
-            if test "x$mp_sqlite3_dir" != "x"; then
-                mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
-            fi
-        fi
+		# see if it's somewhere like /usr that needs no extra flags
+		LDFLAGS_SQLITE3="-lsqlite3"
+		AC_CHECK_HEADER(sqlite3.h, [],[
+		    # nope - try pkg-config
+			AC_PATH_PROG([PKG_CONFIG], [pkg-config])
+			if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then
+				AC_MSG_ERROR([cannot find sqlite3 header])
+			else
+				CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3)
+				LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
+				# for tclsqlite below
+				mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
+            			if test "x$mp_sqlite3_dir" != "x"; then
+                			mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
+            			fi
+			fi
+		])
 	else
 	    CFLAGS_SQLITE3="-I${sqlite3prefix}/include"
 		LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2012-04-03 22:47:18 UTC (rev 91511)
+++ trunk/base/configure	2012-04-03 23:13:04 UTC (rev 91512)
@@ -9653,7 +9653,15 @@
 
 
 	if test "x$sqlite3prefix" = "x"; then
-		# Extract the first word of "pkg-config", so it can be a program name with args.
+		# see if it's somewhere like /usr that needs no extra flags
+		LDFLAGS_SQLITE3="-lsqlite3"
+		ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
+if test "x$ac_cv_header_sqlite3_h" = xyes; then :
+
+else
+
+		    # nope - try pkg-config
+			# Extract the first word of "pkg-config", so it can be a program name with args.
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -9693,27 +9701,21 @@
 fi
 
 
-		if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then
-		    # assume it's somewhere like /usr that needs no extra flags
-		    ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
-if test "x$ac_cv_header_sqlite3_h" = xyes; then :
+			if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then
+				as_fn_error $? "cannot find sqlite3 header" "$LINENO" 5
+			else
+				CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3)
+				LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
+				# for tclsqlite below
+				mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
+            			if test "x$mp_sqlite3_dir" != "x"; then
+                			mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
+            			fi
+			fi
 
-else
-  as_fn_error $? "cannot find sqlite3 header" "$LINENO" 5
 fi
 
 
-            CFLAGS_SQLITE3=""
-		    LDFLAGS_SQLITE3="-lsqlite3"
-        else
-            CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3)
-            LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3)
-            # for tclsqlite below
-            mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3)
-            if test "x$mp_sqlite3_dir" != "x"; then
-                mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3
-            fi
-        fi
 	else
 	    CFLAGS_SQLITE3="-I${sqlite3prefix}/include"
 		LDFLAGS_SQLITE3="-L${sqlite3prefix}/lib -lsqlite3"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120403/9cc46e24/attachment.html>


More information about the macports-changes mailing list