This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mkdll.sh


Harold Hunt wrote:

 > Chuck,
 >
 > Could you give a few more notes on "relibtoolize"?  A pointer to some 
good
 > documentation would be helpful...


Well, there's the goat book http://sources.redhat.com/autobook/ but it's 
a bit out of date, now...

Here's the procedure I used to "relibtoolize" libiconv.  Libiconv is a 
worst-case example: they distribute their own fork of autoconf itself, 
they redistribute system m4 macros, ... they're just plain evil.  But, 
if you can understand *this*, then "relibtoolizing" anything else should 
be a piece of cake...

Short version: remove autogenerated files.  Replace "standard" files 
with the newest versions (install-sh, mkinstalldirs, config.guess, 
config.sub) -- you can also just remove these and let the autotools copy 
in what they need (use the --force --c -a switches, or their analog: not 
every tool has exactly the same syntax).  Rerun the the autotools in the 
proper order (more later).

#1) libiconv actually ships its OWN VERSION of autoconf.  This is dumb.

rm autoconf/acgeneral.m4
rm autoconf/acspecific.m4
rm autoconf/aclocal.m4
rm autoconf/autoconf
rm autoconf/autoconf.m4
rm autoconf/mbstate_t.m4

#2) remove the "normal" distribution files that are created by autoconf.

rm autoconf/install-sh
rm autoconf/config.guess
rm autoconf/config.sub
rm configure

#3) remove the obsolete libtool files (libtool no longer uses "ltmain.sh")

rm autoconf/ltmain.sh

#4) I don't like hiding the autofiles, so I removed the subdir and will 
change configure.in appropriately, but you don't have to do that.

rmdir autoconf

#5) libiconv doesn't use automake, but it does distribute some scripts 
from automake.  Replace them with the current versions.  (Actually, 
libiconv only distributed install-sh; it used the mkinstalldirs from the 
libcharset subdirectory, "proper" auto* usage requires that each 
separately configure project have its own copy...and of course, I put 
install-sh in the top directory, libiconv had it in the autoconf subdir)

cp /usr/autotool/devel/share/automake/mkinstalldirs .
cp /usr/autotool/devel/share/automake/install-sh .

#6) repeat steps 1-4 for the libcharset subdirectory.  Normally, this is 
unnecessary, but libiconv actually treats libcharset as a separate 
project, with it's own configure script and suchlike...

rm libcharset/autoconf/aclocal.m4
rm libcharset/autoconf/mkinstalldirs
rm libcharset/autoconf/install-sh
rm libcharset/autoconf/config.guess
rm libcharset/autoconf/config.sub
rm libcharset/autoconf/ltmain.sh
rm libcharset/configure
rmdir libcharset/autoconf

#7) libcharset also includes its own copies of some .m4 scripts that are 
part of gettext.  Use the system ones.

rm libcharset/m4/codeset.m4
rm libcharset/m4/glibc21.m4

#8) AND we're going to use the system libtool...and cleanup.

rm libcharset/m4/libtool.m4
rm libcharset/m4/ChangeLog
rmdir libcharset/m4

#9) Similar to step #5, replace the "automake" files with the latest 
version (even though libcharset doesn't use automake...).  Both 
mkinstalldirs and install-sh WERE in the autoconf subdir of libcharset; 
I put them in the top level (of libcharset).  Each separately configured 
project needs its own copy...

cp /usr/autotool/devel/share/automake/mkinstalldirs libcharset/
cp /usr/autotool/devel/share/automake/install-sh libcharset/

#10) As promised, I need to change a few items in configure.in (e.g. 
don't use the "autoconf" subdir (or libcharset/autoconf or 
libcharset/m4).  Also, since the "special" versions of the autoconf 
files that libiconv distributes were slightly modified -- okay, they 
were distributing a fork -- I parsed out the differences they had, and 
put those macros into acinclude.m4...

The patch is attached.

