1 dnl This encapsulates the nasty mess of headers we need to check when
3 AC_DEFUN([SQUID_DEFAULT_INCLUDES],[[
4 /* What a mess.. many systems have added the (now standard) bit types
5 * in their own ways, so we need to scan a wide variety of headers to
7 * IMPORTANT: Keep compat/types.h syncronised with this list
10 #include <sys/types.h>
12 #if HAVE_LINUX_TYPES_H
13 #include <linux/types.h>
24 #if HAVE_SYS_BITYPES_H
25 #include <sys/bitypes.h>
28 #include <sys/select.h>
30 #if HAVE_NETINET_IN_SYSTM_H
31 #include <netinet/in_systm.h>
36 AC_DEFUN([SQUID_BSDNET_INCLUDES],[
37 SQUID_DEFAULT_INCLUDES
42 #include <sys/socket.h>
45 #include <netinet/in.h>
48 #include <netinet/ip.h>
50 #if HAVE_NETINET_IP_COMPAT_H
51 #include <netinet/ip_compat.h>
56 #if HAVE_NETINET_IP_FIL_H
57 #include <netinet/ip_fil.h>
60 #include <sys/param.h>
64 dnl ===========================================================================
65 dnl http://autoconf-archive.cryp.to/ax_with_prog.html
66 dnl ===========================================================================
70 dnl AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH])
74 dnl Locates an installed program binary, placing the result in the precious
75 dnl variable VARIABLE. Accepts a present VARIABLE, then --with-program, and
76 dnl failing that searches for program in the given path (which defaults to
77 dnl the system path). If program is found, VARIABLE is set to the full path
78 dnl of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND
79 dnl if provided, unchanged otherwise.
81 dnl A typical example could be the following one:
83 dnl AX_WITH_PROG(PERL,perl)
85 dnl NOTE: This macro is based upon the original AX_WITH_PYTHON macro from
86 dnl Dustin J. Mitchell <dustin@cs.uchicago.edu>.
94 dnl Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
95 dnl Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
97 dnl Copying and distribution of this file, with or without modification, are
98 dnl permitted in any medium without royalty provided the copyright notice
99 dnl and this notice are preserved.
101 AC_DEFUN([AX_WITH_PROG],[
104 pushdef([VARIABLE],$1)
105 pushdef([EXECUTABLE],$2)
106 pushdef([VALUE_IF_NOT_FOUND],$3)
107 pushdef([PATH_PROG],$4)
109 AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable)
111 AS_IF(test -z "$VARIABLE",[
112 AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
113 AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[[PATH]]]]],absolute path to EXECUTABLE executable), [
114 AS_IF([test "$withval" != "yes"],[
116 AC_MSG_RESULT($VARIABLE)
125 AS_IF(test -z "$VARIABLE",[
126 AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
131 popdef([VALUE_IF_NOT_FOUND])