gmyth/configure.ac
author melunko
Fri Oct 06 16:13:28 2006 +0100 (2006-10-06)
branchtrunk
changeset 26 b9c6012bccdb
parent 1 ffdf467315ec
child 36 a6559a231dd2
permissions -rw-r--r--
[svn r27] Removed doxygen calls and fixing dependencies from maemo-ui
leo_sobral@1
     1
#                                               -*- Autoconf -*-
leo_sobral@1
     2
# Process this file with autoconf to produce a configure script.
leo_sobral@1
     3
leo_sobral@1
     4
AC_PREREQ(2.50)
leo_sobral@1
     5
leo_sobral@1
     6
AC_INIT([gmyth],[0.1])
leo_sobral@1
     7
leo_sobral@1
     8
dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
leo_sobral@1
     9
AC_CONFIG_HEADER(config.h)
leo_sobral@1
    10
leo_sobral@1
    11
dnl when going to/from release please set the nano (fourth number) right !
leo_sobral@1
    12
dnl releases only do Wall, SVN and prerelease does Werror too
leo_sobral@1
    13
AS_VERSION(gmyth, GMYTH, 0, 1, 0, 3, GMYTH_SVN="no", GMYTH_SVN="yes")
leo_sobral@1
    14
leo_sobral@1
    15
GMYTH_MAJORMINOR=$GMYTH_MAJOR_VERSION.$GMYTH_MINOR_VERSION
leo_sobral@1
    16
leo_sobral@1
    17
AC_SUBST(GMYTH_MAJORMINOR)
leo_sobral@1
    18
leo_sobral@1
    19
dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
leo_sobral@1
    20
AM_MAINTAINER_MODE
leo_sobral@1
    21
dnl make aclocal work in maintainer mode
leo_sobral@1
    22
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
leo_sobral@1
    23
leo_sobral@1
    24
# Checks for programs.
leo_sobral@1
    25
# check for tools
leo_sobral@1
    26
# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
leo_sobral@1
    27
CFLAGS="$CFLAGS -Wall"
leo_sobral@1
    28
AC_PROG_CC
leo_sobral@1
    29
AC_PROG_LIBTOOL
leo_sobral@1
    30
leo_sobral@1
    31
dnl Generate doxygen documentation
leo_sobral@1
    32
DX_HTML_FEATURE(ON)
leo_sobral@1
    33
DX_CHM_FEATURE(OFF)
leo_sobral@1
    34
DX_CHI_FEATURE(OFF)
leo_sobral@1
    35
DX_MAN_FEATURE(OFF)
leo_sobral@1
    36
DX_RTF_FEATURE(OFF)
leo_sobral@1
    37
DX_XML_FEATURE(OFF)
leo_sobral@1
    38
DX_PDF_FEATURE(OFF)
leo_sobral@1
    39
DX_PS_FEATURE(OFF)
leo_sobral@1
    40
DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
leo_sobral@1
    41
leo_sobral@1
    42
leo_sobral@1
    43
# Checks for libraries.
leo_sobral@1
    44
leo_sobral@1
    45
# Checks for header files.
leo_sobral@1
    46
AC_HEADER_STDC
leo_sobral@1
    47
AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
leo_sobral@1
    48
leo_sobral@1
    49
# Checks for typedefs, structures, and compiler characteristics.
leo_sobral@1
    50
AC_C_CONST
leo_sobral@1
    51
AC_TYPE_PID_T
leo_sobral@1
    52
AC_STRUCT_TM
leo_sobral@1
    53
leo_sobral@1
    54
# Checks for library functions.
leo_sobral@1
    55
AC_FUNC_FORK
leo_sobral@1
    56
AC_PROG_GCC_TRADITIONAL
leo_sobral@1
    57
AC_FUNC_MALLOC
leo_sobral@1
    58
AC_FUNC_MKTIME
leo_sobral@1
    59
AC_FUNC_VPRINTF
leo_sobral@1
    60
AC_CHECK_FUNCS([memset socket stime strstr strtoul])
leo_sobral@1
    61
leo_sobral@1
    62
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
leo_sobral@1
    63
leo_sobral@1
    64
# Checks required packages
leo_sobral@1
    65
leo_sobral@1
    66
dnl Test if --disable-debug given
leo_sobral@1
    67
AC_ARG_ENABLE(debug,
leo_sobral@1
    68
	[AC_HELP_STRING([--disable-debug], [disable debugging mode])],
leo_sobral@1
    69
	enable_debug="$enableval",
leo_sobral@1
    70
	enable_debug=yes)
leo_sobral@1
    71
leo_sobral@1
    72
if test "x$enable_debug" = "xyes" ; then
leo_sobral@1
    73
      CFLAGS="$CFLAGS -g"
leo_sobral@1
    74
else
leo_sobral@1
    75
      AC_DEFINE( NDEBUG, 1, [disable debug messages] )
leo_sobral@1
    76
      CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
leo_sobral@1
    77
fi          
leo_sobral@1
    78
leo_sobral@1
    79
AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
leo_sobral@1
    80
leo_sobral@1
    81
# Check for pkgconfig
leo_sobral@1
    82
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
leo_sobral@1
    83
# Give error and exit if we don't have pkgconfig
leo_sobral@1
    84
if test "x$HAVE_PKGCONFIG" = "xno"; then
leo_sobral@1
    85
  AC_MSG_ERROR(you need to have pkgconfig installed !)
leo_sobral@1
    86
fi
leo_sobral@1
    87
leo_sobral@1
    88
# Check for Glib2.0
leo_sobral@1
    89
PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
leo_sobral@1
    90
leo_sobral@1
    91
# Give error and exit if we don't have glib
leo_sobral@1
    92
