]> git.decadent.org.uk Git - ap-utils.git/blob - configure.in
Imported Upstream version 1.4.2~pre2~a
[ap-utils.git] / configure.in
1 #
2 #      configure.in from Wireless Access Point Utilites for Unix
3 #
4 #  Copyright (c) 2002 Roman Festchook <roma at polesye dot net>
5 #
6 #  This program is free software; you can redistribute it and/or modify
7 #  it under the terms of the GNU General Public License Version 2 from
8 #  June 1991 as published by the Free Software Foundation.
9 #
10 #  This program is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License along
16 #  with this program; if not, write to the Free Software Foundation, Inc.,
17 #  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #
19 AC_INIT([lib/snmp.c])
20 AC_CONFIG_AUX_DIR(config)
21 AM_INIT_AUTOMAKE(ap-utils, 1.4.2pre2a)
22 AM_CONFIG_HEADER(config.h)
23
24 ac_aux_dir=config
25 ac_config_guess=config/config.guess
26 ac_config_sub=config/config.sub
27
28 # Checks for programs.
29 AC_PROG_CC
30 AC_PROG_RANLIB
31
32 # Checks for header files.
33 AC_HEADER_STDC
34 AC_HEADER_SYS_WAIT
35 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])
36
37 # Checks for typedefs, structures, and compiler characteristics.
38 AC_C_CONST
39 AC_TYPE_PID_T
40 AC_TYPE_SIZE_T
41 AC_CHECK_MEMBER(struct sockaddr.sa_len,
42                 AC_DEFINE(HAVE_SA_LEN, 1,
43                     Define if your (struct sockadr) has an sa_len member),,
44                 [
45 #include <sys/types.h>
46 #include <sys/socket.h>
47 ])
48
49 # Checks for library functions.
50 AC_FUNC_MEMCMP
51 AC_TYPE_SIGNAL
52 AC_CHECK_FUNCS([alarm inet_ntoa socket strtol sysinfo fork malloc free])
53
54 ALL_LINGUAS="uk fr pl ro nl tr"
55
56 AM_GNU_GETTEXT
57
58 AC_CHECK_LIB(ncurses, initscr, , NOCURSES=yes)
59 if test "$NOCURSES" = yes; then
60        AC_CHECK_LIB(curses, initscr, , AC_MSG_ERROR([ap-utils requires installed ncurses or Sys V curses to build]))
61 fi
62
63 # Check for OS and make OS define OS specific variables
64 case "$host_os" in
65  *bsd*|*darwin* )
66         AC_DEFINE(OS_BSD, 1, Define if target OS is BSD)
67         case "$host_os" in
68          netbsd* )
69             ap_config_LDADD="-lncurses"
70             CC="$CC -R/usr/pkg/lib -L/usr/pkg/lib -I/usr/pkg/include"
71             ;;
72          openbsd* )
73             ;;
74          *darwin* )
75             AC_DEFINE(OS_X, 1, Define if target OS is MacOS X)
76             ;;
77         esac
78         ;;
79  *qnx )
80         LIBS="$LIBS -lsocket"
81         INSTALL="config/install-sh"
82         ;;
83  aix4* )
84     case "$CC" in
85      cc* | xlc* )
86         CC="$CC -qcpluscmt -qmaxmem=16384"
87     esac
88     ;;
89  solaris* )
90         AC_DEFINE(OS_SOLARIS, 1, Define if target OS is Solaris)
91         LIBS="$LIBS -lresolv -lnls"
92     ;;
93  gnu*|*linux* )
94         AC_DEFINE(OS_LINUX, 1, Define if target OS is Linux)
95         CFLAGS="$CFLAGS -Wall -W"
96     ;;
97 esac
98
99 AC_C_BIGENDIAN
100
101 AC_ARG_ENABLE(regdomain, [ --disable-regdomain     disable regulation domain channel restrictions],
102   [ case "$enableval" in
103 no)
104      AC_DEFINE(NO_REG_DOMAIN, 1, Define for no regulation domain restrictions)
105  ;;
106  esac     
107 ])
108
109 AC_OUTPUT([Makefile src/Makefile ap-gl/Makefile lib/Makefile po/Makefile.in intl/Makefile Documentation/Makefile])
110
111 echo "
112
113         Thank you for using ap-utils.
114
115 "