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

📄 configure.in

📁 linux系统下的音频通信
💻 IN
📖 第 1 页 / 共 3 页
字号:
dnl	This file is an input file used by the GNU "autoconf" program todnl	generate the file "configure", which is run during Tcl installationdnl	to configure the system for the local environment.AC_INIT(../generic/tcl.h)# SCCS: @(#) configure.in 1.18 98/08/12 17:29:39TCL_VERSION=8.0TCL_MAJOR_VERSION=8TCL_MINOR_VERSION=0TCL_PATCH_LEVEL=".3"VERSION=${TCL_VERSION}if test "${prefix}" = "NONE"; then    prefix=/usr/localfiif test "${exec_prefix}" = "NONE"; then    exec_prefix=$prefixfiTCL_SRC_DIR=`cd $srcdir/..; pwd`AC_PROG_RANLIB#AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],#    [tcl_ok=$enableval], [tcl_ok=no])#if test "$tcl_ok" = "yes"; then    AC_PROG_CC#else#    CC=${CC-cc}#AC_SUBST(CC)#fi# set the warning flags depending on whether or not we are using gccif test "${GCC}" = "yes" ; then    CFLAGS_WARNING="-Wall -Wconversion"else    CFLAGS_WARNING=""fi#--------------------------------------------------------------------#	Supply substitutes for missing POSIX library procedures, or#	set flags so Tcl uses alternate procedures.#--------------------------------------------------------------------# Check if Posix compliant getcwd exists, if not we'll use getwd.AC_CHECK_FUNCS(getcwd, , AC_DEFINE(USEGETWD))# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really# define USEGETWD even if the posix getcwd exists. Add a test ?AC_REPLACE_FUNCS(opendir strstr)AC_REPLACE_FUNCS(strtol tmpnam waitpid)AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR))AC_CHECK_FUNC(getwd, , AC_DEFINE(NO_GETWD))AC_CHECK_FUNC(wait3, , AC_DEFINE(NO_WAIT3))AC_CHECK_FUNC(uname, , AC_DEFINE(NO_UNAME))#--------------------------------------------------------------------#	On a few very rare systems, all of the libm.a stuff is#	already in libc.a.  Set compiler flags accordingly.#	Also, Linux requires the "ieee" library for math to work#	right (and it must appear before "-lm").#--------------------------------------------------------------------AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])#--------------------------------------------------------------------#       On AIX systems, libbsd.a has to be linked in to support#       non-blocking file IO.  This library has to be linked in after#       the MATH_LIBS or it breaks the pow() function.  The way to#       insure proper sequencing, is to add it to the tail of MATH_LIBS.#        This library also supplies gettimeofday.#--------------------------------------------------------------------libbsd=noif test "`uname -s`" = "AIX" ; then    AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes)    if test $libbsd = yes; then	MATH_LIBS="$MATH_LIBS -lbsd"    fifi#--------------------------------------------------------------------#	Supply substitutes for missing POSIX header files.  Special#	notes:#	    - stdlib.h doesn't define strtol, strtoul, or#	      strtod insome versions of SunOS#	    - some versions of string.h don't declare procedures such#	      as strstr#--------------------------------------------------------------------AC_MSG_CHECKING(dirent.h)AC_TRY_LINK([#include <sys/types.h>#include <dirent.h>], [#ifndef _POSIX_SOURCE#   ifdef __Lynx__	/*	 * Generate compilation error to make the test fail:  Lynx headers	 * are only valid if really in the POSIX environment.	 */	missing_procedure();#   endif#endifDIR *d;struct dirent *entryPtr;char *p;d = opendir("foobar");entryPtr = readdir(d);p = entryPtr->d_name;closedir(d);], tcl_ok=yes, tcl_ok=no)if test $tcl_ok = no; then    AC_DEFINE(NO_DIRENT_H)fiAC_MSG_RESULT($tcl_ok)AC_CHECK_HEADER(errno.h, , AC_DEFINE(NO_ERRNO_H))AC_CHECK_HEADER(float.h, , AC_DEFINE(NO_FLOAT_H))AC_CHECK_HEADER(values.h, , AC_DEFINE(NO_VALUES_H))AC_CHECK_HEADER(limits.h, , AC_DEFINE(NO_LIMITS_H))AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)if test $tcl_ok = 0; then    AC_DEFINE(NO_STDLIB_H)fiAC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)if test $tcl_ok = 0; then    AC_DEFINE(NO_STRING_H)fiAC_CHECK_HEADER(sys/wait.h, , AC_DEFINE(NO_SYS_WAIT_H))AC_CHECK_HEADER(dlfcn.h, , AC_DEFINE(NO_DLFCN_H))AC_HAVE_HEADERS(unistd.h)#---------------------------------------------------------------------------#	Determine which interface to use to talk to the serial port.#	Note that #include lines must begin in leftmost column for#	some compilers to recognize them as preprocessor directives.#---------------------------------------------------------------------------AC_MSG_CHECKING([termios vs. termio vs. sgtty])AC_TRY_RUN([#include <termios.h>main(){    struct termios t;    if (tcgetattr(0, &t) == 0) {	cfsetospeed(&t, 0);	t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;	return 0;    }    return 1;}], tk_ok=termios, tk_ok=no, tk_ok=no)if test $tk_ok = termios; then    AC_DEFINE(USE_TERMIOS)elseAC_TRY_RUN([#include <termio.h>main(){    struct termio t;    if (ioctl(0, TCGETA, &t) == 0) {	t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;	return 0;    }    return 1;}], tk_ok=termio, tk_ok=no, tk_ok=no)if test $tk_ok = termio; then    AC_DEFINE(USE_TERMIO)elseAC_TRY_RUN([#include <sgtty.h>main(){    struct sgttyb t;    if (ioctl(0, TIOCGETP, &t) == 0) {	t.sg_ospeed = 0;	t.sg_flags |= ODDP | EVENP | RAW;	return 0;    }    return 1;}], tk_ok=sgtty, tk_ok=none, tk_ok=none)if test $tk_ok = sgtty; then    AC_DEFINE(USE_SGTTY)fififiAC_MSG_RESULT($tk_ok)#--------------------------------------------------------------------#	Include sys/select.h if it exists and if it supplies things#	that appear to be useful and aren't already in sys/types.h.#	This appears to be true only on the RS/6000 under AIX.  Some#	systems like OSF/1 have a sys/select.h that's of no use, and#	other systems like SCO UNIX have a sys/select.h that's#	pernicious.  If "fd_set" isn't defined anywhere then set a#	special flag.#--------------------------------------------------------------------AC_MSG_CHECKING([fd_set and sys/select])AC_TRY_COMPILE([#include <sys/types.h>],	[fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)if test $tk_ok = no; then    AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)    if test $tk_ok = yes; then	AC_DEFINE(HAVE_SYS_SELECT_H)    fifiAC_MSG_RESULT($tk_ok)if test $tk_ok = no; then    AC_DEFINE(NO_FD_SET)fi#------------------------------------------------------------------------------#       Find out all about time handling differences.#------------------------------------------------------------------------------AC_CHECK_HEADERS(sys/time.h)AC_HEADER_TIMEAC_STRUCT_TIMEZONEAC_MSG_CHECKING([tm_tzadj in struct tm])AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],        [AC_DEFINE(HAVE_TM_TZADJ)         AC_MSG_RESULT(yes)],         AC_MSG_RESULT(no))AC_MSG_CHECKING([tm_gmtoff in struct tm])AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],        [AC_DEFINE(HAVE_TM_GMTOFF)         AC_MSG_RESULT(yes)],         AC_MSG_RESULT(no))## Its important to include time.h in this check, as some systems (like convex)# have timezone functions, etc.#have_timezone=noAC_MSG_CHECKING([long timezone variable])AC_TRY_COMPILE([#include <time.h>],        [extern long timezone;         timezone += 1;         exit (0);],        [have_timezone=yes	 AC_DEFINE(HAVE_TIMEZONE_VAR)         AC_MSG_RESULT(yes)],         AC_MSG_RESULT(no))## On some systems (eg IRIX 6.2), timezone is a time_t and not a long.#if test "$have_timezone" = no; then   AC_MSG_CHECKING([time_t timezone variable])   AC_TRY_COMPILE([#include <time.h>],        [extern time_t timezone;         timezone += 1;         exit (0);],        [AC_DEFINE(HAVE_TIMEZONE_VAR)         AC_MSG_RESULT(yes)],         AC_MSG_RESULT(no))fi## AIX does not have a timezone field in struct tm. When the AIX bsd# library is used, the timezone global and the gettimeofday methods are# to be avoided for timezone deduction instead, we deduce the timezone# by comparing the localtime result on a known GMT value.#if test $libbsd = yes; then    AC_DEFINE(USE_DELTA_FOR_TZ)fi#--------------------------------------------------------------------#	Some systems (e.g., IRIX 4.0.5) lack the st_blksize field#	in struct stat.#--------------------------------------------------------------------AC_STRUCT_ST_BLKSIZE#--------------------------------------------------------------------#	On some systems strstr is broken: it returns a pointer even#	even if the original string is empty.#--------------------------------------------------------------------AC_MSG_CHECKING([proper strstr implementation])AC_TRY_RUN([extern int strstr();int main(){    exit(strstr("\0test", "test") ? 1 : 0);}], tcl_ok=yes, tcl_ok=no, tcl_ok=no)if test $tcl_ok = yes; then    AC_MSG_RESULT(yes)else    AC_MSG_RESULT([broken, using substitute])    LIBOBJS="$LIBOBJS strstr.o"fi#--------------------------------------------------------------------#	Check for strtoul function.  This is tricky because under some#	versions of AIX strtoul returns an incorrect terminator#	pointer for the string "0".#--------------------------------------------------------------------AC_CHECK_FUNC(strtoul, tcl_ok=1, tcl_ok=0)AC_TRY_RUN([extern int strtoul();int main(){    char *string = "0";    char *term;    int value;    value = strtoul(string, &term, 0);    if ((value != 0) || (term != (string+1))) {        exit(1);    }    exit(0);}], , tcl_ok=0, tcl_ok=0)if test "$tcl_ok" = 0; then    test -n "$verbose" && echo "	Adding strtoul.o."    LIBOBJS="$LIBOBJS strtoul.o"fi#--------------------------------------------------------------------#	Check for the strtod function.  This is tricky because in some#	versions of Linux strtod mis-parses strings starting with "+".#--------------------------------------------------------------------AC_CHECK_FUNC(strtod, tcl_ok=1, tcl_ok=0)AC_TRY_RUN([extern double strtod();int main(){    char *string = " +69";    char *term;    double value;    value = strtod(string, &term);    if ((value != 69) || (term != (string+4))) {	exit(1);    }    exit(0);}], , tcl_ok=0, tcl_ok=0)if test "$tcl_ok" = 0; then    test -n "$verbose" && echo "	Adding strtod.o."    LIBOBJS="$LIBOBJS strtod.o"fi#--------------------------------------------------------------------#	Under Solaris 2.4, strtod returns the wrong value for the#	terminating character under some conditions.  Check for this#	and if the problem exists use a substitute procedure#	"fixstrtod" that corrects the error.#--------------------------------------------------------------------AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)if test "$tcl_strtod" = 1; then    AC_MSG_CHECKING([for Solaris strtod bug])    AC_TRY_RUN([extern double strtod();int main(){    char *string = "NaN";    char *term;    strtod(string, &term);    if ((term != string) && (term[-1] == 0)) {	exit(1);    }    exit(0);}], tcl_ok=1, tcl_ok=0, tcl_ok=0)    if test $tcl_ok = 1; then	AC_MSG_RESULT(ok)    else	AC_MSG_RESULT(buggy)	LIBOBJS="$LIBOBJS fixstrtod.o"	AC_DEFINE(strtod, fixstrtod)    fifi#--------------------------------------------------------------------#	Check for various typedefs and provide substitutes if#	they don't exist.#--------------------------------------------------------------------AC_TYPE_MODE_TAC_TYPE_PID_TAC_TYPE_SIZE_TAC_TYPE_UID_T#--------------------------------------------------------------------#	If a system doesn't have an opendir function (man, that's old!)#	then we have to supply a different version of dirent.h which#	is compatible with the substitute version of opendir that's#	provided.  This version only works with V7-style directories.#--------------------------------------------------------------------AC_CHECK_FUNC(opendir, , AC_DEFINE(USE_DIRENT2_H))#--------------------------------------------------------------------#	The check below checks whether <sys/wait.h> defines the type#	"union wait" correctly.  It's needed because of weirdness in#	HP-UX where "union wait" is defined in both the BSD and SYS-V#	environments.  Checking the usability of WIFEXITED seems to do#	the trick.#--------------------------------------------------------------------AC_MSG_CHECKING([union wait])AC_TRY_LINK([#include <sys/types.h> #include <sys/wait.h>], [union wait x;WIFEXITED(x);		/* Generates compiler error if WIFEXITED			 * uses an int. */], tcl_ok=yes, tcl_ok=no)AC_MSG_RESULT($tcl_ok)if test $tcl_ok = no; then    AC_DEFINE(NO_UNION_WAIT)fi#--------------------------------------------------------------------#	Check to see whether the system supports the matherr function#	and its associated type "struct exception".#--------------------------------------------------------------------

⌨️ 快捷键说明

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