The patch also AC_PREREQ's 2.52 instead of 2.13 (I want to use the 
-devel tree), but that required a few other changes due to 
incompatibilities (AC_OUTPUT_SUBDIRS ---> AC_CONFIG_SUBDIRS, etc)

Normally, you'd also re-run autoheader at some point, but that didn't 
work (thanks to the fact that libiconv uses a forked autoconf dist...) 
So I patched libcharset/config.h.in by hand...

#11) Okay, here's the meat:  First, we relibtoolize libcharset:

cd libcharset
aclocal
libtoolize -c -f
aclocal # (again)
autoconf

cd <topsrc>
aclocal
libtoolize -c -f
aclocal # (again)
autoconf

Why the second aclocal step?  Because libtoolize adds additional stuff 
in configure.in, which require additional macros to be pulled into 
aclocal.m4.  Why not run libtoolize first, and then aclocal?  Because 
libtoolize needs a pre-existing aclocal.m4...

Normally, you'd run "automake -a -c" between the second aclocal and 
autoconf, but libiconv doesn't use automake.  Also, you'd normally run 
autoheader after the second aclocal -- but we can't because libiconv sucks.

Finally, you should be able to configure and make as "normal":

conf() {
   (cd ${objdir} && \
   ${srcdir}/configure --build=${host} --target=${target} \
   --srcdir=${srcdir} --prefix=${prefix} \
   --exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
   --libdir=${prefix}/lib --includedir=${prefix}/include \
   --enable-shared --enable-static )
}


 > Is the general idea here that I would just be working on the config files
 > and makefiles, rather than having to make extensive internal changes 
to the
 > way that libraries are loaded?


Yes.

--Chuck


Harold Hunt wrote:

