Changeset 4146 for trunk/configure.in


Ignore:
Timestamp:
Jan 22, 2014, 8:35:03 PM (11 years ago)
Author:
gah
Message:

revert to last version: remove changes for new build system for rappture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r4144 r4146  
    22AC_INIT([Rappture],[1.4],[rappture@nanohub.org])
    33AC_CONFIG_AUX_DIR(cf)
     4AC_CONFIG_HEADER(src/core/config.h)
    45
    56#------------------------------------------------------------------------
     
    3738AC_PROG_INSTALL
    3839AC_PROG_INSTALL
     40AC_PROG_RANLIB
    3941AC_PROG_LN_S
    4042AC_PROG_MKDIR_P
    4143AC_PROG_MAKE_SET
    42 
    43 AC_MSG_CHECKING([RAPPTURE_MAJOR_VERSION])
    44 RAPPTURE_MAJOR_VERSION=1
    45 AC_MSG_RESULT($RAPPTURE_MAJOR_VERSION)
    46 
    47 AC_MSG_CHECKING([RAPPTURE_MINOR_VERSION])
    48 RAPPTURE_MINOR_VERSION=4
    49 AC_MSG_RESULT($RAPPTURE_MINOR_VERSION)
    50 
    51 AC_MSG_CHECKING([RAPPTURE_RELEASE_SERIAL])
    52 RAPPTURE_RELEASE_SERIAL=0
    53 AC_MSG_RESULT($RAPPTURE_RELEASE_SERIAL)
    54 
    55 RAPPTURE_VERSION=${RAPPTURE_MAJOR_VERSION}.${RAPPTURE_MINOR_VERSION}
    56 
    57 AC_SUBST(VERSION)
    58 AC_SUBST(RAPPTURE_VERSION)
    59 AC_SUBST(RAPPTURE_MINOR_VERSION)
    60 AC_SUBST(RAPPTURE_MAJOR_VERSION)
    61 AC_SUBST(RAPPTURE_RELEASE_SERIAL)
    62 
    63 AC_PATH_X
    64 
    65 X_INCLUDES=${x_includes}
    66 X_LIBRARIES=${x_libraries}
    67 AC_SUBST(X_INCLUDES)
    68 AC_SUBST(X_LIBRARIES)
    6944
    7045# Check for C, C++, and FORTRAN
     
    7752
    7853AC_HEADER_STDC
     54AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
     55
    7956AC_LANG([C++])
     57
     58AC_CHECK_FUNCS(sysinfo)
     59AC_CHECK_FUNCS(gettimeofday)
     60AC_CHECK_FUNC(localtime,,AC_MSG_ERROR(oops! no localtime ?!?))
     61AC_CHECK_FUNC(getenv,,AC_MSG_ERROR(oops! no getenv ?!?))
     62
     63AC_CHECK_HEADERS(sys/sysinfo.h)
     64
     65AC_CHECK_LIB(ncurses, clrtoeol,,AC_MSG_ERROR([ncurses library missing?]))
     66AC_CHECK_HEADERS(ncurses.h,,AC_MSG_WARN(ncurses headers missing ?))
     67
     68AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
     69AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?))
     70AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?))
     71AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?))
     72AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?))
     73AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?))
     74AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?))
     75AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?))
     76AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?))
     77AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
     78AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?))
     79AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?))
     80AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?))
     81AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
     82AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
     83AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
     84
     85AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?))
     86AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?))
     87AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?))
     88AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?))
     89AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?))
     90AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?))
     91AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?))
     92AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?))
     93AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?))
     94dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?))
     95AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?))
     96AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?))
     97AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?))
     98
     99AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?))
     100if test "${ac_cv_header_inttypes_h}" = "yes" ; then
     101  HAVE_INTTYPES_H=1
     102else
     103  HAVE_INTTYPES_H=0
     104fi
     105
    80106
    81107SC_CONFIG_CFLAGS
     
    93119if test "x${make_command}" = "x" ; then
    94120  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
     121fi
     122
     123AC_ARG_ENABLE(
     124    [lang],
     125    [AS_HELP_STRING([--enable-lang], [build language bindings @<:@default=yes@:>@])],
     126    [],
     127    [enable_lang=yes])
     128
     129ENABLE_LANG=
     130if test "$enable_lang" != "no" ; then
     131    ENABLE_LANG="yes"
    95132fi
    96133
     
    117154done
    118155
     156AC_ARG_WITH(
     157    [ffmpeg],
     158    [AS_HELP_STRING([--with-ffmpeg[=DIR]],
     159      [location of ffmpeg @<:@default=yes@:>@])],
     160    [],
     161    [with_ffmpeg=yes])
     162
     163AC_ARG_WITH(
     164    [tclsh],
     165    [AS_HELP_STRING([--with-tclsh[=DIR]],
     166        [location of tclsh @<:@default=yes@:>@])],
     167    [],
     168    [with_tclsh=yes])
     169
     170TCLSH=""
     171if test "${with_tclsh}" != "no" ; then
     172  tclsh="tclsh${TCL_VERSION}"
     173  if test "${with_tclsh}" = "yes" ; then
     174    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}])
     175  else
     176    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${with_tclsh}/bin:${with_tclsh}])
     177  fi
     178  if test "x${TCLSH}" = "x" ; then
     179    AC_ERROR([can't find tclsh])
     180  fi
     181fi
     182
     183
     184TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
     185
     186AC_ARG_WITH(
     187    [vtk],
     188    [AS_HELP_STRING([--with-vtk[=version]],
     189        [VTK library version @<:@default=6.0@:>@])],
     190    [],
     191    [with_vtk=yes])
     192
     193AC_MSG_CHECKING([for vtk])
     194VTK_VERSION=6.0
     195VTK_TCL_DIR=""
     196
     197if test "$with_vtk" != "no" ; then
     198  if test "$with_vtk" != "yes" ; then
     199    VTK_VERSION=$with_vtk
     200  fi
     201  if test "x$with_vtk" != "x" ; then
     202    for path in \
     203     $libdir/tcltk \
     204     $exec_prefix/lib/tcltk \
     205     $prefix/lib/tcltk \
     206     $libdir \
     207     $prefix/lib \
     208     $exec_prefix/lib \
     209     /usr/lib
     210    do
     211      if test -d "$path/vtk-$VTK_VERSION" ; then
     212        VTK_TCL_DIR="$path/vtk-$VTK_VERSION"
     213      fi
     214      if test "x${VTK_TCL_DIR}" != "x" ; then
     215        break
     216      fi
     217    done
     218  fi
     219else
     220  if test "${ENABLE_GUI}" = "yes" ; then
     221    AC_MSG_ERROR([Rappture GUI requires VTK])
     222  fi
     223fi
     224AC_MSG_RESULT([$VTK_TCL_DIR])
     225
     226AC_ARG_ENABLE(
     227    [vtkdicom],
     228    [AS_HELP_STRING([--enable-vtkdicom],
     229        [Use vtkDICOM package @<:@default=no@:>@])],
     230    [],
     231    [enable_vtkdicom=no])
     232
     233AC_MSG_CHECKING([for vtkDICOM])
     234ENABLE_VTK_DICOM=
     235if test "$enable_vtkdicom" != "no" ; then
     236    ENABLE_VTK_DICOM="yes"
     237fi
     238AC_MSG_RESULT([$enable_vtkdicom])
     239
     240RP_LANG_MATLAB
     241RP_LANG_OCTAVE
     242RP_LANG_PERL
     243RP_LANG_PYTHON
     244RP_LANG_JAVA
     245RP_LANG_R
     246RP_LANG_RUBY
     247
    119248RP_BASE=`pwd`
    120249
    121250SC_ENABLE_SHARED
     251
     252#--------------------------------------------------------------------
     253# This macro figures out what flags to use with the compiler/linker
     254# when building shared/static debug/optimized objects.  This information
     255# is all taken from the tclConfig.sh file.
     256#--------------------------------------------------------------------
     257
     258if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     259  . ${exec_prefix}/lib/tclConfig.sh
     260fi
     261if test -f "${exec_prefix}/lib/tkConfig.sh" ; then
     262  . ${exec_prefix}/lib/tkConfig.sh
     263fi
    122264
    123265# -----------------------------------------------------------------------
     
    147289SC_ENABLE_SYMBOLS
    148290
     291
     292#--------------------------------------------------------------------
     293# search for ffmpeg libraries libavcodec, libavformat, libswscale
     294#--------------------------------------------------------------------
     295if test "${with_ffmpeg}" != "no" ; then
     296  if test "${with_ffmpeg}" = "yes" ; then
     297    AC_PATH_PROG(FFMPEG, ffmpeg, [], $PATH)
     298  else
     299    AC_PATH_PROG(FFMPEG, ffmpeg, [], [${with_ffmpeg}/bin:${with_ffmpeg}])
     300  fi
     301  if test "${FFMPEG}x" != "x" ; then
     302    AC_DEFINE(HAVE_FFMPEG, 1, [Render servers can use ffmpeg])
     303  fi
     304fi
     305
     306AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h libavutil/mathematics.h ffmpeg/swscale.h libswscale/swscale.h],,,[
     307#define __STDC_CONSTANT_MACROS 1
     308])
     309
     310HAVE_FFMPEG_LIBS=""
     311if test "${with_ffmpeg}" != "no"; then
     312  if [[ \( "${ac_cv_header_ffmpeg_avcodec_h}" = "yes" -o \
     313        "${ac_cv_header_libavcodec_avcodec_h}" = "yes" \) -a \
     314     \( "${ac_cv_header_ffmpeg_avformat_h}" = "yes" -o \
     315        "${ac_cv_header_libavformat_avformat_h}" = "yes" \) -a \
     316     \( "${ac_cv_header_ffmpeg_avutil_h}" = "yes" -o \
     317        "${ac_cv_header_libavutil_avutil_h}" = "yes" \) -a \
     318     \( "${ac_cv_header_ffmpeg_swscale_h}" = "yes" -o \
     319        "${ac_cv_header_libswscale_swscale_h}" = "yes" \) ]] ; then
     320    HAVE_FFMPEG_LIBS="yes"
     321    AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets])
     322  fi
     323  AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(librappture requires libavcodec))
     324  AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(librappture requires libavutil))
     325  AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(librappture requires libavformat))
     326  AC_CHECK_LIB(swscale, main)
     327  AC_CHECK_FUNCS(av_find_stream_info)
     328  AC_CHECK_FUNCS(av_open_input_file)
     329  AC_CHECK_FUNCS(avcodec_decode_video)
     330  AC_CHECK_FUNCS(avcodec_decode_video2)
     331  AC_CHECK_FUNCS(avcodec_open)
     332  AC_CHECK_FUNCS(avcodec_open2)
     333  AC_CHECK_FUNCS(avformat_find_stream_info)
     334  AC_CHECK_FUNCS(avformat_open_input)
     335  AC_CHECK_FUNCS(avio_close)
     336  AC_CHECK_FUNCS(img_convert)
     337  AC_CHECK_FUNCS(sws_getCachedContext)
     338  AC_CHECK_FUNCS(sws_scale)
     339  AC_CHECK_FUNCS(url_close)
     340  AC_CHECK_FUNCS(av_close_input_file)
     341  AC_CHECK_FUNCS(avformat_close_input)
     342       
     343  AC_CHECK_FUNC(avcodec_find_decoder,,
     344    AC_MSG_ERROR(oops! no av_codec_find_decoder ?!?))
     345  AC_CHECK_FUNC(avcodec_alloc_frame,,
     346    AC_MSG_ERROR(oops! no avcode_alloc_frame ?!?))
     347  AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?))
     348  AC_CHECK_FUNC(av_read_frame,,AC_MSG_ERROR(oops! av_read_frame ?!?))
     349  AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_frame ?!?))
     350  AC_CHECK_FUNC(avcodec_default_release_buffer,,
     351    AC_MSG_ERROR(oops! no avcode_default_release_buffer ?!?))
     352  AC_CHECK_FUNC(avpicture_get_size,,
     353    AC_MSG_ERROR(oops! no avpicture_get_size ?!?))
     354  AC_CHECK_FUNC(avpicture_fill,,AC_MSG_ERROR(oops! no avpicture_fill ?!?))
     355  AC_CHECK_FUNCS(sws_getCachedContext)
     356  AC_CHECK_FUNCS(img_convert)
     357  AC_CHECK_FUNCS(sws_scale)
     358  AC_TRY_COMPILE([
     359#define __STDC_CONSTANT_MACROS 1
     360#include <stdlib.h>
     361#ifdef HAVE_FFMPEG_AVCODEC_H
     362# include <ffmpeg/avcodec.h>
     363#endif
     364#ifdef HAVE_LIBAVCODEC_AVCODEC_H
     365# include <libavcodec/avcodec.h>
     366#endif
     367int x = AVMEDIA_TYPE_VIDEO;
     368],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no")
     369  if test "$ac_avmedia_type_video" == "yes" ; then
     370    AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ])
     371  fi
     372fi
     373
    149374AC_SUBST(CFLAGS_DEBUG)
    150375AC_SUBST(CFLAGS_OPTIMIZE)
     376AC_SUBST(ENABLE_LANG)
    151377AC_SUBST(ENABLE_GUI)
     378AC_SUBST(ENABLE_VTK_DICOM)
    152379AC_SUBST(FFMPEG)
    153380AC_SUBST(HAVE_FFMPEG_LIBS)
     
    230457AC_SUBST(TK_XLIBSW)
    231458AC_SUBST(TK_VERSION)
    232 AC_SUBST(VTKDIR)
     459AC_SUBST(VTK_TCL_DIR)
     460AC_SUBST(VTK_VERSION)
    233461AC_SUBST(XSUBPP)
    234462
     
    239467AC_CONFIG_FILES([
    240468    Makefile
    241     objects/Makefile
    242     system/Makefile
     469    packages/Makefile
     470    src/Makefile
     471    src/core/Makefile
     472    src/core2/Makefile
     473    src/objects/Makefile
     474    src/objects/RpHash.h
     475    gui/Makefile
     476    gui/apps/Makefile
     477    gui/apps/about
     478    gui/apps/copy_rappture_examples
     479    gui/apps/encodedata
     480    gui/apps/rappture
     481    gui/apps/rappture-csh.env
     482    gui/apps/rappture.env
     483    gui/apps/rappture.use
     484    gui/apps/rerun
     485    gui/apps/simsim
     486    gui/apps/xmldiff
     487    gui/pkgIndex.tcl
     488    gui/scripts/Makefile
     489    gui/src/Makefile
    243490    builder/Makefile
     491    builder/pkgIndex.tcl
    244492    builder/scripts/Makefile
    245     builder/scripts/tclIndex
    246     builder/pkgIndex.tcl
     493    tester/Makefile
     494    tester/pkgIndex.tcl
     495    tester/scripts/Makefile
     496    lang/Makefile
     497    lang/java/Makefile
     498    lang/java/rappture/Makefile
     499    lang/perl/Makefile
     500    lang/perl/Makefile.PL
     501    lang/python/Makefile
     502    lang/python/setup.py
     503    lang/matlab/Makefile
     504    lang/octave/Makefile
     505    lang/octave/octave2/Makefile
     506    lang/octave/octave3/Makefile
     507    lang/R/Makefile
     508    lang/ruby/Makefile
     509    lang/ruby/build.rb
     510    lang/tcl/Makefile
     511    lang/tcl/pkgIndex.tcl
     512    lang/tcl/scripts/Makefile
     513    lang/tcl/src/Makefile
     514    lang/tcl/tests/Makefile
     515    lib/Makefile
     516    examples/3D/Makefile
     517    examples/Makefile
     518    examples/app-fermi/2.0/Makefile
     519    examples/app-fermi/Makefile
     520    examples/app-fermi/cee/Makefile
     521    examples/app-fermi/fortran/Makefile
     522    examples/app-fermi/java/Makefile
     523    examples/app-fermi/matlab/Makefile
     524    examples/app-fermi/matlab/compiled/Makefile
     525    examples/app-fermi/matlab/uncompiled/Makefile
     526    examples/app-fermi/octave/octave2/Makefile
     527    examples/app-fermi/octave/octave3/Makefile
     528    examples/app-fermi/octave/Makefile
     529    examples/app-fermi/perl/Makefile
     530    examples/app-fermi/python/Makefile
     531    examples/app-fermi/ruby/Makefile
     532    examples/app-fermi/tcl/Makefile
     533    examples/app-fermi/wrapper/Makefile
     534    examples/app-fermi/wrapper/cee/Makefile
     535    examples/app-fermi/wrapper/perl/Makefile
     536    examples/app-fermi/wrapper/python/Makefile
     537    examples/app-fermi/wrapper/tcl/Makefile
     538    examples/app-fermi/R/Makefile
     539    examples/c-example/Makefile
     540    examples/canvas/Makefile
     541    examples/demo.bash
     542    examples/flow/Makefile
     543    examples/flow/demo1/Makefile
     544    examples/flow/demo2/Makefile
     545    examples/flow/demo3/Makefile
     546    examples/graph/Makefile
     547    examples/objects/Makefile
     548    examples/objects/axis/Makefile
     549    examples/objects/curve/Makefile
     550    examples/objects/dxWriter/Makefile
     551    examples/objects/floatBuffer/Makefile
     552    examples/objects/histogram/Makefile
     553    examples/objects/library/Makefile
     554    examples/objects/number/Makefile
     555    examples/objects/path/Makefile
     556    examples/objects/plot/Makefile
     557    examples/objects/scatter/Makefile
     558    examples/objects/string/Makefile
     559    examples/objects/tree/Makefile
     560    examples/objects/xmlparser/Makefile
     561    examples/zoo/Makefile
     562    examples/zoo/binary/Makefile
     563    examples/zoo/boolean/Makefile
     564    examples/zoo/choice/Makefile
     565    examples/zoo/curve/Makefile
     566    examples/zoo/drawing/Makefile
     567    examples/zoo/enable/Makefile
     568    examples/zoo/field/Makefile
     569    examples/zoo/group/Makefile
     570    examples/zoo/histogram/Makefile
     571    examples/zoo/image/Makefile
     572    examples/zoo/image/docs/Makefile
     573    examples/zoo/image/examples/Makefile
     574    examples/zoo/integer/Makefile
     575    examples/zoo/integer2/Makefile
     576    examples/zoo/loader/Makefile
     577    examples/zoo/loader/examples/Makefile
     578    examples/zoo/log/Makefile
     579    examples/zoo/mesh/Makefile
     580    examples/zoo/note/Makefile
     581    examples/zoo/note/docs/Makefile
     582    examples/zoo/number/Makefile
     583    examples/zoo/number2/Makefile
     584    examples/zoo/parallelepiped/Makefile
     585    examples/zoo/periodicelement/Makefile
     586    examples/zoo/phase/Makefile
     587    examples/zoo/sequence/Makefile
     588    examples/zoo/sequence/examples/Makefile
     589    examples/zoo/string/Makefile
     590    examples/zoo/structure/Makefile
     591    examples/zoo/structure/examples/Makefile
     592    examples/zoo/table/Makefile
     593    video/Makefile
     594    video/pkgIndex.tcl
     595    oldtest/Makefile
     596    oldtest/src/Makefile
    247597])
    248598AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.