Roozbeh,
I am not particularly familiar with glib, but I have some
experience with autoconf.
I have done this in the past by using the AC_REPLACE_FUNCS()
to build a library with replacement code (replace/libreplace.a).
First try to add glib to the libraries list for linking using
something like:
AC_CHECK_LIB(glib, open)
Then call AC_REPLACE_FUNCS() with the list of functions you are
calling, e.g.
AC_REPLACE_FUNCS(strlcpy strlcat getopt)
Autoconf will try to link each of the functions. If a function
is not found, an object called func.o will be added to LIBOBJS.
If it is found, a preprocessor macro like HAVE_FUNC will be defined.
Make a directory for the replacement code (I use "replace").
Put each replacement function in a file with the same name, e.g.
strlcat.c. Use a Makefile.am file like this to generate the library:
INTAINERCLEANFILES = Makefile.in
INCLUDES = -I$(top_builddir) -I$(top_srcdir)
noinst_LIBRARIES = libreplace.a
libreplace_a_SOURCES =
libreplace_a_LIBADD = @LIBOBJS@
Then add replace/libreplace to the top level Makefile.am, e.g.
SUBDIRS = replace .
INCLUDES = -I$(top_builddir) -I$(top_srcdir) \
-I$(top_builddir)/replace -I$(top_srcdir)/replace
libfribidi_la_LIBADD = $(GLIB_LIBS) \
$(top_builddir)/replace/libreplace.a
I highly recommend the book "GNU Autoconf, Automake, and Libtool".
It is available on the web here:
http://sources.redhat.com/autobook/
If you like, I could try to patch things to add this stuff.
But I don't have any machines without glib, so it is a bit
difficult for me to test :-)
Regards,
Jake
--- Roozbeh Pournader <[EMAIL PROTECTED]> wrote:
>
> Dear friends,
>
> We need help regarding removing the glib dependency in FriBidi. We
> have
> the replacement code, but do not know autoconf enough to use that
> code if
> glib was not available. Would someone please help?
>
> --roozbeh
>
> -
> Linux-UTF8: i18n of Linux on all levels
> Archive: http://mail.nl.linux.org/lists/
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/