source: branches/r9/gui/configure.in @ 4840

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