Merge branch 'master' into bindings/python
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 26 Aug 2013 17:34:48 +0000 (13:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 26 Aug 2013 17:34:48 +0000 (13:34 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
1  2 
.gitignore
Makefile.am
configure.ac

diff --combined .gitignore
index c60c0e4b00092d6df13395aba313e85cce08953e,2b5af7e28fba1d5b6d6ad67e5812005487a21adf..782da3e9621b8fc665e2206cf626ec48232e40b6
@@@ -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 d28fbc0f78f2e233e172bfc5b774c40eb0ae6011,e5eca77f506b4fcbf0bf7b5e1e379d145115bb91..c3c64e09a01db8623b2ff312645196fbfe54d14c
@@@ -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 4563c35c575ae216ac83f63b8b717fff079fa128,58a472d1fac2c2976964ccad603cb96aa53faede..16679b84ae09dd7527b17cac343d1b7f4c8c1ad5
@@@ -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],
  [
                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
        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
This page took 0.02752 seconds and 4 git commands to generate.