From: Mathieu Desnoyers Date: Mon, 26 Aug 2013 17:34:48 +0000 (-0400) Subject: Merge branch 'master' into bindings/python X-Git-Tag: v1.2.0-rc1~74 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=ccde9b25397f3e74c60bfbcb9f77008299a44cc9;hp=-c Merge branch 'master' into bindings/python Signed-off-by: Mathieu Desnoyers --- ccde9b25397f3e74c60bfbcb9f77008299a44cc9 diff --combined .gitignore index c60c0e4b,2b5af7e2..782da3e9 --- a/.gitignore +++ b/.gitignore @@@ -1,10 -1,10 +1,11 @@@ +*~ - /tests/lib/test-bitfield - /tests/lib/test-seeks + /tests/lib/test_bitfield + /tests/lib/test_seek *.o *.a *.la *.lo + *.exe .libs .deps *.bkp @@@ -17,12 -17,7 +18,12 @@@ ctf-parser-tes /config.h.in /config.status *.log -*.m4 +aclocal.m4 +/m4/libtool.m4 +/m4/lt~obsolete.m4 +/m4/ltoptions.m4 +/m4/ltsugar.m4 +/m4/ltversion.m4 libtool /configure Makefile @@@ -33,7 -28,4 +34,7 @@@ converter/babeltrace-lo core formats/ctf/metadata/ctf-parser.output stamp-h1 +bindings/python/babeltrace.i +bindings/python/babeltrace.py +bindings/python/babeltrace_wrap.c babeltrace.pc diff --combined Makefile.am index d28fbc0f,e5eca77f..c3c64e09 --- a/Makefile.am +++ b/Makefile.am @@@ -2,7 -2,7 +2,7 @@@ AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_s ACLOCAL_AMFLAGS = -I m4 - SUBDIRS = include types lib formats converter bindings tests doc extras -SUBDIRS = include types compat lib formats converter tests doc extras ++SUBDIRS = include types compat lib formats converter bindings tests doc extras dist_doc_DATA = ChangeLog LICENSE mit-license.txt gpl-2.0.txt \ std-ext-lib.txt @@@ -10,4 -10,4 +10,4 @@@ dist_noinst_DATA = CodingStyle pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = babeltrace.pc + pkgconfig_DATA = babeltrace.pc babeltrace-ctf.pc diff --combined configure.ac index 4563c35c,58a472d1..16679b84 --- a/configure.ac +++ b/configure.ac @@@ -23,7 -23,20 +23,20 @@@ LT_INI AC_PROG_YACC AC_PROG_LEX - AC_DEFUN([AC_PROG_BISON], [AC_CHECK_PROGS(BISON, bison, bison)]) + if test ! -f "$srcdir/formats/ctf/metadata/ctf-parser.h"; then + if test x"$YACC" != "xbison -y"; then + AC_MSG_ERROR([[bison not found and is required when building from git. + Please install bison]]) + fi + fi + + if test ! -f "$srcdir/formats/ctf/metadata/ctf-lexer.c"; then + if test x"$LEX" != "xflex"; then + AC_MSG_ERROR([[flex not found and is required when building from git. + Please install flex]]) + fi + fi + AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule) @@@ -37,6 -50,15 +50,15 @@@ AC_FUNC_MALLO AC_FUNC_MMAP AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul]) + # Check for MinGW32. + MINGW32=no + case $host in + *-*-mingw*) + MINGW32=yes;; + esac + + AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"]) + # Check for libuuid AC_CHECK_LIB([uuid], [uuid_generate], [ @@@ -51,7 -73,10 +73,10 @@@ have_libc_uuid=yes ], [ - AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.]) + # for MinGW32 we have our own internal implemenation of uuid using Windows functions. + if test "x$MINGW32" = xno; then + AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.]) + fi ]) ] ) @@@ -76,41 -101,6 +101,41 @@@ AC_CHECK_LIB([popt], [poptGetContext], [AC_MSG_ERROR([Cannot find popt.])] ) + +# For Python +# SWIG version needed or newer: +swig_version=2.0.0 + +AC_ARG_ENABLE([python], + [AC_HELP_STRING([--disable-python], + [do not compile Python bindings])], + [], [enable_python=yes]) + +AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python:-yes}" = xyes]) + +if test "x${enable_python:-yes}" = xyes; then + AC_MSG_NOTICE([You may configure with --disable-python ]dnl +[if you do not want Python bindings.]) + + AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ]) + AM_PATH_PYTHON + + AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config]) + AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) + AS_IF([test -z "$PYTHON_INCLUDE"], [ + AS_IF([test -z "$PYTHON_CONFIG"], [ + AC_PATH_PROGS([PYTHON_CONFIG], + [python$PYTHON_VERSION-config python-config], + [no], + [`dirname $PYTHON`]) + AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])]) + ]) + AC_MSG_CHECKING([python include flags]) + PYTHON_INCLUDE=`$PYTHON_CONFIG --includes` + AC_MSG_RESULT([$PYTHON_INCLUDE]) + ]) +fi + pkg_modules="gmodule-2.0 >= 2.0.0" PKG_CHECK_MODULES(GMODULE, [$pkg_modules]) AC_SUBST(PACKAGE_LIBS) @@@ -128,6 -118,7 +153,7 @@@ AC_SUBST(babeltracectfincludedir AC_CONFIG_FILES([ Makefile types/Makefile + compat/Makefile formats/Makefile formats/ctf/Makefile formats/ctf/types/Makefile @@@ -141,12 -132,14 +167,16 @@@ lib/Makefile lib/prio_heap/Makefile include/Makefile + bindings/Makefile + bindings/python/Makefile tests/Makefile + tests/bin/Makefile tests/lib/Makefile + tests/utils/Makefile + tests/utils/tap/Makefile extras/Makefile extras/valgrind/Makefile babeltrace.pc + babeltrace-ctf.pc ]) AC_OUTPUT