dnl------------------------------------------------------------------------- dnl dnl configure.in: script source file for configure dnl dnl author: Pierre.Saramito@imag.fr dnl dnl date: 2 september 2000 dnl dnl------------------------------------------------------------------------- dnl init autoconf without caches define([AC_CACHE_LOAD], ) define([AC_CACHE_SAVE], ) AC_PREREQ(2.13) dnl------------------------------------------------------------------------- dnl package and version definition dnl------------------------------------------------------------------------- PACKAGE=tk707 dnl the version is defined in the VERSION file: example: dnl 0.6.17 dnl - all but the last are the MAJOR_VERSION used for dnl official releases: 0.6 dnl and is propagated in the .tcl file and the config.h file dnl => you can change the last number dnl - the last number (17) is handled automatically by CVS, for tags dnl => do not change the last number, except when increasing dnl the major version number; then reset it in the VERSION file: dnl 0.7.0 dnl------------------------------------------------------------------------- dnl init automake dnl------------------------------------------------------------------------- AC_INIT([tk707], [0.7.21]) AC_CONFIG_SRCDIR([README]) AM_INIT_AUTOMAKE AC_ARG_PROGRAM AM_CONFIG_HEADER(config.h) dnl------------------------------------------------------------------------- dnl check some commands dnl------------------------------------------------------------------------- AC_PROG_CC dnl------------------------------------------------------------------------- dnl check for maintainers tools (not requiered for build) dnl------------------------------------------------------------------------- AC_CHECK_PROGS(LEX, flex lex) if test x"$LEX" != x""; then AC_DECL_YYTEXT else LEX="${srcdir}/missing lex" fi AC_CHECK_PROGS(MAKEINFO, makeinfo, makeinfo) AC_CHECK_PROGS(TEXI2HTML, texi2html, texi2html) AC_CHECK_PROGS(TEXI2DVI, texi2dvi) AC_CHECK_PROGS(FIG2DEV, fig2dev) dnl------------------------------------------------------------------------- dnl check for run-time environment dnl------------------------------------------------------------------------- AC_CHECK_PROGS(TIMIDITY, timidity) AC_CHECK_PROGS(LAME, lame) AC_CHECK_PROGS(MIDIDUMP, mididump) dnl------------------------------------------------------------------------- dnl check for libraries: dl, m dnl------------------------------------------------------------------------- AC_CHECK_LIB(dl,dlopen) AC_CHECK_LIB(m,sqrt) dnl------------------------------------------------------------------------- dnl check for library: alsa dnl------------------------------------------------------------------------- PREV_LIBS=$LIBS PREV_LDFLAGS=$LDFLAGS PREV_CFLAGS=$CFLAGS PREV_CPPFLAGS=$CPPFLAGS AM_PATH_ALSA LIBS=$PREV_LIBS LDFLAGS=$PREV_LDFLAGS CFLAGS=$PREV_CFLAGS CPPFLAGS=$PREV_CPPFLAGS dnl------------------------------------------------------------------------- dnl check for library X dnl------------------------------------------------------------------------- AC_PATH_XTRA if test "x$have_x" = xno; then AC_MSG_ERROR(Could not configure X) fi if test "x$x_libraries" != x; then ldflags_x_opt="-L$x_libraries" LDFLAGS="$LDFLAGS $ldflags_x_opt" SHLDFLAGS="$SHLDFLAGS $ldflags_x_opt" else ldflags_x_opt= fi if test "x$x_includes" != x; then CPPFLAGS="$CPPFLAGS -I$x_includes" fi AC_CHECK_LIB(X11,XOpenDisplay) dnl------------------------------------------------------------------------- dnl get libraries by options: tcl tk dnl------------------------------------------------------------------------- AC_ARG_WITH(tcl-includes, [ --with-tcl-includes=DIR Tcl include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tcl_include_dir="-I$withval" ]) AC_ARG_WITH(tcl-libs, [ --with-tcl-libs=DIR Tcl library file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tcl_libdir="-L$withval" ]) AC_ARG_WITH(tk-includes, [ --with-tk-includes=DIR Tk include file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tk_includes="-I$withval" ]) AC_ARG_WITH(tk-libs, [ --with-tk-libs=DIR Tk library file path ], [ if test ! -d $withval; then AC_MSG_WARN($withval is not found.) fi tk_libdir="-L$withval" ]) dnl------------------------------------------------------------------------- dnl check for libraries: tcl tk dnl------------------------------------------------------------------------- dnl save flags KEEPCPPFLAGS=$CPPFLAGS KEEPLDFLAGS=$LDFLAGS KEEPLIBS=$LIBS CPPFLAGS="$tcl_include_dir $tk_includes $CPPFLAGS" LDFLAGS="$tcl_libdir $tk_libdir $LDFLAGS" LIBS="$LIBS $lib_dl_opt" tcl_lib= tk_lib= for l in tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl7.6 tcl80 tcl76 tcl; do case "x$tcl_lib" in x) AC_CHECK_LIB($l,Tcl_Init,tcl_lib=-l$l);; esac done LIBS="$LIBS $tcl_lib" for l in tk8.4 tk8.3 tk8.2 tk8.1 tk8.0 tk8.0jp tk4.2jp tk80jp tk42jp tk4.2 tk80 tk42 tk; do case "x$tk_lib" in x) AC_CHECK_LIB($l,Tk_Init,tk_lib=-l$l);; esac done LIBS=$KEEPLIBS if test "x$tcl_lib" = x -o "x$tk_lib" = x; then CPPFLAGS=$KEEPCPPFLAGS LDFLAGS=$KEEPLDFLAGS enable_tcltk=no AC_MSG_WARN(tcl/tk is not enable) else tcltk_dep='tclIndex' TCLTK_CFLAGS="$tcl_include_dir $tk_includes" AC_SUBST(TCLTK_CFLAGS) TCLTK_LDFLAGS="$tk_lib $tcl_lib $lib_dl_opt" AC_SUBST(TCLTK_LDFLAGS) TCLTK_LIBS=`echo $LIBS | sed "s/-lX11/$tk_lib $tcl_lib -lX11/"` AC_SUBST(TCLTK_LIBS) case "$target" in *-*-bsdi*) TCLTK_LIBS="$TCLTK_LIBS -lipc" ;; esac fi LIBS=$PREV_LIBS LDFLAGS=$PREV_LDFLAGS CFLAGS=$PREV_CFLAGS CPPFLAGS=$PREV_CPPFLAGS dnl------------------------------------------------------------------------- dnl Output dnl------------------------------------------------------------------------- AC_CONFIG_FILES(Makefile tk707.sh) AC_OUTPUT