_set_fmode?

Charles Wilson cygwin@cwilson.fastmail.fm
Tue Mar 24 03:02:00 GMT 2009


Charles Wilson wrote:

> Hmm...that autoconfery might work and be blessed upstream (but I need to
> add the value to a custom var, not LIBS, because I don't want the
> libarchive dll linked with it; just the bsdtar and bsdcpio apps. But
> that should be easy to accomplish.

FWIW, the attached is what I ended up doing for libarchive. It should
work for cross-compiling to cygwin, as well as native. I borrowed a page
from libtool, and extracted the library search path from the compiler --
then manually searched those directories for binmode.o.

In Makefile.am:

-bsdtar_LDADD= libarchive.la
+bsdtar_LDADD= libarchive.la @PROG_LDADD_EXTRA@

(and more like that)

In configure.ac:

#
# Locate some specific link objects for cygwin
#
LA_SYS_LIB_SEARCH_PATH
prog_ldadd_extra=
case "$host_os" in
*cygwin*)
  for la_sys_path in $la_sys_lib_search_path_spec; do
    if test -f $la_sys_path/binmode.o ; then
      prog_ldadd_extra=$la_sys_path/binmode.o
      break
    fi
  done
  ;;
esac
PROG_LDADD_EXTRA=$prog_ldadd_extra
AC_SUBST(PROG_LDADD_EXTRA)

where LA_SYS_LIB_SEARCH_PATH ("LA" for "libarchive") is attached.

--
Chuck

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: la_syslibsearchpath.m4
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090324/04379bbf/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list