@@ -10,6 +10,8 @@ buildSetup: |
1010 local INSTALL_TAGET=install
1111 local INSTALL_OPTIONS=( )
1212 local SHARED_STATIC=( )
13+ local AUTOCONF_OPTS=()
14+ local AUTOCONF_SYNC_RECONFIGURE=0
1315
1416 # Explicitly build everything static on host builds and shared on
1517 # cross-builds. The package may disable this behaviour if the configure
@@ -33,7 +35,7 @@ buildSetup: |
3335 # parse arguments
3436 OPTIND=1
3537 local opt
36- while getopts "i:m:o:O:s " opt ; do
38+ while getopts "i:m:o:O:sS: " opt ; do
3739 case "$opt" in
3840 i)
3941 INSTALL_TAGET="$OPTARG"
@@ -47,6 +49,12 @@ buildSetup: |
4749 O)
4850 INSTALL_OPTIONS+=( "$OPTARG" )
4951 ;;
52+ s)
53+ AUTOCONF_SYNC_RECONFIGURE=1
54+ ;;
55+ S)
56+ AUTOCONF_OPTS+=( "-$OPTARG" )
57+ ;;
5058 \?)
5159 echo "Invalid option: -$OPTARG" >&2
5260 exit 1
@@ -55,12 +63,18 @@ buildSetup: |
5563 done
5664 shift $(( OPTIND -1 ))
5765
66+ local AUTOTOOLS_SRC=$1
67+ if [ ${AUTOCONF_SYNC_RECONFIGURE:-} -eq 1 ]; then
68+ AUTOTOOLS_SRC=$(pwd)/src
69+ autoconfSyncReconfigure $1 $AUTOTOOLS_SRC ${AUTOCONF_OPTS[@]}
70+ fi
71+
5872 rm -rf install
5973 mkdir -p build install
6074 pushd build
6175
62- if [[ $1 /configure -nt .configure.stamp ]] ; then
63- $1 /configure \
76+ if [[ ${AUTOTOOLS_SRC} /configure -nt .configure.stamp ]] ; then
77+ ${AUTOTOOLS_SRC} /configure \
6478 ${AUTOCONF_BUILD:+--build=${AUTOCONF_BUILD}} \
6579 ${AUTOCONF_HOST:+--host=${AUTOCONF_HOST}} \
6680 ${AUTOCONF_TARGET:+--target=${AUTOCONF_TARGET}} \
0 commit comments