File: axis2c.m4

package info (click to toggle)
emboss 6.6.0%2Bdfsg-15
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 571,580 kB
  • sloc: ansic: 460,579; java: 29,383; perl: 13,573; sh: 12,753; makefile: 3,295; csh: 706; asm: 351; xml: 239; pascal: 237; modula3: 8
file content (72 lines) | stat: -rw-r--r-- 1,830 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
dnl @synopsis CHECK_AXIS2C()
dnl
dnl This macro searches for installed axis2c libraries only
dnl if the --with-axis2c[=dir] switch is given. With no
dnl directory specified it will default to /usr
dnl

AC_DEFUN([CHECK_AXIS2C],
[
AC_MSG_CHECKING([whether to look for axis2c support])

AC_ARG_WITH([axis2c],[AS_HELP_STRING([--with-axis2c=@<:@DIR@:>@],
            [root directory of axis2c installation])],
            [], [with_axis2c=no])

AXIS2C_CPPFLAGS=""
AXIS2C_LDFLAGS=""

found_axis2c="no"

AS_IF([test "x$with_axis2c" != xno],
  [
    AC_MSG_RESULT([yes])
    if test "x$with_axis2c" != "xyes" ; then
        ALT_HOME=$with_axis2c
        if test ! -d "${ALT_HOME}" ; then
          AC_MSG_ERROR([No such axis2c directory (${ALT_HOME})])
        fi
	 export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$ALT_HOME/lib/pkgconfig"
    else
        ALT_HOME="/usr"
    fi

    PKG_CHECK_MODULES([AXIS2C],[axis2c],
    [
        AXIS2C_CPPFLAGS=${AXIS2C_CFLAGS}
        AXIS2C_LDFLAGS=${AXIS2C_LIBS}
    ],
    [
        echo pkg-config axis2c detection failed
    ])


    A2CTMPLIBS="${LIBS}"

    LIBS="${AXIS2C_LDFLAGS} ${LIBS}"
    AC_CHECK_LIB([axis2_engine], [axis2_svc_client_create],
    [
       AC_DEFINE([HAVE_AXIS2C],[1],[Define to 1 if using axis2c libraries])
       AC_DEFINE_UNQUOTED([AXIS2C_LOC],["${ALT_HOME}"],[AXIS2C location])
       found_axis2c="yes"
       AXIS2C_LDFLAGS="${AXIS2C_LDFLAGS} -laxis2_engine -lneethi -laxis2_http_sender -laxis2_http_receiver -laxis2_http_common -laxis2_axiom -laxis2_parser -lguththila -laxutil"
    ],
    [
       AC_MSG_RESULT([no])
       found_axis2c="no"
    ])

    LIBS="${A2CTMPLIBS}"

  ],

  [
      AC_MSG_RESULT([no])
      found_axis2c="no"
  ])

# AM_CONDITIONAL([USEAXIS2C], [test "$found_axis2c" = "yes"])

AC_SUBST([AXIS2C_CPPFLAGS])
AC_SUBST([AXIS2C_LDFLAGS])
])