source: branches/1.6/gui/configure.in @ 6291

Last change on this file since 6291 was 6160, checked in by ldelgass, 9 years ago

merge r6137 from trunk (remove hardcoded path to Tcl/Tk? sources)

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