File: aolserver.m4

package info (click to toggle)
tclthread 20030827-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,284 kB
  • ctags: 526
  • sloc: ansic: 4,828; sh: 2,589; tcl: 888; makefile: 240; cpp: 31
file content (60 lines) | stat: -rw-r--r-- 1,675 bytes parent folder | download | duplicates (2)
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

#------------------------------------------------------------------------
# NS_PATH_AOLSERVER
#
#   Allows the building with support for AOLserver 
#
# Arguments:
#   none
#   
# Results:
#
#   Adds the following arguments to configure:
#       --with-aolserver=...
#
#   Defines the following vars:
#       AOL_DIR Full path to the directory containing AOLserver distro
#
#   Sets the following vars:
#       NS_AOLSERVER 
#
#   Updates following vars:
#       CFLAGS
#       LIBS
#       SHLIB_LD
#------------------------------------------------------------------------

AC_DEFUN(NS_PATH_AOLSERVER, [
    AC_MSG_CHECKING([for AOLserver configuration])
    AC_ARG_WITH(aol, 
    [  --with-aolserver        directory with AOLserver distribution],\
    with_aolserver=${withval})

    AC_CACHE_VAL(ac_cv_c_aolserver,[
    if test x"${with_aolserver}" != x ; then
        if test -f "${with_aolserver}/include/ns.h" ; then
            ac_cv_c_aolserver=`(cd ${with_aolserver}; pwd)`
        else
            AC_MSG_ERROR([${with_aolserver} directory doesn't contain ns.h])
        fi
    fi
    ])
    if test x"${ac_cv_c_aolserver}" = x ; then
        AC_MSG_RESULT([none found])
    else
        AOL_DIR=${ac_cv_c_aolserver}
        AC_MSG_RESULT([found AOLserver in $AOL_DIR])
        CFLAGS="${CFLAGS} -I${AOL_DIR}/include"
        aollibs=`ls ${AOL_DIR}/lib/libnsd* 2>/dev/null`
        if test "x$aollibs" != x ; then
            LIBS="${LIBS} -L${AOL_DIR}/lib -lnsd -lnsthread"
        fi
        if test "`uname -s`" = Darwin ; then 
            SHLIB_LD="cc -bundle \${LDFLAGS}"
        fi
        AC_SUBST(SHLIB_LD)
        AC_DEFINE(NS_AOLSERVER)
    fi
])

# EOF