> Chuck,
> 
> Could you give a few more notes on "relibtoolize"?  A pointer to some good
> documentation would be helpful...
> 
> Is the general idea here that I would just be working on the config files
> and makefiles, rather than having to make extensive internal changes to the
> way that libraries are loaded?
> 
> Harold
> 
> 
>>-----Original Message-----
>>From: cygwin-xfree-owner@cygwin.com
>>[mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Charles Wilson
>>Sent: Tuesday, April 30, 2002 2:48 AM
>>To: cygwin-xfree@cygwin.com
>>Cc: cygx
>>Subject: Re: mkdll.sh
>>
>>
>>You could probably do the following:
>>
>>get rid of mkdll.sh
>>relibtoolize/autoconf using the "-devel" tools (e.g. make sure that
>>configure.in has "AC_PREREQ(2.52)")
>>
>>./configure; make;
>>
>>It oughta work. </famous last words>
>>
>>--chuck
>>
>>
>>Harold Hunt wrote:
>>
>>
>>>Steve,
>>>
>>>I'm working on creating Cygwin setup.exe packages for Gnome...
>>>
>>I know, it's
>>
>>>buggy but I'd like to get a start.  One problem I'm having with
>>>
>>your patches
>>
>>>is that they use mkdll.sh but they don't cause configure to
>>>
>>copy the file to
>>
>>>a build directory.
>>>
>>>For example:
>>>
>>>tar xzf glib-1.2.10.tar.gz
>>>cd glib-1.2.10
>>>patch -p1 < ../glib-1.2.10-cygwin.patch
>>>mkdir build
>>>cd build
>>>../configure
>>>[yada yada yada]
>>>make
>>>[yada yada yada]
>>>mkdir .libs
>>>ar cru .libs/libglib.a  garray.o gcache.o gcompletion.o
>>>
>>gdataset.o gdate.o
>>
>>>gerro
>>>r.o ghash.o ghook.o giochannel.o giounix.o glist.o gmain.o gmem.o
>>>gmessages.o gm
>>>utex.o gnode.o gprimes.o grel.o gscanner.o gslist.o gstrfuncs.o
>>>
>>gstring.o
>>
>>>gtimer
>>>.o gtree.o gutils.o
>>>ranlib .libs/libglib.a
>>>creating libglib.la
>>>(cd .libs && rm -f libglib.la && ln -s ../libglib.la libglib.la)
>>>cd .libs && PREFIX=/usr sh ../mkdll.sh libglib.la
>>>../mkdll.sh: Can't open ../mkdll.sh: No such file or directory
>>>make[2]: *** [libglib.la] Error 2
>>>make[2]: Leaving directory
>>>`/home/Administrator/x-devel/gnome/glib/tmp/glib-1.2.
>>>10/.build'
>>>make[1]: *** [all-recursive] Error 1
>>>make[1]: Leaving directory
>>>`/home/Administrator/x-devel/gnome/glib/tmp/glib-1.2.
>>>10/.build'
>>>make: *** [all-recursive-am] Error 2
>>>
>>>
>>>Eventually I always reach a point where mkdll.sh can't be found because
>>>configure didn't copy it to the out-of-the-tree build directory.
>>>
>>>Got any ideas on how to fix this?
>>>
>>>Harold
>>>
>>>
>>>
>>>
>>
>>
> 

diff -urN libiconv-1.7-orig/CYGWIN-PATCHES/libiconv.README libiconv-1.7/CYGWIN-PATCHES/libiconv.README
--- libiconv-1.7-orig/CYGWIN-PATCHES/libiconv.README	Wed Dec 31 19:00:00 1969
+++ libiconv-1.7/CYGWIN-PATCHES/libiconv.README	Mon Feb  4 18:46:11 2002
@@ -0,0 +1 @@
+placeholder
diff -urN libiconv-1.7-orig/acinclude.m4 libiconv-1.7/acinclude.m4
--- libiconv-1.7-orig/acinclude.m4	Wed Dec 31 19:00:00 1969
+++ libiconv-1.7/acinclude.m4	Mon Feb  4 18:48:03 2002
@@ -0,0 +1,363 @@
+dnl local autoconf macros
+dnl Bruno Haible 2001-02-04
+dnl Marcus Daniels 1997-04-10
+dnl
+AC_PREREQ(2.50)dnl
+dnl
+dnl without AC_MSG_...:   with AC_MSG_... and caching:
+dnl   AC_TRY_CPP          CL_CPP_CHECK
+dnl   AC_TRY_COMPILE      CL_COMPILE_CHECK
+dnl   AC_TRY_LINK         CL_LINK_CHECK
+dnl   AC_TRY_RUN          CL_RUN_CHECK - would require cross-compiling support
+dnl Usage:
+dnl AC_TRY_CPP(INCLUDES,
+dnl            ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
+dnl              INCLUDES,
+dnl              ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
+dnl            ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
+dnl              INCLUDES, FUNCTION-BODY,
+dnl              ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+dnl
+define(CL_CPP_CHECK,
+[AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL($2,[
+AC_TRY_CPP([$3], $2=yes, $2=no)
+])
+AC_MSG_RESULT([$]$2)
+if test [$]$2 = yes; then
+  ifelse([$4], , :, [$4])
+ifelse([$5], , , [else
+  $5
+])dnl
+fi
+])dnl
+dnl
+define(CL_COMPILE_CHECK,
+[AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL($2,[
+AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
+])
+AC_MSG_RESULT([$]$2)
+if test [$]$2 = yes; then
+  ifelse([$5], , :, [$5])
+ifelse([$6], , , [else
+  $6
+])dnl
+fi
+])dnl
+dnl
+define(CL_LINK_CHECK,
+[AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL($2,[
+AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
+])
+AC_MSG_RESULT([$]$2)
+if test [$]$2 = yes; then
+  ifelse([$5], , :, [$5])
+ifelse([$6], , , [else
+  $6
+])dnl
+fi
+])dnl
+dnl
+dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
+define(CL_PROTO,
+[AC_MSG_CHECKING([for $1 declaration])
+AC_CACHE_VAL(cl_cv_proto_[$1], [$2
+cl_cv_proto_$1="$3"])
+cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
+AC_MSG_RESULTPROTO([$]cl_cv_proto_$1)
+])dnl
+dnl
+dnl CL_PROTO_RET(INCLUDES, DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
+define(CL_PROTO_RET,
+[AC_TRY_COMPILE([$1]
+AC_LANG_EXTERN[$2
+], [], $3="$4", $3="$5")
+])dnl
+dnl
+dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
+define(CL_PROTO_TRY,
+[AC_TRY_COMPILE([$1]
+AC_LANG_EXTERN
+[#if defined(__STDC__) || defined(__cplusplus)
+$2
+#else
+$3
+#endif
+], [], [$4], [$5])
+])dnl
+dnl
+dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
+define(CL_PROTO_CONST,
+[CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
+)dnl
+dnl
+dnl CL_SILENT(ACTION)
+dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
+define(CL_SILENT,
+[pushdef([AC_MSG_CHECKING],[:])dnl
+pushdef([AC_CHECKING],[:])dnl
+pushdef([AC_MSG_RESULT],[:])dnl
+pushdef([AC_MSG_RESULTPROTO],[:])dnl
+$1[]dnl
+popdef([AC_MSG_RESULTPROTO])dnl
+popdef([AC_MSG_RESULT])dnl
+popdef([AC_CHECKING])dnl
+popdef([AC_MSG_CHECKING])dnl
+])dnl
+dnl
+AC_DEFUN(CL_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])dnl
+dnl
+AC_DEFUN(CL_PROG_INSTALL,
+[dnl This is mostly copied from AC_PROG_INSTALL.
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+AC_MSG_CHECKING(for a BSD compatible install)
+if test -z "$INSTALL"; then
+AC_CACHE_VAL(cl_cv_path_install,
+[  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      for ac_prog in ginstall installbsd scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    # OSF/1 installbsd also uses dspmsg, but is usable.
+	    :
+	  else
+	    if test $ac_prog = installbsd &&
+	      grep src/bos $ac_dir/$ac_prog >/dev/null 2>&1; then
+	      # AIX installbsd doesn't work without option "-g".
+	      :
+	    else
+	      cl_cv_path_install="$ac_dir/$ac_prog -c"
+	      break 2
+	    fi
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_ifs"
+  # As a last resort, use cp.
+  test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
+])dnl
+  INSTALL="$cl_cv_path_install"
+fi
+dnl We do special magic for INSTALL instead of AC_SUBST, to get
+dnl relative paths right. 
+AC_MSG_RESULT($INSTALL)
+AC_SUBST(INSTALL)dnl
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
+AC_SUBST(INSTALL_PROGRAM)dnl
+if test -z "$INSTALL_DATA"; then
+  case "$INSTALL" in
+    cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
+    * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
+  esac
+fi
+AC_SUBST(INSTALL_DATA)dnl
+])dnl
+dnl
+AC_DEFUN(CL_PROG_CP,
+[AC_CACHE_CHECK(how to copy files, cl_cv_prog_cp, [
+echo "blabla" > conftest.x
+err=`/bin/sh -c "cp -p conftest.x conftest.y 2>&1"`
+if test -z "$err"; then
+  cl_cv_prog_cp='cp -p'
+else
+  cl_cv_prog_cp='cp'
+fi
+rm -f conftest*
+])
+CP="$cl_cv_prog_cp"
+AC_SUBST(CP)dnl
+])dnl
+dnl
+AC_DEFUN(CL_PROG_LN,
+[AC_REQUIRE([CL_PROG_CP])dnl
+AC_CACHE_CHECK(how to make hard links, cl_cv_prog_LN, [
+rm -f conftestdata conftestfile
+echo data > conftestfile
+if ln conftestfile conftestdata 2>/dev/null; then
+  cl_cv_prog_LN=ln
+else
+  cl_cv_prog_LN="$cl_cv_prog_cp"
+fi
+rm -f conftestdata conftestfile
+])
+LN="$cl_cv_prog_LN"
+AC_SUBST(LN)dnl
+])dnl
+dnl
+AC_DEFUN(CL_PROG_LN_S,
+[AC_REQUIRE([CL_PROG_LN])dnl
+dnl Make a symlink if possible; otherwise try a hard link. On filesystems
+dnl which support neither symlink nor hard link, use a plain copy.
+AC_MSG_CHECKING(whether ln -s works)
+AC_CACHE_VAL(cl_cv_prog_LN_S, [
+rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null; then
+  cl_cv_prog_LN_S="ln -s"
+else
+  cl_cv_prog_LN_S="$cl_cv_prog_LN"
+fi
+rm -f conftestdata
+])dnl
+if test "$cl_cv_prog_LN_S" = "ln -s"; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+LN_S="$cl_cv_prog_LN_S"
+AC_SUBST(LN_S)dnl
+])dnl
+dnl
+AC_DEFUN(CL_ICONV,
+[dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+dnl those with the standalone libiconv installed).
+AC_CACHE_CHECK(for iconv, cl_cv_func_iconv, [
+cl_cv_func_iconv=no
+cl_cv_lib_iconv=no
+AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);],
+cl_cv_func_iconv=yes)
+if test "$cl_cv_func_iconv" = no; then
+cl_save_LIBS="$LIBS"
+LIBS="$LIBS -liconv"
+AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);],
+cl_cv_lib_iconv=yes
+cl_cv_func_iconv=yes)
+LIBS="$cl_save_LIBS"
+fi
+])
+if test "$cl_cv_func_iconv" = yes; then
+  AC_DEFINE(HAVE_ICONV)
+CL_PROTO([iconv], [
+CL_PROTO_CONST([
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <iconv.h>
+], [size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);],
+[size_t iconv();],
+cl_cv_proto_iconv_arg1)],
+[extern size_t iconv (iconv_t cd, $cl_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);])
+AC_DEFINE_UNQUOTED(ICONV_CONST,$cl_cv_proto_iconv_arg1)
+fi
+LIBICONV=
+if test "$cl_cv_lib_iconv" = yes; then
+  LIBICONV="-liconv"
+fi
+AC_SUBST(LIBICONV)
+])dnl
+dnl
+AC_DEFUN(CL_WORDS_LITTLEENDIAN,
+[AC_CACHE_CHECK(byte ordering, cl_cv_sys_endian, [
+AC_TRY_RUN([int main () {
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[0] == 1);
+}],
+cl_cv_sys_endian="big endian",
+cl_cv_sys_endian="little endian",
+: # must guess the endianness
+)
+if test -z "$cl_cv_sys_endian"; then
+AC_EGREP_CPP(yes,[#if defined(m68k) || defined(__m68k__) || defined(mc68000) || defined(mc68020) || defined(__mc68020__) || defined(sparc) || defined(__sparc__) || defined(MIPSEB) || defined(__MIPSEB__) || defined(hppa) || defined(__hppa) || defined(m88000) || defined(__m88k__)
+  yes
+#endif
+], cl_cv_sys_endian="big endian")
+fi
+if test -z "$cl_cv_sys_endian"; then
+AC_EGREP_CPP(yes,[#if defined(i386) || defined(__i386) || defined(__i386__) || defined(_I386) || defined(MIPSEL) || defined(__MIPSEL__) || defined(__alpha)
+  yes
+#endif
+], cl_cv_sys_endian="little endian")
+fi
+if test -z "$cl_cv_sys_endian"; then
+cl_cv_sys_endian="guessing little endian"
+fi
+])
+case "$cl_cv_sys_endian" in
+  *little*) AC_DEFINE(WORDS_LITTLEENDIAN) ;;
+  *big*)    ;;
+esac
+])dnl
+dnl
+
+dnl Expands to the "extern ..." prefix used for system declarations.
+dnl AC_LANG_EXTERN()
+define(AC_LANG_EXTERN,
+[extern
+#ifdef __cplusplus
+"C"
+#endif
+])
+
+dnl AC_MSG_RESULTPROTO(RESULT-PROTOTYPE-DESCRIPTION)
+define(AC_MSG_RESULTPROTO,
+[AC_MSG_RESULT(${ac_tt}[$1])
+dnl ac_proto=`echo "$1" | tr -s ' '`
+dnl AC_MSG_RESULT(${ac_tt}${ac_proto})
+])
+
+# serial 8
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# Include stdlib.h first, because otherwise this test would fail on Linux
+# (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
+# a syntax error in wchar.h due to the use of undefined __int32_t.
+
+AC_DEFUN(AC_MBSTATE_T,
+  [
+   AC_CHECK_HEADERS(stdlib.h)
+
+   AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
+    [AC_TRY_COMPILE([
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#include <wchar.h>],
+      [mbstate_t x; return sizeof x;],
+      ac_cv_type_mbstate_t=yes,
+      ac_cv_type_mbstate_t=no)])
+   if test $ac_cv_type_mbstate_t = no; then
+     AC_DEFINE(mbstate_t, int,
+	       [Define to a type if <wchar.h> does not define.])
+   fi])
diff -urN libiconv-1.7-orig/configure.in libiconv-1.7/configure.in
--- libiconv-1.7-orig/configure.in	Mon Feb  4 18:37:45 2002
+++ libiconv-1.7/configure.in	Mon Feb  4 18:49:51 2002
@@ -16,10 +16,9 @@
 dnl If not, write to the Free Software Foundation, Inc., 59 Temple Place -
 dnl Suite 330, Boston, MA 02111-1307, USA.  */
 
