| 1 |
## -*-m4-*- |
|---|
| 2 |
# $Id: configure.in 1162 2007-01-06 23:51:02Z benoitg $ |
|---|
| 3 |
|
|---|
| 4 |
dnl Process this file with autoconf to produce a configure script. |
|---|
| 5 |
|
|---|
| 6 |
# FILE: |
|---|
| 7 |
# configure.in |
|---|
| 8 |
# |
|---|
| 9 |
# FUNCTION: |
|---|
| 10 |
# implements checks for a variety of system-specific functions |
|---|
| 11 |
|
|---|
| 12 |
AC_INIT(src/common.h) |
|---|
| 13 |
AM_CONFIG_HEADER(config.h) |
|---|
| 14 |
AC_CONFIG_AUX_DIR(config) |
|---|
| 15 |
AC_PROG_CC |
|---|
| 16 |
AC_PROG_CXX |
|---|
| 17 |
#AC_PROG_RANLIB |
|---|
| 18 |
|
|---|
| 19 |
AC_SUBST(BUILDROOT) |
|---|
| 20 |
|
|---|
| 21 |
WIFIDOG_MAJOR_VERSION=1 |
|---|
| 22 |
WIFIDOG_MINOR_VERSION=1 |
|---|
| 23 |
WIFIDOG_MICRO_VERSION=3_beta6-ffw-05 |
|---|
| 24 |
WIFIDOG_VERSION=$WIFIDOG_MAJOR_VERSION.$WIFIDOG_MINOR_VERSION.$WIFIDOG_MICRO_VERSION |
|---|
| 25 |
|
|---|
| 26 |
AC_SUBST(WIFIDOG_MAJOR_VERSION) |
|---|
| 27 |
AC_SUBST(WIFIDOG_MINOR_VERSION) |
|---|
| 28 |
AC_SUBST(WIFIDOG_MICRO_VERSION) |
|---|
| 29 |
AC_SUBST(WIFIDOG_VERSION) |
|---|
| 30 |
AM_INIT_AUTOMAKE(wifidog,$WIFIDOG_VERSION) |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
AM_MAINTAINER_MODE |
|---|
| 34 |
|
|---|
| 35 |
AC_PROG_INSTALL |
|---|
| 36 |
|
|---|
| 37 |
AC_LIBTOOL_DLOPEN |
|---|
| 38 |
AM_PROG_LIBTOOL |
|---|
| 39 |
|
|---|
| 40 |
AC_ISC_POSIX |
|---|
| 41 |
AC_C_BIGENDIAN |
|---|
| 42 |
AC_PROG_MAKE_SET |
|---|
| 43 |
AC_HEADER_STDC |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
# check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/ |
|---|
| 47 |
# ---------------------------------------------------------------------------- |
|---|
| 48 |
AC_DEFUN([BB_ENABLE_DOXYGEN], |
|---|
| 49 |
[ |
|---|
| 50 |
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)]) |
|---|
| 51 |
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) |
|---|
| 52 |
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes]) |
|---|
| 53 |
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no]) |
|---|
| 54 |
if test "x$enable_doxygen" = xno; then |
|---|
| 55 |
enable_doc=no |
|---|
| 56 |
else |
|---|
| 57 |
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) |
|---|
| 58 |
if test x$DOXYGEN = x; then |
|---|
| 59 |
if test "x$enable_doxygen" = xyes; then |
|---|
| 60 |
AC_MSG_ERROR([could not find doxygen]) |
|---|
| 61 |
fi |
|---|
| 62 |
enable_doc=no |
|---|
| 63 |
else |
|---|
| 64 |
enable_doc=yes |
|---|
| 65 |
AC_PATH_PROG(DOT, dot, , $PATH) |
|---|
| 66 |
fi |
|---|
| 67 |
fi |
|---|
| 68 |
AM_CONDITIONAL(DOC, test x$enable_doc = xyes) |
|---|
| 69 |
|
|---|
| 70 |
if test x$DOT = x; then |
|---|
| 71 |
if test "x$enable_dot" = xyes; then |
|---|
| 72 |
AC_MSG_ERROR([could not find dot]) |
|---|
| 73 |
fi |
|---|
| 74 |
enable_dot=no |
|---|
| 75 |
else |
|---|
| 76 |
enable_dot=yes |
|---|
| 77 |
fi |
|---|
| 78 |
AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue) |
|---|
| 79 |
AC_SUBST(enable_dot) |
|---|
| 80 |
AC_SUBST(enable_html_docs) |
|---|
| 81 |
AC_SUBST(enable_latex_docs) |
|---|
| 82 |
]) |
|---|
| 83 |
|
|---|
| 84 |
# check for doxygen |
|---|
| 85 |
# ---------------------------------------------------------------------------- |
|---|
| 86 |
BB_ENABLE_DOXYGEN |
|---|
| 87 |
|
|---|
| 88 |
# check for pthread |
|---|
| 89 |
AC_CHECK_HEADER(pthread.h, , AC_MSG_ERROR(You need the pthread headers) ) |
|---|
| 90 |
AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(You need the pthread library) ) |
|---|
| 91 |
|
|---|
| 92 |
# libhttpd dependencies |
|---|
| 93 |
echo "Begining libhttpd dependencies check" |
|---|
| 94 |
AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h) |
|---|
| 95 |
AC_HAVE_LIBRARY(socket) |
|---|
| 96 |
AC_HAVE_LIBRARY(nsl) |
|---|
| 97 |
echo "libhttpd dependencies check complete" |
|---|
| 98 |
|
|---|
| 99 |
AC_OUTPUT( Makefile |
|---|
| 100 |
wifidog.spec |
|---|
| 101 |
src/Makefile |
|---|
| 102 |
libhttpd/Makefile |
|---|
| 103 |
doc/Makefile |
|---|
| 104 |
) |
|---|
| 105 |
|
|---|