From 8930ff365545c42b8dfde705b92b5cd873ec5833 Mon Sep 17 00:00:00 2001 From: saal Date: Fri, 15 Jun 2007 16:25:26 +0000 Subject: mise à jour de la procédure d'installation --- GNUmakefile.in | 25 +++----- aclocal.m4 | 18 ++++++ configure | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- configure.in | 5 +- private.m4 | 18 ++++++ 5 files changed, 231 insertions(+), 22 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 86a47e9..53320f1 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -53,6 +53,7 @@ INSTALL := @INSTALL@ INSTALL_PROGRAM := @INSTALL_PROGRAM@ INSTALL_SCRIPT := @INSTALL_SCRIPT@ INSTALL_DATA := @INSTALL_DATA@ +INSTALL_LINK := @LN_S@ -nf PYTHON_COMPILER := @PYTHON_COMPILER@ @@ -94,6 +95,7 @@ default: src/_ivycpy.so src/ivycpy.pyc $(DOCS) $(EXAMPLES) $(DEBIANSTUFF) $(DOCU doc: $(DOXYGEN) + src/_ivycpy.so: src/ivycpy_wrap.o $(LINK.o) $(CC_SHARED_OPTIONS) $^ -o $@ -livy $(LDLIBS) -lc @@ -154,26 +156,12 @@ debian/copyright: docs/copyright src/ivycpy.pyc: src/ivycpy.py python $(PYTHON_COMPILER) -l ./src python $(PYTHON_COMPILER) docs/examples + $(LN_S) -n IvyCpy.py ./src/ivy.py -src/IvyCpy.pyc: src/IvyCpy.py - python $(PYTHON_COMPILER) -l ./src - python $(PYTHON_COMPILER) docs/examples - -src/IvyCTest.pyc: src/IvyCTest.py - python $(PYTHON_COMPILER) -l ./src - python $(PYTHON_COMPILER) docs/examples - -src/XmlParser.pyc: src/XmlParser.py - python $(PYTHON_COMPILER) -l ./src - python $(PYTHON_COMPILER) docs/examples - -src/Utils.pyc: src/Utils.py - python $(PYTHON_COMPILER) -l ./src - python $(PYTHON_COMPILER) docs/examples - -install:: src/_ivycpy.so src/ivycpy.py src/ivycpy.pyc src/IvyCpy.py src/IvyCpy.pyc src/IvyCTest.pyc src/XmlParser.pyc src/Utils.pyc +install:: src/_ivycpy.so src/ivycpy.py src/ivycpy.pyc src/IvyCpy.py src/IvyCpy.pyc src/IvyCTest.pyc src/XmlParser.pyc src/Utils.pyc $(INSTALL_DIR) $(pythondir) $(INSTALL_DATA) src/_ivycpy.so src/*.py src/*.pyc src/Message.xml $(pythondir) + $(INSTALL_LINK) IvyCpy.py $(pythondir)/ivy.py $(INSTALL_DIR) $(DOCDIR) $(INSTALL_DATA) doc/html/*.* $(DOCDIR) @@ -189,7 +177,8 @@ install:: $(DOCS) $(EXAMPLES) clean: $(RM) core src/a.out src/*.o - $(RM) src/_ivycpy.so src/ivycpy*.py + $(RM) src/_ivycpy.so src/ivycpy*.py + $(RM) src/ivy.py $(RM) src/ivycpy_wrap.c find ./src -name '*.pyc' -exec $(RM) {} ";" $(RM) -r doc diff --git a/aclocal.m4 b/aclocal.m4 index 2fccc25..6273a02 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2880,6 +2880,24 @@ AC_SUBST(INCLUDES)dnl AC_SUBST(LIBRARIES)]) dnl ########################################################################### +dnl # OS_SET_IVY_C +dnl # +dnl # Find and load the IVY_C configuration +AC_DEFUN(OS_SET_IVY_C, [dnl + AC_ARG_WITH([ivy-c], + AC_HELP_STRING([--with-ivy-c], + [ivy-c root location (default is EMPTY)]), + [ivy_c_location=$withval], [ivy_c_location=""]) + if test -n "$ivy_c_location"; then + CPPFLAGS="$CPPFLAGS -I$ivy_c_location/include/Ivy" + AC_CHECK_HEADERS([ivy.h],,AC_MSG_ERROR([ivy.h not found please provide valid --with-ivy-c directory])) + LDFLAGS="$LDFLAGS -L$ivy_c_location/lib -livy" + else + AC_CHECK_HEADERS([Ivy/ivy.h],,AC_MSG_ERROR([ivy.h not found please provide valid --with-ivy-c directory])) + fi +]) + +dnl ########################################################################### dnl # [END OF FILE] dnl ########################################################################### diff --git a/configure b/configure index c28f29e..3b53d3d 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ECHO_E _N _C ECHO ESC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PYTHON LINES COLUMNS PYTHON_VERSION PYTHON_INCLUDEDIR PYTHON_LIBDIR PYTHON_COMPILER pyexecdir pythondir pkgpyexecdir pkgpythondir TCL_VERSION TCL_BIN_DIR TCL_INC_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC DEFINES INCLUDES LIBRARIES SWIG DOXYGEN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP PACKAGE VERSION DOCDIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ECHO_E _N _C ECHO ESC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PYTHON LINES COLUMNS PYTHON_VERSION PYTHON_INCLUDEDIR PYTHON_LIBDIR PYTHON_COMPILER pyexecdir pythondir pkgpyexecdir pkgpythondir TCL_VERSION TCL_BIN_DIR TCL_INC_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC DEFINES INCLUDES LIBRARIES SWIG LN_S DOXYGEN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP PACKAGE VERSION DOCDIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -841,6 +841,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-ivy-c ivy-c root location (default is EMPTY) Some influential environment variables: CC C compiler command @@ -2120,6 +2121,18 @@ fi done +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + + if test -z "$SWIG"; then { { mv_fd=2 @@ -4565,6 +4578,16 @@ done # ivy header +# Check whether --with-ivy-c or --without-ivy-c was given. +if test "${with_ivy_c+set}" = set; then + withval="$with_ivy_c" + ivy_c_location=$withval +else + ivy_c_location="" +fi; + if test -n "$ivy_c_location"; then + CPPFLAGS="$CPPFLAGS -I$ivy_c_location/include/Ivy" + for ac_header in ivy.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -4710,13 +4733,170 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then _ACEOF else - { { echo "$as_me:$LINENO: error: \"ivy.h unreachable\"" >&5 -echo "$as_me: error: \"ivy.h unreachable\"" >&2;} + { { echo "$as_me:$LINENO: error: ivy.h not found please provide valid --with-ivy-c directory" >&5 +echo "$as_me: error: ivy.h not found please provide valid --with-ivy-c directory" >&2;} + { (exit 1); exit 1; }; } +fi + +done + + LDFLAGS="$LDFLAGS -L$ivy_c_location/lib -livy" + else + +for ac_header in Ivy/ivy.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: ivy.h not found please provide valid --with-ivy-c directory" >&5 +echo "$as_me: error: ivy.h not found please provide valid --with-ivy-c directory" >&2;} { (exit 1); exit 1; }; } fi done + fi + echo "$as_me:$LINENO: checking \"TCL_THREADS\"" >&5 echo $ECHO_N "checking \"TCL_THREADS\"... $ECHO_C" >&6 @@ -5427,6 +5607,7 @@ s,@DEFINES@,$DEFINES,;t t s,@INCLUDES@,$INCLUDES,;t t s,@LIBRARIES@,$LIBRARIES,;t t s,@SWIG@,$SWIG,;t t +s,@LN_S@,$LN_S,;t t s,@DOXYGEN@,$DOXYGEN,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t diff --git a/configure.in b/configure.in index 935640f..4af33dd 100644 --- a/configure.in +++ b/configure.in @@ -31,6 +31,9 @@ CPPFLAGS="$CPPFLAGS $TCL_INCLUDES" dnl # testing some tools are working properly : swig AC_CHECK_PROGS(SWIG, swig) +dnl # testing some tools are working properly : ln +AC_PROG_LN_S + if test -z "$SWIG"; then MV_ERROR( SWIG (Simplified Wrapper and Interface Generator) not @@ -101,7 +104,7 @@ AC_MSG_ERROR("Python.h unreachable")) # tcl header AC_CHECK_HEADERS([tcl.h],,AC_MSG_ERROR("tcl.h unreachable")) # ivy header -AC_CHECK_HEADERS([ivy.h],,AC_MSG_ERROR("ivy.h unreachable")) +OS_SET_IVY_C AC_MSG_CHECKING("TCL_THREADS") AC_EGREP_CPP(yes, diff --git a/private.m4 b/private.m4 index d1218ce..78ef88c 100644 --- a/private.m4 +++ b/private.m4 @@ -187,5 +187,23 @@ AC_SUBST(INCLUDES)dnl AC_SUBST(LIBRARIES)]) dnl ########################################################################### +dnl # OS_SET_IVY_C +dnl # +dnl # Find and load the IVY_C configuration +AC_DEFUN(OS_SET_IVY_C, [dnl + AC_ARG_WITH([ivy-c], + AC_HELP_STRING([--with-ivy-c], + [ivy-c root location (default is EMPTY)]), + [ivy_c_location=$withval], [ivy_c_location=""]) + if test -n "$ivy_c_location"; then + CPPFLAGS="$CPPFLAGS -I$ivy_c_location/include/Ivy" + AC_CHECK_HEADERS([ivy.h],,AC_MSG_ERROR([ivy.h not found please provide valid --with-ivy-c directory])) + LDFLAGS="$LDFLAGS -L$ivy_c_location/lib -livy" + else + AC_CHECK_HEADERS([Ivy/ivy.h],,AC_MSG_ERROR([ivy.h not found please provide valid --with-ivy-c directory])) + fi +]) + +dnl ########################################################################### dnl # [END OF FILE] dnl ########################################################################### -- cgit v1.1