source: branches/geomap/gui/configure.in

Last change on this file was 4847, checked in by ldelgass, 10 years ago

bump version

File size: 3.9 KB
Line 
1
2AC_INIT([RapptureGUI],[1.5],[rappture@nanohub.org])
3AC_CONFIG_AUX_DIR(cf)
4#------------------------------------------------------------------------
5# Handle the --prefix=... option
6#------------------------------------------------------------------------
7
8if test "${prefix}" = "NONE"; then
9    prefix=/usr/local
10fi
11if test "${exec_prefix}" = "NONE"; then
12    exec_prefix=$prefix
13fi
14
15if test "${libdir}" != "${prefix}/lib"; then
16    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
17else
18    LIB_SEARCH_DIRS="-L${libdir}"
19fi
20AC_CANONICAL_TARGET
21AC_SUBST(LIB_SEARCH_DIRS)
22
23AC_PROG_INSTALL
24AC_PROG_INSTALL
25AC_PROG_RANLIB
26AC_PROG_LN_S
27AC_PROG_MKDIR_P
28AC_PROG_MAKE_SET
29AC_PROG_CC
30
31#SC_CONFIG_CFLAGS
32#SC_ENABLE_SHARED
33
34gui_with_tcl=""
35
36make_command=""
37for m in "$MAKE" make gmake gnumake ; do
38  if test "x${m}" != "x" ; then
39    if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then
40      make_command=$m; break;
41    fi
42  fi
43done
44if test "x${make_command}" = "x" ; then
45  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
46fi
47AC_SUBST(MAKE, ${make_command})
48
49AC_ARG_ENABLE(
50    [gui],
51    [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])],
52    [],
53    [enable_gui=yes])
54
55ENABLE_GUI=
56if test "$enable_gui" != "no" ; then
57    ENABLE_GUI="yes"
58fi
59AC_SUBST(ENABLE_GUI)
60
61with_tclsh="yes"
62AC_ARG_WITH(
63    [tclsh],
64    [AS_HELP_STRING([--with-tclsh[=DIR]],
65        [location of tclsh @<:@default=yes@:>@])],
66    [],
67    [with_tclsh=yes])
68
69TCLSH=
70# -----------------------------------------------------------------------
71#
72#       Find the Tcl build configuration file "tclConfig.sh"
73#
74# -----------------------------------------------------------------------
75
76AC_MSG_CHECKING([for tclConfig.sh])
77tcl_config_sh=""
78if test "x$gui_with_tcl" != "x" ; then
79
80  # Verify that a tclConfig.sh file exists in the directory specified
81  # by --with-tcl.
82
83  for dir in \
84   $gui_with_tcl
85  do
86    if test -r "$dir/tclConfig.sh" ; then
87      tcl_config_sh="$dir/tclConfig.sh"
88      break
89    elif test -r "$dir/lib/tclConfig.sh" ; then
90      tcl_config_sh="$dir/lib/tclConfig.sh"
91      break
92    fi
93  done
94else
95
96  # Otherwise, search for Tcl configuration file. 
97
98  #  1. Search previously named locations.
99
100  for dir in \
101   $prefix \
102   $exec_prefix \
103   $gui_cv_tcl_lib
104  do
105    if test -r "$dir/tclConfig.sh" ; then
106      tcl_config_sh="$dir/tclConfig.sh"
107      break
108    elif test -r "$dir/lib/tclConfig.sh" ; then
109      tcl_config_sh="$dir/lib/tclConfig.sh"
110      break
111    fi
112  done
113fi
114
115AC_MSG_RESULT([${tcl_config_sh}])
116
117if test "x$tcl_config_sh" = "x" ; then
118  echo "can't find Tcl configuration script \"tclConfig.sh\""
119  exit 1
120fi
121. ${tcl_config_sh}
122TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
123
124case $target in
125  *-*-cygwin*|*-*-mingw*)
126    gui_platform="win"
127    TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}
128    ;;
129  *-*-darwin*)
130    gui_platform="macosx"
131    TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}
132    ;;
133  *)
134    blt_platform="unix"
135    TCLSH=${TCL_PREFIX}/bin/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}
136    ;;
137esac
138
139AC_MSG_RESULT([${TCLSH}])
140AC_SUBST(TCLSH)
141
142if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
143  . ${exec_prefix}/lib/tclConfig.sh
144fi
145if test -f "${exec_prefix}/lib/tkConfig.sh" ; then
146  . ${exec_prefix}/lib/tkConfig.sh     
147fi
148AC_SUBST(TCL_INC_SPEC)
149AC_SUBST(TCL_LIB_SPEC)
150AC_SUBST(TCL_VERSION)
151AC_SUBST(TK_INC_SPEC)
152AC_SUBST(TK_LIB_SPEC)
153AC_SUBST(TK_XLIBSW)
154AC_SUBST(TK_VERSION)
155AC_SUBST(TCL_CFLAGS_DEBUG)
156AC_SUBST(TCL_CFLAGS_OPTIMIZE)
157AC_SUBST(TCL_STLIB_LD)
158AC_SUBST(TCL_SHLIB_LD)
159AC_SUBST(TCL_SHLIB_CFLAGS)
160AC_SUBST(TCL_SHLIB_LDFLAGS)
161AC_SUBST(TCL_SHLIB_SUFFIX)
162
163
164AC_CONFIG_FILES([
165    Makefile
166    pkgIndex.tcl
167    apps/Makefile
168    apps/about
169    apps/encodedata
170    apps/rappture
171    apps/rappture-csh.env
172    apps/rappture.env
173    apps/rappture.use
174    apps/rerun
175    apps/simsim
176    apps/xmldiff
177    scripts/Makefile
178    src/Makefile
179])
180AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.