2 # configure.in from Wireless Access Point Utilites for Unix
4 # Copyright (c) 2002 Roman Festchook <roma at polesye dot net>
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.
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.
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
20 AC_CONFIG_AUX_DIR(config)
21 AM_INIT_AUTOMAKE(ap-utils, 1.5)
22 AM_CONFIG_HEADER(config.h)
25 ac_config_guess=config/config.guess
26 ac_config_sub=config/config.sub
28 # Checks for programs.
32 # Checks for header files.
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])
37 # Checks for typedefs, structures, and compiler characteristics.
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),,
45 #include <sys/types.h>
46 #include <sys/socket.h>
49 # Checks for library functions.
52 AC_CHECK_FUNCS([alarm inet_ntoa socket strtol sysinfo fork malloc free])
54 ALL_LINGUAS="uk fr pl ro nl tr"
58 aputils_save_LIBS="$LIBS"
59 AC_CHECK_LIB(ncurses, initscr, CURSESLIBS="-lncurses", NOCURSES=yes)
60 if test "$NOCURSES" = yes; then
61 AC_CHECK_LIB(curses, initscr, CURSESLIBS="-lcurses", AC_MSG_ERROR([ap-utils requires installed ncurses or Sys V curses to build]))
63 LIBS="$aputils_save_LIBS"
65 # Check for OS and make OS define OS specific variables
68 AC_DEFINE(OS_BSD, 1, Define if target OS is BSD)
71 ap_config_LDADD="-lncurses"
72 CC="$CC -R/usr/pkg/lib -L/usr/pkg/lib -I/usr/pkg/include"
77 AC_DEFINE(OS_X, 1, Define if target OS is MacOS X)
83 INSTALL="config/install-sh"
88 CC="$CC -qcpluscmt -qmaxmem=16384"
92 AC_DEFINE(OS_SOLARIS, 1, Define if target OS is Solaris)
93 LIBS="$LIBS -lresolv -lnls"
96 AC_DEFINE(OS_LINUX, 1, Define if target OS is Linux)
97 CFLAGS="$CFLAGS -Wall -W"
103 AC_ARG_ENABLE(regdomain, [ --disable-regdomain disable regulation domain channel restrictions],
104 [ case "$enableval" in
106 AC_DEFINE(NO_REG_DOMAIN, 1, Define for no regulation domain restrictions)
113 AC_OUTPUT([Makefile src/Makefile ap-gl/Makefile lib/Makefile po/Makefile.in intl/Makefile Documentation/Makefile])
117 Thank you for using ap-utils.