configure.in
来自「非常好的dns解析软件」· IN 代码 · 共 2,640 行 · 第 1/5 页
IN
2,640 行
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1" USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1" SOLARIS2="#define SOLARIS2 1" PORT_DIR="port/solaris";; *-solaris2.5) BSD_COMP="#define BSD_COMP 1" SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1" SOLARIS2="#define SOLARIS2 1" PORT_DIR="port/solaris";; *-solaris2.[[67]]) BSD_COMP="#define BSD_COMP 1" SOLARIS2="#define SOLARIS2 1" PORT_DIR="port/solaris";; *-solaris2*) BSD_COMP="#define BSD_COMP 1" USE_POLL="#define USE_POLL 1" HAVE_MD5="#define HAVE_MD5 1" SOLARIS2="#define SOLARIS2 1" PORT_DIR="port/solaris";; *-ultrix*) PORT_DIR="port/ultrix";; *-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";; *-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";; *-sco-sysv*uw7*) PORT_DIR="port/unixware7";;esacAC_SUBST(BSD_COMP)AC_SUBST(SOLARIS_BITTYPES)AC_SUBST(USE_FIONBIO_IOCTL)AC_SUBST(PORT_NONBLOCK)AC_SUBST(PORT_DIR)AC_SUBST(USE_POLL)AC_SUBST(HAVE_MD5)AC_SUBST(SOLARIS2)PORT_INCLUDE=${PORT_DIR}/includeAC_SUBST(PORT_INCLUDE)## Look for a 4.4BSD or 4.3BSD struct msghdr#AC_MSG_CHECKING(for struct msghdr flavor)AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[struct msghdr msg; msg.msg_flags = 0; return (0);], [AC_MSG_RESULT(4.4BSD) ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"], [AC_MSG_RESULT(4.3BSD) ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)## Look for in_port_t.#AC_MSG_CHECKING(for type in_port_t)AC_TRY_COMPILE([#include <sys/types.h>#include <netinet/in.h>],[in_port_t port = 25; return (0);], [AC_MSG_RESULT(yes) ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"], [AC_MSG_RESULT(no) ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])AC_SUBST(ISC_PLATFORM_NEEDPORTT)## Check for addrinfo#AC_MSG_CHECKING(for struct addrinfo)AC_TRY_COMPILE([#include <netdb.h>],[struct addrinfo a; return (0);], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ADDRINFO)], [AC_MSG_RESULT(no)])AC_MSG_CHECKING(for int sethostent)AC_TRY_COMPILE([#include <netdb.h>],[int i = sethostent(0); return(0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])AC_MSG_CHECKING(for int endhostent)AC_TRY_COMPILE([#include <netdb.h>],[int i = endhostent(); return(0);], [AC_MSG_RESULT(yes) ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"], [AC_MSG_RESULT(no) ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])AC_SUBST(ISC_LWRES_ENDHOSTENTINT)AC_MSG_CHECKING(for int setnetent)AC_TRY_COMPILE([#include <netdb.h>],[int i = setnetent(0); return(0);], [AC_MSG_RESULT(yes) ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"], [AC_MSG_RESULT(no) ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])AC_SUBST(ISC_LWRES_SETNETENTINT)AC_MSG_CHECKING(for int endnetent)AC_TRY_COMPILE([#include <netdb.h>],[int i = endnetent(); return(0);], [AC_MSG_RESULT(yes) ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"], [AC_MSG_RESULT(no) ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])AC_SUBST(ISC_LWRES_ENDNETENTINT)AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))AC_TRY_COMPILE([#include <netdb.h>struct hostent *gethostbyaddr(const void *, size_t, int);],[return(0);], [AC_MSG_RESULT(yes) ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"], [AC_MSG_RESULT(no) ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)AC_MSG_CHECKING(for h_errno in netdb.h)AC_TRY_COMPILE([#include <netdb.h>],[h_errno = 1; return(0);], [AC_MSG_RESULT(yes) ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"], [AC_MSG_RESULT(no) ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])AC_SUBST(ISC_LWRES_NEEDHERRNO)AC_CHECK_FUNC(getipnodebyname, [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"], [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])AC_CHECK_FUNC(getnameinfo, [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"], [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])AC_CHECK_FUNC(getaddrinfo, [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO" AC_DEFINE(HAVE_GETADDRINFO)], [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))AC_SUBST(ISC_LWRES_GETIPNODEPROTO)AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)AC_CHECK_FUNC(pselect, [NEED_PSELECT="#undef NEED_PSELECT"], [NEED_PSELECT="#define NEED_PSELECT"])AC_SUBST(NEED_PSELECT)AC_CHECK_FUNC(gettimeofday, [NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"], [NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])AC_SUBST(NEED_GETTIMEOFDAY)AC_CHECK_FUNC(strndup, [HAVE_STRNDUP="#define HAVE_STRNDUP 1"], [HAVE_STRNDUP="#undef HAVE_STRNDUP"])AC_SUBST(HAVE_STRNDUP)## Look for a sysctl call to get the list of network interfaces.#AC_MSG_CHECKING(for interface list sysctl)AC_EGREP_CPP(found_rt_iflist, [#include <sys/param.h>#include <sys/sysctl.h>#include <sys/socket.h>#ifdef NET_RT_IFLISTfound_rt_iflist#endif], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_IFLIST_SYSCTL)], [AC_MSG_RESULT(no)])## Check for some other useful functions that are not ever-present.#AC_CHECK_FUNC(strsep, [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"], [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])AC_CHECK_FUNC(vsnprintf, [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"], [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O" ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c" ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)AC_SUBST(ISC_EXTRA_OBJS)AC_SUBST(ISC_EXTRA_SRCS)AC_CHECK_FUNC(strerror, [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"], [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])AC_SUBST(USE_SYSERROR_LIST)## Determine the printf format characters to use when printing# values of type isc_int64_t. We make the assumption that platforms# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",# but that's defined elsewhere since we don't use configure on Win32.#AC_MSG_CHECKING(printf format modifier for 64-bit integers)AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }], [AC_MSG_RESULT(l) ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'], [AC_MSG_RESULT(ll) ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'], [AC_MSG_RESULT(default ll) ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])AC_SUBST(ISC_PLATFORM_QUADFORMAT)## Security Stuff#AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))## for accept, recvfrom, getpeername etc.#AC_MSG_CHECKING(for socket length type)AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>int accept(int, struct sockaddr *, socklen_t *);],[],[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"AC_MSG_RESULT(socklen_t)],AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>int accept(int, struct sockaddr *, unsigned int *);],[],[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"AC_MSG_RESULT(unsigned int)],AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>int accept(int, struct sockaddr *, unsigned long *);],[],[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"AC_MSG_RESULT(unsigned long)],AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>int accept(int, struct sockaddr *, long *);],[],[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"AC_MSG_RESULT(long)],ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"AC_MSG_RESULT(int)))))AC_SUBST(ISC_SOCKLEN_T)AC_CHECK_FUNC(getgrouplist,AC_TRY_COMPILE([#include <unistd.h>intgetgrouplist(const char *name, int basegid, int *groups, int *ngroups) {}],[return (0);],GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups",GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"),GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"AC_DEFINE(NEED_GETGROUPLIST))AC_SUBST(GETGROUPLIST_ARGS)AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))case $host inia64-hp-hpux11.*);;*)AC_CHECK_FUNC(getnetbyaddr_r,AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#define _OSF_SOURCE#undef __USE_MISC#define __USE_MISC#include <netdb.h>struct netent *getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,int buflen) {}],[return (0)],[NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"NET_R_BAD="#define NET_R_BAD NULL"NET_R_COPY="#define NET_R_COPY buf, buflen"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"NET_R_OK="#define NET_R_OK nptr"NET_R_SETANSWER="#undef NET_R_SETANSWER"NET_R_RETURN="#define NET_R_RETURN struct netent *"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"NETENT_DATA="#undef NETENT_DATA"],AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#define _OSF_SOURCE#undef __USE_MISC#define __USE_MISC#include <netdb.h>int getnetbyaddr_r (unsigned long int, int, struct netent *, char *, size_t, struct netent **, int *);],[return (0)],[NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"NET_R_BAD="#define NET_R_BAD ERANGE"NET_R_COPY="#define NET_R_COPY buf, buflen"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"NET_R_OK="#define NET_R_OK 0"NET_R_SETANSWER="#define NET_R_SETANSWER 1"NET_R_RETURN="#define NET_R_RETURN int"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"NETENT_DATA="#undef NETENT_DATA"],AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#define _OSF_SOURCE#undef __USE_MISC#define __USE_MISC#include <netdb.h>extern int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);],[return (0)],[NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"NET_R_BAD="#define NET_R_BAD (-1)"NET_R_COPY="#define NET_R_COPY ndptr"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"NET_R_OK="#define NET_R_OK 0"NET_R_SETANSWER="#undef NET_R_SETANSWER"NET_R_RETURN="#define NET_R_RETURN int"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"NETENT_DATA="#define NETENT_DATA 1"],AC_TRY_COMPILE(#undef __USE_MISC#define __USE_MISC[#include <netdb.h>int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *);],[return (0)],[NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"NET_R_BAD="#define NET_R_BAD (-1)"NET_R_COPY="#define NET_R_COPY ndptr"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"NET_R_OK="#define NET_R_OK 0"NET_R_SETANSWER="#undef NET_R_SETANSWER"NET_R_RETURN="#define NET_R_RETURN int"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"NETENT_DATA="#define NETENT_DATA 1"],AC_TRY_COMPILE(#undef __USE_MISC#define __USE_MISC[#include <netdb.h>int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);],[return (0)],[NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"NET_R_BAD="#define NET_R_BAD (-1)"NET_R_COPY="#define NET_R_COPY ndptr"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"NET_R_OK="#define NET_R_OK 0"NET_R_SETANSWER="#undef NET_R_SETANSWER"NET_R_RETURN="#define NET_R_RETURN int"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"NETENT_DATA="#define NETENT_DATA 1"],AC_TRY_COMPILE(#undef __USE_MISC#define __USE_MISC[#include <netdb.h>int getnetbyaddr_r (uint32_t, int, struct netent *, char *, size_t, struct netent **, int *);],[return (0)],[NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"NET_R_BAD="#define NET_R_BAD ERANGE"NET_R_COPY="#define NET_R_COPY buf, buflen"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"NET_R_OK="#define NET_R_OK 0"NET_R_SETANSWER="#define NET_R_SETANSWER 1"NET_R_RETURN="#define NET_R_RETURN int"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"NETENT_DATA="#undef NETENT_DATA"],)))))),NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"NET_R_BAD="#define NET_R_BAD NULL"NET_R_COPY="#define NET_R_COPY buf, buflen"NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"NET_R_OK="#define NET_R_OK nptr"NET_R_SETANSWER="#undef NET_R_SETANSWER"NET_R_RETURN="#define NET_R_RETURN struct netent *"GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"NETENT_DATA="#undef NETENT_DATA")esaccase "$host" in*dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;esacAC_SUBST(NET_R_ARGS)AC_SUBST(NET_R_BAD)AC_SUBST(NET_R_COPY)AC_SUBST(NET_R_COPY_ARGS)AC_SUBST(NET_R_OK)AC_SUBST(NET_R_SETANSWER)AC_SUBST(NET_R_RETURN)AC_SUBST(GETNETBYADDR_ADDR_T)AC_SUBST(NETENT_DATA)AC_CHECK_FUNC(setnetent_r,AC_TRY_COMPILE([#undef __USE_MISC#define __USE_MISC#include <netdb.h>void setnetent_r (int);] ,[return (0);],[NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"NET_R_SET_RETURN="#define NET_R_SET_RETURN void"],AC_TRY_COMPILE([#define _REENTRANT#undef __USE_MISC#define __USE_MISC#include <netdb.h>extern int setnetent_r(int, struct netent_data *);] ,[return (0);],[NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"NET_R_SET_RETURN="#define NET_R_SET_RETURN int"],)),NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"NET_R_SET_RETURN="#define NET_R_SET_RETURN void")AC_SUBST(NET_R_ENT_ARGS)AC_SUBST(NET_R_SET_RESULT)AC_SUBST(NET_R_SET_RETURN)case $host inia64-hp-hpux11.*);;*)AC_CHECK_FUNC(endnetent_r,AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#undef __USE_MISC#define __USE_MISC#include <netdb.h>void endnetent_r (void);] ,[return (0);],[NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"NET_R_END_RETURN="#define NET_R_END_RETURN void"],AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#undef __USE_MISC#define __USE_MISC#include <netdb.h>extern int endnetent_r(struct netent_data *);] ,[return (0);],[NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"NET_R_END_RETURN="#define NET_R_END_RETURN int"],AC_TRY_COMPILE([#undef _REENTRANT#define _REENTRANT#undef __USE_MISC#define __USE_MISC#include <netdb.h>extern void endnetent_r(struct netent_data *);] ,[return (0);],[NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"NET_R_END_RETURN="#define NET_R_END_RETURN void"],))),NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"NET_R_END_RETURN="#define NET_R_END_RETURN void")esacAC_SUBST(NET_R_END_RESULT)AC_SUBST(NET_R_END_RETURN)AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?