File: naviserver.m4

package info (click to toggle)
tclthread3 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,752 kB
  • sloc: ansic: 8,259; tcl: 1,711; sh: 436; makefile: 38
file content (57 lines) | stat: -rw-r--r-- 1,546 bytes parent folder | download | duplicates (3)
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

#------------------------------------------------------------------------
# NS_PATH_AOLSERVER
#
#   Allows the building with support for NaviServer/AOLserver
#
# Arguments:
#   none
#
# Results:
#
#   Adds the following arguments to configure:
#       --with-naviserver=...
#
#   Defines the following vars:
#       NS_DIR Full path to the directory containing NaviServer/AOLserver distro
#       NS_INCLUDES
#       NS_LIBS
#
#   Sets the following vars:
#       NS_AOLSERVER
#
#   Updates following vars:
#------------------------------------------------------------------------

AC_DEFUN(NS_PATH_AOLSERVER, [
    AC_MSG_CHECKING([for NaviServer/AOLserver configuration])
    AC_ARG_WITH(naviserver,
    [  --with-naviserver       directory with NaviServer/AOLserver distribution],\
    with_naviserver=${withval})

    AC_CACHE_VAL(ac_cv_c_naviserver,[
    if test x"${with_naviserver}" != x ; then
	if test -f "${with_naviserver}/include/ns.h" ; then
	    ac_cv_c_naviserver=`(cd ${with_naviserver}; pwd)`
	else
	    AC_MSG_ERROR([${with_naviserver} directory doesn't contain ns.h])
	fi
    fi
    ])
    if test x"${ac_cv_c_naviserver}" = x ; then
	AC_MSG_RESULT([none found])
    else
	NS_DIR=${ac_cv_c_naviserver}
	AC_MSG_RESULT([found NaviServer/AOLserver in $NS_DIR])
	NS_INCLUDES="-I\"${NS_DIR}/include\""
	if test "`uname -s`" = Darwin ; then
	    aollibs=`ls ${NS_DIR}/lib/libns* 2>/dev/null`
	    if test x"$aollibs" != x ; then
		NS_LIBS="-L\"${NS_DIR}/lib\" -lnsd -lnsthread"
	    fi
	fi
	AC_DEFINE(NS_AOLSERVER)
    fi
])

# EOF