File: autogen.sh

package info (click to toggle)
ndpi 2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 33,444 kB
  • sloc: ansic: 31,255; makefile: 269; sh: 144; objc: 70; ruby: 28; cpp: 5; exp: 4
file content (48 lines) | stat: -rwxr-xr-x 1,209 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

NDPI_MAJOR="2"
NDPI_MINOR="6"
NDPI_PATCH="0"
NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH"

rm -f configure config.h config.h.in

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"
    exit
fi

if test -z $AUTOMAKE; then
    echo "automake is missing: please install it and try again"
    exit
fi

if test -z $LIBTOOL && test -z $LIBTOOLIZE ; then
    echo "libtool and libtoolize is missing: please install it and try again"
    exit
fi

if test -z $AUTORECONF; then
    echo "autoreconf is missing: please install it and try again"
    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

chmod +x configure
./configure $*