if test "x$HAVE_GLIB" = "xno"; then
leo_sobral@1
    93
  AC_MSG_ERROR(you need glib-2.0 installed)
leo_sobral@1
    94
fi
leo_sobral@1
    95
leo_sobral@1
    96
# make GLIB_CFLAGS and GLIB_LIBS available
leo_sobral@1
    97
AC_SUBST(GLIB_CFLAGS)
leo_sobral@1
    98
AC_SUBST(GLIB_LIBS)
leo_sobral@1
    99
leo_sobral@1
   100
# Check for GObject2.0
leo_sobral@1
   101
PKG_CHECK_MODULES(GOBJECT,
leo_sobral@1
   102
  gobject-2.0,
leo_sobral@1
   103
  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
leo_sobral@1
   104
leo_sobral@1
   105
# Give error and exit if we don't have gobject
leo_sobral@1
   106
if test "x$HAVE_GOBJECT" = "xno"; then
leo_sobral@1
   107
  AC_MSG_ERROR(you need gobject-2.0 installed)
leo_sobral@1
   108
fi
leo_sobral@1
   109
leo_sobral@1
   110
# make GOBJECT_CFLAGS and GOBJECT_LIBS available
leo_sobral@1
   111
AC_SUBST(GOBJECT_CFLAGS)
leo_sobral@1
   112
AC_SUBST(GOBJECT_LIBS)
leo_sobral@1
   113
leo_sobral@1
   114
# Check for libxml-2.0
leo_sobral@1
   115
PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
leo_sobral@1
   116
renatofilho@18
   117
# Give error and exit if we don't have libxml
leo_sobral@1
   118
if test "x$HAVE_LIBXML" = "xno"; then
leo_sobral@1
   119
  AC_MSG_ERROR(you need libxml-2.0 installed)
leo_sobral@1
   120
fi
leo_sobral@1
   121
leo_sobral@1
   122
# make LIBXML_CFLAGS and LIBXML_LIBS available
leo_sobral@1
   123
AC_SUBST(LIBXML_CFLAGS)
leo_sobral@1
   124
AC_SUBST(LIBXML_LIBS)
leo_sobral@1
   125
leo_sobral@1
   126
leo_sobral@1
   127
# check for gstreamer development files
leo_sobral@1
   128
GST_REQUIRED=0.10
leo_sobral@1
   129
GST_MAJORMINOR=0.10
leo_sobral@1
   130
PKG_CHECK_MODULES(GST, \
leo_sobral@1
   131
  gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
leo_sobral@1
   132
  HAVE_GST=yes, HAVE_GST=no)
leo_sobral@1
   133
leo_sobral@1
   134
# Give error and exit if we don't have gstreamer
leo_sobral@1
   135
if test "x$HAVE_GST" = "xno"; then
leo_sobral@1
   136
  AC_MSG_ERROR(you need gstreamer development packages installed !)
leo_sobral@1
   137
fi
leo_sobral@1
   138
leo_sobral@1
   139
# make GST_CFLAGS and GST_LIBS available
leo_sobral@1
   140
AC_SUBST(GST_CFLAGS)
leo_sobral@1
   141
AC_SUBST(GST_LIBS)
leo_sobral@1
   142
leo_sobral@1
   143
# check for gstreamer-base plugins (xoverlay interface)
leo_sobral@1
   144
GSTBASE_REQUIRED=0.10
leo_sobral@1
   145
GSTBASE_MAJORMINOR=0.10
leo_sobral@1
   146
PKG_CHECK_MODULES(GSTBASE, \
leo_sobral@1
   147
  gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
leo_sobral@1
   148
  HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
leo_sobral@1
   149
leo_sobral@1
   150
# Give error and exit if we don't have gstreamer base libraries
leo_sobral@1
   151
if test "x$HAVE_GSTBASE" = "xno"; then
leo_sobral@1
   152
  AC_MSG_ERROR(you need gstreamer base development packages installed !)
leo_sobral@1
   153
fi
leo_sobral@1
   154
leo_sobral@1
   155
# make GSTBASE_CFLAGS and GSTBASE_LIBS available
leo_sobral@1
   156
AC_SUBST(GSTBASE_CFLAGS)
leo_sobral@1
   157
AC_SUBST(GSTBASE_LIBS)
leo_sobral@1
   158
leo_sobral@1
   159
leo_sobral@1
   160
# make GST_MAJORMINOR available in Makefile.am
leo_sobral@1
   161
AC_SUBST(GST_MAJORMINOR)
leo_sobral@1
   162
leo_sobral@1
   163
#
leo_sobral@1
   164
# mysql libraries
leo_sobral@1
   165
#
leo_sobral@1
   166
AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
leo_sobral@1
   167
if test -z "$MYSQL_CFLAGS"; then 
leo_sobral@1
   168
        AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
leo_sobral@1
   169
fi
leo_sobral@1
   170
AC_SUBST(MYSQL_CFLAGS)
leo_sobral@1
   171
leo_sobral@1
   172
leo_sobral@1
   173
AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs`)
leo_sobral@1
   174
if test -z "$MYSQL_LIBS"; then 
leo_sobral@1
   175
        AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
leo_sobral@1
   176
fi
leo_sobral@1
   177
AC_SUBST(MYSQL_LIBS)
leo_sobral@1
   178
leo_sobral@1
   179
#dnl Enable gtk-doc
leo_sobral@1
   180
#GTK_DOC_CHECK(1.4)
leo_sobral@1
   181
leo_sobral@1
   182
leo_sobral@1
   183
AC_CONFIG_FILES([Makefile
leo_sobral@1
   184
                src/Makefile
renatofilho@18
   185
        		gmyth.pc])
leo_sobral@1
   186
AC_OUTPUT