3 have_ext=$(if test -e ext/automake.mk; then echo yes; else echo no; fi)
7 (--enable-ext) have_ext=yes ;;
8 (--disable-ext) have_ext=no ;;
10 $0: bootstrap OpenFlow from a Git repository
12 The recognized options are:
13 --enable-ext include openflowext
14 --disable-ext exclude openflowext
15 By default, openflowext is included if it is present.
19 (*) echo "unknown option $opt; use --help for help"; exit 1 ;;
24 # Generate list of files in debian/ to distribute.
25 (echo '# Automatically generated by boot.sh (from Git tree).' &&
26 echo 'EXTRA_DIST += \' &&
27 git ls-files debian | grep -v '^debian/\.gitignore$' |
28 sed -e 's/\(.*\)/ \1 \\/' -e '$s/ \\//') > debian/automake.mk
30 # Find the "include ext/automake.mk" line in Makefile.am and comment
31 # it out or in according to whether ext is available, and similarly
32 # for "m4_include(ext/configure.m4)" in configure.ac.
34 perl -pe "$1" < "$2" > "$2.tmp"
35 if cmp -s "$2.tmp" "$2"; then
41 if test "$have_ext" = yes; then
42 echo 'Enabling openflowext...'
46 echo 'Disabling openflowext...'
50 subst "s|^$OC(include ext/automake\\.mk)\$|$NC\$1|" Makefile.am
51 subst "s|^$OC(m4_include\\(ext/configure\.m4\\))\$|$NC\$1|" configure.ac
53 # Bootstrap configure system from .ac/.am files
54 autoreconf --install -I config --force