diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/autogen.sh b/autogen.sh index 492ef3bf6..13bb2d801 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,13 +1,17 @@ #!/bin/sh +NDPI_MAJOR="2" +NDPI_MINOR="3" +NDPI_PATCH="0" +NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH" -/bin/rm -f configure config.h config.h.in src/lib/Makefile.in +rm -f configure config.h config.h.in src/lib/Makefile.in -AUTOCONF=$(which autoconf) -AUTOMAKE=$(which automake) -LIBTOOL=$(which libtool) -LIBTOOLIZE=$(which libtoolize) -AUTORECONF=$(which autoreconf) +AUTOCONF=$(command -v autoconf) +AUTOMAKE=$(command -v automake) +LIBTOOL=$(command -v libtool) +LIBTOOLIZE=$(command -v libtoolize) +AUTORECONF=$(command -v autoreconf) if test -z $AUTOCONF; then echo "autoconf is missing: please install it and try again" @@ -29,5 +33,15 @@ if test -z $AUTORECONF; then exit fi +cat configure.seed | sed \ + -e "s/@NDPI_MAJOR@/$NDPI_MAJOR/g" \ + -e "s/@NDPI_MINOR@/$NDPI_MINOR/g" \ + -e "s/@NDPI_PATCH@/$NDPI_PATCH/g" \ + -e "s/@NDPI_VERSION_SHORT@/$NDPI_VERSION_SHORT/g" \ + > configure.ac + autoreconf -ivf +cat configure | sed "s/#define PACKAGE/#define NDPI_PACKAGE/g" | sed "s/#define VERSION/#define NDPI_VERSION/g" > configure.tmp +cat configure.tmp > configure + ./configure $* |