comparison aclocal.m4 @ 1:af25f5c39d90 0.2.21-4

added diff from debian (masqmail-0.2.21-4)
author meillo@marmaro.de
date Fri, 26 Sep 2008 20:56:23 +0200
parents 08114f7dcc23
children 9cb4031fa5e0
comparison
equal deleted inserted replaced
0:08114f7dcc23 1:af25f5c39d90
857 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 857 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
858 AC_MSG_ERROR([conditional "$1" was never defined. 858 AC_MSG_ERROR([conditional "$1" was never defined.
859 Usually this means the macro was only invoked conditionally.]) 859 Usually this means the macro was only invoked conditionally.])
860 fi])]) 860 fi])])
861 861
862 # isc-posix.m4 serial 2 (gettext-0.11.2)
863 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
864 dnl This file is free software; the Free Software Foundation
865 dnl gives unlimited permission to copy and/or distribute it,
866 dnl with or without modifications, as long as this notice is preserved.
867
868 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
869
870 # This test replaces the one in autoconf.
871 # Currently this macro should have the same name as the autoconf macro
872 # because gettext's gettext.m4 (distributed in the automake package)
873 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
874 # give these diagnostics:
875 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
876 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
877
878 undefine([AC_ISC_POSIX])
879
880 AC_DEFUN([AC_ISC_POSIX],
881 [
882 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
883 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
884 ]
885 )
886
887 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 862 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
888 # 863 #
889 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 864 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
890 # 865 #
891 # This program is free software; you can redistribute it and/or modify 866 # This program is free software; you can redistribute it and/or modify
915 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 890 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
916 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 891 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
917 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 892 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
918 fi 893 fi
919 if test -n "$PKG_CONFIG"; then 894 if test -n "$PKG_CONFIG"; then
920 _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) 895 _pkg_min_version=m4_default([$1], [0.9.0])
921 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 896 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
922 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 897 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
923 AC_MSG_RESULT([yes]) 898 AC_MSG_RESULT([yes])
924 else 899 else
925 AC_MSG_RESULT([no]) 900 AC_MSG_RESULT([no])
951 926
952 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 927 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
953 # --------------------------------------------- 928 # ---------------------------------------------
954 m4_define([_PKG_CONFIG], 929 m4_define([_PKG_CONFIG],
955 [if test -n "$PKG_CONFIG"; then 930 [if test -n "$PKG_CONFIG"; then
931 if test -n "$$1"; then
932 pkg_cv_[]$1="$$1"
933 else
956 PKG_CHECK_EXISTS([$3], 934 PKG_CHECK_EXISTS([$3],
957 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 935 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
958 [pkg_failed=yes]) 936 [pkg_failed=yes])
937 fi
959 else 938 else
960 pkg_failed=untried 939 pkg_failed=untried
961 fi[]dnl 940 fi[]dnl
962 ])# _PKG_CONFIG 941 ])# _PKG_CONFIG
942
943 # _PKG_SHORT_ERRORS_SUPPORTED
944 # -----------------------------
945 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
946 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
947 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
948 _pkg_short_errors_supported=yes
949 else
950 _pkg_short_errors_supported=no
951 fi[]dnl
952 ])# _PKG_SHORT_ERRORS_SUPPORTED
953
963 954
964 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 955 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
965 # [ACTION-IF-NOT-FOUND]) 956 # [ACTION-IF-NOT-FOUND])
966 # 957 #
967 # 958 #
980 AC_MSG_CHECKING([for $1]) 971 AC_MSG_CHECKING([for $1])
981 972
982 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 973 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
983 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) 974 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
984 975
976 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
977 and $1[]_LIBS to avoid the need to call pkg-config.
978 See the pkg-config man page for more details.])
979
985 if test $pkg_failed = yes; then 980 if test $pkg_failed = yes; then
986 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 981 _PKG_SHORT_ERRORS_SUPPORTED
982 if test $_pkg_short_errors_supported = yes; then
983 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
984 else
985 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
986 fi
987 # Put the nasty error message in config.log where it belongs 987 # Put the nasty error message in config.log where it belongs
988 echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD 988 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
989 989
990 ifelse([$4], , [AC_MSG_ERROR(dnl 990 ifelse([$4], , [AC_MSG_ERROR(dnl
991 [Package requirements ($2) were not met. 991 [Package requirements ($2) were not met:
992
993 $$1_PKG_ERRORS
994
992 Consider adjusting the PKG_CONFIG_PATH environment variable if you 995 Consider adjusting the PKG_CONFIG_PATH environment variable if you
993 installed software in a non-standard prefix. 996 installed software in a non-standard prefix.
994 997
995 Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables 998 _PKG_TEXT
996 to avoid the need to call pkg-config. See the pkg-config man page for 999 ])],
997 more details.])], 1000 [AC_MSG_RESULT([no])
998 [$4]) 1001 $4])
999 elif test $pkg_failed = untried; then 1002 elif test $pkg_failed = untried; then
1000 ifelse([$4], , [AC_MSG_FAILURE(dnl 1003 ifelse([$4], , [AC_MSG_FAILURE(dnl
1001 [The pkg-config script could not be found or is too old. Make sure it 1004 [The pkg-config script could not be found or is too old. Make sure it
1002 is in your PATH or set the PKG_CONFIG environment variable to the full 1005 is in your PATH or set the PKG_CONFIG environment variable to the full
1003 path to pkg-config. 1006 path to pkg-config.
1004 1007
1005 Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables 1008 _PKG_TEXT
1006 to avoid the need to call pkg-config. See the pkg-config man page for 1009
1007 more details. 1010 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1008
1009 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1010 [$4]) 1011 [$4])
1011 else 1012 else
1012 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1013 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1013 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1014 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1014 AC_MSG_RESULT([yes]) 1015 AC_MSG_RESULT([yes])