source: branches/blt4/configure.in @ 1838

Last change on this file since 1838 was 1780, checked in by gah, 14 years ago
File size: 21.2 KB
Line 
1AC_INIT([Rappture],[1.1],[rappture@nanohub.org])
2dnl AC_CONFIG_HEADER(src/core/RpConfig.h)
3AC_CONFIG_AUX_DIR(cf)
4AC_CONFIG_HEADER(src/core/config.h)
5
6#------------------------------------------------------------------------
7# Handle the --prefix=... option
8#------------------------------------------------------------------------
9
10if test "${prefix}" = "NONE"; then
11    prefix=/usr/local
12fi
13if test "${exec_prefix}" = "NONE"; then
14    exec_prefix=$prefix
15fi
16
17if test "${libdir}" != "${prefix}/lib"; then
18    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
19else
20    LIB_SEARCH_DIRS="-L${libdir}"
21fi
22
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
31
32# Check for C, C++, and FORTRAN
33AC_PROG_CC
34AC_PROG_CXX
35# Avoid g95
36AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
37
38AC_LANG([C])
39
40AC_HEADER_STDC
41AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
42
43AC_LANG([C++])
44
45AC_CHECK_FUNCS([sysinfo])
46AC_CHECK_HEADERS(sys/sysinfo.h)
47
48AC_CHECK_LIB(m, main,,AC_MSG_ERROR(librappture requires libm))
49AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
50AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?))
51AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?))
52AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?))
53AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?))
54AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?))
55AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?))
56AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?))
57AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?))
58AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
59AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?))
60AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?))
61AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?))
62AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
63AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
64AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
65
66AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?))
67AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?))
68AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?))
69AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?))
70AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?))
71AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?))
72AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?))
73AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?))
74AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?))
75dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?))
76AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?))
77AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?))
78AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?))
79
80AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?))
81if test "${ac_cv_header_inttypes_h}" = "yes" ; then
82  HAVE_INTTYPES_H=1
83else
84  HAVE_INTTYPES_H=0
85fi
86AC_SUBST(HAVE_INTTYPES_H)
87
88
89SC_CONFIG_CFLAGS
90
91make_command=""
92for m in "$MAKE" make gmake gnumake ; do
93  if test "x${m}" != "x" ; then
94    if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then
95      make_command=$m; break;
96    fi
97  fi
98done
99if test "x${make_command}" = "x" ; then
100  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
101fi
102AC_SUBST(MAKE, ${make_command})
103
104AC_ARG_ENABLE(
105    [gui],
106    [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])],
107    [],
108    [enable_gui=yes])
109
110ENABLE_GUI=
111if test "$enable_gui" != "no" ; then
112    ENABLE_GUI="yes"
113fi
114AC_SUBST(ENABLE_GUI)
115
116with_tclsh="yes"
117AC_ARG_WITH(
118    [tclsh],
119    [AS_HELP_STRING([--with-tclsh[=DIR]],
120        [location of tclsh @<:@default=yes@:>@])],
121    [],
122    [with_tclsh=yes])
123
124TCLSH=
125if test "$with_tclsh" != "no" ; then
126    AC_MSG_CHECKING([for tclsh])
127    if test -x "$with_tclsh/bin/tclsh"
128    then
129        echo Found tclsh in $with_tclsh/bin/tclsh
130        TCLSH="$with_tclsh/bin/tclsh"
131    else
132        if test -x "$with_tclsh"
133        then
134            echo Found tclsh in $with_tclsh
135            TCLSH="$with_tclsh"
136        else
137            AC_PATH_PROG(TCLSH, tclsh)
138        fi
139    fi
140fi
141AC_MSG_RESULT([${TCLSH}])
142AC_SUBST(TCLSH)
143
144TCL_VERSION="8.4"
145for dir in \
146 ${exec_prefix} \
147 ${exec_prefix}/lib ; do
148  tclconfig="${dir}/tclConfig.sh"
149  if test -f "$tclconfig" ; then
150    . $tclconfig
151    break
152  fi
153done
154TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
155
156if test "x$with_tcllib" != "x" ; then
157   tclconfig="${with_tcllib}/tclConfig.sh"
158   if test -f "$tclconfig" ; then
159    . $tclconfig
160   fi
161   TCL_LIB_SPEC="-L${with_tcllib} -ltcl${TCL_VERSION}"
162fi
163if test "x$with_tclinclude" != "x" ; then
164   TCL_INC_SPEC="-I${with_tclinclude}"
165fi
166
167AC_SUBST(TCL_VERSION)
168AC_SUBST(TCL_INC_SPEC)
169AC_SUBST(TCL_LIB_SPEC)
170
171AC_ARG_WITH(
172    [vtk],
173    [AS_HELP_STRING([--with-vtk[=DIR]],
174        [location of vtk library @<:@default=yes@:>@])],
175    [with_vtk=$withval], [with_vtk=yes])
176
177AC_MSG_CHECKING([for vtk])
178VTKDIR=""
179
180if test "$with_vtk" != "no" ; then
181  if test "$with_vtk" = "yes" ; then
182    for path in \
183     $libdir \
184     $prefix/lib \
185     $exec_prefix/lib \
186     /usr/lib
187    do
188      for vtk in $path/vtk-* ; do
189        if test -d "${vtk}" ; then
190          VTKDIR=${vtk}
191        fi
192      done
193      if test "x${VTKDIR}" != "x" ; then
194        break
195      fi
196    done
197  fi
198fi
199AC_SUBST(VTKDIR)
200AC_MSG_RESULT([$VTKDIR])
201
202
203AC_ARG_WITH(
204    [matlab],
205    [AS_HELP_STRING([--with-matlab[=DIR]],
206        [location of matlab and mex compiler @<:@default=yes@:>@])],
207    [with_matlab=$withval],
208    [with_matlab=yes])
209
210MCC=""
211MEX=""
212MEX_ARCH=""
213MEXEXT=""
214MATLAB=
215if test "$with_matlab" != "no" ; then
216  if test "$with_matlab" = "yes" ; then
217    AC_PATH_PROG(MATLAB, matlab)
218  else
219    AC_PATH_PROG(MATLAB, matlab, [], [${with_matlab}/bin:${with_matlab}])
220  fi
221fi
222
223if test "x$MATLAB" != "x" ; then
224  # Found matlab.  May be a symlink to the real binary.  Run "matlab -e"
225  # to tell where matlab is installed.
226
227  matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin
228
229  # Now see if we can find "mex" or "mexext" there.
230  AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}])
231  AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}])
232
233  # Run "mexext" to get the expected module extension for this platform.
234  AC_MSG_CHECKING([for mex extension])
235  if test "x$MEXEXT" != "x" ; then
236    MEXEXT=`$MEXEXT`
237  else
238    MEXEXT="mexglx"
239  fi
240  AC_MSG_RESULT([$MEXEXT])
241  AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}])
242  AC_MSG_CHECKING([for mcc extension])
243fi
244
245AC_SUBST(MCC)
246AC_SUBST(MEX)
247AC_SUBST(MATLAB)
248AC_SUBST(MEX_ARCH)
249AC_SUBST(MEXEXT)
250
251AC_ARG_WITH(
252    [octave],
253    [AS_HELP_STRING([--with-octave[=DIR]],
254        [location of octave compiler MKOCTFILE @<:@default=yes@:>@])],
255    [with_octave=$withval],
256    [with_octave=yes])
257
258OCTAVE=
259OCTAVE_VERSION=
260OCTAVE_VERSION_MAJOR=
261MKOCTFILE=
262if test "$with_octave" != "no" ; then
263  AC_MSG_CHECKING([for octave and mkoctfile])
264  if test "$with_octave" = "yes" ; then
265    AC_PATH_PROG(OCTAVE, octave)
266    AC_PATH_PROG(MKOCTFILE, mkoctfile)
267  else
268    AC_PATH_PROG(OCTAVE, octave, [], [$with_octave/bin:$with_octave])
269    AC_PATH_PROG(MKOCTFILE, mkoctfile, [],
270        [${with_octave}/bin:${with_octave}])
271  fi
272  if test "x${OCTAVE}" != "x" ; then
273    OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4`
274    OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
275  fi
276fi
277AC_SUBST(OCTAVE)
278AC_SUBST(OCTAVE_VERSION)
279AC_SUBST(OCTAVE_VERSION_MAJOR)
280AC_SUBST(MKOCTFILE)
281
282AC_ARG_WITH(
283    [perl],
284    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
285    [],
286    [with_perl=yes])
287
288PERL=
289PERL_INCLUDES=
290PERL_ARCHLIB=
291PERL_ARCHLIBEXP=
292PERL_VERSION=
293PERL_VENDORLIB=
294PERL_PRIVLIB=
295PERL_CPPFLAGS=
296PERL_CCFlAGS=
297PERL_VERSION_RV=
298PERL_LIBSPEC=
299if test "$with_perl" != "no" ; then
300  AC_MSG_CHECKING([for perl])
301  if test "$with_perl" != "yes" ; then
302    AC_PATH_PROG(PERL, perl, [], [$with_perl/bin:$with_perl])
303  else
304    AC_PATH_PROG(PERL, perl)
305  fi
306  if test "x${PERL}" != "x" ; then
307    PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'`
308    PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'`
309    PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'`
310    PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'`
311    PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'`
312    PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'`
313    PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'`
314    PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'`
315    PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2`
316    echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}"
317
318    # libperl may or may not be installed.  Check for its existence.
319    if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then
320      PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl"
321    fi
322  fi
323fi
324AC_MSG_RESULT([${PERL}])
325AC_SUBST(PERL)
326AC_SUBST(PERL_INCLUDES)
327AC_SUBST(PERL_ARCHLIB)
328AC_SUBST(PERL_ARCHLIBEXP)
329AC_SUBST(PERL_VERSION)
330AC_SUBST(PERL_CCFLAGS)
331AC_SUBST(PERL_CPPFLAGS)
332AC_SUBST(PERL_VENDORLIB)
333AC_SUBST(PERL_PRIVLIB)
334AC_SUBST(PERL_INSTALLARCHLIB)
335AC_SUBST(PERL_VERSION_RV)
336AC_SUBST(PERL_LIBSPEC)
337
338PYTHON=""
339PYTHON_CFLAGS=""
340PYTHON_CPPFLAGS=""
341HAVE_PYTHON_DISTUTILS=""
342PYTHON_INCLUDES=""
343PYTHON_LDFLAGS=""
344PYTHON_LIB=""
345PYTHON_LIBDIR=""
346PYTHON_SITE_DIR=""
347PYTHON_SITE_PACKAGES=""
348PYTHON_VERSION=""
349pythondir=""
350
351AC_ARG_WITH([python],
352    [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])],
353    [],
354    [with_python=yes])
355
356if test "$with_python" != "no" ; then
357  AC_MSG_CHECKING([for python])
358  if test -x "$with_python/bin/python"; then
359    echo Found python in $with_python/bin/python
360    PYTHON="$with_python/bin/python"
361  elif test -x "$with_python"; then
362    echo Found python in $with_python
363    PYTHON="$with_python"
364  else
365    AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
366  fi
367  if test "x${PYTHON}" != "x"; then
368    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
369    echo Using python version $PYTHON_VERSION
370  fi
371  if test "x${PYTHON_VERSION}" != "x"; then
372    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
373     -d $with_python/lib/python$PYTHON_VERSION/site-packages; then
374      PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
375      PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
376    else
377      if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then
378        PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
379        PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
380      else
381        if test -r /usr/include/python$PYTHON_VERSION/Python.h; then
382          PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
383          PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
384        else
385          echo could not find python$PYTHON_VERSION/Python.h
386        fi
387      fi
388      if test ! -d "$PYTHON_SITE_PACKAGES"; then
389        PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
390      fi
391    fi
392  fi
393  if test "x$with_python" != "x" ;  then
394    pythondir='$(PYTHON_SITE_PACKAGES)'
395  else
396    pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
397  fi
398
399  AC_MSG_CHECKING([for python distutils])
400  ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \
401        build build_ext 2>&1 > /dev/null
402  if test $? = 0 ; then
403    HAVE_PYTHON_DISTUTILS="yes"
404  else
405     HAVE_PYTHON_DISTUTILS="no"
406  fi
407  AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS])
408
409  if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then
410    #
411    # Check for Python include path
412    #
413    AC_MSG_CHECKING([for Python include path])
414    if test "x${PYTHON_CPPFLAGS}" = "x"; then
415      incdir_path=`${PYTHON} -c "import distutils.sysconfig; \
416       print distutils.sysconfig.get_python_inc();"`
417      if test -n "${incdir}"; then
418        python_path="-I${incdir}"
419      fi
420      PYTHON_CPPFLAGS=$python_path
421    fi
422    AC_MSG_RESULT([$PYTHON_CPPFLAGS])
423    AC_SUBST([PYTHON_CPPFLAGS])
424    #
425    # python distutils found, get settings from python directly
426    #
427    AC_MSG_CHECKING([location of site-packages])
428    PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`"
429
430    PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
431    PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
432    PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`"
433    PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`"
434  fi
435fi 
436AC_SUBST(pythondir)
437
438AC_SUBST(PYTHON)
439AC_SUBST(PYTHON_VERSION)
440AC_SUBST(PYTHON_INCLUDES)
441AC_SUBST(PYTHON_SITE_PACKAGES)
442AC_SUBST(HAVE_PYTHON_DISTUTILS)
443
444with_ruby="yes"
445
446RUBY=""
447RUBY_DEV_PKG="no"
448
449AC_ARG_WITH(ruby,
450  AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]),
451  [with_ruby=$with_val])
452if test "${with_ruby}" != "no" ; then
453  if test "${with_ruby}" = "yes" ; then
454    AC_PATH_PROG(RUBY, ruby)
455  else
456    AC_PATH_PROG(RUBY, ruby, [],
457      [${with_ruby}/bin/ruby:${with_ruby}])
458  fi
459fi
460AC_SUBST(RUBY)
461
462RUBY_VERSION_RV=
463RUBY_PLATFORM=
464if test "x${RUBY}" != "x" ; then
465  AX_PROG_RUBY_VERSION
466  RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2`
467  RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'`
468  ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1`
469  if test -z "$ac_mkmf_result"; then
470    HAVE_RUBY_DEVEL="yes"
471    AX_RUBY_DEV_FLAGS([${RUBY}])
472  fi
473fi
474AC_SUBST(HAVE_RUBY_DEVEL)
475AC_SUBST(RUBY_VERSION_RV)
476AC_SUBST(RUBY_PLATFORM)
477
478with_java="yes"
479JAVA=""
480JAVAH=""
481JAVAC=""
482JAVA_DEV_PKG="no"
483
484JDK=
485JAVA_HOME=
486JAVA_INC_DIR=
487JAVA_INC_SPEC=
488
489# If java exists, let's look for the jni.h file.
490if test "x${JAVA}" != "x" ; then
491  for d in \
492   ${with_java} \
493   /usr/lib/jvm/java-6-sun \
494   /apps/java/jdk1.6.0_01 \
495   /opt/icedtea6-* \
496   /opt/sun-jdk-1.6* \
497   /opt/sun-jdk-1.5*
498  do
499    if test -r "${d}/include/jni.h" ; then
500      JDK=${d}
501      break;
502    fi
503  done
504  JAVA_HOME=$JDK
505  JAVA_INC_DIR=${JDK}/include
506  JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux"
507fi
508
509AC_ARG_WITH(java,
510  AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]),
511  [with_java=$with_val])
512if test "${with_java}" != "no" ; then
513  if test "${with_java}" = "yes" ; then
514    AC_PATH_PROG(JAVA, java)
515    AC_PATH_PROG(JAVAC, javac)
516    AC_PATH_PROG(JAVAH, javah)
517  else
518    AC_PATH_PROG(JAVA, java, [],
519      [${with_java}/bin:${with_java}])
520    AC_PATH_PROG(JAVAC, javac, [],
521      [${with_java}/bin:${with_java}])
522    AC_PATH_PROG(JAVAH, javah, [],
523      [${with_java}/bin:${with_java}])
524  fi
525fi
526
527AC_SUBST(JAVA)
528AC_SUBST(JAVAC)
529AC_SUBST(JAVAH)
530AC_SUBST(JAVA_HOME)
531AC_SUBST(JAVA_INC_DIR)
532AC_SUBST(JAVA_INC_SPEC)
533
534AC_MSG_CHECKING([for OpenDX headers])
535DX_INC_DIR=""
536for dir in \
537 /apps/rappture/include \
538 /usr/dx/include \
539 /usr/include
540do
541  if test -r "${dir}/dx/dx.h" ; then
542    DX_INC_DIR="$dir"
543    break
544  fi
545done
546
547if test "${DX_INC_DIR}" = "/usr/include" ; then
548  DX_INC_SPEC=""
549else
550  DX_INC_SPEC="-I{DX_INC_DIR}"
551fi
552AC_SUBST(DX_INC_SPEC)
553AC_MSG_RESULT([${DX_INC_DIR}])
554
555AC_MSG_CHECKING([for OpenDX libraries])
556DX_LIB_DIR=""
557for dir in \
558 /apps/rappture/lib \
559 /usr/lib/dx/lib_linux \
560 /usr/dx/lib_linux \
561 /usr/lib
562do
563  if test -r "${dir}/libDXcallm.a" ; then
564    DX_LIB_DIR="$dir"
565    break
566  fi
567done
568
569if test "${DX_LIB_DIR}" = "/usr" ; then
570  DX_LIB_SPEC=""
571else
572  DX_LIB_SPEC="-L${DX_LIB_DIR}"
573fi
574
575AC_SUBST(DX_LIB_SPEC)
576AC_MSG_RESULT([${DX_LIB_DIR}])
577
578RP_BASE=`pwd`
579AC_SUBST(RP_BASE)
580
581SC_ENABLE_SHARED
582
583#--------------------------------------------------------------------
584# This macro figures out what flags to use with the compiler/linker
585# when building shared/static debug/optimized objects.  This information
586# is all taken from the tclConfig.sh file.
587#--------------------------------------------------------------------
588
589AC_SUBST(CFLAGS_DEBUG)
590AC_SUBST(CFLAGS_OPTIMIZE)
591AC_SUBST(STLIB_LD)
592AC_SUBST(SHLIB_LD)
593AC_SUBST(SHLIB_CFLAGS)
594AC_SUBST(SHLIB_LDFLAGS)
595AC_SUBST(SHLIB_SUFFIX)
596
597if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
598  . ${exec_prefix}/lib/tclConfig.sh
599fi
600if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
601  . ${exec_prefix}/lib/tkConfig.sh     
602fi
603AC_SUBST(TCL_VERSION)
604AC_SUBST(TK_VERSION)
605
606# -----------------------------------------------------------------------
607#
608# Compiler characteristics:
609#   Check for existence of types of size_t and pid_t
610#
611# -----------------------------------------------------------------------
612
613AC_C_BIGENDIAN
614AC_CHECK_SIZEOF(int)
615AC_CHECK_SIZEOF(long)
616AC_CHECK_SIZEOF(long long)
617AC_CHECK_SIZEOF(void *)
618
619SIZEOF_LONG="${ac_cv_sizeof_long}"
620SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}"
621SIZEOF_VOID_P="${ac_cv_sizeof_void_p}"
622SIZEOF_INT="${ac_cv_sizeof_int}"
623AC_SUBST(SIZEOF_INT)
624AC_SUBST(SIZEOF_LONG)
625AC_SUBST(SIZEOF_LONG_LONG)
626AC_SUBST(SIZEOF_VOID_P)
627
628
629#--------------------------------------------------------------------
630# Set the default compiler switches based on the --enable-symbols
631# option.
632#--------------------------------------------------------------------
633
634SC_ENABLE_SYMBOLS
635
636if test "${SHARED_BUILD}" = "1" ; then
637    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
638else
639    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
640fi
641
642ac_configure_args="--disable-threads --enable-shared"
643AC_CONFIG_SUBDIRS( [packages/optimizer/src] )
644
645dnl read Makefile.in and write Makefile
646AC_CONFIG_FILES([
647    Makefile
648    packages/Makefile
649    src/Makefile
650    src/core/Makefile
651    src/core2/Makefile
652    src/objects/Makefile
653    src/objects/RpHash.h
654    gui/Makefile
655    gui/apps/Makefile
656    gui/apps/about
657    gui/apps/encodedata
658    gui/apps/rappture
659    gui/apps/rappture-csh.env
660    gui/apps/rappture.env
661    gui/apps/rappture.use
662    gui/apps/rerun
663    gui/apps/simsim
664    gui/apps/xmldiff
665    gui/pkgIndex.tcl
666    gui/scripts/Makefile
667    instant/Makefile
668    instant/irappture
669    lang/Makefile
670    lang/java/Makefile
671    lang/java/rappture/Makefile
672    lang/perl/Makefile
673    lang/perl/Makefile.PL
674    lang/python/Makefile
675    lang/python/setup.py
676    lang/matlab/Makefile
677    lang/octave/Makefile
678    lang/octave/RpOctaveInterface.h
679    lang/ruby/Makefile
680    lang/ruby/build.rb
681    lang/tcl/Makefile
682    lang/tcl/pkgIndex.tcl
683    lang/tcl/src/Makefile
684    lang/tcl/scripts/Makefile
685    lang/tcl/tests/Makefile
686    lib/Makefile
687    examples/3D/Makefile
688    examples/Makefile
689    examples/app-fermi/2.0/Makefile
690    examples/app-fermi/Makefile
691    examples/app-fermi/cee/Makefile
692    examples/app-fermi/fortran/Makefile
693    examples/app-fermi/java/Makefile
694    examples/app-fermi/matlab/Makefile
695    examples/app-fermi/matlab/compiled/Makefile
696    examples/app-fermi/matlab/uncompiled/Makefile
697    examples/app-fermi/octave/Makefile
698    examples/app-fermi/octave/2/Makefile
699    examples/app-fermi/octave/3/Makefile
700    examples/app-fermi/perl/Makefile
701    examples/app-fermi/python/Makefile
702    examples/app-fermi/ruby/Makefile
703    examples/app-fermi/tcl/Makefile
704    examples/app-fermi/wrapper/Makefile
705    examples/app-fermi/wrapper/cee/Makefile
706    examples/app-fermi/wrapper/python/Makefile
707    examples/app-fermi/wrapper/tcl/Makefile
708    examples/c-example/Makefile
709    examples/canvas/Makefile
710    examples/demo.bash
711    examples/flow/Makefile
712    examples/flow/demo1/Makefile
713    examples/flow/demo2/Makefile
714    examples/flow/demo3/Makefile
715    examples/graph/Makefile
716    examples/objects/Makefile
717    examples/objects/axis/Makefile
718    examples/objects/contour/Makefile
719    examples/objects/curve/Makefile
720    examples/objects/dxWriter/Makefile
721    examples/objects/floatBuffer/Makefile
722    examples/objects/histogram/Makefile
723    examples/objects/library/Makefile
724    examples/objects/number/Makefile
725    examples/objects/path/Makefile
726    examples/objects/plot/Makefile
727    examples/objects/scatter/Makefile
728    examples/objects/string/Makefile
729    examples/objects/tree/Makefile
730    examples/objects/xmlparser/Makefile
731    examples/zoo/Makefile
732    examples/zoo/binary/Makefile
733    examples/zoo/boolean/Makefile
734    examples/zoo/choice/Makefile
735    examples/zoo/cloud/Makefile
736    examples/zoo/cloud/matlab/Makefile
737    examples/zoo/curve/Makefile
738    examples/zoo/enable/Makefile
739    examples/zoo/field/Makefile
740    examples/zoo/filechoice/Makefile
741    examples/zoo/group/Makefile
742    examples/zoo/image/Makefile
743    examples/zoo/image/docs/Makefile
744    examples/zoo/image/examples/Makefile
745    examples/zoo/integer/Makefile
746    examples/zoo/integer2/Makefile
747    examples/zoo/loader/Makefile
748    examples/zoo/loader/examples/Makefile
749    examples/zoo/loadrun/Makefile
750    examples/zoo/log/Makefile
751    examples/zoo/note/Makefile
752    examples/zoo/note/docs/Makefile
753    examples/zoo/number/Makefile
754    examples/zoo/number2/Makefile
755    examples/zoo/periodicelement/Makefile
756    examples/zoo/phase/Makefile
757    examples/zoo/sequence/Makefile
758    examples/zoo/sequence/examples/Makefile
759    examples/zoo/string/Makefile
760    examples/zoo/structure/Makefile
761    examples/zoo/structure/examples/Makefile
762    examples/zoo/table/Makefile
763    examples/zoo/unirect2d/Makefile
764    test/Makefile
765    test/src/Makefile
766])
767AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.