File: configure.in

package info (click to toggle)
ap-utils 1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,644 kB
  • sloc: ansic: 22,708; sh: 3,973; makefile: 344; yacc: 316
file content (119 lines) | stat: -rw-r--r-- 3,189 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
#      configure.in from Wireless Access Point Utilites for Unix
#
#  Copyright (c) 2002 Roman Festchook <roma at polesye dot net>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License Version 2 from
#  June 1991 as published by the Free Software Foundation.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License along
#  with this program; if not, write to the Free Software Foundation, Inc.,
#  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
AC_INIT([lib/snmp.c])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(ap-utils, 1.5)
AM_CONFIG_HEADER(config.h)

ac_aux_dir=config
ac_config_guess=config/config.guess
ac_config_sub=config/config.sub

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBER(struct sockaddr.sa_len,
		AC_DEFINE(HAVE_SA_LEN, 1,
		    Define if your (struct sockadr) has an sa_len member),,
		[
#include <sys/types.h>
#include <sys/socket.h>
])

# Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([alarm inet_ntoa socket strtol sysinfo fork malloc free])

ALL_LINGUAS="uk fr pl ro nl tr"

AM_GNU_GETTEXT

aputils_save_LIBS="$LIBS"
AC_CHECK_LIB(ncurses, initscr, CURSESLIBS="-lncurses", NOCURSES=yes)
if test "$NOCURSES" = yes; then
	AC_CHECK_LIB(curses, initscr, CURSESLIBS="-lcurses", AC_MSG_ERROR([ap-utils requires installed ncurses or Sys V curses to build]))
fi
LIBS="$aputils_save_LIBS"

# Check for OS and make OS define OS specific variables
case "$host_os" in
 *bsd*|*darwin* )
	AC_DEFINE(OS_BSD, 1, Define if target OS is BSD)
	case "$host_os" in
    	 netbsd* )
	    ap_config_LDADD="-lncurses"
	    CC="$CC -R/usr/pkg/lib -L/usr/pkg/lib -I/usr/pkg/include"
	    ;;
	 openbsd* )
	    ;;
	 *darwin* )
	    AC_DEFINE(OS_X, 1, Define if target OS is MacOS X)
	    ;;
	esac
	;;
 *qnx )
	LIBS="$LIBS -lsocket"
	INSTALL="config/install-sh"
	;;
 aix4* )
    case "$CC" in
     cc* | xlc* )
	CC="$CC -qcpluscmt -qmaxmem=16384"
    esac
    ;;
 solaris* )
    	AC_DEFINE(OS_SOLARIS, 1, Define if target OS is Solaris)
	LIBS="$LIBS -lresolv -lnls"
    ;;
 gnu*|*linux* )
    	AC_DEFINE(OS_LINUX, 1, Define if target OS is Linux)
	CFLAGS="$CFLAGS -Wall -W"
    ;;
esac

AC_C_BIGENDIAN

AC_ARG_ENABLE(regdomain, [ --disable-regdomain     disable regulation domain channel restrictions],
  [ case "$enableval" in
no)
     AC_DEFINE(NO_REG_DOMAIN, 1, Define for no regulation domain restrictions)
 ;;
 esac     
])

AC_SUBST(CURSESLIBS)

AC_OUTPUT([Makefile src/Makefile ap-gl/Makefile lib/Makefile po/Makefile.in intl/Makefile Documentation/Makefile])

echo "

	Thank you for using ap-utils.

"