~ubuntu-branches/ubuntu/trusty/mod-gearman/trusty

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2012-04-16 07:48:43 UTC
  • mfrom: (4.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120416074843-r03ytzfvk4l1azk0
Tags: 1.2.8-1
ImportedĀ UpstreamĀ versionĀ 1.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
##############################################
5
5
# autoconf really does not work with 2.59 or older
6
6
AC_PREREQ([2.60])
7
 
AC_INIT([mod_gearman], [1.2.2], [sven.nierlein@consol.de])
 
7
AC_INIT([mod_gearman], [1.2.8], [sven.nierlein@consol.de])
8
8
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
9
9
AC_CONFIG_SRCDIR([neb_module/mod_gearman.c],[worker/worker.c],[tools/send_gearman.c],[tools/check_gearman.c],[tools/gearman_top.c])
10
10
AC_CONFIG_HEADER([config.h])
44
44
 
45
45
AC_ARG_WITH(gearman,
46
46
 [  --with-gearman=DIR Specify the path to your gearman library],
47
 
 [  LDFLAGS="${LDFLAGS} -L$withval/lib"
48
 
    CFLAGS="${CFLAGS} -I$withval/include"
 
47
 [
 
48
    found=0
 
49
    libgm_1_0=0
 
50
    for d in libgearman/.libs lib .; do
 
51
      test -e "$withval/$d/libgearman.so" && LDFLAGS="${LDFLAGS} -L$withval/$d" && CFLAGS="${CFLAGS} -L$withval/$d" && found=1 && break;
 
52
    done
 
53
    test $found -eq 1 || { echo 'did not find libgearman.so under your specified path!' && exit 1; }
 
54
    found=0
 
55
    for d in libgearman-1.0 include .; do
 
56
      test -e "$withval/$d/libgearman-1.0/gearman.h" && CFLAGS="${CFLAGS} -I$withval/$d" && found=1 && libgm_1_0=1 && break;
 
57
      test -e "$withval/$d/libgearman/gearman.h"     && CFLAGS="${CFLAGS} -I$withval/$d" && found=1 && break;
 
58
    done
 
59
    test $found -eq 1 || { echo 'did not find gearman.h under your specified path!' && exit 1; }
 
60
    test $libgm_1_0 -eq 1 && { AC_DEFINE_UNQUOTED(LIBGEARMAN_1_0,,[libgearman 1.0 uses different header name. introduced with libgearman 0.25 ]) }
49
61
 ])
50
62
 
51
63
##############################################
79
91
 
80
92
dnl Is embedded Perl being compiled in?
81
93
AM_CONDITIONAL(USEPERL, test "$USEPERL" = "yes")
82
 
if test "$USEPERL" == "yes"; then
 
94
if test "$USEPERL" = "yes"; then
83
95
    tmp=$LIBS
84
96
    AC_CHECK_LIB([perl],[perl_alloc],,AC_MSG_ERROR([Compiling Mod-Gearman with embedded Perl requires libperl.]),[`perl -MExtUtils::Embed -e ccopts -e ldopts`])
85
97
    # save libs, as we do not want to add -lperl to all LIBS
93
105
fi
94
106
 
95
107
##############################################
 
108
AM_CONDITIONAL(USEBSD, test "$(uname)" = "FreeBSD")
 
109
 
 
110
##############################################
96
111
# Check some functions
97
112
AC_CHECK_FUNCS([gettimeofday strsep strtok strdup strchr strstr strtoul alarm gethostname memset strcspn strerror atexit gethostbyname socket dup2 localtime_r memmove strpbrk])
98
113
AC_PROG_LN_S