File: autogen.sh

package info (click to toggle)
eegdev 0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,052 kB
  • sloc: ansic: 32,298; sh: 10,941; makefile: 245; yacc: 130; lex: 128
file content (48 lines) | stat: -rwxr-xr-x 977 bytes parent folder | download | duplicates (6)
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 -e

glmodules="accept bind byteswap clock-functions close connect dlopen getaddrinfo lib-symbol-visibility listen netdb regex setsockopt shutdown socket time"
gloptions="--local-dir=gnulib-local --lgpl --libtool"

# Get absolute path of current and package path
execpath=$(pwd)
cd $(dirname $0)
packagepath=$(pwd)
cd $execpath


# Get gnulib-tool path from cache
GL_CMD_CACHE=".gnulib-tool-cmd.cache"
if [ -f "$GL_CMD_CACHE" ] ; then
	GLTOOL=`cat $GL_CMD_CACHE`
else
	GLTOOL=gnulib-tool
fi


# Process options (output filename)
while getopts "g:" option
do
  case $option in
    g) cd $(dirname $OPTARG)
       GLTOOL="$(pwd)/$(basename $OPTARG)"
       cd $execpath
       ;;
    *) exit 1 ;;
  esac
done
shift $(($OPTIND - 1))


# run gnulib-tool --update from the package folder
cd $packagepath
if ! $GLTOOL  $gloptions --import $glmodules> gnulib.log ; then
	cat gnulib.log
	rm gnulib.log
	exit 1
fi
rm gnulib.log
echo "$GLTOOL" > $GL_CMD_CACHE


autoreconf -fi