-AC_PREREQ(2.13)
+AC_PREREQ(2.50)
 
 AC_INIT(lib/iconv.c)
-AC_CONFIG_AUX_DIR(autoconf)
 AC_CONFIG_HEADER(lib/config.h)
 AC_PROG_MAKE_SET
 
@@ -36,7 +35,7 @@
 
 dnl           check for host type
 
-CL_CANONICAL_HOST(autoconf)
+AC_CANONICAL_HOST
 
 dnl           checks for UNIX variants that set DEFS
 
@@ -99,5 +98,5 @@
 else
   TESTS_MAKEFILE=""
 fi
+AC_CONFIG_SUBDIRS(libcharset)
 AC_OUTPUT(Makefile lib/Makefile src/Makefile man/Makefile ${TESTS_MAKEFILE} include/iconv.h)
-AC_OUTPUT_SUBDIRS(libcharset)
diff -urN libiconv-1.7-orig/libcharset/Makefile.in libiconv-1.7/libcharset/Makefile.in
--- libiconv-1.7-orig/libcharset/Makefile.in	Mon Feb  4 18:38:07 2002
+++ libiconv-1.7/libcharset/Makefile.in	Mon Feb  4 18:41:07 2002
@@ -22,7 +22,7 @@
 # Programs used by "make install":
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = $(SHELL) $(srcdir)/autoconf/mkinstalldirs
+MKINSTALLDIRS = $(SHELL) $(srcdir)/mkinstalldirs
 
 #### End of system configuration section. ####
 
