Use pkgconfig. Increment libtool CURRENT version.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
diff --git a/libffi/ChangeLog.libffi b/libffi/ChangeLog.libffi
index 03f40f5..5b4b667 100644
--- a/libffi/ChangeLog.libffi
+++ b/libffi/ChangeLog.libffi
@@ -1,3 +1,13 @@
+2008-02-14 Anthony Green <green@redhat.com>
+
+ * include/Makefile.am (includesdir): Install headers under libdir.
+ (pkgconfigdir): Define. Install libffi.pc.
+ * include/Makefile.in: Rebuilt.
+ * libffi.pc.in: Create.
+ * libtool-version: Increment CURRENT
+ * configure.ac: Add libffi.pc.in
+ * configure: Rebuilt.
+
2008-02-03 Anthony Green <green@redhat.com>
* include/Makefile.am (includesdir): Fix header install with
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
index e64ec9c..4d30ce6 100644
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -83,6 +83,9 @@ libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
src/raw_api.c src/java_raw_api.c src/closures.c
# include/ffi_common.h include/ffitarget.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libffi.pc
+
nodist_libffi_la_SOURCES =
if MIPS
diff --git a/libffi/Makefile.in b/libffi/Makefile.in
index fe22db7..5c3e892 100644
--- a/libffi/Makefile.in
+++ b/libffi/Makefile.in
@@ -14,6 +14,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -58,9 +59,10 @@ target_triplet = @target@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \
- $(top_srcdir)/configure ChangeLog compile config.guess \
- config.sub depcomp install-sh ltcf-c.sh ltcf-cxx.sh \
- ltcf-gcj.sh ltconfig ltmain.sh missing mkinstalldirs
+ $(srcdir)/libffi.pc.in $(top_srcdir)/configure ChangeLog TODO \
+ compile config.guess config.sub depcomp install-sh ltcf-c.sh \
+ ltcf-cxx.sh ltcf-gcj.sh ltconfig ltmain.sh missing \
+ mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
@@ -70,14 +72,15 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = fficonfig.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = libffi.pc
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
+am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
+ "$(DESTDIR)$(pkgconfigdir)"
toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
libffi_la_LIBADD =
@@ -175,6 +178,8 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
@@ -386,6 +391,8 @@ libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
src/raw_api.c src/java_raw_api.c src/closures.c
# include/ffi_common.h include/ffitarget.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libffi.pc
nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8) \
@@ -455,6 +462,8 @@ $(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
distclean-hdr:
-rm -f fficonfig.h stamp-h1
+libffi.pc: $(top_builddir)/config.status $(srcdir)/libffi.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -923,6 +932,23 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -1199,10 +1225,10 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile $(LTLIBRARIES) fficonfig.h
+all-am: Makefile $(LTLIBRARIES) $(DATA) fficonfig.h
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(toolexeclibdir)"; do \
+ for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
@@ -1283,7 +1309,7 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-pkgconfigDATA
install-dvi: install-dvi-recursive
@@ -1317,7 +1343,7 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-toolexeclibLTLIBRARIES
+uninstall-am: uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
@@ -1333,13 +1359,14 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip install-toolexeclibLTLIBRARIES \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-toolexeclibLTLIBRARIES
+ install-man install-pdf install-pdf-am install-pkgconfigDATA \
+ install-ps install-ps-am install-strip \
+ install-toolexeclibLTLIBRARIES installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-pkgconfigDATA uninstall-toolexeclibLTLIBRARIES
# No install-html or install-pdf support in automake yet
diff --git a/libffi/README b/libffi/README
index f426c9d..56382bb 100644
--- a/libffi/README
+++ b/libffi/README
@@ -1,40 +1,35 @@
-This directory contains the libffi package, which is not part of GCC but
-shipped with GCC as convenience.
-
Status
======
-libffi-2.00 has not been released yet! This is a development snapshot!
-
-libffi-1.20 was released on October 5, 1998. Check the libffi web
-page for updates: <URL:http://sources.redhat.com/libffi/>.
+libffi-3.00 was released on February xx, 2008. Check the libffi web
+page for updates: <URL:http://sourceware.org/libffi/>.
What is libffi?
===============
Compilers for high level languages generate code that follow certain
-conventions. These conventions are necessary, in part, for separate
-compilation to work. One such convention is the "calling
-convention". The "calling convention" is essentially a set of
-assumptions made by the compiler about where function arguments will
-be found on entry to a function. A "calling convention" also specifies
-where the return value for a function is found.
+conventions. These conventions are necessary, in part, for separate
+compilation to work. One such convention is the "calling convention".
+The "calling convention" is a set of assumptions made by the compiler
+about where function arguments will be found on entry to a function.
+A "calling convention" also specifies where the return value for a
+function is found.
Some programs may not know at the time of compilation what arguments
-are to be passed to a function. For instance, an interpreter may be
+are to be passed to a function. For instance, an interpreter may be
told at run-time about the number and types of arguments used to call
-a given function. Libffi can be used in such programs to provide a
+a given function. Libffi can be used in such programs to provide a
bridge from the interpreter program to compiled code.
The libffi library provides a portable, high level programming
-interface to various calling conventions. This allows a programmer to
+interface to various calling conventions. This allows a programmer to
call any function specified by a call interface description at run
-time.
+time.
-Ffi stands for Foreign Function Interface. A foreign function
+FFI stands for Foreign Function Interface. A foreign function
interface is the popular name for the interface that allows code
-written in one language to call code written in another language. The
+written in one language to call code written in another language. The
libffi library really only provides the lowest, machine dependent
layer of a fully featured foreign function interface. A layer must
exist above libffi that handles type conversions for values passed
@@ -120,7 +115,7 @@ call and that you know the number and types of arguments to pass it,
as well as the return type of the function.
The first thing you must do is create an ffi_cif object that matches
-the signature of the function you wish to call. The cif in ffi_cif
+the signature of the function you wish to call. The `cif' in ffi_cif
stands for Call InterFace. To prepare a call interface object, use the
following function:
@@ -375,6 +370,9 @@ arguments' test).
History
=======
+3.00 Feb-XX-08
+ Many changes, mostly thanks to the GCC project.
+
1.20 Oct-5-98
Raffaele Sena produces ARM port.
diff --git a/libffi/configure b/libffi/configure
index 9fd638a..8a2bbf9 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -22695,7 +22695,7 @@ ac_config_commands="$ac_config_commands src"
ac_config_links="$ac_config_links include/ffitarget.h:src/$TARGETDIR/ffitarget.h"
-ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile"
+ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile libffi.pc"
cat >confcache <<\_ACEOF
@@ -23478,6 +23478,7 @@ do
"include/ffi.h") CONFIG_FILES="$CONFIG_FILES include/ffi.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+ "libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
diff --git a/libffi/configure.ac b/libffi/configure.ac
index 7c9713d..fd9e4b8 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -352,6 +352,6 @@ test -d src/$TARGETDIR || mkdir src/$TARGETDIR
AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h)
-AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile)
+AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile libffi.pc)
AC_OUTPUT
diff --git a/libffi/include/Makefile.am b/libffi/include/Makefile.am
index 03956af..abdba52 100644
--- a/libffi/include/Makefile.am
+++ b/libffi/include/Makefile.am
@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign
DISTCLEANFILES=ffitarget.h
EXTRA_DIST=ffi.h.in ffi_common.h
-includesdir = $(includedir)
+includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
includes_HEADERS = ffi.h ffitarget.h
diff --git a/libffi/include/Makefile.in b/libffi/include/Makefile.in
index e85e68b..1c240f3 100644
--- a/libffi/include/Makefile.in
+++ b/libffi/include/Makefile.in
@@ -182,7 +182,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h
-includesdir = $(includedir)
+includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
includes_HEADERS = ffi.h ffitarget.h
all: all-am
diff --git a/libffi/libffi.pc.in b/libffi/libffi.pc.in
new file mode 100644
index 0000000..10c910a
--- /dev/null
+++ b/libffi/libffi.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@/@PACKAGE_NAME@-@PACKAGE_VERSION@
+includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+
+Name: libffi
+Description: Library supporting Foreign Function Interfaces
+Version: 3.0
+Libs: -lffi
+Cflags: -I${includedir}
diff --git a/libffi/libtool-version b/libffi/libtool-version
index 6753286..71a31c4 100644
--- a/libffi/libtool-version
+++ b/libffi/libtool-version
@@ -3,4 +3,4 @@
# a separate file so that version updates don't involve re-running
# automake.
# CURRENT:REVISION:AGE
-4:1:0
+5:1:0