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

📄 aclocal.m4

📁 PPP协议的实现演示
💻 M4
📖 第 1 页 / 共 5 页
字号:
AC_TRY_LINK(dnl[#include<tiffio.h>],    [return (TIFFOpen( "", "r") == 0); ],[    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"], [    kde_cv_libtiff_$1=no])LIBS="$kde_save_LIBS"CXXFLAGS="$kde_save_CXXFLAGS"])if test "$kde_cv_libtiff_$1" = "no"; then    AC_MSG_RESULT(no)    LIBTIFF=""    $3else    LIBTIFF="$kde_cv_libtiff_$1"    AC_MSG_RESULT(yes)    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])    $2fi])AC_DEFUN(AC_FIND_TIFF,[AC_REQUIRE([K_PATH_X])AC_REQUIRE([AC_FIND_ZLIB])AC_REQUIRE([AC_FIND_JPEG])AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])KDE_TRY_TIFFLIB(tiff, [],   KDE_TRY_TIFFLIB(tiff34))AC_SUBST(LIBTIFF)])AC_DEFUN(AC_FIND_PNG,[AC_REQUIRE([AC_FIND_ZLIB])AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])AC_MSG_CHECKING([for libpng])AC_CACHE_VAL(ac_cv_lib_png,[kde_save_LIBS="$LIBS"LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"kde_save_CFLAGS="$CFLAGS"CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"AC_LANG_CAC_TRY_LINK(dnl    [    #include<png.h>    ],    [    png_structp png_ptr = png_create_read_struct(  /* image ptr */		PNG_LIBPNG_VER_STRING, 0, 0, 0 );    return( png_ptr != 0 );    ],    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",    eval "ac_cv_lib_png=no")LIBS="$kde_save_LIBS"CFLAGS="$kde_save_CFLAGS"])dnlif eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])  LIBPNG="$ac_cv_lib_png"  AC_SUBST(LIBPNG)  AC_MSG_RESULT($ac_cv_lib_png)else  AC_MSG_RESULT(no)  LIBPNG=""  AC_SUBST(LIBPNG)fi])AC_DEFUN(AC_CHECK_BOOL,[	AC_MSG_CHECKING([for bool])        AC_CACHE_VAL(ac_cv_have_bool,        [		AC_LANG_CPLUSPLUS          	AC_TRY_COMPILE([],                 [bool aBool = true;],                 [ac_cv_have_bool="yes"],                 [ac_cv_have_bool="no"])        ]) dnl end AC_CHECK_VAL        AC_MSG_RESULT($ac_cv_have_bool)        if test "$ac_cv_have_bool" = "yes"; then        	AC_DEFINE(HAVE_BOOL, 1, [Define if the C++ compiler supports BOOL])        fi])AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,[AC_MSG_CHECKING(if you need GNU extensions)AC_CACHE_VAL(ac_cv_gnu_extensions,[cat > conftest.c << EOF#include <features.h>#ifdef __GNU_LIBRARY__yes#endifEOFif (eval "$ac_cpp conftest.c") 2>&5 |  egrep "yes" >/dev/null 2>&1; then  rm -rf conftest*  ac_cv_gnu_extensions=yeselse  ac_cv_gnu_extensions=nofi])AC_MSG_RESULT($ac_cv_gnu_extensions)if test "$ac_cv_gnu_extensions" = "yes"; then  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])fi])AC_DEFUN(KDE_CHECK_COMPILER_FLAG,[AC_REQUIRE([AC_CHECK_COMPILERS])AC_MSG_CHECKING(whether $CXX supports -$1)kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,[echo 'void f(){}' >conftest.ccif test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then  eval "kde_cv_prog_cxx_$kde_cache=yes"else  eval "kde_cv_prog_cxx_$kde_cache=no"firm -f conftest*])if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then AC_MSG_RESULT(yes) : $2else AC_MSG_RESULT(no) : $3fi])AC_DEFUN(AC_CHECK_COMPILERS,[  dnl this is somehow a fat lie, but prevents other macros from double checking  AC_PROVIDE([AC_PROG_CC])  AC_PROVIDE([AC_PROG_CPP])  AC_ARG_ENABLE(debug,[  --enable-debug          creates debugging code [default=no]],  [   if test $enableval = "no"; dnl     then       kde_use_debug_code="no"       kde_use_debug_define=yes     else       kde_use_debug_code="yes"       kde_use_debug_define=no   fi  ], [kde_use_debug_code="no"      kde_use_debug_define=no    ])  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],   [    if test $enableval = "no"; then         kde_use_strict_options="no"       else         kde_use_strict_options="yes"    fi   ], [kde_use_strict_options="no"])dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it  AC_MSG_CHECKING(for a C-Compiler)  dnl if there is one, print out. if not, don't matter  AC_MSG_RESULT($CC)  if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi  if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi  if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])  AC_PROG_CC_WORKS  AC_PROG_CC_GNU  if test $ac_cv_prog_gcc = yes; then    GCC=yes  else    GCC=  fi  if test -z "$CFLAGS"; then    if test "$kde_use_debug_code" = "yes"; then      AC_PROG_CC_G      if test $ac_cv_prog_cc_g = yes; then        CFLAGS="-g"      fi    else      if test "$GCC" = "yes"; then        CFLAGS="-O2"      else        CFLAGS=""      fi      if test "$kde_use_debug_define" = "yes"; then         CFLAGS="$CFLAGS -DNDEBUG"      fi    fi    if test "$GCC" = "yes"; then     CFLAGS="$CFLAGS"     if test "$kde_use_strict_options" = "yes"; then	CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"     fi    fi  fi  case "$host" in  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;  esac  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then     LDFLAGS="-s"  fidnl this is AC_PROG_CPP. I had to include it here, since autoconf checksdnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)  AC_MSG_CHECKING(how to run the C preprocessor)  # On Suns, sometimes $CPP names a directory.  if test -n "$CPP" && test -d "$CPP"; then    CPP=  fi  if test -z "$CPP"; then  AC_CACHE_VAL(ac_cv_prog_CPP,  [  # This must be in double quotes, not single quotes, because CPP may get    # substituted into the Makefile and "${CC-cc}" will confuse make.    CPP="${CC-cc} -E"    # On the NeXT, cc -E runs the code through the compiler's parser,    # not just through cpp.    dnl Use a header file that comes with gcc, so configuring glibc    dnl with a fresh cross-compiler works.    AC_TRY_CPP([#include <assert.h>    Syntax Error], ,    CPP="${CC-cc} -E -traditional-cpp"    AC_TRY_CPP([#include <assert.h>    Syntax Error], , CPP=/lib/cpp))    ac_cv_prog_CPP="$CPP"])dnl    CPP="$ac_cv_prog_CPP"  else    ac_cv_prog_CPP="$CPP"  fi  AC_MSG_RESULT($CPP)  AC_SUBST(CPP)dnl  AC_MSG_CHECKING(for a C++-Compiler)  dnl if there is one, print out. if not, don't matter  AC_MSG_RESULT($CXX)  if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi  if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi  if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi  if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi  test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])  AC_PROG_CXX_WORKS  AC_PROG_CXX_GNU  if test $ac_cv_prog_gxx = yes; then    GXX=yes  fi  if test -z "$CXXFLAGS"; then    if test "$kde_use_debug_code" = "yes"; then      AC_PROG_CXX_G      if test $ac_cv_prog_cxx_g = yes; then        CXXFLAGS="-g"      fi    else      if test "$GXX" = "yes"; then         CXXFLAGS="-O2"      fi      if test "$kde_use_debug_define" = "yes"; then         CXXFLAGS="$CXXFLAGS -DNDEBUG"      fi    fi    KDE_CHECK_COMPILER_FLAG(fno-exceptions,	[	  CXXFLAGS="$CXXFLAGS -fno-exceptions"	])    KDE_CHECK_COMPILER_FLAG(fno-rtti,	[	  CXXFLAGS="$CXXFLAGS -fno-rtti"	])    KDE_CHECK_COMPILER_FLAG(fno-check-new,	[	  CXXFLAGS="$CXXFLAGS -fno-check-new"	])    if test "$GXX" = "yes"; then       CXXFLAGS="$CXXFLAGS"       if test "$kde_use_debug_code" = "yes"; then	 CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"         KDE_CHECK_COMPILER_FLAG(Wno-long-long,	 [	   CXXFLAGS="$CXXFLAGS -Wno-long-long"	 ])         KDE_CHECK_COMPILER_FLAG(fno-builtin,         [           CXXFLAGS="$CXXFLAGS -fno-builtin"         ])	       fi       if test "$kde_use_strict_options" = "yes"; then	CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align -Woverloaded-virtual"       fi       if test "$kde_very_strict" = "yes"; then         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"       fi    fi  fi    KDE_CHECK_COMPILER_FLAG(fexceptions,	[	  USE_EXCEPTIONS="-fexceptions"	],	  USE_EXCEPTIONS=	)    AC_SUBST(USE_EXCEPTIONS)    KDE_CHECK_COMPILER_FLAG(frtti,	[	  USE_RTTI="-frtti"	],	  USE_RTTI=	)    AC_SUBST(USE_RTTI)    case "$host" in      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;    esac    AC_PROVIDE(AC_PROG_CXXCPP)    AC_MSG_CHECKING(how to run the C++ preprocessor)    if test -z "$CXXCPP"; then      AC_CACHE_VAL(ac_cv_prog_CXXCPP,      [         AC_LANG_SAVE[]dnl         AC_LANG_CPLUSPLUS[]dnl         CXXCPP="${CXX-g++} -E"         AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)         ac_cv_prog_CXXCPP="$CXXCPP"         AC_LANG_RESTORE[]dnl     ])dnl     CXXCPP="$ac_cv_prog_CXXCPP"     fi    AC_MSG_RESULT($CXXCPP)    AC_SUBST(CXXCPP)dnl    # the following is to allow programs, that are known to    # have problems when compiled with -O2    if test -n "$CXXFLAGS"; then      kde_safe_IFS=$IFS      IFS=" "      NOOPT_CXXFLAGS=""      for i in $CXXFLAGS; do        if test ! "$i" = "-O2"; then          NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"        fi      done      IFS=$kde_safe_IFS    fi    AC_SUBST(NOOPT_CXXFLAGS)    KDE_CHECK_FINAL    ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])    KDE_CXXFLAGS=    AC_SUBST(KDE_CXXFLAGS)])AC_DEFUN(KDE_ADD_DEPENDENCIES,[   [A]M_DEPENDENCIES(CC)   [A]M_DEPENDENCIES(CXX)])dnl just a wrapper to clean up configure.inAC_DEFUN(KDE_PROG_LIBTOOL,[AC_REQUIRE([AC_CHECK_COMPILERS])AC_REQUIRE([AC_ENABLE_SHARED])AC_REQUIRE([AC_ENABLE_STATIC])if test -z "$LIBTOOL"; then  dnl libtool is only for C, so I must force him  dnl to find the correct flags for C++  kde_save_cc=$CC  kde_save_cflags="$CFLAGS"  CC=$CXX  CFLAGS="$CXXFLAGS"  AC_LANG_SAVE  AC_LANG_C  AC_LIBTOOL_DLOPEN  AM_PROG_LIBTOOL#  LIBTOOL="$LIBTOOL --silent"  dnl AC_SUBST(LIBTOOL)  AC_LANG_RESTORE  CC=$kde_save_cc  CFLAGS="$kde_save_cflags"  LIBTOOL_SHELL='/bin/sh ./libtool'else  LIBTOOL_SHELL=$LIBTOOLfi])AC_DEFUN(KDE_DO_IT_ALL,[AC_CANONICAL_SYSTEMAC_ARG_PROGRAMAM_INIT_AUTOMAKE($1, $2)AM_DISABLE_LIBRARIESAC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})AC_CHECK_COMPILERSKDE_PROG_LIBTOOLAM_KDE_WITH_NLSAC_PATH_KDE])AC_DEFUN(AC_CHECK_RPATH,[AC_MSG_CHECKING(for rpath)AC_ARG_ENABLE(rpath,      [  --disable-rpath         do not use the rpath feature of ld],      USE_RPATH=$enableval, USE_RPATH=yes)if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then  KDE_RPATH="-rpath \$(kde_libraries)"  if test -n "$qt_libraries"; then    KDE_RPATH="$KDE_RPATH -rpath \$(qt_libraries)"  fi  dnl $x_libraries is set to /usr/lib in case  if test -n "$X_LDFLAGS"; then    KDE_RPATH="$KDE_RPATH -rpath \$(x_libraries)"  fi  if test -n "$KDE_EXTRA_RPATH"; then    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"  fifiAC_SUBST(KDE_EXTRA_RPATH)AC_SUBST(KDE_RPATH)AC_MSG_RESULT($USE_RPATH)])dnl Check for the type of the third argument of getsocknameAC_DEFUN(AC_CHECK_KSIZE_T,[AC_MSG_CHECKING(for the third argument of getsockname)AC_CACHE_VAL(ac_cv_ksize_t,AC_LANG_SAVEAC_LANG_CPLUSPLUS[AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[socklen_t a=0;getsockname(0,(struct sockaddr*)0, &a);],ac_cv_ksize_t=socklen_t,ac_cv_ksize_t=)if test -z "$ac_cv_ksize_t"; thenac_safe_cxxflags="$CXXFLAGS"if test "$GCC" = "yes"; then  CXXFLAGS="-Werror $CXXFLAGS"fiAC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>],[int a=0;getsockname(0,(struct sockaddr*)0, &a);],ac_cv_ksize_t=int,ac_cv_ksize_t=size_t)CXXFLAGS="$ac_safe_cxxflags"fiAC_LANG_RESTORE])if test -z "$ac_cv_ksize_t"; then

⌨️ 快捷键说明

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