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.
33 if test "$have_ext" = yes; then
34 echo 'Enabling openflowext...'
35 perl -i.bak -pe 's|^#(include ext/automake\.mk)$|$1|' Makefile.am
36 perl -i.bak -pe 's|^#(m4_include\(ext/configure\.m4\))$|$1|' configure.ac
38 echo 'Disabling openflowext...'
39 perl -i.bak -pe 's|^(include ext/automake\.mk)$|#$1|' Makefile.am
40 perl -i.bak -pe 's|^(m4_include\(ext/configure\.m4\))$|#$1|' configure.ac
43 # Bootstrap configure system from .ac/.am files
44 autoreconf --install -I config --force