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

📄 acinclude.m4.in

📁 查看局域网的信息,类似网上邻居的功能,例如查看哪台计算机在线等
💻 IN
📖 第 1 页 / 共 5 页
字号:
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"AC_TRY_LINK(dnl[#ifdef __cplusplusextern "C" {#endifint GifLastError(void);#ifdef __cplusplus}#endif/* We use char because int might match the return type of a gcc2    builtin and then its argument prototype would still apply.  */],            [return GifLastError();],            eval "ac_cv_lib_gif=yes",            eval "ac_cv_lib_gif=no")LIBS="$ac_save_LIBS"])dnlif eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then  AC_MSG_RESULT(yes)  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])else  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)fi])AC_DEFUN(KDE_FIND_JPEG_HELPER,[AC_MSG_CHECKING([for libjpeg$2])AC_CACHE_VAL(ac_cv_lib_jpeg_$1,[AC_LANG_Cac_save_LIBS="$LIBS"LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"AC_TRY_LINK([/* Override any gcc2 internal prototype to avoid an error.  */struct jpeg_decompress_struct;typedef struct jpeg_decompress_struct * j_decompress_ptr;typedef int size_t;#ifdef __cplusplusextern "C" {#endif    void jpeg_CreateDecompress(j_decompress_ptr cinfo,                                    int version, size_t structsize);#ifdef __cplusplus}#endif/* We use char because int might match the return type of a gcc2    builtin and then its argument prototype would still apply.  */],            [jpeg_CreateDecompress(0L, 0, 0);],            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",            eval "ac_cv_lib_jpeg_$1=no")LIBS="$ac_save_LIBS"])if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then  LIBJPEG="$ac_cv_lib_jpeg_$1"  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)else  AC_MSG_RESULT(no)  $3fi])AC_DEFUN(AC_FIND_JPEG,[KDE_FIND_JPEG_HELPER(6b, 6b,   KDE_FIND_JPEG_HELPER(normal, [],    [dnl what to do, if the normal way fails:	if test -f "$kde_libraries/libjpeg.so"; then	   test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"	else if test -f "$kde_libraries/libjpeg.sl"; then	   test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"		else if test -f "$kde_libraries/libjpeg.a"; then	   test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a	   ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"        else	  AC_MSG_ERROR([You need the development package of libjpeg6b. You can geta source package of libjpeg from http://www.ijg.org/])	fi      fi   fi   LIBJPEG=$ac_cv_lib_jpeg]))AC_SUBST(LIBJPEG)AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])])AC_DEFUN(AC_FIND_ZLIB,[AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])AC_MSG_CHECKING([for libz])AC_CACHE_VAL(ac_cv_lib_z,[AC_LANG_Ckde_save_LIBS="$LIBS"LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"kde_save_CFLAGS="$CFLAGS"CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"AC_TRY_LINK(dnl[#include<zlib.h>],            [return (zlibVersion() == ZLIB_VERSION); ],            eval "ac_cv_lib_z='-lz'",            eval "ac_cv_lib_z=no")LIBS="$kde_save_LIBS"CFLAGS="$kde_save_CFLAGS"])dnlif eval "test ! \"`echo $ac_cv_lib_z`\" = no"; then  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])  LIBZ="$ac_cv_lib_z"  AC_SUBST(LIBZ)  AC_MSG_RESULT($ac_cv_lib_z)else  AC_MSG_ERROR(not found. Check your installation and look into config.log)  LIBZ=""  AC_SUBST(LIBZ)fi])AC_DEFUN(KDE_TRY_TIFFLIB,[AC_MSG_CHECKING([for libtiff $1])AC_CACHE_VAL(kde_cv_libtiff_$1,[AC_LANG_CPLUSPLUSkde_save_LIBS="$LIBS"LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"kde_save_CXXFLAGS="$CXXFLAGS"CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"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([KDE_CHECK_EXTRA_LIBS])AC_REQUIRE([AC_FIND_ZLIB])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 'int main() { return 0; }' >conftest.ccif test -z "`$CXX -$1 -o conftest 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(KDE_PROG_CC_PG,[ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,  [echo 'void f(){}' > conftest.c   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then     kde_cv_prog_cc_pg=yes   else     kde_cv_prog_cc_pg=no   fi   rm -f conftest*])])AC_DEFUN(KDE_PROG_CXX_PG,[ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,  [echo 'void f(){}' > conftest.cc   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then     kde_cv_prog_cxx_pg=yes   else     kde_cv_prog_cxx_pg=no   fi  rm -f conftest*])])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_PROVIDE([AC_PROG_CXX])  AC_PROVIDE([AC_PROG_CXXCPP])  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"])  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],     [kde_use_profiling=$enableval],     [kde_use_profiling="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"	case $host in   	*-*-linux-gnu)	           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"         ;;        esac      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 "$kde_use_profiling" = yes; then      KDE_PROG_CC_PG      if test "$kde_cv_prog_cc_pg" = yes; then        CFLAGS="$CFLAGS -pg"      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=""  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"	case $host in  dnl   	*-*-linux-gnu)           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"         ;;        esac      fi    else      if test "$GXX" = "yes"; then         CXXFLAGS="-O2"      fi      if test "$kde_use_debug_define" = "yes"; then         CXXFLAGS="$CXXFLAGS -DNDEBUG"      fi    fi    if test "$kde_use_profiling" = yes; then      KDE_PROG_CXX_PG      if test "$kde_cv_prog_cxx_pg" = yes; then        CXXFLAGS="$CXXFLAGS -pg"      fi    fi    KDE_CHECK_COMPILER_FLAG(fno-exceptions,	[	  CXXFLAGS="$CXXFLAGS -fno-exceptions"	])dnl WABA: Nothing wrong with RTTI, keep it on.dnl    KDE_CHECK_COMPILER_FLAG(fno-rtti,dnl	[dnl	  CXXFLAGS="$CXXFLAGS -fno-rtti"dnl	])    KDE_CHECK_COMPILER_FLAG(fno-check-new,	[	  CXXFLAGS="$CXXFLAGS -fno-check-new"

⌨️ 快捷键说明

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