summaryrefslogtreecommitdiff
path: root/packages/libftdi
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2008-07-18 12:46:29 +0000
committerHenning Heinold <heinold@inf.fu-berlin.de>2008-07-18 12:46:29 +0000
commitcd581f86f4bc7f633f62d288ba7d42a3252a8c18 (patch)
tree48446ca82d63c4cb1ff94aa120878874f1e1eaed /packages/libftdi
parent6bf00b4df6b1eddb3733aec3704044191ebdf03a (diff)
libftdi: update to version 0.13
*rewrite configure.ac and use rpath tools from gettext *disable examples because of rpath issue needs more investigation *doxygen is still disabled too
Diffstat (limited to 'packages/libftdi')
-rw-r--r--packages/libftdi/files/autotools.patch896
-rw-r--r--packages/libftdi/libftdi-native_0.13.bb5
-rw-r--r--packages/libftdi/libftdi_0.13.bb20
3 files changed, 921 insertions, 0 deletions
diff --git a/packages/libftdi/files/autotools.patch b/packages/libftdi/files/autotools.patch
new file mode 100644
index 0000000000..e10528ea73
--- /dev/null
+++ b/packages/libftdi/files/autotools.patch
@@ -0,0 +1,896 @@
+Index: libftdi-0.13/configure.ac
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libftdi-0.13/configure.ac 2008-07-18 14:35:52.710117546 +0200
+@@ -0,0 +1,54 @@
++# -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_PREREQ(2.61)
++AC_INIT([libftdi], [0.13])
++AM_INIT_AUTOMAKE
++AC_CONFIG_SRCDIR([config.h.in])
++AC_CONFIG_HEADER([config.h])
++
++AC_CONFIG_MACRO_DIR([m4])
++
++# Checks for programs.
++AC_PROG_CC
++AC_PROG_CPP
++AC_PROG_INSTALL
++AC_PROG_LN_S
++AC_PROG_MAKE_SET
++AC_PROG_RANLIB
++AM_PROG_LIBTOOL
++AC_LIB_RPATH
++AC_LIB_LINKFLAGS_FROM_LIBS
++
++# Checks for libraries.
++PKG_PROG_PKG_CONFIG
++PKG_CHECK_MODULES([LIBUSB],[libusb >= 0.1.7],,[AC_MSG_ERROR(libusb library not found.)])
++
++# Checks for header files.
++AC_HEADER_STDC
++AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
++
++# Checks for typedefs, structures, and compiler characteristics.
++AC_C_CONST
++AC_HEADER_TIME
++
++# Checks for library functions.
++AC_PROG_GCC_TRADITIONAL
++AC_FUNC_MALLOC
++AC_FUNC_MEMCMP
++AC_FUNC_REALLOC
++AC_FUNC_SELECT_ARGTYPES
++AC_CHECK_FUNCS([memmove memset select strtol])
++
++AC_CHECK_ENABLE_ASYNC_MODE
++AC_CHECK_ENABLE_DOCS
++
++AC_CONFIG_FILES([Makefile
++ libftdi-config
++ libftdi.pc
++ libftdi.spec
++ doc/Makefile
++ examples/Makefile
++ src/Makefile])
++AC_CONFIG_COMMANDS([default],[[chmod a+x libftdi-config]],[[]])
++AC_OUTPUT
+Index: libftdi-0.13/configure.in
+===================================================================
+--- libftdi-0.13.orig/configure.in 2008-06-13 10:28:54.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,55 +0,0 @@
+-AC_INIT(configure.in)
+-
+-AM_CONFIG_HEADER(config.h)
+-AM_INIT_AUTOMAKE(libftdi, 0.13)
+-
+-AC_LANG_C
+-AC_PROG_CC
+-AM_PROG_LIBTOOL
+-
+-dnl check for libusb-config
+-AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH)
+-
+-if test ! -z "$HAVELIBUSB"; then
+- LIBUSB_CFLAGS=`$HAVELIBUSB --cflags`
+- LIBUSB_LIBS=`$HAVELIBUSB --libs`
+-
+- CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
+- LIBS="$LIBS $LIBUSB_LIBS"
+-else
+- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.])
+-fi
+-
+-dnl check for version of libusb
+-AC_MSG_CHECKING([if libusb version is >= 0.1.7])
+-libusb_version_needed="1007"
+-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
+-
+-if test $libusb_version -lt $libusb_version_needed; then
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.])
+-else
+- AC_MSG_RESULT(yes)
+-fi
+-
+-ENABLE_ASYNC_MODE=0
+-AC_ARG_WITH(async-mode,
+-[ --with-async-mode enable experimental async mode. Linux only.],
+-[
+- AC_MSG_CHECKING(for experimental linux async mode)
+- if test "$withval" != "no"; then
+- ENABLE_ASYNC_MODE=1
+- CFLAGS="$CFLAGS -DLIBFTDI_LINUX_ASYNC_MODE"
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_RESULT(no)
+- fi
+-])
+-AC_SUBST(ENABLE_ASYNC_MODE)
+-
+-dnl check for doxygen
+-AC_PATH_PROG(DOXYGEN, doxygen)
+-AM_CONDITIONAL(HAVE_DOXYGEN, test -n $DOXYGEN)
+-
+-AC_OUTPUT([libftdi-config],[chmod a+x libftdi-config])
+-AC_OUTPUT(Makefile src/Makefile examples/Makefile doc/Doxyfile doc/Makefile libftdi.pc libftdi.spec)
+Index: libftdi-0.13/m4/async.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libftdi-0.13/m4/async.m4 2008-07-18 14:35:52.710117546 +0200
+@@ -0,0 +1,17 @@
++AC_DEFUN([AC_CHECK_ENABLE_ASYNC_MODE],[
++AC_MSG_CHECKING([whether to compile with async-mode])
++ENABLE_ASYNC_MODE=0
++AC_ARG_WITH(async-mode,
++[ --with-async-mode enable experimental async mode. Linux only.],
++[
++ AC_MSG_CHECKING(for experimental linux async mode)
++ if test "$withval" != "no"; then
++ ENABLE_ASYNC_MODE=1
++ CFLAGS="$CFLAGS -DLIBFTDI_LINUX_ASYNC_MODE"
++ AC_MSG_RESULT(yes)
++ else
++ AC_MSG_RESULT(no)
++ fi
++])
++AC_SUBST(ENABLE_ASYNC_MODE)
++])
+Index: libftdi-0.13/m4/doxygen.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libftdi-0.13/m4/doxygen.m4 2008-07-18 14:35:52.710117546 +0200
+@@ -0,0 +1,11 @@
++AC_DEFUN([AC_CHECK_ENABLE_DOCS],[
++AC_MSG_CHECKING([whether to compile the docs])
++AC_ARG_ENABLE([docs],
++[ --enable-docs Turn on debugging],
++[case "${enableval}" in
++ yes) AC_PATH_PROG(DOXYGEN, doxygen);;
++ no) ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-docs]) ;;
++esac],[DOXYGEN=""])
++AM_CONDITIONAL([HAVE_DOXYGEN], [test -n $DOXYGENx])
++])
+Index: libftdi-0.13/Makefile.am
+===================================================================
+--- libftdi-0.13.orig/Makefile.am 2008-06-13 10:28:54.000000000 +0200
++++ libftdi-0.13/Makefile.am 2008-07-18 14:36:25.160089170 +0200
+@@ -2,7 +2,9 @@
+ # have all needed files, that a GNU package needs
+ AUTOMAKE_OPTIONS = foreign 1.4
+
+-SUBDIRS = src examples doc
++ACLOCAL_AMFLAGS = -I m4
++
++SUBDIRS = src doc
+
+ EXTRA_DIST = libftdi.spec libftdi.spec.in COPYING.LIB README AUTHORS ChangeLog libftdi-config.in
+
+Index: libftdi-0.13/m4/lib-link.m4
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libftdi-0.13/m4/lib-link.m4 2008-07-18 14:35:52.713438346 +0200
+@@ -0,0 +1,709 @@
++# lib-link.m4 serial 13 (gettext-0.17)
++dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++
++dnl From Bruno Haible.
++
++AC_PREREQ(2.54)
++
++dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
++dnl the libraries corresponding to explicit and implicit dependencies.
++dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
++dnl augments the CPPFLAGS variable.
++dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
++dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
++AC_DEFUN([AC_LIB_LINKFLAGS],
++[
++ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
++ AC_REQUIRE([AC_LIB_RPATH])
++ define([Name],[translit([$1],[./-], [___])])
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
++ AC_LIB_LINKFLAGS_BODY([$1], [$2])
++ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
++ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
++ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
++ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
++ ])
++ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
++ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
++ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
++ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
++ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
++ AC_SUBST([LIB]NAME)
++ AC_SUBST([LTLIB]NAME)
++ AC_SUBST([LIB]NAME[_PREFIX])
++ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
++ dnl results of this search when this library appears as a dependency.
++ HAVE_LIB[]NAME=yes
++ undefine([Name])
++ undefine([NAME])
++])
++
++dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
++dnl searches for libname and the libraries corresponding to explicit and
++dnl implicit dependencies, together with the specified include files and
++dnl the ability to compile and link the specified testcode. If found, it
++dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
++dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
++dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
++dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
++dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
++dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
++AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
++[
++ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
++ AC_REQUIRE([AC_LIB_RPATH])
++ define([Name],[translit([$1],[./-], [___])])
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++
++ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
++ dnl accordingly.
++ AC_LIB_LINKFLAGS_BODY([$1], [$2])
++
++ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
++ dnl because if the user has installed lib[]Name and not disabled its use
++ dnl via --without-lib[]Name-prefix, he wants to use it.
++ ac_save_CPPFLAGS="$CPPFLAGS"
++ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
++
++ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
++ ac_save_LIBS="$LIBS"
++ LIBS="$LIBS $LIB[]NAME"
++ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
++ LIBS="$ac_save_LIBS"
++ ])
++ if test "$ac_cv_lib[]Name" = yes; then
++ HAVE_LIB[]NAME=yes
++ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
++ AC_MSG_CHECKING([how to link with lib[]$1])
++ AC_MSG_RESULT([$LIB[]NAME])
++ else
++ HAVE_LIB[]NAME=no
++ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
++ dnl $INC[]NAME either.
++ CPPFLAGS="$ac_save_CPPFLAGS"
++ LIB[]NAME=
++ LTLIB[]NAME=
++ LIB[]NAME[]_PREFIX=
++ fi
++ AC_SUBST([HAVE_LIB]NAME)
++ AC_SUBST([LIB]NAME)
++ AC_SUBST([LTLIB]NAME)
++ AC_SUBST([LIB]NAME[_PREFIX])
++ undefine([Name])
++ undefine([NAME])
++])
++
++dnl Determine the platform dependent parameters needed to use rpath:
++dnl acl_libext,
++dnl acl_shlibext,
++dnl acl_hardcode_libdir_flag_spec,
++dnl acl_hardcode_libdir_separator,
++dnl acl_hardcode_direct,
++dnl acl_hardcode_minus_L.
++AC_DEFUN([AC_LIB_RPATH],
++[
++ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
++ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
++ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
++ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
++ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
++ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
++ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
++ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
++ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
++ . ./conftest.sh
++ rm -f ./conftest.sh
++ acl_cv_rpath=done
++ ])
++ wl="$acl_cv_wl"
++ acl_libext="$acl_cv_libext"
++ acl_shlibext="$acl_cv_shlibext"
++ acl_libname_spec="$acl_cv_libname_spec"
++ acl_library_names_spec="$acl_cv_library_names_spec"
++ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
++ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
++ acl_hardcode_direct="$acl_cv_hardcode_direct"
++ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
++ dnl Determine whether the user wants rpath handling at all.
++ AC_ARG_ENABLE(rpath,
++ [ --disable-rpath do not hardcode runtime library paths],
++ :, enable_rpath=yes)
++])
++
++dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
++dnl the libraries corresponding to explicit and implicit dependencies.
++dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
++dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
++dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
++AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
++[
++ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
++ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
++ dnl Autoconf >= 2.61 supports dots in --with options.
++ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
++ dnl By default, look in $includedir and $libdir.
++ use_additional=yes
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
++[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
++ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
++[
++ if test "X$withval" = "Xno"; then
++ use_additional=no
++ else
++ if test "X$withval" = "X"; then
++ AC_LIB_WITH_FINAL_PREFIX([
++ eval additional_includedir=\"$includedir\"
++ eval additional_libdir=\"$libdir\"
++ ])
++ else
++ additional_includedir="$withval/include"
++ additional_libdir="$withval/$acl_libdirstem"
++ fi
++ fi
++])
++ dnl Search the library and its dependencies in $additional_libdir and
++ dnl $LDFLAGS. Using breadth-first-seach.
++ LIB[]NAME=
++ LTLIB[]NAME=
++ INC[]NAME=
++ LIB[]NAME[]_PREFIX=
++ rpathdirs=
++ ltrpathdirs=
++ names_already_handled=
++ names_next_round='$1 $2'
++ while test -n "$names_next_round"; do
++ names_this_round="$names_next_round"
++ names_next_round=
++ for name in $names_this_round; do
++ already_handled=
++ for n in $names_already_handled; do
++ if test "$n" = "$name"; then
++ already_handled=yes
++ break
++ fi
++ done
++ if test -z "$already_handled"; then
++ names_already_handled="$names_already_handled $name"
++ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
++ dnl or AC_LIB_HAVE_LINKFLAGS call.
++ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
++ eval value=\"\$HAVE_LIB$uppername\"
++ if test -n "$value"; then
++ if test "$value" = yes; then
++ eval value=\"\$LIB$uppername\"
++ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
++ eval value=\"\$LTLIB$uppername\"
++ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
++ else
++ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
++ dnl that this library doesn't exist. So just drop it.
++ :
++ fi
++ else
++ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
++ dnl and the already constructed $LIBNAME/$LTLIBNAME.
++ found_dir=
++ found_la=
++ found_so=
++ found_a=
++ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
++ if test -n "$acl_shlibext"; then
++ shrext=".$acl_shlibext" # typically: shrext=.so
++ else
++ shrext=
++ fi
++ if test $use_additional = yes; then
++ dir="$additional_libdir"
++ dnl The same code as in the loop below:
++ dnl First look for a shared library.
++ if test -n "$acl_shlibext"; then
++ if test -f "$dir/$libname$shrext"; then
++ found_dir="$dir"
++ found_so="$dir/$libname$shrext"
++ else
++ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
++ ver=`(cd "$dir" && \
++ for f in "$libname$shrext".*; do echo "$f"; done \
++ | sed -e "s,^$libname$shrext\\\\.,," \
++ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
++ | sed 1q ) 2>/dev/null`
++ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
++ found_dir="$dir"
++ found_so="$dir/$libname$shrext.$ver"
++ fi
++ else
++ eval library_names=\"$acl_library_names_spec\"
++ for f in $library_names; do
++ if test -f "$dir/$f"; then
++ found_dir="$dir"
++ found_so="$dir/$f"
++ break
++ fi
++ done
++ fi
++ fi
++ fi
++ dnl Then look for a static library.
++ if test "X$found_dir" = "X"; then
++ if test -f "$dir/$libname.$acl_libext"; then
++ found_dir="$dir"
++ found_a="$dir/$libname.$acl_libext"
++ fi
++ fi
++ if test "X$found_dir" != "X"; then
++ if test -f "$dir/$libname.la"; then
++ found_la="$dir/$libname.la"
++ fi
++ fi
++ fi
++ if test "X$found_dir" = "X"; then
++ for x in $LDFLAGS $LTLIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ case "$x" in
++ -L*)
++ dir=`echo "X$x" | sed -e 's/^X-L//'`
++ dnl First look for a shared library.
++ if test -n "$acl_shlibext"; then
++ if test -f "$dir/$libname$shrext"; then
++ found_dir="$dir"
++ found_so="$dir/$libname$shrext"
++ else
++ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
++ ver=`(cd "$dir" && \
++ for f in "$libname$shrext".*; do echo "$f"; done \
++ | sed -e "s,^$libname$shrext\\\\.,," \
++ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
++ | sed 1q ) 2>/dev/null`
++ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
++ found_dir="$dir"
++ found_so="$dir/$libname$shrext.$ver"
++ fi
++ else
++ eval library_names=\"$acl_library_names_spec\"
++ for f in $library_names; do
++ if test -f "$dir/$f"; then
++ found_dir="$dir"
++ found_so="$dir/$f"
++ break
++ fi
++ done
++ fi
++ fi
++ fi
++ dnl Then look for a static library.
++ if test "X$found_dir" = "X"; then
++ if test -f "$dir/$libname.$acl_libext"; then
++ found_dir="$dir"
++ found_a="$dir/$libname.$acl_libext"
++ fi
++ fi
++ if test "X$found_dir" != "X"; then
++ if test -f "$dir/$libname.la"; then
++ found_la="$dir/$libname.la"
++ fi
++ fi
++ ;;
++ esac
++ if test "X$found_dir" != "X"; then
++ break
++ fi
++ done
++ fi
++ if test "X$found_dir" != "X"; then
++ dnl Found the library.
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
++ if test "X$found_so" != "X"; then
++ dnl Linking with a shared library. We attempt to hardcode its
++ dnl directory into the executable's runpath, unless it's the
++ dnl standard /usr/lib.
++ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
++ dnl No hardcoding is needed.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ dnl Use an explicit option to hardcode DIR into the resulting
++ dnl binary.
++ dnl Potentially add DIR to ltrpathdirs.
++ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
++ haveit=
++ for x in $ltrpathdirs; do
++ if test "X$x" = "X$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ ltrpathdirs="$ltrpathdirs $found_dir"
++ fi
++ dnl The hardcoding into $LIBNAME is system dependent.
++ if test "$acl_hardcode_direct" = yes; then
++ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
++ dnl resulting binary.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
++ dnl Use an explicit option to hardcode DIR into the resulting
++ dnl binary.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ dnl Potentially add DIR to rpathdirs.
++ dnl The rpathdirs will be appended to $LIBNAME at the end.
++ haveit=
++ for x in $rpathdirs; do
++ if test "X$x" = "X$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ rpathdirs="$rpathdirs $found_dir"
++ fi
++ else
++ dnl Rely on "-L$found_dir".
++ dnl But don't add it if it's already contained in the LDFLAGS
++ dnl or the already constructed $LIBNAME
++ haveit=
++ for x in $LDFLAGS $LIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$found_dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
++ fi
++ if test "$acl_hardcode_minus_L" != no; then
++ dnl FIXME: Not sure whether we should use
++ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
++ dnl here.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
++ else
++ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
++ dnl here, because this doesn't fit in flags passed to the
++ dnl compiler. So give up. No hardcoding. This affects only
++ dnl very old systems.
++ dnl FIXME: Not sure whether we should use
++ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
++ dnl here.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
++ fi
++ fi
++ fi
++ fi
++ else
++ if test "X$found_a" != "X"; then
++ dnl Linking with a static library.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
++ else
++ dnl We shouldn't come here, but anyway it's good to have a
++ dnl fallback.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
++ fi
++ fi
++ dnl Assume the include files are nearby.
++ additional_includedir=
++ case "$found_dir" in
++ */$acl_libdirstem | */$acl_libdirstem/)
++ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
++ LIB[]NAME[]_PREFIX="$basedir"
++ additional_includedir="$basedir/include"
++ ;;
++ esac
++ if test "X$additional_includedir" != "X"; then
++ dnl Potentially add $additional_includedir to $INCNAME.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/include,
++ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
++ dnl 3. if it's already present in $CPPFLAGS or the already
++ dnl constructed $INCNAME,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_includedir" != "X/usr/include"; then
++ haveit=
++ if test "X$additional_includedir" = "X/usr/local/include"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ for x in $CPPFLAGS $INC[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-I$additional_includedir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_includedir"; then
++ dnl Really add $additional_includedir to $INCNAME.
++ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
++ fi
++ fi
++ fi
++ fi
++ fi
++ dnl Look for dependencies.
++ if test -n "$found_la"; then
++ dnl Read the .la file. It defines the variables
++ dnl dlname, library_names, old_library, dependency_libs, current,
++ dnl age, revision, installed, dlopen, dlpreopen, libdir.
++ save_libdir="$libdir"
++ case "$found_la" in
++ */* | *\\*) . "$found_la" ;;
++ *) . "./$found_la" ;;
++ esac
++ libdir="$save_libdir"
++ dnl We use only dependency_libs.
++ for dep in $dependency_libs; do
++ case "$dep" in
++ -L*)
++ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
++ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
++ dnl But don't add it
++ dnl 1. if it's the standard /usr/lib,
++ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
++ dnl 3. if it's already present in $LDFLAGS or the already
++ dnl constructed $LIBNAME,
++ dnl 4. if it doesn't exist as a directory.
++ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
++ haveit=
++ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
++ if test -n "$GCC"; then
++ case $host_os in
++ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
++ esac
++ fi
++ fi
++ if test -z "$haveit"; then
++ haveit=
++ for x in $LDFLAGS $LIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$additional_libdir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_libdir"; then
++ dnl Really add $additional_libdir to $LIBNAME.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
++ fi
++ fi
++ haveit=
++ for x in $LDFLAGS $LTLIB[]NAME; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X-L$additional_libdir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ if test -d "$additional_libdir"; then
++ dnl Really add $additional_libdir to $LTLIBNAME.
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
++ fi
++ fi
++ fi
++ fi
++ ;;
++ -R*)
++ dir=`echo "X$dep" | sed -e 's/^X-R//'`
++ if test "$enable_rpath" != no; then
++ dnl Potentially add DIR to rpathdirs.
++ dnl The rpathdirs will be appended to $LIBNAME at the end.
++ haveit=
++ for x in $rpathdirs; do
++ if test "X$x" = "X$dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ rpathdirs="$rpathdirs $dir"
++ fi
++ dnl Potentially add DIR to ltrpathdirs.
++ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
++ haveit=
++ for x in $ltrpathdirs; do
++ if test "X$x" = "X$dir"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ ltrpathdirs="$ltrpathdirs $dir"
++ fi
++ fi
++ ;;
++ -l*)
++ dnl Handle this in the next round.
++ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
++ ;;
++ *.la)
++ dnl Handle this in the next round. Throw away the .la's
++ dnl directory; it is already contained in a preceding -L
++ dnl option.
++ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
++ ;;
++ *)
++ dnl Most likely an immediate library name.
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
++ ;;
++ esac
++ done
++ fi
++ else
++ dnl Didn't find the library; assume it is in the system directories
++ dnl known to the linker and runtime loader. (All the system
++ dnl directories known to the linker should also be known to the
++ dnl runtime loader, otherwise the system is severely misconfigured.)
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
++ fi
++ fi
++ fi
++ done
++ done
++ if test "X$rpathdirs" != "X"; then
++ if test -n "$acl_hardcode_libdir_separator"; then
++ dnl Weird platform: only the last -rpath option counts, the user must
++ dnl pass all path elements in one option. We can arrange that for a
++ dnl single library, but not when more than one $LIBNAMEs are used.
++ alldirs=
++ for found_dir in $rpathdirs; do
++ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
++ done
++ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
++ acl_save_libdir="$libdir"
++ libdir="$alldirs"
++ eval flag=\"$acl_hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
++ else
++ dnl The -rpath options are cumulative.
++ for found_dir in $rpathdirs; do
++ acl_save_libdir="$libdir"
++ libdir="$found_dir"
++ eval flag=\"$acl_hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
++ done
++ fi
++ fi
++ if test "X$ltrpathdirs" != "X"; then
++ dnl When using libtool, the option that works for both libraries and
++ dnl executables is -R. The -R options are cumulative.
++ for found_dir in $ltrpathdirs; do
++ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
++ done
++ fi
++])
++
++dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
++dnl unless already present in VAR.
++dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
++dnl contains two or three consecutive elements that belong together.
++AC_DEFUN([AC_LIB_APPENDTOVAR],
++[
++ for element in [$2]; do
++ haveit=
++ for x in $[$1]; do
++ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
++ if test "X$x" = "X$element"; then
++ haveit=yes
++ break
++ fi
++ done
++ if test -z "$haveit"; then
++ [$1]="${[$1]}${[$1]:+ }$element"
++ fi
++ done
++])
++
++dnl For those cases where a variable contains several -L and -l options
++dnl referring to unknown libraries and directories, this macro determines the
++dnl necessary additional linker options for the runtime path.
++dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
++dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
++dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
++dnl otherwise linking without libtool is assumed.
++AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
++[
++ AC_REQUIRE([AC_LIB_RPATH])
++ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
++ $1=
++ if test "$enable_rpath" != no; then
++ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
++ dnl Use an explicit option to hardcode directories into the resulting
++ dnl binary.
++ rpathdirs=
++ next=
++ for opt in $2; do
++ if test -n "$next"; then
++ dir="$next"
++ dnl No need to hardcode the standard /usr/lib.
++ if test "X$dir" != "X/usr/$acl_libdirstem"; then
++ rpathdirs="$rpathdirs $dir"
++ fi
++ next=
++ else
++ case $opt in
++ -L) next=yes ;;
++ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
++ dnl No need to hardcode the standard /usr/lib.
++ if test "X$dir" != "X/usr/$acl_libdirstem"; then
++ rpathdirs="$rpathdirs $dir"
++ fi
++ next= ;;
++ *) next= ;;
++ esac
++ fi
++ done
++ if test "X$rpathdirs" != "X"; then
++ if test -n ""$3""; then
++ dnl libtool is used for linking. Use -R options.
++ for dir in $rpathdirs; do
++ $1="${$1}${$1:+ }-R$dir"
++ done
++ else
++ dnl The linker is used for linking directly.
++ if test -n "$acl_hardcode_libdir_separator"; then
++ dnl Weird platform: only the last -rpath option counts, the user
++ dnl must pass all path elements in one option.
++ alldirs=
++ for dir in $rpathdirs; do
++ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
++ done
++ acl_save_libdir="$libdir"
++ libdir="$alldirs"
++ eval flag=\"$acl_hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ $1="$flag"
++ else
++ dnl The -rpath options are cumulative.
++ for dir in $rpathdirs; do
++ acl_save_libdir="$libdir"
++ libdir="$dir"
++ eval flag=\"$acl_hardcode_libdir_flag_spec\"
++ libdir="$acl_save_libdir"
++ $1="${$1}${$1:+ }$flag"
++ done
++ fi
++ fi
++ fi
++ fi
++ fi
++ AC_SUBST([$1])
++])
+Index: libftdi-0.13/src/Makefile.am
+===================================================================
+--- libftdi-0.13.orig/src/Makefile.am 2008-06-13 10:28:53.000000000 +0200
++++ libftdi-0.13/src/Makefile.am 2008-07-18 14:35:52.713438346 +0200
+@@ -10,4 +10,4 @@
+ # Note: If you specify a:b:c as the version in the next line,
+ # the library that is made has version (a-c).c.b. In this
+ # example, the version is 2.1.2. (3:2:1)
+-libftdi_la_LDFLAGS = -version-info 14:0:13 $(all_libraries)
++libftdi_la_LDFLAGS = -version-info 14:0:13 $(all_libraries) @LIBUSB_LIBS@
diff --git a/packages/libftdi/libftdi-native_0.13.bb b/packages/libftdi/libftdi-native_0.13.bb
new file mode 100644
index 0000000000..24f82778e5
--- /dev/null
+++ b/packages/libftdi/libftdi-native_0.13.bb
@@ -0,0 +1,5 @@
+require libftdi_${PV}.bb
+
+inherit native
+
+DEPENDS = "libusb-native"
diff --git a/packages/libftdi/libftdi_0.13.bb b/packages/libftdi/libftdi_0.13.bb
new file mode 100644
index 0000000000..3e787ca512
--- /dev/null
+++ b/packages/libftdi/libftdi_0.13.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "libftdi is a library to talk to FTDI chips.\
+FT232BM/245BM, FT2232C/D and FT232/245R using libusb,\
+including the popular bitbang mode."
+HOMEPAGE = "http://www.intra2net.com/de/produkte/opensource/ftdi/"
+LICENSE = "LGPL"
+SECTION = "libs"
+
+DEPENDS = "libusb"
+
+SRC_URI = "http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-${PV}.tar.gz \
+ file://autotools.patch;patch=1 \
+ "
+
+inherit autotools binconfig pkgconfig
+
+EXTRA_OECONF += "--disable-rpath"
+
+do_stage() {
+ autotools_stage_all
+}