Changeset 10405
- Timestamp:
- 04/18/11 17:45:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/aclocal.m4
r10335 r10405 1828 1828 #echo DX_ENV=$DX_ENV 1829 1829 ]) 1830 1831 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1832 # serial 1 (pkg-config-0.24) 1833 # 1834 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1835 # 1836 # This program is free software; you can redistribute it and/or modify 1837 # it under the terms of the GNU General Public License as published by 1838 # the Free Software Foundation; either version 2 of the License, or 1839 # (at your option) any later version. 1840 # 1841 # This program is distributed in the hope that it will be useful, but 1842 # WITHOUT ANY WARRANTY; without even the implied warranty of 1843 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1844 # General Public License for more details. 1845 # 1846 # You should have received a copy of the GNU General Public License 1847 # along with this program; if not, write to the Free Software 1848 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1849 # 1850 # As a special exception to the GNU General Public License, if you 1851 # distribute this file as part of a program that contains a 1852 # configuration script generated by Autoconf, you may include it under 1853 # the same distribution terms that you use for the rest of that program. 1854 1855 # PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1856 # ---------------------------------- 1857 AC_DEFUN([PKG_PROG_PKG_CONFIG], 1858 [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1859 m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1860 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1861 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1862 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1863 1864 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1865 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1866 fi 1867 if test -n "$PKG_CONFIG"; then 1868 _pkg_min_version=m4_default([$1], [0.9.0]) 1869 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1870 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1871 AC_MSG_RESULT([yes]) 1872 else 1873 AC_MSG_RESULT([no]) 1874 PKG_CONFIG="" 1875 fi 1876 fi[]dnl 1877 ])# PKG_PROG_PKG_CONFIG 1878 1879 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1880 # 1881 # Check to see whether a particular set of modules exists. Similar 1882 # to PKG_CHECK_MODULES(), but does not set variables or print errors. 1883 # 1884 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1885 # only at the first occurence in configure.ac, so if the first place 1886 # it's called might be skipped (such as if it is within an "if", you 1887 # have to call PKG_CHECK_EXISTS manually 1888 # -------------------------------------------------------------- 1889 AC_DEFUN([PKG_CHECK_EXISTS], 1890 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1891 if test -n "$PKG_CONFIG" && \ 1892 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1893 m4_default([$2], [:]) 1894 m4_ifvaln([$3], [else 1895 $3])dnl 1896 fi]) 1897 1898 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1899 # --------------------------------------------- 1900 m4_define([_PKG_CONFIG], 1901 [if test -n "$$1"; then 1902 pkg_cv_[]$1="$$1" 1903 elif test -n "$PKG_CONFIG"; then 1904 PKG_CHECK_EXISTS([$3], 1905 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1906 [pkg_failed=yes]) 1907 else 1908 pkg_failed=untried 1909 fi[]dnl 1910 ])# _PKG_CONFIG 1911 1912 # _PKG_SHORT_ERRORS_SUPPORTED 1913 # ----------------------------- 1914 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1915 [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1916 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1917 _pkg_short_errors_supported=yes 1918 else 1919 _pkg_short_errors_supported=no 1920 fi[]dnl 1921 ])# _PKG_SHORT_ERRORS_SUPPORTED 1922 1923 1924 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1925 # [ACTION-IF-NOT-FOUND]) 1926 # 1927 # 1928 # Note that if there is a possibility the first call to 1929 # PKG_CHECK_MODULES might not happen, you should be sure to include an 1930 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1931 # 1932 # 1933 # -------------------------------------------------------------- 1934 AC_DEFUN([PKG_CHECK_MODULES], 1935 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1936 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1937 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1938 1939 pkg_failed=no 1940 AC_MSG_CHECKING([for $1]) 1941 1942 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1943 _PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1944 1945 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1946 and $1[]_LIBS to avoid the need to call pkg-config. 1947 See the pkg-config man page for more details.]) 1948 1949 if test $pkg_failed = yes; then 1950 AC_MSG_RESULT([no]) 1951 _PKG_SHORT_ERRORS_SUPPORTED 1952 if test $_pkg_short_errors_supported = yes; then 1953 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1954 else 1955 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1956 fi 1957 # Put the nasty error message in config.log where it belongs 1958 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1959 1960 m4_default([$4], [AC_MSG_ERROR( 1961 [Package requirements ($2) were not met: 1962 1963 $$1_PKG_ERRORS 1964 1965 Consider adjusting the PKG_CONFIG_PATH environment variable if you 1966 installed software in a non-standard prefix. 1967 1968 _PKG_TEXT])dnl 1969 ]) 1970 elif test $pkg_failed = untried; then 1971 AC_MSG_RESULT([no]) 1972 m4_default([$4], [AC_MSG_FAILURE( 1973 [The pkg-config script could not be found or is too old. Make sure it 1974 is in your PATH or set the PKG_CONFIG environment variable to the full 1975 path to pkg-config. 1976 1977 _PKG_TEXT 1978 1979 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl 1980 ]) 1981 else 1982 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1983 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1984 AC_MSG_RESULT([yes]) 1985 $3 1986 fi[]dnl 1987 ])# PKG_CHECK_MODULES 1830 1988 1831 1989 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. … … 2871 3029 m4_include([.macro_dir/mysql++_devel.m4]) 2872 3030 m4_include([.macro_dir/mysql_devel.m4]) 3031 m4_include([.macro_dir/qt4_do_it_all.m4])
Note:
See TracChangeset
for help on using the changeset viewer.