⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 EPIC IRC客户端。来源于IRCII客户端但做了很多性能和功能的优化。
💻 IN
📖 第 1 页 / 共 2 页
字号:
dnl ----------------------------------------------------------dnl configure.in for ircii, 2.3.  copyright (c) matthew green, 1993,dnl except those bits attributed otherwise.dnl thanks to the screen 3.3 configure.in for giving me examples todnl work from and steal ;)dnldnl @(#)$Id: configure.in,v 1.40 2006/10/19 22:25:27 jnelson Exp $AC_REVISION($Revision: 1.40 $)dnlAC_INIT(source/irc.c)AC_CONFIG_HEADER(include/defs.h)dnl ----------------------------------------------------------dnldnl grok the version number - from source/irc.cdnlVERSION=`sed -n -e 's/";$//' -e '/const char irc_version.. = "/s///p' -e '/const char irc_version/q' < $srcdir/source/irc.c` echo this is ircii version $VERSIONechoAC_SUBST(VERSION)dnl ----------------------------------------------------------dnldnl initial stuffdnlAC_PROG_CCAC_PROG_CPPAC_ISC_POSIXAC_AIXdnl ----------------------------------------------------------dnl ----------------------------------------------------------dnldnl System specific checksdnldnl ----------------------------------------------------------dnl ----------------------------------------------------------dnldnl get these once.  check them laterdnlunamer=`uname -r 2> /dev/null`unames=`uname -s 2> /dev/null`dnl ----------------------------------------------------------dnldnl Checking for qnxdnlAC_MSG_CHECKING(for qnx)case "$unames" in  QNX*)    AC_MSG_RESULT(yes)    LDFLAGS=-N64k                  dnl 64k of stack    CFLAGS="-w4 -O -g -fi=unix.h"  dnl better compile options  ;;  *)    AC_MSG_RESULT(no)esacdnldnl checking for svr4's /usr/ccs/libdnlif test -d /usr/ccs/lib; then	LIBS="-L/usr/ccs/lib $LIBS"fidnl ----------------------------------------------------------dnldnl Check for libraries before we check for functions!dnlif test -z "$libsocket"; then	AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket",)fiAC_ARG_WITH(ssl,[  --with-ssl[=PATH]         Include SSL support (DIR is OpenSSL's install dir).],[	if test -z "$withval"; then		with_ssl="yes"	fi])AC_MSG_CHECKING(whether to include SSL support)if test "x$with_ssl" = "xno"; then	AC_MSG_RESULT(no)else	saved_LIBS="$LIBS"	saved_CFLAGS="$CFLAGS"	# First just try to see if it exists in the default location	LIBS="$saved_LIBS -lssl -lcrypto"	CFLAGS="$saved_CFLAGS"	AC_TRY_LINK([#include <openssl/ssl.h>],		[SSL_accept(NULL);], have_ssl="yes")	# Otherwise, go hunting for it.	if test -z "$have_ssl" ; then	    for ssldir in "$with_ssl" /usr/local/ssl /usr/local/openssl; do		if test -n "$have_ssl"; then			break;		fi		if test -z "$ssldir"; then			continue;		fi		if test -f "$ssldir/include/openssl/ssl.h" &&			test -f "$ssldir/lib/libssl.a"; then		    CFLAGS="$saved_CFLAGS -I$ssldir/include"		    LIBS="$saved_LIBS -L$ssldir/lib -lssl -lcrypto"		    AC_TRY_LINK([#include <openssl/ssl.h>],				[SSL_accept(NULL);], have_ssl="yes")		fi	    done	fi	# If we found it somewhere, great!  Otherwise, revert.	if test -n "$have_ssl"; then		AC_DEFINE(HAVE_SSL)		AC_MSG_RESULT(yes)	else		LIBS="$saved_LIBS"		CFLAGS="$saved_CFLAGS"		AC_MSG_RESULT(no)		if test "x$with_ssl" != "x"; then			AC_MSG_ERROR([You requested SSL support, but OpenSSL was not found. Please supply a pathname to OpenSSL])		fi	fifidnl this is for isc.  need the nsl_s library as well.if test -z "$libinet"; then	AC_CHECK_LIB(inet, socket, libnsl=1; LIBS="$LIBS -linet -lnsl_s",)fiif test -z "$libnsl"; then	AC_CHECK_LIB(nsl, gethostname, LIBS="$LIBS -lnsl",)fiAC_CHECK_LIB(sun, getpwnam, LIBS="$LIBS -lsun",)AC_CHECK_LIB(dgc, inet_addr, LIBS="$LIBS -ldgc",)AC_CHECK_LIB(resolv, gethostbyname, LIBS="$LIBS -lresolv",)AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt",)AC_CHECK_LIB(m, pow, LIBS="$LIBS -lm",)termcap=0;AC_MSG_CHECKING(whether you want to use termcap)AC_ARG_WITH(termcap,[  --with-termcap     Forcibly refuse to use terminfo/ncurses ],[   AC_MSG_RESULT(yes)    AC_CHECK_LIB(termcap, tgetent, termcap=1;LIBS="-ltermcap $LIBS",      AC_CHECK_LIB(termlib, tgetent, termcap=1;LIBS="-ltermlib $LIBS",        AC_CHECK_LIB(curses,  tgetent, termcap=1;LIBS="-lcurses $LIBS",          AC_MSG_WARN(I cant find tgetent.  Youll have to help me.))))],[   AC_MSG_RESULT(no)    AC_CHECK_LIB(ncurses, setupterm, LIBS="-lncurses $LIBS",      AC_CHECK_LIB(tinfo,   setupterm, LIBS="-ltinfo $LIBS",	  AC_CHECK_LIB(curses, setupterm, LIBS="-lcurses $LIBS",	    AC_CHECK_LIB(curses, tgetent, LIBS="-lcurses $LIBS",              AC_CHECK_LIB(termlib, tgetent, LIBS="-ltermlib $LIBS",                AC_CHECK_LIB(termcap, tgetent, LIBS="-ltermcap $LIBS",	          AC_MSG_WARN(I cant find tgetent.  Youll have to help me.)))))))])dnl ----------------------------------------------------------dnldnl Checking for headers, functions, and a type declarationsdnlAC_CHECK_HEADERS(fcntl.h netdb.h regex.h sys/fcntl.h sys/file.h sys/select.h sys/syslimits.h sys/un.h sys/time.h termcap.h sys/filio.h sys/sysctl.h inttypes.h stdint.h)if test $termcap -eq 0 ; then	AC_CHECK_FUNC(setupterm, AC_DEFINE(HAVE_TERMINFO),)fiAC_CHECK_FUNC(uname, AC_DEFINE(HAVE_UNAME),)AC_CHECK_FUNC(setenv, AC_DEFINE(HAVE_SETENV),)AC_CHECK_FUNC(unsetenv, AC_DEFINE(HAVE_UNSETENV),)AC_CHECK_FUNC(killpg, AC_DEFINE(HAVE_KILLPG),)AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY),)AC_CHECK_FUNC(getpass, AC_DEFINE(HAVE_GETPASS),)AC_CHECK_FUNC(strtoul, AC_DEFINE(HAVE_STRTOUL),)AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF),)AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF),)AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)AC_CHECK_FUNC(fpathconf, AC_DEFINE(HAVE_FPATHCONF),)AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR),)AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE),)AC_CHECK_FUNC(setsid, AC_DEFINE(HAVE_SETSID),)AC_CHECK_FUNC(tparm, AC_DEFINE(HAVE_TPARM),)AC_CHECK_FUNC(getlogin, AC_DEFINE(HAVE_GETLOGIN),)AC_CHECK_FUNC(fchdir, AC_DEFINE(HAVE_FCHDIR),)AC_CHECK_FUNC(realpath, AC_DEFINE(HAVE_REALPATH),)AC_CHECK_FUNC(hstrerror, AC_DEFINE(HAVE_HSTRERROR),)AC_CHECK_FUNC(strlcpy, AC_DEFINE(HAVE_STRLCPY),)AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT),)AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME),)AC_CHECK_FUNC(getservbyport, AC_DEFINE(HAVE_GETSERVBYPORT),)AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO),)AC_CHECK_FUNC(getnameinfo, AC_DEFINE(HAVE_GETNAMEINFO),)AC_CHECK_FUNC(clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME),)AC_CHECK_FUNC(atoll, AC_DEFINE(HAVE_ATOLL),)AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL),)AC_CHECK_FUNC(atoq, AC_DEFINE(HAVE_ATOQ),)AC_CHECK_FUNC(finite, AC_DEFINE(HAVE_FINITE),)AC_CHECK_FUNC(isfinite, AC_DEFINE(HAVE_ISFINITE),)AC_HEADER_STDCAC_HEADER_TIMEAC_HEADER_DIRENTAC_TYPE_SIGNALAC_TYPE_MODE_TAC_TYPE_PID_TAC_TYPE_SIZE_TAC_TYPE_UID_TAC_FUNC_ALLOCAdnl ----------------------------------------------------------dnl Check to see if we can find intptr_t.dnlhave_intptr_t=""AC_MSG_CHECKING(for intptr_t in inttypes.h or stdint.h)AC_EGREP_HEADER(intptr_t, inttypes.h, AC_DEFINE(HAVE_INTPTR_T)					have_intptr_t=yes)AC_EGREP_HEADER(intptr_t, stdint.h, AC_DEFINE(HAVE_INTPTR_T)					have_intptr_t=yes)if test "x$have_intptr_t" = "x"; then	AC_MSG_RESULT(no)else	AC_MSG_RESULT(yes)fidnl ----------------------------------------------------------dnl Check to see if we have socklen_tdnlAC_MSG_CHECKING(for socklen_t)AC_EGREP_HEADER(socklen_t, sys/socket.h,  AC_MSG_RESULT(yes)  AC_DEFINE(HAVE_SOCKLEN_T),  AC_MSG_RESULT(no))dnl ----------------------------------------------------------dnldnl Check to see if we have to include <sys/select.h>dnl dnlAC_MSG_CHECKING(whether sys/types.h defines fd_set)AC_EGREP_HEADER(fd_set, sys/types.h,  AC_MSG_RESULT(yes),  AC_MSG_RESULT(no)  AC_MSG_CHECKING(whether sys/select.h defines fd_set)  AC_EGREP_HEADER(fd_set, sys/select.h,    AC_MSG_RESULT(yes)    AC_DEFINE(NEED_SYS_SELECT_H),    AC_MSG_RESULT(no. ugh.))) dnl ----------------------------------------------------------dnldnl check for struct lingerdnlAC_MSG_CHECKING(for struct linger)AC_EGREP_HEADER([struct( |	)*linger], sys/socket.h,   AC_MSG_RESULT(yes),   AC_DEFINE(NO_STRUCT_LINGER)   AC_MSG_RESULT(no. ugh.))dnl ----------------------------------------------------------dnldnl svr3's getpgrp() didnt take arguments.  BSD's did.dnl POSIX said that there wasnt any usefulness to giving argumentsdnl to getpgrp(), so that was forbidden.  So svr4 made a new syscalldnl getpgid() to fill in this functionality gap (grrrr).  BSD stilldnl doesnt have any way to do it, even though they were the ones thatdnl originally wanted to have it around, but svr3 insisted not so. (grrr)dnlAC_CHECK_FUNC(getpgid, AC_DEFINE(HAVE_GETPGID),)AC_CHECK_FUNC(getpgrp, AC_FUNC_GETPGRP,)dnl ---------------------------------------------------------dnldnl Check for a useful SO_SNDLOWAT.dnl Some systems (eg, linux) can be bothered to #define SO_SNDLOWATdnl but can't be bothered to implement it, instead returning an error.dnl How completely bogus.  Don't #define it if you don't support it!dnlAC_MSG_CHECKING(for useful SO_SNDLOWAT)AC_TRY_RUN([#include <sys/types.h>#include <sys/socket.h>main (){#ifndef SO_SNDLOWAT        exit(1);#else        int d = socket(AF_INET, SOCK_STREAM, 0);        int size = 256;        if (setsockopt(d, SOL_SOCKET, SO_SNDLOWAT, &size, sizeof(size)) < 0)                exit(1);        exit (0);#endif}],  AC_MSG_RESULT(yes, your SO_SNDLOWAT is useful)  AC_DEFINE(HAVE_SO_SNDLOWAT),  AC_MSG_RESULT(no, your SO_SNDLOWAT is broken and/or worthless), :)dnl ----------------------------------------------------------dnldnl Check for a realpath() that works.dnlAC_MSG_CHECKING(for useful realpath)AC_TRY_RUN([#include <sys/param.h>#include <stdlib.h>main (){	char resolved_path[MAXPATHLEN];	if (realpath("/etc/filethatdoesnotexist", resolved_path) == NULL)		exit(1);	exit(0);}],  AC_MSG_RESULT(yes),  AC_MSG_RESULT(no, your realpath is broken and/or worthless)  AC_DEFINE(HAVE_BROKEN_REALPATH), :)dnl ----------------------------------------------------------dnldnl Check for sys_siglist declarationdnlAC_MSG_CHECKING(for sys_siglist declaration)AC_TRY_RUN([#include <sys/types.h>#include <sys/signal.h>#include <signal.h>#include <unistd.h>main(){	char *s = sys_siglist[0];	exit(0);}],  AC_MSG_RESULT(yes)   sys_siglist="1"  AC_DEFINE(SYS_SIGLIST_DECLARED),   AC_MSG_RESULT(no), :)dnl ----------------------------------------------------------dnldnl Generate signal list, from perl4dnlif test x$sys_siglist != x1thenecho "generating a list of signal names..."set X `cat /usr/include/signal.h /usr/include/sys/signal.h /usr/include/linux/signal.h 2>&1 | sed 's/^#[	]*/#/' | awk '$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {  [sig[$3] = substr($2,4,20)]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -