-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautogen.sh
executable file
·52 lines (45 loc) · 1.02 KB
/
autogen.sh
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
49
50
51
52
#!/bin/sh -e
cd usbhid-dump
./bootstrap
cd ..
#gtkdocize
autoreconf --install --symlink
MYCFLAGS="-g -Wall \
-Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wpointer-arith -Wsign-compare -Wchar-subscripts \
-Wstrict-prototypes -Wshadow \
-Wformat=2 -Wtype-limits"
case "$CFLAGS" in
*-O[0-9]*)
;;
*)
MYCFLAGS="$MYCFLAGS -O2"
;;
esac
libdir() {
if [[ $(uname) == "Darwin" ]];then
echo $(cd $1/$(gcc-7 -print-multi-os-directory); pwd)
elif [[ $(uname) == "Linux" ]];then
echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
fi
}
if [[ $(uname) == "Darwin" ]];then
args="--prefix=/usr \
--sysconfdir=/etc \
--bindir=/usr/sbin \
--sbindir=/usr/sbin \
--libdir=$(libdir /usr/lib) \
--enable-gtk-doc"
elif [[ $(uname) == "Linux" ]];then
args="--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/sbin \
--libdir=$(libdir /usr/lib) \
--with-rootlibdir=$(libdir /lib) \
--libexecdir=/lib/udev \
--with-selinux \
--enable-gtk-doc"
fi
export CFLAGS="$CFLAGS $MYCFLAGS"
./configure $args $@