configure.in
author hallski <hallski>
Thu, 17 Jul 2003 16:33:05 +0000
changeset 20 f299ced9d93d
parent 17 f1cbbbcb29fe
child 22 855fb414667f
permissions -rw-r--r--
2003-07-17 Mikael Hallendal <micke@imendio.com> * configure.in: Added GNUTLS_REQUIRED * loudmouth.spec.in: Added gnutls dependency in RPM's. *
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     1
AC_INIT(loudmouth/lm-message.h)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     2
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     3
AM_CONFIG_HEADER(config.h)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     4
17
f1cbbbcb29fe 2003-07-14 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 15
diff changeset
     5
AM_INIT_AUTOMAKE(loudmouth, 0.11)
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     6
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     7
AM_MAINTAINER_MODE
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     8
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
     9
AC_PROG_CC
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    10
AC_ISC_POSIX
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    11
AC_HEADER_STDC
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    12
AM_PROG_LIBTOOL
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    13
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    14
AM_PATH_GLIB_2_0
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    15
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    16
LM_COMPILE_WARNINGS
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    17
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    18
changequote(,)dnl
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    19
if test "x$GCC" = "xyes"; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    20
  case " $CFLAGS " in
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    21
  *[\ \	]-Wall[\ \	]*) ;;
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    22
  *) CFLAGS="$CFLAGS -Wall" ;;
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    23
  esac
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    24
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    25
changequote([,])dnl
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    26
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    27
AC_SUBST(CFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    28
AC_SUBST(LDFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    29
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    30
GLIB2_REQUIRED=2.0.0
20
f299ced9d93d 2003-07-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 17
diff changeset
    31
GNUTLS_REQUIRED=0.8.9
f299ced9d93d 2003-07-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 17
diff changeset
    32
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    33
AC_SUBST(GLIB2_REQUIRED)
20
f299ced9d93d 2003-07-17 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 17
diff changeset
    34
AC_SUBST(GNUTLS_REQUIRED)
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    35
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    36
PKG_CHECK_MODULES(LOUDMOUTH, glib-2.0 >= $GLIB2_REQUIRED)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    37
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    38
dnl +--------------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    39
dnl | Check for gtk-doc. |-------------------------------
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    40
dnl +--------------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    41
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    42
AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    43
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    44
if test "x$with_html_dir" = "x" ; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    45
  HTML_DIR='${datadir}/gtk-doc/html'
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    46
else
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    47
  HTML_DIR=$with_html_dir
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    48
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    49
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    50
AC_SUBST(HTML_DIR)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    51
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    52
gtk_doc_min_version=1.0
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    53
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    54
if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    55
  AC_MSG_RESULT(yes)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    56
  GTKDOC=true
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    57
else
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    58
  AC_MSG_RESULT(no)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    59
  GTKDOC=false
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    60
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    61
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    62
dnl Let people disable the gtk-doc stuff.
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    63
AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    64
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    65
if test x$enable_gtk_doc = xauto ; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    66
  if test x$GTKDOC = xtrue ; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    67
    enable_gtk_doc=yes
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    68
  else
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    69
    enable_gtk_doc=no
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    70
  fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    71
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    72
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    73
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    74
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    75
dnl define a MAINT-like variable REBUILD which is set if Perl
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    76
dnl and awk are found, so autogenerated sources can be rebuilt
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    77
AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    78
REBUILD=\#
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    79
if test "x$enable_rebuilds" = "xyes" && \
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    80
     test -n "$PERL" && \
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    81
     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    82
     test -n "$AWK" ; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    83
  REBUILD=
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    84
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    85
AC_SUBST(REBUILD)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    86
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    87
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    88
dnl +--------------------------------------------------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    89
dnl | Checking for libnsl and libsocket need on some systems |-
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    90
dnl +--------------------------------------------------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    91
AC_CHECK_LIB(nsl,gethostbyname)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    92
AC_CHECK_LIB(socket,socket)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
    93
15
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    94
dnl +--------------------------------------------------------+
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    95
dnl | Checking for SSL (through GnuTLS) support              |
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    96
dnl +--------------------------------------------------------+
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    97
AC_MSG_CHECKING([for GnuTLS support])
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    98
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
    99
AC_ARG_WITH(ssl, [  --without-ssl           disable ssl support],
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   100
	    ac_ssl=$withval,
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   101
	    ac_ssl=yes
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   102
	    )
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   103
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   104
if test x$ac_ssl != xno; then
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   105
  GNUTLS_CFLAGS=`libgnutls-config --cflags`
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   106
  if test "x$GNUTLS_CFLAGS" = "x"; then
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   107
    AC_MSG_RESULT(no)
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   108
  else
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   109
    AC_MSG_RESULT(yes)
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   110
    GNUTLS_LDFLAGS=`libgnutls-config --libs`
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   111
    CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   112
    LDFLAGS="$LDFLAGS $GNUTLS_LDFLAGS"
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   113
    AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.])
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   114
  fi
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   115
else
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   116
  AC_MSG_RESULT(no)
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   117
fi
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   118
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   119
dnl +-------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   120
dnl | Build Flags |--------------------------------------------
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   121
dnl +-------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   122
DOC_CFLAGS="$CFLAGS"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   123
CFLAGS="$CFLAGS $WARN_CFLAGS"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   124
AC_SUBST(DOC_CFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   125
AC_SUBST(CFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   126
AC_SUBST(CPPFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   127
AC_SUBST(LDFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   128
dnl -----------------------------------------------------------
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   129
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   130
dnl +--------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   131
dnl | Debug output |-------------------------------------------
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   132
dnl +--------------+
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   133
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   134
AC_ARG_ENABLE(debug, 
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   135
	      [  --enable-debug          Enable debug output [default=yes]],
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   136
	      enable_debug="$enableval", enable_debug=yes, enable_debug=no)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   137
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   138
if test x$enable_debug = xno ; then
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   139
	echo "Debugging disabled"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   140
	LOUDMOUTH_CFLAGS="$LOUDMOUTH_CFLAGS -DLM_NO_DEBUG"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   141
else
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   142
	echo "Debugging enabled"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   143
fi
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   144
15
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   145
1ff2f81867e1 2003-07-12 Mikael Hallendal <micke@imendio.com>
hallski <hallski>
parents: 13
diff changeset
   146
1
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   147
AC_SUBST(LOUDMOUTH_CFLAGS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   148
AC_SUBST(LOUDMOUTH_LIBS)
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   149
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   150
#CFLAGS="$CFLAGS $WARN_CFLAGS"
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   151
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   152
AC_OUTPUT([
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   153
Makefile
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   154
docs/Makefile
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   155
docs/reference/Makefile
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   156
loudmouth/Makefile
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   157
loudmouth-1.0.pc
50e230cf7818 Initial revision
hallski <hallski>
parents:
diff changeset
   158
loudmouth.spec])