File: configure

package info (click to toggle)
swi-prolog 6.6.6-1~bpo70+1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 82,312 kB
  • sloc: ansic: 322,250; perl: 245,822; sh: 6,651; java: 5,254; makefile: 4,423; cpp: 4,153; ruby: 1,594; yacc: 843; xml: 82; sed: 12; sql: 6
file content (84 lines) | stat: -rwxr-xr-x 1,896 bytes parent folder | download | duplicates (3)
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=""
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-*)	pkg=`echo $1 | sed 's/--without-//'`
			DISABLE_PKGS="$DISABLE_PKGS $pkg"
			export DISABLE_PKGS
			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%" \
	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