-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure
executable file
·130 lines (111 loc) · 4.95 KB
/
configure
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/sh
TOPDIR=`dirname $0`
absolute()
{
test=`echo $1 | grep "^/"`
if [ "x$test" = "x" ]; then
echo "`pwd`/$1"
else
echo "$1"
fi
}
for arg
do
case $arg in
*=*) optarg=${arg#*=} ;;
*) optarg= ;;
esac
case $arg in
--build=*) BUILD=$optarg ;;
--host=*) HOST=$optarg ;;
--target=*) TARGET=$optarg ;;
--prefix=*) PREFIX=`absolute $optarg` ;;
--exec-prefix=*) EXEC_PREFIX=`absolute $optarg` ;;
--sysconfdir=*) SYSCONFDIR=`absolute $optarg` ;;
--bindir=*) BINDIR=`absolute $optarg` ;;
--libdir=*) LIBDIR=`absolute $optarg` ;;
--datadir=*) DATADIR=`absolute $optarg` ;;
--localedir=*) LOCALEDIR=`absolute $optarg` ;;
--mandir=*) MANDIR=`absolute $optarg` ;;
--infodir=*) INFODIR=`absolute $optarg` ;;
--enable-*)
option=`echo $arg | sed -e 's/--enable-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
case "$arg" in
*=*) eval "enable_${option}='$optarg'" ;;
*) eval "enable_${option}=yes" ;;
esac
;;
--disable-*)
option=`echo $arg | sed -e 's/--disable-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
eval "enable_${option}=no"
;;
--with-*)
option=`echo $arg | sed -e 's/--with-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
case "$arg" in
*=*) eval "with_${option}='$optarg'" ;;
*) eval "with_${option}=yes" ;;
esac
;;
--without-*)
option=`echo $arg | sed -e 's/--without-//' -e 's/=.*//'`
option=`echo $option | sed 's/-/_/g'`
eval "with_${option}=no"
;;
--help | *)
echo "Usage: ./configure [options]"
echo
echo "Standard build options:"
echo " --build=STRING Host environment for build [auto-detect]"
echo " --host=STRING Cross-compile for target environment [BUILD]"
echo
echo " --prefix=DIR Installation base (MI files) [/usr/local]"
echo " --exec-prefix=DIR Installation base (MD files) [PREFIX]"
echo " --sysconfdir=DIR System configuration files [PREFIX/etc]"
echo " --bindir=DIR Executables (for common users) [PREFIX/bin]"
echo " --libdir=DIR System libraries [PREFIX/lib]"
echo " --datadir=DIR Data files (for programs) [PREFIX/share]"
echo " --localedir=DIR Multi-language support locales [DATADIR/locale]"
echo " --mandir=DIR Manual page documentation [PREFIX/man]"
echo " --infodir=DIR Texinfo documentation [DATADIR/info]"
echo
echo " --enable-debug Compile in debug mode [no]"
echo " --enable-PACKAGE Enable PACKAGE suport."
echo " --disbale-PACKAGE Disable PACKAGE support."
echo " --with-OPTION Build with OPTION enabled."
echo " --without-OPTION Build with OPTION disabled."
exit
;;
esac
done
# Installation prefix
[ "x$PREFIX" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=$PREFIX"
[ "x$EXEC_PREFIX" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_EXEC_PREFIX=$EXEC_PREFIX"
[ "x$SYSCONFDIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_SYSCONFDIR=$SYSCONFDIR"
[ "x$BINDIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_BINDIR=$BINDIR"
[ "x$LIBDIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_LIBDIR=$LIBDIR"
[ "x$DATADIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_DATADIR=$DATADIR"
[ "x$LOCALEDIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_LOCALEDIR=$LOCALEDIR"
[ "x$MANDIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_MANDIR=$MANDIR"
[ "x$INFODIR" = "x" ] || CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_INFODIR=$INFODIR"
# Debug
if [ "${enable_debug}" = "yes" ]; then
CMAKE_OPTS="$CMAKE_OPTS -DDEBUG=ON"
else
CMAKE_OPTS="$CMAKE_OPTS -DDEBUG=OFF"
fi
# Modules
if [ "${enable_mod_dummy}" = "yes" ]; then
CMAKE_OPTS="$CMAKE_OPTS -DENABLE_MOD_DUMMY=ON"
else
CMAKE_OPTS="$CMAKE_OPTS -DENABLE_MOD_DUMMY=OFF"
fi
if [ "${enable_mod_webkit}" = "yes" ]; then
CMAKE_OPTS="$CMAKE_OPTS -DENABLE_MOD_WEBKIT=ON"
else
CMAKE_OPTS="$CMAKE_OPTS -DENABLE_MOD_WEBKIT=OFF"
fi
# Execute cmake
cmake $TOPDIR $CMAKE_OPTS