X-Git-Url: http://www.privoxy.org/gitweb/index.html?a=blobdiff_plain;f=build.sh;h=2f00841d081071dad733f3358e714cde9bbc9504;hb=1c011adfcb9ccecf20dfb592bc0ce7e1fda0a94d;hp=0a4755105ec3018d765f70bf4f522279286064d9;hpb=189abce4eb5c137fcfcd6d6c7718dedf5d05cbea;p=OSXPackageBuilder.git diff --git a/build.sh b/build.sh index 0a47551..2f00841 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ # Purpose : Build the privoxy binary, documentation and config files # for the chosen target environment # -# Copyright : Written by and Copyright (C) 2001-2012 the +# Copyright : Written by and Copyright (C) 2001-2021 the # Privoxy team. http://www.privoxy.org/ # # This program is free software; you can redistribute it @@ -28,14 +28,15 @@ # 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. # # # 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 current | lion | snowleopardx64 | snowleopard | snowleopardi386 | leopardupwards | leopard | leopardi386 | leopardppc | tiger | tigeri386 | tigerppc | panther [-pcre]" exit 1 fi @@ -43,19 +44,27 @@ fi # load common settings # . ./common.sh $1 +#echo "${XCODE_PATH}" +#echo ${SYSROOT} # # 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 # -# use default 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 # # check if privoxy group and user exist? @@ -77,9 +86,10 @@ fi echo "" echo "Notice: configuring the privoxy software." cd ../${SOURCE_DIR} -/usr/bin/autoheader -/usr/bin/autoconf -/usr/bin/env CFLAGS="${CFLAGS} -I/usr/local/include/ ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} -L/usr/local/lib ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS} +autoheader +autoconf + +/usr/bin/env CFLAGS="-O2 -mdynamic-no-pic ${CFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS} # # clean, then make privoxy