pike.git / src / aclocal.m4

version» Context lines:

pike.git/src/aclocal.m4:2003:      dnl package, variable, options   AC_DEFUN(PIKE_LOW_PKG_CONFIG,   [    AC_MSG_CHECKING([for stuff to add to $2])    pkg_stuff="`${PKG_CONFIG} $3 $1`"    AC_MSG_RESULT(${pkg_stuff})    $2="[$]$2 ${pkg_stuff}"   ])    - dnl package + dnl package, on_success_opt, on_failure_opt   AC_DEFUN(PIKE_PKG_CONFIG,   [    AC_REQUIRE([PIKE_PROG_PKG_CONFIG])dnl -  +  pike_cv_pkg_config_$1=no    if test "${PKG_CONFIG}" = no; then :; else    AC_MSG_CHECKING([if a pkg-config based $1 is installed])    if "${PKG_CONFIG}" "$1"; then    AC_MSG_RESULT(yes)    PKG_SAVE_CPPFLAGS="$CPPFLAGS"    PKG_SAVE_CFLAGS="$CFLAGS"    PKG_SAVE_LDFLAGS="$LDFLAGS"    PKG_SAVE_LIBS="$LIBS"    PIKE_LOW_PKG_CONFIG([$1], [CPPFLAGS], [--cflags-only-I])    PIKE_LOW_PKG_CONFIG([$1], [CFLAGS], [--cflags-only-other])    PIKE_LOW_PKG_CONFIG([$1], [LDFLAGS], [--libs-only-L])    PIKE_LOW_PKG_CONFIG([$1], [LIBS], [--libs-only-l --libs-only-other])    AC_MSG_CHECKING([if $1 breaks compilation...])    AC_TRY_COMPILE([   #include <stdio.h>   ],[    printf("Hello, world\n");    exit(0);    ],[    AC_MSG_RESULT([no, everything seems ok]) -  +  pike_cv_pkg_config_$1=yes    ],[    AC_MSG_RESULT([yes, do not use])    CPPFLAGS="$PKG_SAVE_CPPFLAGS"    CFLAGS="$PKG_SAVE_CFLAGS"    LDFLAGS="$PKG_SAVE_LDFLAGS"    LIBS="$PKG_SAVE_LIBS"    ])    else    AC_MSG_RESULT(no)    fi    fi -  +  ifelse([$2$3], , , [ +  if test "x$pike_cv_pkg_config_$1" = "xno"; then +  ifelse([$3], , :, [$3]) +  else +  ifelse([$2], , :, [$2]) +  fi    ]) -  + ])