Changeset 0a69d7b


Ignore:
Timestamp:
2006-05-25T09:53:53Z (13 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
5d9b792, b1bd100
Parents:
1c8a7a2
Message:

Use iconv from GLib if available

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r1c8a7a2 r0a69d7b  
    163163fi
    164164
     165GLIB=0
     166
    165167if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    166168        cat<<EOF>>Makefile.settings
     
    169171EOF
    170172        echo '#define GLIB2' >> config.h
     173        GLIB=2
    171174elif type glib-config > /dev/null 2> /dev/null; then
    172175        cat<<EOF>>Makefile.settings
     
    175178EOF
    176179        echo '#define GLIB1' >> config.h
     180        GLIB=1
    177181else
    178182        echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
     
    180184fi
    181185
    182 if [ -r /usr/include/iconv.h ]; then
     186if [ GLIB = 1 -o -r /usr/include/iconv.h ]; then
    183187        :;
    184188elif [ -r /usr/local/include/iconv.h ]; then
  • util.c

    r1c8a7a2 r0a69d7b  
    3939#include <glib.h>
    4040#include <time.h>
     41#ifdef GLIB2
     42#define iconv_t GIConv
     43#define iconv_open g_iconv_open
     44#define iconv_close g_iconv_close
     45#define iconv g_iconv
     46#else
    4147#include <iconv.h>
     48#endif
    4249
    4350void strip_linefeed(gchar *text)
Note: See TracChangeset for help on using the changeset viewer.