-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·135 lines (127 loc) · 4 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
131
132
133
134
135
#! /bin/sh
prefix=/usr/local
if test -z "$PREFIX";
then
PREFIX=$prefix
fi
builddir=$(pwd)
srcrel=`echo $0 | sed -e 's|/configure||g'`
if test "$srcrel" != ".";
then
srcdir=`echo $srcrel | sed -e "s|^\.\+|$builddir/$srcrel|g"`
else
srcdir=$builddir
fi
opts="$@"
echo "# vi: ft=make" > config.make
for opt in $opts;
do
val=`echo "$opt" | sed -e 's|^.*=||g'`
case $opt in
--prefix*)
prefix="$val";;
--host*)
echo "HOST=$val" >> config.make;;
--with-libiconv)
echo "USE_LIBICONV=1" >> config.make;;
--with-regexp*)
case $val in
pcre)
lt=REGEXP_PCRE;;
regexpr)
lt=REGEXP_REGEXPR;;
*)
lt=
esac
echo "DEFS_REGEXP=$lt" >> config.make;;
--with-settings*)
case $val in
ini)
st=SETTINGS_INI;;
libini)
st=SETTINGS_LIBINI;;
registry)
st=SETTINGS_REG;;
*)
echo "$opt invalid"
exit;;
esac
echo "DEFS_SETTINGS=$st" >> config.make;;
--with-sockets*)
case $val in
libcurl)
st=SOCKETS_LIBCURL;;
none)
st=SOCKETS_NONE;;
synapse)
st=SOCKETS_SYNAPSE;;
*)
echo "$opt invalid"
exit;;
esac
echo "DEFS_SOCKETS=$st" >> config.make;;
--with-ssl)
echo "USE_SSL=1" >> config.make;;
--with-ui*)
case $val in
classic|html|tui|tv|wx)
echo "R3R_UI=$val" >> config.make;;
*)
echo "$opt invalid";
exit;;
esac;;
--enable-libedit)
echo "USE_LIBEDIT=1" >> config.make;;
--disable-iconv)
echo "USE_ICONV=0" >> config.make;;
--disable-libidn)
echo "USE_IDN=0" >> config.make;;
--disable-ncurses)
echo "NO_NCURSES=1" >> config.make;;
--disable-nls)
echo "USE_NLS=0" >> config.make;;
--disable-readline)
echo "USE_READLINE=0" >> config.make;;
--disable-xml)
echo "USE_EXPAT=0" >> config.make;;
--expat-version*)
echo "EXPAT_VERSION=$val" >> config.make;;
--help)
echo "Available options:"
echo -e "\t--prefix=PFX Where to install it [$PREFIX]"
echo -e "\t--host=HOST Build for HOST (e.g. i386-win32)"
echo -e "\t--with-libiconv Use GNU's libiconv library instead of the functionality built in to your OS.\n\t\tOnly works on Unix systems without the --disable-iconv option"
echo -e "\t--with-regexp=lib Use some library (pcre, regexpr) for regular-expression support"
echo -e "\t--with-settings=database Type of settings database to use (ini|libini|registry)"
echo -e "\t--with-sockets=lib Sockets library to use (libcurl|none|synapse)"
echo -e "\t--with-ssl Build with OpenSSL"
echo -e "\t--with-ui=ui Which UI to build it with (html|tui|wx)"
echo -e "\t--enable-libedit Use libedit's readline emulation.\n\t\tOnly works without the --disable-readline option"
echo -e "\t--disable-iconv Build without iconv support"
echo -e "\t--disable-libidn Build without IDN support"
echo -e "\t--disable-ncurses Disable the use of ncurses where used (Unix/FPC TUI only)"
echo -e "\t--disable-nls Disable gettext support"
echo -e "\t--disable-readline Disable GNU Readline support (TUI only)"
echo -e "\t--disable-xml Disable XML support"
echo -e "\t--expat-version The version of Expat to use (1.0, 1.1, 1.2, 2.0, 2.1).\n\t\tOnly valid if --disable-xml wasn't specified"
echo -e "\t--help This help"
exit;;
*)
echo "Invalid option $opt. See $srcrel/configure --help for valid options."
exit;;
esac
done
echo "DESTDIR=$prefix" >> config.make
if test $? -eq 0;
then
if test "$builddir" != "$srcdir";
then
rm -fv Makefile
ln -s "$srcdir/Makefile"
install -d -m 755 "$builddir/scripts"
sed -e "s|BUILDDIR ?= \.|BUILDDIR=$builddir|g" \
-e "s|SRCDIR ?= \.|SRCDIR=$srcdir|g" \
$srcdir/scripts/common.make > $builddir/scripts/common.make
fi
make _configure
fi