diff options
author | pavet | 2004-09-09 15:33:37 +0000 |
---|---|---|
committer | pavet | 2004-09-09 15:33:37 +0000 |
commit | a5803c3a3e49d5d10e017a70c9e94d0545d59a09 (patch) | |
tree | 62fb7a35ca46bbefa2eb1a9e4266315ed1ba76de /private.m4 | |
parent | 23abb4b87c7e40ed259dd02f653516f60e55ade4 (diff) | |
download | ivycpy-vinit-a5803c3a3e49d5d10e017a70c9e94d0545d59a09.zip ivycpy-vinit-a5803c3a3e49d5d10e017a70c9e94d0545d59a09.tar.gz ivycpy-vinit-a5803c3a3e49d5d10e017a70c9e94d0545d59a09.tar.bz2 ivycpy-vinit-a5803c3a3e49d5d10e017a70c9e94d0545d59a09.tar.xz |
Initial revision
Diffstat (limited to 'private.m4')
-rw-r--r-- | private.m4 | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/private.m4 b/private.m4 new file mode 100644 index 0000000..733b865 --- /dev/null +++ b/private.m4 @@ -0,0 +1,189 @@ +dnl # -*- autoconf -*- + +dnl #++ +dnl # LISTE DES MACROS: +dnl # ================= +dnl # +dnl # MV_PROG_PYTHON +dnl # MV_LOAD_TCL_CONFIG +dnl # MV_LOAD_TK_CONFIG +dnl # MV_SET_TCL_CONFIG +dnl # MV_SET_TCL_STUB_CONFIG +dnl # MV_SET_TK_STUB_CONFIG +dnl #-- + +dnl ########################################################################### +dnl # MV_PROG_PYTHON +dnl # +AC_DEFUN(MV_PROG_PYTHON, [dnl + +AC_CHECK_PROGS(PYTHON, python2.3 python2.2 python2.1 python) + +if test -z "$PYTHON"; then + MV_ERROR(No Python interpreter found) +fi + +changequote(,) +PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"` +changequote([, ]) + +MV_MSG(You are using Python version $PYTHON_VERSION, $CYAN) + +AC_SUBST(PYTHON_VERSION)dnl + +mv_tmp=`type -p $PYTHON` # filespec +mv_tmp=`dirname $mv_tmp` # bindir +mv_tmp=`dirname $mv_tmp` # topdir + +if test ! -d $mv_tmp/include; then + MV_ERROR(No «$mv_tmp/include» found) +fi +if test ! -d $mv_tmp/include/python$PYTHON_VERSION; then + MV_ERROR(No «$mv_tmp/include/python$PYTHON_VERSION» found) +fi +if test ! -f $mv_tmp/include/python$PYTHON_VERSION/Python.h; then + MV_ERROR(No «$mv_tmp/include/python$PYTHON_VERSION/Python.h» found) +fi + +PYTHON_INCLUDEDIR=$mv_tmp/include +PYTHON_LIBDIR=$mv_tmp/lib + +AC_SUBST(PYTHON_INCLUDEDIR) +AC_SUBST(PYTHON_LIBDIR) + +dnl # A FAIRE: +dnl # S'assurer de bien utiliser cette version de la bibliotheque python! + +pyexecdir=\${exec_prefix}/lib/python$PYTHON_VERSION/site-packages +pythondir=\${exec_prefix}/lib/python$PYTHON_VERSION/site-packages + +AC_SUBST(pyexecdir) +AC_SUBST(pythondir) + +pkgpyexecdir=\${pyexecdir}/$PACKAGE +pkgpythondir=\${pythondir}/$PACKAGE + +AC_SUBST(pkgpyexecdir) +AC_SUBST(pkgpythondir) + +]) + +dnl ########################################################################### +dnl # MV_LOAD_TCL_CONFIG +dnl # +dnl # Find and load the tclConfig.sh file +dnl # +AC_DEFUN(MV_LOAD_TCL_CONFIG, [dnl + +SC_PATH_TCLCONFIG +SC_LOAD_TCLCONFIG + +MV_MSG([You are using Tcl $TCL_VERSION], $CYAN)]) + +dnl ########################################################################### +dnl # MV_LOAD_TK_CONFIG +dnl # +dnl # Find and load the tkConfig.sh file +dnl # +AC_DEFUN(MV_LOAD_TK_CONFIG, [dnl + +SC_PATH_TKCONFIG +SC_LOAD_TKCONFIG + +MV_MSG([You are using Tk $TK_VERSION], $CYAN) + +if test "$TCL_VERSION" != "$TK_VERSION"; then + MV_ERROR([dnl +$TCL_BIN_DIR/tclConfig.sh is for Tcl $TCL_VERSION. +Tk $TK_VERSION$TK_PATCH_LEVEL needs Tcl $TK_VERSION. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl $TK_VERSION.]) + else + MV_MSG([Good: Tcl and Tk have the same version], $CYAN) + fi +]) + +dnl ########################################################################### +dnl # MV_SET_TCL_CONFIG +dnl # +dnl # Find and load the tcl configuration +dnl # +AC_DEFUN(MV_SET_TCL_CONFIG, [dnl + +AC_REQUIRE([MV_LOAD_TCL_CONFIG])dnl + +TCL_INCLUDES= +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}/unix" +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}/generic" +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}" + +DEFINES=" $DEFINES $TCL_DEFS" +INCLUDES=" $TCL_INCLUDES $INCLUDES" +LIBRARIES=" $TCL_LIB_SPEC $LIBRARIES" + +AC_SUBST(DEFINES)dnl +AC_SUBST(INCLUDES)dnl +AC_SUBST(LIBRARIES)]) + +dnl ########################################################################### +dnl # MV_SET_TCL_STUB_CONFIG +dnl # +dnl # Find and load the tcl configuration for stub operation +dnl # +AC_DEFUN(MV_SET_TCL_STUB_CONFIG, [dnl + +DEFINES="$DEFINES -DUSE_TCL_STUBS=1" + +AC_REQUIRE([MV_LOAD_TCL_CONFIG])dnl + +TCL_INCLUDES= +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}/unix" +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}/generic" +TCL_INCLUDES="$TCL_INCLUDES ${TCL_INCLUDE_SPEC-"-I$TCL_SRC_DIR"}" + +DEFINES=" $DEFINES $TCL_DEFS" +INCLUDES=" $TCL_INCLUDES $INCLUDES" +LIBRARIES=" $TCL_STUB_LIB_SPEC $LIBRARIES" + +AC_SUBST(DEFINES)dnl +AC_SUBST(INCLUDES)dnl +AC_SUBST(LIBRARIES)]) + +dnl ########################################################################### +dnl # MV_SET_TK_STUB_CONFIG +dnl # +dnl # Find and load the tk configuration for stub operation +dnl # +AC_DEFUN(MV_SET_TK_STUB_CONFIG, [dnl + +DEFINES="$DEFINES -DUSE_TK_STUBS=1" + +AC_REQUIRE([MV_LOAD_TK_CONFIG])dnl + +INCLUDES=" $TK_XINCLUDES $INCLUDES" +LIBRARIES="$TK_XLIBSW $LIBRARIES" + +TK_INCLUDES= +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tk$TK_VERSION/unix" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tk$TK_VERSION/generic" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tk$TK_VERSION" + +dnl # La galère sur la woody... +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tcl$TK_VERSION/tk-private/unix" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tcl$TK_VERSION/tk-private/generic" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/tcl$TK_VERSION/tk-private" + +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/unix" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include/generic" +TK_INCLUDES="$TK_INCLUDES -I$TK_PREFIX/include" + +DEFINES=" $DEFINES $TK_DEFS" +INCLUDES=" $TK_INCLUDES $INCLUDES" +LIBRARIES=" $TK_STUB_LIB_SPEC $LIBRARIES" + +AC_SUBST(DEFINES)dnl +AC_SUBST(INCLUDES)dnl +AC_SUBST(LIBRARIES)]) + +dnl ########################################################################### +dnl # [END OF FILE] +dnl ########################################################################### |