Converted to separate package.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 21 Dec 2002 19:05:49 +0000 (19:05 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 21 Dec 2002 19:05:49 +0000 (19:05 +0000)
Changed license to LGPL (instead of public domain).

utf8/.cvsignore
utf8/AUTHORS [new file with mode: 0644]
utf8/ChangeLog [new file with mode: 0644]
utf8/NEWS [new file with mode: 0644]
utf8/acinclude.m4 [new file with mode: 0644]
utf8/configure.in [new file with mode: 0644]
utf8/utf8-convert.c
utf8/utf8-locale.c
utf8/utf8.c
utf8/utf8tools.h

index 70845e08eb0b807b1022dc47cd27e67f726d4a0f..77d059eee1e50923ae1b8acfbb604ec3130db5a9 100644 (file)
@@ -1 +1,6 @@
+aclocal.m4
+configure
+config.h.in
 Makefile.in
 Makefile.in
+stamp-h.in
+README
diff --git a/utf8/AUTHORS b/utf8/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/utf8/ChangeLog b/utf8/ChangeLog
new file mode 100644 (file)
index 0000000..23d8cff
--- /dev/null
@@ -0,0 +1,4 @@
+2002-12-21  Peter Verthez  <Peter.Verthez@advalvas.be>
+
+       * libutf8 is now separate package (changed license to LGPL).
+
diff --git a/utf8/NEWS b/utf8/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/utf8/acinclude.m4 b/utf8/acinclude.m4
new file mode 100644 (file)
index 0000000..c23e485
--- /dev/null
@@ -0,0 +1,52 @@
+dnl $Id$
+dnl $Name$
+
+dnl From codeset.m4 (in libcharset):
+#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
+])
+
+dnl From glibc21.m4 (in libcharset):
+#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 --git a/utf8/configure.in b/utf8/configure.in
new file mode 100644 (file)
index 0000000..9967fe0
--- /dev/null
@@ -0,0 +1,92 @@
+# Process this file with autoconf to produce a configure script.
+# $Id$
+# $Name$
+AC_INIT(utf8.c)
+
+dnl =============================================================
+dnl Global variables
+NAME=libutf8tools
+AC_SUBST(NAME)
+
+VERSION=0.1
+AC_SUBST(VERSION)
+
+LIBVERSION=0:1
+AC_SUBST(LIBVERSION)
+
+SHELL=/bin/sh
+AC_SUBST(SHELL)
+
+dnl =============================================================
+AM_INIT_AUTOMAKE(${NAME},${VERSION})
+AM_CONFIG_HEADER(config.h)
+
+AC_CANONICAL_HOST
+
+EXTRA_CFLAGS=""
+
+AC_ARG_ENABLE(debug,
+[  --enable-debug          Compilation flags to allow debugging [default=yes]],
+  if test $enableval == "yes"
+  then
+    EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
+  fi,
+  EXTRA_CFLAGS="-g $EXTRA_CFLAGS"
+)
+
+AC_SUBST(EXTRA_CFLAGS)
+
+dnl =============================================================
+dnl Checks for programs.
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_PROG_AWK
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+dnl =============================================================
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF(void *, 4)
+
+
+dnl ==========================================================
+dnl Checks for library functions.
+AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
+AC_CHECK_FUNCS(setlocale vsnprintf vsprintf)
+jm_LANGINFO_CODESET
+jm_GLIBC21
+
+dnl ==========================================================
+dnl My local stuff
+
+AM_ICONV
+if test "$am_cv_func_iconv" != yes; then
+  AC_MSG_ERROR([
+*******************************************************************************
+You need 'iconv' (with features comparable to what is in glibc 2.2) to use this
+library, consider installing GNU libiconv or use --with-libiconv-prefix to
+point to an existing installation of that library (see README)
+*******************************************************************************
+  ])
+fi
+
+AC_MSG_CHECKING(for location of iconv)
+if test "$am_cv_lib_iconv" = yes; then
+  AC_MSG_RESULT(libiconv)
+else
+  AC_MSG_RESULT(libc)
+  LCS_SUBDIRS=libcharset
+  LCS_INCLUDES='-I $(srcdir)/libcharset'
+  LCS_LIBADD=libcharset/libcharset.la
+  AC_SUBST(LCS_SUBDIRS)
+  AC_SUBST(LCS_INCLUDES)
+  AC_SUBST(LCS_LIBADD)
+fi
+
+AC_OUTPUT(Makefile
+         libcharset/Makefile)
index c7094b5a7da0038aa4d51e6809376e0714fee9d3..9dbfaf50e8b15d1ca03613e458faa07ca0913f01 100644 (file)
@@ -1,9 +1,20 @@
 /* Encoding utility from UTF-8 to another charset and vice versa
    Copyright (C) 2001, 2002 Peter Verthez
 
 /* Encoding utility from UTF-8 to another charset and vice versa
    Copyright (C) 2001, 2002 Peter Verthez
 
-   Permission granted to do anything with this file that you want, as long
-   as the above copyright is retained in all copies.
-   THERE IS NO WARRANTY - USE AT YOUR OWN RISK
+   The UTF8 tools library is free software; you can redistribute it
+   and/or modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The Gedcom parser library is distributed in the hope that it will be
+   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the Gedcom parser library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.
 */
 
 /* $Id$ */
 */
 
 /* $Id$ */
