[svn r933] fixed autotools script. patch by Andre Moreira <andrunko@gmail.com> trunk
authorrenatofilho
Mon Feb 25 17:45:36 2008 +0000 (2008-02-25)
branchtrunk
changeset 924c39c60fcfec8
parent 923 337aef39e86a
child 925 4a8d56080089
[svn r933] fixed autotools script. patch by Andre Moreira <andrunko@gmail.com>
gmyth/Makefile.am
gmyth/configure.ac
gmyth/src/Makefile.am
gmyth/tests/Makefile.am
     1.1 --- a/gmyth/Makefile.am	Mon Feb 25 14:14:29 2008 +0000
     1.2 +++ b/gmyth/Makefile.am	Mon Feb 25 17:45:36 2008 +0000
     1.3 @@ -1,31 +1,11 @@
     1.4  SUBDIRS= src samples tests
     1.5  
     1.6 -### all of the standard pc files we need to generate
     1.7 -#pcfiles = gmyth-@GMYTH_MAJORMINOR@.pc
     1.8 -pcfiles = gmyth.pc
     1.9 +pkgconfigdir = $(libdir)/pkgconfig
    1.10 +pkgconfig_DATA = gmyth.pc
    1.11  
    1.12 -all-local: $(pcfiles)
    1.13 -
    1.14 -### how to generate pc files
    1.15 -#%-@GMYTH_MAJORMINOR@.pc: %.pc
    1.16 -#	cp $< $@
    1.17 -
    1.18 -pkgconfigdir = $(libdir)/pkgconfig
    1.19 -pkgconfig_DATA = $(pcfiles)
    1.20 -
    1.21 -if HAVE_INDENT
    1.22 -indent:
    1.23 -	cd src; \
    1.24 -	make indent; \
    1.25 -	cd ..
    1.26 -endif
    1.27 -
    1.28 -include aminclude.am
    1.29 -
    1.30 -EXTRA_DIST =                            \
    1.31 -        autogen.sh                      \
    1.32 -        gmyth.pc.in			\
    1.33 -        AUTHORS                         \
    1.34 -        COPYING                         \
    1.35 -        README
    1.36 -
    1.37 +EXTRA_DIST =	\
    1.38 +	autogen.sh	\
    1.39 +	gmyth.pc.in	\
    1.40 +	AUTHORS		\
    1.41 +	COPYING		\
    1.42 +	README
     2.1 --- a/gmyth/configure.ac	Mon Feb 25 14:14:29 2008 +0000
     2.2 +++ b/gmyth/configure.ac	Mon Feb 25 17:45:36 2008 +0000
     2.3 @@ -1,154 +1,47 @@
     2.4 -#                                               -*- Autoconf -*-
     2.5 -# Process this file with autoconf to produce a configure script.
     2.6 +AC_INIT(gmyth, 0.7.0)
     2.7 +AC_PREREQ(2.52)
     2.8 +AC_CONFIG_SRCDIR(configure.ac)
     2.9 +AC_CANONICAL_BUILD
    2.10 +AC_CANONICAL_HOST
    2.11 +AC_ISC_POSIX
    2.12  
    2.13 -AC_PREREQ(2.50)
    2.14 +AM_INIT_AUTOMAKE(1.6 dist-bzip2)
    2.15 +AM_CONFIG_HEADER(config.h)
    2.16  
    2.17 -AC_INIT([gmyth],[0.7.0])
    2.18 -
    2.19 -AC_CONFIG_SRCDIR([src/gmyth.h])
    2.20 -AC_CONFIG_HEADER(config.h)
    2.21 -
    2.22 -dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    2.23 -AM_MAINTAINER_MODE
    2.24  dnl make aclocal work in maintainer mode
    2.25  AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    2.26  
    2.27 -# Checks for programs.
    2.28 -# check for tools
    2.29 -# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    2.30 -CFLAGS="$CFLAGS -Wall"
    2.31 +AC_PROG_CXX
    2.32  AC_PROG_CC
    2.33 +AM_PROG_CC_STDC
    2.34 +AC_HEADER_STDC
    2.35 +AC_C_BIGENDIAN
    2.36 +AC_C_CONST
    2.37 +
    2.38 +AC_LIBTOOL_WIN32_DLL
    2.39 +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
    2.40  AC_PROG_LIBTOOL
    2.41  
    2.42 -dnl Generate doxygen documentation
    2.43 -DX_HTML_FEATURE(ON)
    2.44 -DX_CHM_FEATURE(OFF)
    2.45 -DX_CHI_FEATURE(OFF)
    2.46 -DX_MAN_FEATURE(OFF)
    2.47 -DX_RTF_FEATURE(OFF)
    2.48 -DX_XML_FEATURE(OFF)
    2.49 -DX_PDF_FEATURE(OFF)
    2.50 -DX_PS_FEATURE(OFF)
    2.51 -DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
    2.52 -
    2.53 -
    2.54 -# Checks for libraries.
    2.55 -
    2.56 -# Checks for header files.
    2.57 -AC_HEADER_STDC
    2.58 -AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    2.59 -
    2.60 -# Checks for typedefs, structures, and compiler characteristics.
    2.61 -AC_C_CONST
    2.62 -AC_TYPE_PID_T
    2.63 -AC_STRUCT_TM
    2.64 -AC_HEADER_TIME
    2.65 -AC_HEADER_STDBOOL
    2.66 -
    2.67 -# Checks for library functions.
    2.68 -AC_FUNC_FORK
    2.69 -AC_FUNC_STRFTIME
    2.70 -AC_FUNC_SELECT_ARGTYPES
    2.71 -AC_PROG_GCC_TRADITIONAL
    2.72 -AC_FUNC_MALLOC
    2.73 -AC_FUNC_MKTIME
    2.74 -AC_FUNC_STRFTIME
    2.75 -AC_FUNC_VPRINTF
    2.76 -AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
    2.77 -
    2.78 -##############################
    2.79 -# Checks for Network functions
    2.80 -##############################
    2.81 -
    2.82 -AC_CHECK_FUNCS([socket])
    2.83 -AC_CHECK_FUNCS([inet_ntoa])
    2.84 -AC_CHECK_HEADERS([ifaddrs.h])
    2.85 -AC_CHECK_FUNCS([getifaddrs])
    2.86 -AC_CHECK_FUNCS([time])
    2.87 -
    2.88 -AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    2.89 -
    2.90 -CFLAGS="$CFLAGS -I/usr/include"
    2.91 -LDFLAGS="$LDFLAGS -L/usr/lib"
    2.92 -
    2.93 -# Checks required packages
    2.94 -
    2.95  dnl Test if --enable-debug given
    2.96  AC_ARG_ENABLE(debug,
    2.97 -        [AC_HELP_STRING([--enable-debug], [enable debugging mode])],
    2.98 +        AC_HELP_STRING([--enable-debug], [enable debugging mode]),
    2.99          enable_debug="$enableval",
   2.100          enable_debug=no)
   2.101  
   2.102  if test "x$enable_debug" = "xyes" ; then
   2.103 -    AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!])
   2.104 -    CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
   2.105 +        AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!])
   2.106 +        CFLAGS="$CFLAGS -Wall -O0 -g -DGMYTH_USE_DEBUG"
   2.107  else
   2.108 -    CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
   2.109 +        CFLAGS="$CFLAGS -Wall -O2"
   2.110  fi
   2.111  
   2.112  AM_CONDITIONAL(GMYTH_USE_DEBUG, test "x$enable_debug" = "xyes")
   2.113  
   2.114 -AC_ARG_ENABLE(coverage,
   2.115 -        AS_HELP_STRING([--enable-coverage],
   2.116 -                [enable coverage (default = no)]),
   2.117 -                [
   2.118 -                        if test $enableval = no; then
   2.119 -                                USE_COVERAGE=no;
   2.120 -                        else
   2.121 -                                USE_COVERAGE=yes;
   2.122 -                        fi
   2.123 -                ],[
   2.124 -                        USE_COVERAGE=no;
   2.125 -                ]
   2.126 -)
   2.127 -
   2.128 -if [ test $USE_COVERAGE = yes ]; then
   2.129 -        CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage -O0"
   2.130 -        LDFLAGS="$LDFLAGS -lgcov"
   2.131 -fi
   2.132 -
   2.133 -AC_ARG_ENABLE(mudflap-debug,
   2.134 -        AS_HELP_STRING([--enable-mudflap-debug],
   2.135 -                [enable libmudflap debug (default = no)]),
   2.136 -                [
   2.137 -                        if test $enableval = no; then
   2.138 -                                USE_MUDFLAP_DEBUG=no;
   2.139 -                        else
   2.140 -                                USE_MUDFLAP_DEBUG=yes;
   2.141 -                        fi
   2.142 -                ],[
   2.143 -                        USE_MUDFLAP_DEBUG=no;
   2.144 -                ]
   2.145 -)
   2.146 -
   2.147 -if [ test $USE_MUDFLAP_DEBUG = yes ]; then
   2.148 -        CFLAGS="$CFLAGS -fmudflap -fmudflapth -O0"
   2.149 -        LDFLAGS="$LDFLAGS -lmudflapth"
   2.150 -fi
   2.151 -
   2.152 -AC_ARG_ENABLE(profiling,
   2.153 -        AS_HELP_STRING([--enable-profiling],
   2.154 -                [enable GNU profiling (default = no)]),
   2.155 -                [
   2.156 -                        if test $enableval = no; then
   2.157 -                                USE_PROFILING=no;
   2.158 -                        else
   2.159 -                                USE_PROFILING=yes;
   2.160 -                        fi
   2.161 -                ],[
   2.162 -                        USE_PROFILING=no;
   2.163 -                ]
   2.164 -)
   2.165 -
   2.166 -if [ test $USE_PROFILING = yes ]; then
   2.167 -        CFLAGS="$CFLAGS -pg"
   2.168 -fi
   2.169 -
   2.170  # Check for pkgconfig
   2.171  AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
   2.172  # Give error and exit if we don't have pkgconfig
   2.173  if test "x$HAVE_PKGCONFIG" = "xno"; then
   2.174 -  AC_MSG_ERROR(you need to have pkgconfig installed !)
   2.175 +        AC_MSG_ERROR(you need to have pkgconfig installed !)
   2.176  fi
   2.177  
   2.178  # Check for Glib2.0
   2.179 @@ -156,7 +49,7 @@
   2.180  
   2.181  # Give error and exit if we don't have glib
   2.182  if test "x$HAVE_GLIB" = "xno"; then
   2.183 -  AC_MSG_ERROR(you need glib-2.0 installed)
   2.184 +        AC_MSG_ERROR(you need glib-2.0 installed)
   2.185  fi
   2.186  
   2.187  # make GLIB_CFLAGS and GLIB_LIBS available
   2.188 @@ -165,12 +58,12 @@
   2.189  
   2.190  # Check for GObject2.0
   2.191  PKG_CHECK_MODULES(GOBJECT,
   2.192 -  gobject-2.0,
   2.193 -  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
   2.194 +        gobject-2.0,
   2.195 +        HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
   2.196  
   2.197  # Give error and exit if we don't have gobject
   2.198  if test "x$HAVE_GOBJECT" = "xno"; then
   2.199 -  AC_MSG_ERROR(you need gobject-2.0 installed)
   2.200 +        AC_MSG_ERROR(you need gobject-2.0 installed)
   2.201  fi
   2.202  
   2.203  # make GOBJECT_CFLAGS and GOBJECT_LIBS available
   2.204 @@ -182,7 +75,7 @@
   2.205  
   2.206  # Give error and exit if we don't have glib
   2.207  if test "x$HAVE_GTHREAD" = "xno"; then
   2.208 -  AC_MSG_ERROR(you need gthread+-2.0 installed)
   2.209 +        AC_MSG_ERROR(you need gthread+-2.0 installed)
   2.210  fi
   2.211  
   2.212  # make GTHREAD_CFLAGS and GTHREAD_LIBS available
   2.213 @@ -194,7 +87,7 @@
   2.214  
   2.215  # Give error and exit if we don't have libxml
   2.216  if test "x$HAVE_LIBXML" = "xno"; then
   2.217 -  AC_MSG_ERROR(you need libxml-2.0 installed)
   2.218 +        AC_MSG_ERROR(you need libxml-2.0 installed)
   2.219  fi
   2.220  
   2.221  # make LIBXML_CFLAGS and LIBXML_LIBS available
   2.222 @@ -206,16 +99,14 @@
   2.223  
   2.224  # Give error and exit if we don't have libcurl
   2.225  if test "x$HAVE_LIBCURL" = "xno"; then
   2.226 -  AC_MSG_ERROR(you need libcurl installed)
   2.227 +        AC_MSG_ERROR(you need libcurl installed)
   2.228  fi
   2.229  
   2.230  # make LIBCURL_CFLAGS and LIBCURL_LIBS available
   2.231  AC_SUBST(LIBCURL_CFLAGS)
   2.232  AC_SUBST(LIBCURL_LIBS)
   2.233  
   2.234 -#
   2.235 -# mysql libraries
   2.236 -#
   2.237 +# check for mysql
   2.238  AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
   2.239  if test -z "$MYSQL_CFLAGS"; then
   2.240          AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
   2.241 @@ -228,55 +119,15 @@
   2.242  fi
   2.243  AC_SUBST(MYSQL_LIBS)
   2.244  
   2.245 -#dnl Enable gtk-doc
   2.246 -#GTK_DOC_CHECK(1.4)
   2.247 -
   2.248 -# checks if the indent tool can be found
   2.249 -AC_CHECK_PROG(HAVE_INDENT, indent, [Found!])
   2.250 -if test -n "$HAVE_INDENT"; then
   2.251 -	AC_DEFINE(HAVE_INDENT, 1, [AutoIndent found!])
   2.252 -fi
   2.253 -
   2.254 -AM_CONDITIONAL(HAVE_INDENT, test -n "$HAVE_INDENT")
   2.255 -
   2.256 -# checks if the gprof tool can be found
   2.257 -AC_CHECK_PROG(HAVE_GPROF, gprof, [Found!])
   2.258 -if test -n "$HAVE_GPROF"; then
   2.259 -	AC_DEFINE(HAVE_GPROF, 1, [Gnu Profiling tool found!])
   2.260 -fi
   2.261 -
   2.262 -AM_CONDITIONAL(HAVE_GPROF, test -n "$HAVE_GPROF")
   2.263 -
   2.264 -# checks if the gcov tool can be found
   2.265 -AC_CHECK_PROG(HAVE_GCOV, gcov, [Found!])
   2.266 -if test -n "$HAVE_GCOV"; then
   2.267 -	AC_DEFINE(HAVE_GCOV, 1, [Gnu Coverage tool found!])
   2.268 -fi
   2.269 -
   2.270 -AM_CONDITIONAL(HAVE_GCOV, test -n "$HAVE_GCOV")
   2.271 -
   2.272 -# checks if the genhtml tool can be found
   2.273 -AC_CHECK_PROG(HAVE_GENHTML, genhtml, [Found!])
   2.274 -if test -n "$HAVE_GENHTML"; then
   2.275 -	AC_DEFINE(HAVE_GENHTML, 1, [Gnu Coverage HTML report generator found!])
   2.276 -fi
   2.277 -
   2.278 -AM_CONDITIONAL(HAVE_GENHTML, test -n "$HAVE_GENHTML")
   2.279 -
   2.280 -AC_SUBST(CFLAGS)
   2.281 -AC_SUBST(LDFLAGS)
   2.282 -AC_SUBST(LIBS)
   2.283 -
   2.284 -AC_OUTPUT([
   2.285 +AC_OUTPUT(
   2.286  Makefile
   2.287  src/Makefile
   2.288  samples/Makefile
   2.289  tests/Makefile
   2.290 -gmyth.pc])
   2.291 +gmyth.pc)
   2.292  
   2.293  if test "x$enable_debug" != "xno"; then
   2.294 -    AC_MSG_NOTICE([Debug: Enabled])
   2.295 +        AC_MSG_NOTICE([Debug: Enabled])
   2.296  else
   2.297 -    AC_MSG_NOTICE([Debug: Disabled])
   2.298 +        AC_MSG_NOTICE([Debug: Disabled])
   2.299  fi
   2.300 -
     3.1 --- a/gmyth/src/Makefile.am	Mon Feb 25 14:14:29 2008 +0000
     3.2 +++ b/gmyth/src/Makefile.am	Mon Feb 25 17:45:36 2008 +0000
     3.3 @@ -1,14 +1,12 @@
     3.4 -SUBDIRS = .
     3.5 -
     3.6  lib_LTLIBRARIES = libgmyth.la
     3.7  
     3.8  INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src @GLIB_CFLAGS@ @GOBJECT_CFLAGS@
     3.9  
    3.10 -BUILT_SOURCES = 				\
    3.11 -	gmyth_marshal.c 			\
    3.12 +BUILT_SOURCES =					\
    3.13 +	gmyth_marshal.c				\
    3.14  	gmyth_marshal.h
    3.15  
    3.16 -libgmyth_la_SOURCES = 			\
    3.17 +libgmyth_la_SOURCES =			\
    3.18  	gmyth_common.c				\
    3.19  	gmyth_debug.c				\
    3.20  	gmyth_epg.c 				\
    3.21 @@ -48,7 +46,7 @@
    3.22  	mv gmyth_marshal.c.tmp gmyth_marshal.c
    3.23  
    3.24  libgmyth_la_CFLAGS = 			\
    3.25 -	-DDATADIR=\"$(pkgdatadir)\" \
    3.26 +	-DDATADIR=\"$(pkgdatadir)\"	\
    3.27  	$(GLIB_CFLAGS) 				\
    3.28  	$(GOBJECT_CFLAGS)			\
    3.29  	$(GST_CFLAGS) 				\
    3.30 @@ -57,32 +55,32 @@
    3.31  	$(MYSQL_CFLAGS)				\
    3.32  	$(LIBXML_CFLAGS)
    3.33  
    3.34 -libgmyth_la_LDFLAGS = 			\
    3.35 -	-export-dynamic 			\
    3.36 -	$(GLIB_CFLAGS) 				\
    3.37 +libgmyth_la_LDFLAGS =			\
    3.38 +	-export-dynamic				\
    3.39 +	$(GLIB_CFLAGS)				\
    3.40  	$(GOBJECT_CFLAGS)			\
    3.41 -	$(MYSQL_LIBS) 				\
    3.42 -	$(GST_LIBS) 				\
    3.43 +	$(MYSQL_LIBS)				\
    3.44 +	$(GST_LIBS)					\
    3.45  	$(GSTBASE_LIBS)				\
    3.46  	$(GSTPLUGINS_LIBS)			\
    3.47  	$(LIBXML_LIBS)
    3.48  
    3.49 -libgmyth_includedir = 			\
    3.50 +libgmyth_includedir =			\
    3.51  	$(pkgincludedir)
    3.52  
    3.53 -libgmyth_include_HEADERS =    	\
    3.54 +libgmyth_include_HEADERS =		\
    3.55  	gmyth.h						\
    3.56  	gmyth_common.h	 			\
    3.57  	gmyth_debug.h				\
    3.58 -	gmyth_epg.h 				\
    3.59 -	gmyth_recorder.h 			\
    3.60 -	gmyth_scheduler.h 			\
    3.61 -	gmyth_tvchain.h 			\
    3.62 -	gmyth_util.h 				\
    3.63 -	gmyth_query.h 				\
    3.64 -	gmyth_socket.h 				\
    3.65 +	gmyth_epg.h					\
    3.66 +	gmyth_recorder.h			\
    3.67 +	gmyth_scheduler.h			\
    3.68 +	gmyth_tvchain.h				\
    3.69 +	gmyth_util.h				\
    3.70 +	gmyth_query.h				\
    3.71 +	gmyth_socket.h				\
    3.72  	gmyth_remote_util.h			\
    3.73 -	gmyth_stringlist.h 			\
    3.74 +	gmyth_stringlist.h			\
    3.75  	gmyth_monitor_handler.h		\
    3.76  	gmyth_file_transfer.h		\
    3.77  	gmyth_livetv.h				\
    3.78 @@ -97,20 +95,4 @@
    3.79  	gmyth_file.h				\
    3.80  	gmyth_file_local.h
    3.81  
    3.82 -if HAVE_INDENT
    3.83 -indent: 
    3.84 -	@for src_file in $(libgmyth_la_SOURCES); do \
    3.85 -		./gmyth-indent.sh $$src_file; \
    3.86 -	done; \
    3.87 -	for inc_file in $(libgmyth_include_HEADERS); do \
    3.88 -		./gmyth-indent.sh $$inc_file; \
    3.89 -	done;
    3.90 -endif
    3.91 -
    3.92  CLEANFILES = $(BUILT_SOURCES)
    3.93 -
    3.94 -if HAVE_GCOV
    3.95 -CLEANFILES += *.gcda \
    3.96 -	*.gcno \
    3.97 -	*.gcov
    3.98 -endif
     4.1 --- a/gmyth/tests/Makefile.am	Mon Feb 25 14:14:29 2008 +0000
     4.2 +++ b/gmyth/tests/Makefile.am	Mon Feb 25 17:45:36 2008 +0000
     4.3 @@ -1,8 +1,8 @@
     4.4  LDADD = \
     4.5 -	$(top_srcdir)/src/.libs/libgmyth.la
     4.6 +	$(top_srcdir)/src/libgmyth.la
     4.7  
     4.8  AM_LDFLAGS = \
     4.9 -	@GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@ 
    4.10 +	@GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@
    4.11  
    4.12  INCLUDES = \
    4.13  	-I$(top_srcdir) \
    4.14 @@ -53,11 +53,6 @@
    4.15  	test_stringlist.py \
    4.16  	test_tvchain.py
    4.17  
    4.18 -if HAVE_GENHTML
    4.19 -TESTS += \
    4.20 -	coverage.py
    4.21 -endif
    4.22 -
    4.23  TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir)
    4.24  
    4.25  test_SOURCES = \
    4.26 @@ -109,15 +104,3 @@
    4.27  	gmyth_test_tvchain.c
    4.28  
    4.29  CLEANFILES = $(BUILT_SOURCES)
    4.30 -
    4.31 -if HAVE_GCOV
    4.32 -CLEANFILES += \
    4.33 -	*.gcda \
    4.34 -	*.gcno \
    4.35 -	*.gcov
    4.36 -endif
    4.37 -
    4.38 -if HAVE_GPROF
    4.39 -CLEANFILES += gmon.out
    4.40 -endif
    4.41 -