Explicitly disable dynamic pcre when the user does not use the -pcre option
[OSXPackageBuilder.git] / build.sh
index 7fb015f..dd2d58c 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -28,7 +28,8 @@
 #                USA
 #
 # Modification : If you modify this file please consider whether your 
-#                changes ought to be passed back to the macsetup module.
+#                changes ought to be passed back to the OSXPackageBuilder
+#                module.
 #
 
 #
@@ -48,17 +49,19 @@ fi
 # must have Xcode
 #
 if [ -z ${XCODE_PATH} ]; then
-  echo "Error: this release of Mac OS X not supported."
+  echo "Error: Xcode is not found."
   exit 1
 fi
 
 #
-# set configure options
+# set configure options; include the appropriate user/group as discerned by common.sh and set pcre to dynamic (libpcre) or static (bundled)
 #
-OPTS=${OPTS}
 if [ "$2" == "-pcre" ]; then
        CFLAGS="${CFLAGS} -I/usr/local/include/"
        LDFLAGS="${LDFLAGS} -L/usr/local/lib"
+       OPTS=${OPTS}
+else
+       OPTS="${OPTS} --disable-dynamic-pcre"
 fi
 
 #
@@ -83,6 +86,7 @@ echo "Notice: configuring the privoxy software."
 cd ../${SOURCE_DIR}
 /usr/bin/autoheader
 /usr/bin/autoconf
+
 /usr/bin/env CFLAGS="${CFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS}
 
 #