index bcfb17e1a9887406540bb8d88e422d73fe0bb22f..697ea1a0b562bfcd6c72c103e0b94e77c960a306 100644 (file)
@@ -1,9 +1,20 @@
 /* Encoding utility from UTF-8 to locale and vice versa
    Copyright (C) 2001, 2002 Peter Verthez
 
 /* Encoding utility from UTF-8 to locale and vice versa
    Copyright (C) 2001, 2002 Peter Verthez
 
-   Permission granted to do anything with this file that you want, as long
-   as the above copyright is retained in all copies.
-   THERE IS NO WARRANTY - USE AT YOUR OWN RISK
+   The UTF8 tools library is free software; you can redistribute it
+   and/or modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The Gedcom parser library is distributed in the hope that it will be
+   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the Gedcom parser library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.
 */
 
 /* $Id$ */
 */
 
 /* $Id$ */
index ae7cc4a5b66ab321c267cbc8bfbeab80d4374e01..e3809b99dc7cc0f917d7980828de0c1337d39dfe 100644 (file)
@@ -1,9 +1,20 @@
 /* Utility functions for UTF-8
    Copyright (C) 2001, 2002 Peter Verthez
 
 /* Utility functions for UTF-8
    Copyright (C) 2001, 2002 Peter Verthez
 
-   Permission granted to do anything with this file that you want, as long
-   as the above copyright is retained in all copies.
-   THERE IS NO WARRANTY - USE AT YOUR OWN RISK
+   The UTF8 tools library is free software; you can redistribute it
+   and/or modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The Gedcom parser library is distributed in the hope that it will be
+   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the Gedcom parser library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.
 */
 
 /* $Id$ */
 */
 
 /* $Id$ */
index 3cfb1c13be35ba51a41679bdabc86b78c878eae4..f7e25ae77ad15619997001ab1da3452f60fa730e 100644 (file)
@@ -1,9 +1,20 @@
 /* Header file for UTF-8 functions
    Copyright (C) 2001, 2002 Peter Verthez
 
 /* Header file for UTF-8 functions
    Copyright (C) 2001, 2002 Peter Verthez
 
-   Permission granted to do anything with this file that you want, as long
-   as the above copyright is retained in all copies.
-   THERE IS NO WARRANTY - USE AT YOUR OWN RISK
+   The UTF8 tools library is free software; you can redistribute it
+   and/or modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The Gedcom parser library is distributed in the hope that it will be
+   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the Gedcom parser library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.
 */
 
 /* $Id$ */
 */
 
 /* $Id$ */