#
# must provide target
#
-if [ $# -eq 0 -o $# -gt 1 ]; then
- echo "Usage: $0 lion | snowleopard64 | snowleopard | leopardupwards | leopard | tiger | panther"
+if [ $# -eq 0 -o $# -gt 2 ]; then
+ echo "Usage: $0 lion | snowleopard64 | snowleopard | leopardupwards | leopard | tiger | panther [-pcre]"
exit 1
fi
fi
#
-# use default options
+# set configure options
#
OPTS=${OPTS}
+if [ "$2" == "-pcre" ]; then
+ CFLAGS="${CFLAGS} -I/usr/local/include/"
+ LDFLAGS="${LDFLAGS} -L/usr/local/lib"
+fi
#
# check if privoxy group and user exist?
#
echo ""
echo "Notice: configuring the privoxy software."
-cd ../current
+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}
#
# modify config file
#
-/usr/bin/awk '{sub(/logfile.*logfile$/,"logfile logfile.log"); print}' ../current/config > ../current/config.tmp
-/bin/mv ../current/config.tmp ../current/config
+/usr/bin/awk '{sub(/logfile.*logfile$/,"logfile logfile.log"); print}' ../${SOURCE_DIR}/config > ../${SOURCE_DIR}/config.tmp
+/bin/mv ../${SOURCE_DIR}/config.tmp ../${SOURCE_DIR}/config