forked from SWI-Prolog/swipl-devel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·84 lines (72 loc) · 1.89 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
#!/bin/sh
#
# The real work is done in the `src' directory. This is just here to
# allow for the standard ./configure && make && make install sequence
# from the topdirectory
#
# If you want more than just te naked Prolog compiler (most likely), we
# advice using build.templ. See the file INSTALL for details.
TARGET=lite
configoptions=""
packagesconfigoptions=""
kerneloptions=""
usage()
{ cat << _EOM_
Usage: configure option ...
Options:
--with-world Build all (default packages)
--without-<package> Exclude package. Notably --without-jpl excludes
often troublesome building of the JPL interface.
--link Install using symbolic links to the development
tree. This option is intended for developers.
This toplevel configure and Makefile ony deal with very standard
installations. More complicated cases should check INSTALL.notes and use
the configure and makefiles in the src and package directories.
_EOM_
}
while [ "$1" != "" ]; do
case "$1" in
--with-world) TARGET=world
shift
;;
--without-*) packagesconfigoptions="$packagesconfigoptions $1"
shift
;;
--link) TARGET="ln-$TARGET"
shift
;;
--help) usage
exit 0
;;
--*-libdirversion*|--*-useprofile*)
kerneloptions="$kerneloptions $1"
shift
;;
*) configoptions="$configoptions $1"
shift
;;
esac
done
if [ -z "$BUILDARCH" ]; then
BUILDARCH=src;
fi
if [ ! -d "$BUILDARCH" ]; then mkdir "$BUILDARCH"; fi
sed -e "s/@BUILDARCH@/$BUILDARCH/" \
-e "s/@TARGET@/$TARGET/" \
-e "s%@CONFIG_OPTIONS@%$configoptions%" \
-e "s%@PACKAGES_CONFIG_OPTIONS@%$packagesconfigoptions%" \
Makefile.in > Makefile
if [ -d .git ]; then
if ! ./prepare; then
exit 1
fi
fi
config_kernel()
{ if [ ! -r config.h -o config.h -ot ../src/configure ]; then
../src/configure $kerneloptions $configoptions
return $?
fi
}
if ! (cd $BUILDARCH && config_kernel); then
exit 1
fi