source: trunk/gui/configure.in @ 2414

Last change on this file since 2414 was 2400, checked in by ldelgass, 13 years ago

Fix Makefile.in for vtkviewer-test filename change

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