aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/configure.in
blob: e809ba475f56253d5f60c0800849c3eb397c0f01 (plain) (blame)
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
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl

dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gs.erl)

if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
  AC_MSG_ERROR(You need to set the environment variable ERL_TOP!)
fi
erl_top=${ERL_TOP}
AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)

dnl FIXME: Should be AC_CANONICAL_TARGET but we follow pattern in
dnl main configure.in.

if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
    AC_CANONICAL_HOST
    system_type=${host_cpu}_`echo $host_os | sed 's/^\([[^\.]]*\)\.\(.*\)$/\1/'`
else
    system_type=$host
fi



dnl
dnl We try to find a prebuilt Tcl/Tk distribution that will later
dnl be unpacked into "priv/tcl". The 'gstk_port_handler' module
dnl seach for the "wish" program int this direcory first before
dnl searching the operating system executable search path.
dnl

AC_SUBST(TCL_TAR)

AC_MSG_CHECKING(for prebuilt tcl/tk in tcl/binaries/$system_type.tar.gz)
if test -f "tcl/binaries/$system_type.tar.gz" ; then
    TCL_TAR="binaries/$system_type.tar.gz"
    AC_MSG_RESULT(found)
else
    TCL_TAR=""
    AC_MSG_RESULT(not found, using PATH at runtime)
fi

AC_OUTPUT(
  tcl/$host/Makefile:tcl/Makefile.in
  tcl/win32/Makefile:tcl/Makefile.in
  )