1 | |
---|
2 | AC_INIT([RapptureGUI],[1.9],[rappture@nanohub.org]) |
---|
3 | AC_CONFIG_AUX_DIR(cf) |
---|
4 | #------------------------------------------------------------------------ |
---|
5 | # Handle the --prefix=... option |
---|
6 | #------------------------------------------------------------------------ |
---|
7 | |
---|
8 | if test "${prefix}" = "NONE"; then |
---|
9 | prefix=/usr/local |
---|
10 | fi |
---|
11 | if test "${exec_prefix}" = "NONE"; then |
---|
12 | exec_prefix=$prefix |
---|
13 | fi |
---|
14 | |
---|
15 | INSTALL_PREFIX=$prefix |
---|
16 | |
---|
17 | if test "${libdir}" != "${prefix}/lib"; then |
---|
18 | LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" |
---|
19 | else |
---|
20 | LIB_SEARCH_DIRS="-L${libdir}" |
---|
21 | fi |
---|
22 | AC_CANONICAL_TARGET |
---|
23 | AC_SUBST(LIB_SEARCH_DIRS) |
---|
24 | |
---|
25 | AC_PROG_INSTALL |
---|
26 | AC_PROG_INSTALL |
---|
27 | AC_PROG_RANLIB |
---|
28 | AC_PROG_LN_S |
---|
29 | AC_PROG_MKDIR_P |
---|
30 | AC_PROG_MAKE_SET |
---|
31 | AC_PROG_CC |
---|
32 | |
---|
33 | #SC_CONFIG_CFLAGS |
---|
34 | #SC_ENABLE_SHARED |
---|
35 | |
---|
36 | SVN_VERSION=`svnversion $srcdir | sed 's/Unversioned directory/unknown/'` |
---|
37 | SVN_URL=`readlink -e $srcdir | xargs svn info | sed -ne 's/^URL: //p'` |
---|
38 | |
---|
39 | gui_with_tcl="" |
---|
40 | |
---|
41 | make_command="" |
---|
42 | for 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 |
---|
48 | done |
---|
49 | if test "x${make_command}" = "x" ; then |
---|
50 | AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) |
---|
51 | fi |
---|
52 | AC_SUBST(MAKE, ${make_command}) |
---|
53 | |
---|
54 | AC_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 | |
---|
60 | ENABLE_GUI= |
---|
61 | if test "$enable_gui" != "no" ; then |
---|
62 | ENABLE_GUI="yes" |
---|
63 | fi |
---|
64 | AC_SUBST(ENABLE_GUI) |
---|
65 | |
---|
66 | with_tclsh="yes" |
---|
67 | AC_ARG_WITH( |
---|
68 | [tclsh], |
---|
69 | [AS_HELP_STRING([--with-tclsh[=DIR]], |
---|
70 | [location of tclsh @<:@default=yes@:>@])], |
---|
71 | [], |
---|
72 | [with_tclsh=yes]) |
---|
73 | |
---|
74 | TCLSH= |
---|
75 | # ----------------------------------------------------------------------- |
---|
76 | # |
---|
77 | # Find the Tcl build configuration file "tclConfig.sh" |
---|
78 | # |
---|
79 | # ----------------------------------------------------------------------- |
---|
80 | |
---|
81 | AC_MSG_CHECKING([for tclConfig.sh]) |
---|
82 | tcl_config_sh="" |
---|
83 | if 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 |
---|
99 | else |
---|
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 |
---|
118 | fi |
---|
119 | |
---|
120 | AC_MSG_RESULT([${tcl_config_sh}]) |
---|
121 | |
---|
122 | if test "x$tcl_config_sh" = "x" ; then |
---|
123 | echo "can't find Tcl configuration script \"tclConfig.sh\"" |
---|
124 | exit 1 |
---|
125 | fi |
---|
126 | . ${tcl_config_sh} |
---|
127 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
128 | |
---|
129 | case $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 | ;; |
---|
142 | esac |
---|
143 | |
---|
144 | AC_MSG_RESULT([${TCLSH}]) |
---|
145 | AC_SUBST(TCLSH) |
---|
146 | |
---|
147 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
148 | . ${exec_prefix}/lib/tclConfig.sh |
---|
149 | fi |
---|
150 | if test -f "${exec_prefix}/lib/tkConfig.sh" ; then |
---|
151 | . ${exec_prefix}/lib/tkConfig.sh |
---|
152 | fi |
---|
153 | |
---|
154 | AC_SUBST(INSTALL_PREFIX) |
---|
155 | AC_SUBST(SVN_URL) |
---|
156 | AC_SUBST(SVN_VERSION) |
---|
157 | AC_SUBST(TCL_CFLAGS_DEBUG) |
---|
158 | AC_SUBST(TCL_CFLAGS_OPTIMIZE) |
---|
159 | AC_SUBST(TCL_INC_SPEC) |
---|
160 | AC_SUBST(TCL_LIB_SPEC) |
---|
161 | AC_SUBST(TCL_SHLIB_CFLAGS) |
---|
162 | AC_SUBST(TCL_SHLIB_LD) |
---|
163 | AC_SUBST(TCL_SHLIB_LDFLAGS) |
---|
164 | AC_SUBST(TCL_SHLIB_SUFFIX) |
---|
165 | AC_SUBST(TCL_SRC_DIR) |
---|
166 | AC_SUBST(TCL_STLIB_LD) |
---|
167 | AC_SUBST(TCL_VERSION) |
---|
168 | AC_SUBST(TK_INC_SPEC) |
---|
169 | AC_SUBST(TK_LIB_SPEC) |
---|
170 | AC_SUBST(TK_SRC_DIR) |
---|
171 | AC_SUBST(TK_XLIBSW) |
---|
172 | AC_SUBST(TK_VERSION) |
---|
173 | |
---|
174 | |
---|
175 | AC_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 | ]) |
---|
191 | AC_OUTPUT |
---|