# HG changeset patch # User renatofilho # Date 1203961536 0 # Node ID c39c60fcfec806235d1794a311239d6b3b780658 # Parent 337aef39e86a83f48dc5bc36a0ea713d77f2b517 [svn r933] fixed autotools script. patch by Andre Moreira diff -r 337aef39e86a -r c39c60fcfec8 gmyth/Makefile.am --- a/gmyth/Makefile.am Mon Feb 25 14:14:29 2008 +0000 +++ b/gmyth/Makefile.am Mon Feb 25 17:45:36 2008 +0000 @@ -1,31 +1,11 @@ SUBDIRS= src samples tests -### all of the standard pc files we need to generate -#pcfiles = gmyth-@GMYTH_MAJORMINOR@.pc -pcfiles = gmyth.pc +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gmyth.pc -all-local: $(pcfiles) - -### how to generate pc files -#%-@GMYTH_MAJORMINOR@.pc: %.pc -# cp $< $@ - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = $(pcfiles) - -if HAVE_INDENT -indent: - cd src; \ - make indent; \ - cd .. -endif - -include aminclude.am - -EXTRA_DIST = \ - autogen.sh \ - gmyth.pc.in \ - AUTHORS \ - COPYING \ - README - +EXTRA_DIST = \ + autogen.sh \ + gmyth.pc.in \ + AUTHORS \ + COPYING \ + README diff -r 337aef39e86a -r c39c60fcfec8 gmyth/configure.ac --- a/gmyth/configure.ac Mon Feb 25 14:14:29 2008 +0000 +++ b/gmyth/configure.ac Mon Feb 25 17:45:36 2008 +0000 @@ -1,154 +1,47 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. +AC_INIT(gmyth, 0.7.0) +AC_PREREQ(2.52) +AC_CONFIG_SRCDIR(configure.ac) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_ISC_POSIX -AC_PREREQ(2.50) +AM_INIT_AUTOMAKE(1.6 dist-bzip2) +AM_CONFIG_HEADER(config.h) -AC_INIT([gmyth],[0.7.0]) - -AC_CONFIG_SRCDIR([src/gmyth.h]) -AC_CONFIG_HEADER(config.h) - -dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode -AM_MAINTAINER_MODE dnl make aclocal work in maintainer mode AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") -# Checks for programs. -# check for tools -# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g -CFLAGS="$CFLAGS -Wall" +AC_PROG_CXX AC_PROG_CC +AM_PROG_CC_STDC +AC_HEADER_STDC +AC_C_BIGENDIAN +AC_C_CONST + +AC_LIBTOOL_WIN32_DLL +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl AC_PROG_LIBTOOL -dnl Generate doxygen documentation -DX_HTML_FEATURE(ON) -DX_CHM_FEATURE(OFF) -DX_CHI_FEATURE(OFF) -DX_MAN_FEATURE(OFF) -DX_RTF_FEATURE(OFF) -DX_XML_FEATURE(OFF) -DX_PDF_FEATURE(OFF) -DX_PS_FEATURE(OFF) -DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs) - - -# Checks for libraries. - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_STRUCT_TM -AC_HEADER_TIME -AC_HEADER_STDBOOL - -# Checks for library functions. -AC_FUNC_FORK -AC_FUNC_STRFTIME -AC_FUNC_SELECT_ARGTYPES -AC_PROG_GCC_TRADITIONAL -AC_FUNC_MALLOC -AC_FUNC_MKTIME -AC_FUNC_STRFTIME -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime]) - -############################## -# Checks for Network functions -############################## - -AC_CHECK_FUNCS([socket]) -AC_CHECK_FUNCS([inet_ntoa]) -AC_CHECK_HEADERS([ifaddrs.h]) -AC_CHECK_FUNCS([getifaddrs]) -AC_CHECK_FUNCS([time]) - -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) - -CFLAGS="$CFLAGS -I/usr/include" -LDFLAGS="$LDFLAGS -L/usr/lib" - -# Checks required packages - dnl Test if --enable-debug given AC_ARG_ENABLE(debug, - [AC_HELP_STRING([--enable-debug], [enable debugging mode])], + AC_HELP_STRING([--enable-debug], [enable debugging mode]), enable_debug="$enableval", enable_debug=no) if test "x$enable_debug" = "xyes" ; then - AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!]) - CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG" + AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!]) + CFLAGS="$CFLAGS -Wall -O0 -g -DGMYTH_USE_DEBUG" else - CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS" + CFLAGS="$CFLAGS -Wall -O2" fi AM_CONDITIONAL(GMYTH_USE_DEBUG, test "x$enable_debug" = "xyes") -AC_ARG_ENABLE(coverage, - AS_HELP_STRING([--enable-coverage], - [enable coverage (default = no)]), - [ - if test $enableval = no; then - USE_COVERAGE=no; - else - USE_COVERAGE=yes; - fi - ],[ - USE_COVERAGE=no; - ] -) - -if [ test $USE_COVERAGE = yes ]; then - CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage -O0" - LDFLAGS="$LDFLAGS -lgcov" -fi - -AC_ARG_ENABLE(mudflap-debug, - AS_HELP_STRING([--enable-mudflap-debug], - [enable libmudflap debug (default = no)]), - [ - if test $enableval = no; then - USE_MUDFLAP_DEBUG=no; - else - USE_MUDFLAP_DEBUG=yes; - fi - ],[ - USE_MUDFLAP_DEBUG=no; - ] -) - -if [ test $USE_MUDFLAP_DEBUG = yes ]; then - CFLAGS="$CFLAGS -fmudflap -fmudflapth -O0" - LDFLAGS="$LDFLAGS -lmudflapth" -fi - -AC_ARG_ENABLE(profiling, - AS_HELP_STRING([--enable-profiling], - [enable GNU profiling (default = no)]), - [ - if test $enableval = no; then - USE_PROFILING=no; - else - USE_PROFILING=yes; - fi - ],[ - USE_PROFILING=no; - ] -) - -if [ test $USE_PROFILING = yes ]; then - CFLAGS="$CFLAGS -pg" -fi - # Check for pkgconfig AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) # Give error and exit if we don't have pkgconfig if test "x$HAVE_PKGCONFIG" = "xno"; then - AC_MSG_ERROR(you need to have pkgconfig installed !) + AC_MSG_ERROR(you need to have pkgconfig installed !) fi # Check for Glib2.0 @@ -156,7 +49,7 @@ # Give error and exit if we don't have glib if test "x$HAVE_GLIB" = "xno"; then - AC_MSG_ERROR(you need glib-2.0 installed) + AC_MSG_ERROR(you need glib-2.0 installed) fi # make GLIB_CFLAGS and GLIB_LIBS available @@ -165,12 +58,12 @@ # Check for GObject2.0 PKG_CHECK_MODULES(GOBJECT, - gobject-2.0, - HAVE_GOBJECT=yes, HAVE_GOBJECT=no) + gobject-2.0, + HAVE_GOBJECT=yes, HAVE_GOBJECT=no) # Give error and exit if we don't have gobject if test "x$HAVE_GOBJECT" = "xno"; then - AC_MSG_ERROR(you need gobject-2.0 installed) + AC_MSG_ERROR(you need gobject-2.0 installed) fi # make GOBJECT_CFLAGS and GOBJECT_LIBS available @@ -182,7 +75,7 @@ # Give error and exit if we don't have glib if test "x$HAVE_GTHREAD" = "xno"; then - AC_MSG_ERROR(you need gthread+-2.0 installed) + AC_MSG_ERROR(you need gthread+-2.0 installed) fi # make GTHREAD_CFLAGS and GTHREAD_LIBS available @@ -194,7 +87,7 @@ # Give error and exit if we don't have libxml if test "x$HAVE_LIBXML" = "xno"; then - AC_MSG_ERROR(you need libxml-2.0 installed) + AC_MSG_ERROR(you need libxml-2.0 installed) fi # make LIBXML_CFLAGS and LIBXML_LIBS available @@ -206,16 +99,14 @@ # Give error and exit if we don't have libcurl if test "x$HAVE_LIBCURL" = "xno"; then - AC_MSG_ERROR(you need libcurl installed) + AC_MSG_ERROR(you need libcurl installed) fi # make LIBCURL_CFLAGS and LIBCURL_LIBS available AC_SUBST(LIBCURL_CFLAGS) AC_SUBST(LIBCURL_LIBS) -# -# mysql libraries -# +# check for mysql AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`) if test -z "$MYSQL_CFLAGS"; then AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed]) @@ -228,55 +119,15 @@ fi AC_SUBST(MYSQL_LIBS) -#dnl Enable gtk-doc -#GTK_DOC_CHECK(1.4) - -# checks if the indent tool can be found -AC_CHECK_PROG(HAVE_INDENT, indent, [Found!]) -if test -n "$HAVE_INDENT"; then - AC_DEFINE(HAVE_INDENT, 1, [AutoIndent found!]) -fi - -AM_CONDITIONAL(HAVE_INDENT, test -n "$HAVE_INDENT") - -# checks if the gprof tool can be found -AC_CHECK_PROG(HAVE_GPROF, gprof, [Found!]) -if test -n "$HAVE_GPROF"; then - AC_DEFINE(HAVE_GPROF, 1, [Gnu Profiling tool found!]) -fi - -AM_CONDITIONAL(HAVE_GPROF, test -n "$HAVE_GPROF") - -# checks if the gcov tool can be found -AC_CHECK_PROG(HAVE_GCOV, gcov, [Found!]) -if test -n "$HAVE_GCOV"; then - AC_DEFINE(HAVE_GCOV, 1, [Gnu Coverage tool found!]) -fi - -AM_CONDITIONAL(HAVE_GCOV, test -n "$HAVE_GCOV") - -# checks if the genhtml tool can be found -AC_CHECK_PROG(HAVE_GENHTML, genhtml, [Found!]) -if test -n "$HAVE_GENHTML"; then - AC_DEFINE(HAVE_GENHTML, 1, [Gnu Coverage HTML report generator found!]) -fi - -AM_CONDITIONAL(HAVE_GENHTML, test -n "$HAVE_GENHTML") - -AC_SUBST(CFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(LIBS) - -AC_OUTPUT([ +AC_OUTPUT( Makefile src/Makefile samples/Makefile tests/Makefile -gmyth.pc]) +gmyth.pc) if test "x$enable_debug" != "xno"; then - AC_MSG_NOTICE([Debug: Enabled]) + AC_MSG_NOTICE([Debug: Enabled]) else - AC_MSG_NOTICE([Debug: Disabled]) + AC_MSG_NOTICE([Debug: Disabled]) fi - diff -r 337aef39e86a -r c39c60fcfec8 gmyth/src/Makefile.am --- a/gmyth/src/Makefile.am Mon Feb 25 14:14:29 2008 +0000 +++ b/gmyth/src/Makefile.am Mon Feb 25 17:45:36 2008 +0000 @@ -1,14 +1,12 @@ -SUBDIRS = . - lib_LTLIBRARIES = libgmyth.la INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src @GLIB_CFLAGS@ @GOBJECT_CFLAGS@ -BUILT_SOURCES = \ - gmyth_marshal.c \ +BUILT_SOURCES = \ + gmyth_marshal.c \ gmyth_marshal.h -libgmyth_la_SOURCES = \ +libgmyth_la_SOURCES = \ gmyth_common.c \ gmyth_debug.c \ gmyth_epg.c \ @@ -48,7 +46,7 @@ mv gmyth_marshal.c.tmp gmyth_marshal.c libgmyth_la_CFLAGS = \ - -DDATADIR=\"$(pkgdatadir)\" \ + -DDATADIR=\"$(pkgdatadir)\" \ $(GLIB_CFLAGS) \ $(GOBJECT_CFLAGS) \ $(GST_CFLAGS) \ @@ -57,32 +55,32 @@ $(MYSQL_CFLAGS) \ $(LIBXML_CFLAGS) -libgmyth_la_LDFLAGS = \ - -export-dynamic \ - $(GLIB_CFLAGS) \ +libgmyth_la_LDFLAGS = \ + -export-dynamic \ + $(GLIB_CFLAGS) \ $(GOBJECT_CFLAGS) \ - $(MYSQL_LIBS) \ - $(GST_LIBS) \ + $(MYSQL_LIBS) \ + $(GST_LIBS) \ $(GSTBASE_LIBS) \ $(GSTPLUGINS_LIBS) \ $(LIBXML_LIBS) -libgmyth_includedir = \ +libgmyth_includedir = \ $(pkgincludedir) -libgmyth_include_HEADERS = \ +libgmyth_include_HEADERS = \ gmyth.h \ gmyth_common.h \ gmyth_debug.h \ - gmyth_epg.h \ - gmyth_recorder.h \ - gmyth_scheduler.h \ - gmyth_tvchain.h \ - gmyth_util.h \ - gmyth_query.h \ - gmyth_socket.h \ + gmyth_epg.h \ + gmyth_recorder.h \ + gmyth_scheduler.h \ + gmyth_tvchain.h \ + gmyth_util.h \ + gmyth_query.h \ + gmyth_socket.h \ gmyth_remote_util.h \ - gmyth_stringlist.h \ + gmyth_stringlist.h \ gmyth_monitor_handler.h \ gmyth_file_transfer.h \ gmyth_livetv.h \ @@ -97,20 +95,4 @@ gmyth_file.h \ gmyth_file_local.h -if HAVE_INDENT -indent: - @for src_file in $(libgmyth_la_SOURCES); do \ - ./gmyth-indent.sh $$src_file; \ - done; \ - for inc_file in $(libgmyth_include_HEADERS); do \ - ./gmyth-indent.sh $$inc_file; \ - done; -endif - CLEANFILES = $(BUILT_SOURCES) - -if HAVE_GCOV -CLEANFILES += *.gcda \ - *.gcno \ - *.gcov -endif diff -r 337aef39e86a -r c39c60fcfec8 gmyth/tests/Makefile.am --- a/gmyth/tests/Makefile.am Mon Feb 25 14:14:29 2008 +0000 +++ b/gmyth/tests/Makefile.am Mon Feb 25 17:45:36 2008 +0000 @@ -1,8 +1,8 @@ LDADD = \ - $(top_srcdir)/src/.libs/libgmyth.la + $(top_srcdir)/src/libgmyth.la AM_LDFLAGS = \ - @GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@ + @GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@ INCLUDES = \ -I$(top_srcdir) \ @@ -53,11 +53,6 @@ test_stringlist.py \ test_tvchain.py -if HAVE_GENHTML -TESTS += \ - coverage.py -endif - TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) test_SOURCES = \ @@ -109,15 +104,3 @@ gmyth_test_tvchain.c CLEANFILES = $(BUILT_SOURCES) - -if HAVE_GCOV -CLEANFILES += \ - *.gcda \ - *.gcno \ - *.gcov -endif - -if HAVE_GPROF -CLEANFILES += gmon.out -endif -