configure.ac
changeset 4 807420cf8002
parent 2 b6516e8751bb
child 6 c2ad0b151a5e
equal deleted inserted replaced
3:7df50d56fbdd 4:807420cf8002
     1 #                                               -*- Autoconf -*-
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     2 # Process this file with autoconf to produce a configure script.
     3 
     3 
     4 AC_PREREQ(2.59)
     4 AC_PREREQ(2.59)
     5 AC_INIT([mcabber-modules],[0.10.0-dev],[mcabber@lilotux.net])
     5 AC_INIT([mcabber],[0.10.0-dev],[mcabber@lilotux.net])
     6 AM_INIT_AUTOMAKE
     6 AM_INIT_AUTOMAKE
     7 AM_CONFIG_HEADER([config-modules.h])
     7 AM_CONFIG_HEADER([config-modules.h])
     8 
     8 
     9 AC_PROG_LIBTOOL
     9 AC_PROG_LIBTOOL
    10 AC_PROG_RANLIB
    10 AC_PROG_RANLIB
    58                 isascii memmove memset modf select setlocale socket strcasecmp \
    58                 isascii memmove memset modf select setlocale socket strcasecmp \
    59                 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \
    59                 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \
    60                 iswblank])
    60                 iswblank])
    61 
    61 
    62 
    62 
       
    63 PKG_CHECK_MODULES(MCABBER, mcabber >= 0.10.0)
       
    64 
    63 # Check for glib
    65 # Check for glib
    64 AM_PATH_GLIB_2_0(2.14.0,
    66 AM_PATH_GLIB_2_0(2.14.0,
    65                  [AC_DEFINE([HAVE_GLIB_REGEX], 1,
    67                  [AC_DEFINE([HAVE_GLIB_REGEX], 1,
    66                             [Define if GLib has regex support])],
    68                             [Define if GLib has regex support])],
    67                  [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),
    69                  [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),
    68                                   [g_list_append], ["$gmodule_module"])],
    70                                   [g_list_append], ["$gmodule_module"])],
    69                  [g_regex_new "$gmodule_module"])
    71                  [g_regex_new "$gmodule_module"])
    70 
    72 
    71 PKG_CHECK_MODULES(MCABBER, mcabber >= 0.10.0)
    73 PKG_CHECK_MODULES(GMODULES, gmodule-2.0)
    72 
    74 
    73 AC_ARG_ENABLE(debug,
    75 AC_ARG_ENABLE(debug,
    74     [AC_HELP_STRING(--enable-debug, add development compilation options)],
    76     [AC_HELP_STRING(--enable-debug, add development compilation options)],
    75     debug=$enableval, debug="")
    77     debug=$enableval, debug="")
    76 if test x"${debug}" = x"yes"; then
    78 if test x"${debug}" = x"yes"; then
    89 fi
    91 fi
    90 
    92 
    91 # We need _GNU_SOURCE for strptime() and strcasestr()
    93 # We need _GNU_SOURCE for strptime() and strcasestr()
    92 CFLAGS="$CFLAGS -D_GNU_SOURCE"
    94 CFLAGS="$CFLAGS -D_GNU_SOURCE"
    93 
    95 
    94 AC_ARG_ENABLE(all-modules, [  --enable-all-modules    enable all modules],
    96 AC_ARG_ENABLE(all-modules,
       
    97               AC_HELP_STRING([--enable-all-modules], [enable all modules]),
    95               enable_all_modules=$enableval)
    98               enable_all_modules=$enableval)
    96 
    99 
    97 AM_CONDITIONAL([INSTALL_HEADERS], [test x$enable_all_modules = xyes])
   100 AC_ARG_ENABLE(module-comment,
       
   101               AC_HELP_STRING([--enable-module-comment], [enable module comment]),
       
   102               enable_module_comment=$enableval)
       
   103 AC_ARG_ENABLE(module-extsay,
       
   104               AC_HELP_STRING([--enable-module-extsay], [enable module extsay]),
       
   105               enable_module_extsay=$enableval)
       
   106 
       
   107 AM_CONDITIONAL([INSTALL_MODULE_COMMENT],
       
   108                [test x"${enable_all_modules}" = x"yes" -o \
       
   109                      x"${enable_module_comment}" = x"yes"])
       
   110 
       
   111 AM_CONDITIONAL([INSTALL_MODULE_EXTSAY],
       
   112                [test x"${enable_all_modules}" = x"yes" -o \
       
   113                      x"${enable_module_extsay}" = x"yes"])
    98 
   114 
    99 AC_CONFIG_FILES([comment/Makefile
   115 AC_CONFIG_FILES([comment/Makefile
   100                  extsay/Makefile
   116                  extsay/Makefile
   101                  Makefile])
   117                  Makefile])
   102 AC_OUTPUT
   118 AC_OUTPUT