aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gs/configure.in')
-rw-r--r--lib/gs/configure.in46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/gs/configure.in b/lib/gs/configure.in
new file mode 100644
index 0000000000..e809ba475f
--- /dev/null
+++ b/lib/gs/configure.in
@@ -0,0 +1,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
+ )