diff -urN libiconv-1.7-orig/libcharset/acinclude.m4 libiconv-1.7/libcharset/acinclude.m4
--- libiconv-1.7-orig/libcharset/acinclude.m4	Wed Dec 31 19:00:00 1969
+++ libiconv-1.7/libcharset/acinclude.m4	Mon Jul 23 02:30:25 2001
@@ -0,0 +1,51 @@
+# The next line was added by Bruno Haible 2001-06-08.
+builtin([undefine],[symbols])
+
+#serial 2
+
+dnl From Bruno Haible.
+
+AC_DEFUN(jm_LANGINFO_CODESET,
+[
+  AC_CHECK_HEADERS(langinfo.h)
+  AC_CHECK_FUNCS(nl_langinfo)
+
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      jm_cv_langinfo_codeset=yes,
+      jm_cv_langinfo_codeset=no)
+    ])
+  if test $jm_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
+
+#serial 2
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN(jm_GLIBC21,
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+	[
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+	],
+	ac_cv_gnu_library_2_1=yes,
+	ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
+
diff -urN libiconv-1.7-orig/libcharset/config.h.in libiconv-1.7/libcharset/config.h.in
--- libiconv-1.7-orig/libcharset/config.h.in	Mon Feb  4 18:38:23 2002
+++ libiconv-1.7/libcharset/config.h.in	Mon Feb  4 18:41:07 2002
@@ -1,43 +1,42 @@
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
 
-/* Define if on AIX 3.
-   System headers sometimes define this.
-   We just want to avoid a redefinition error message.  */
-#ifndef _ALL_SOURCE
-#undef _ALL_SOURCE
-#endif
-
-/* Define if on MINIX.  */
-#undef _MINIX
+/* Define if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
 
-/* Define if the system does not provide POSIX.1 features except
-   with this defined.  */
-#undef _POSIX_1_SOURCE
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
 
-/* Define if you need to in order for stat and other things to work.  */
-#undef _POSIX_SOURCE
+/* Define if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
 
-/* Define if you have the nl_langinfo function.  */
+/* Define if you have the `nl_langinfo' function. */
 #undef HAVE_NL_LANGINFO
 
-/* Define if you have the setlocale function.  */
+/* Define if you have the `setlocale' function. */
 #undef HAVE_SETLOCALE
 
-/* Define if you have the <dlfcn.h> header file.  */
-#undef HAVE_DLFCN_H
-
-/* Define if you have the <langinfo.h> header file.  */
-#undef HAVE_LANGINFO_H
-
-/* Define if you have the <stddef.h> header file.  */
+/* Define if you have the <stddef.h> header file. */
 #undef HAVE_STDDEF_H
 
-/* Define if you have the <stdlib.h> header file.  */
+/* Define if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define if you have the <string.h> header file.  */
+/* Define if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-#undef HAVE_LANGINFO_CODESET
+/* Define if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Define if on MINIX. */
+#undef _MINIX
 
+/* Define if the system does not provide POSIX.1 features except with this
+   defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
diff -urN libiconv-1.7-orig/libcharset/configure.in libiconv-1.7/libcharset/configure.in
--- libiconv-1.7-orig/libcharset/configure.in	Mon Feb  4 18:38:32 2002
+++ libiconv-1.7/libcharset/configure.in	Mon Feb  4 18:50:19 2002
@@ -16,10 +16,9 @@
 dnl write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 dnl Boston, MA 02111-1307, USA.
 
-AC_PREREQ(2.13)
+AC_PREREQ(2.50)
 
 AC_INIT(lib/localcharset.c)
-AC_CONFIG_AUX_DIR(autoconf)
 AC_CONFIG_HEADER(config.h)
 AC_PROG_MAKE_SET
 PACKAGE=libcharset
diff -urN libiconv-1.7-orig/libcharset/lib/Makefile.in libiconv-1.7/libcharset/lib/Makefile.in
--- libiconv-1.7-orig/libcharset/lib/Makefile.in	Mon Feb  4 18:39:08 2002
+++ libiconv-1.7/libcharset/lib/Makefile.in	Mon Feb  4 19:15:28 2002
@@ -27,7 +27,7 @@
 # Programs used by "make install":
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = $(SHELL) $(srcdir)/../autoconf/mkinstalldirs
+MKINSTALLDIRS = $(SHELL) $(srcdir)/../mkinstalldirs
 
 #### End of system configuration section. ####
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]