File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / gettext / config.m4
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:39 2012 UTC (12 years, 10 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

    1: dnl
    2: dnl $Id: config.m4,v 1.1.1.2 2012/05/29 12:34:39 misho Exp $
    3: dnl
    4: 
    5: PHP_ARG_WITH(gettext,for GNU gettext support,
    6: [  --with-gettext[=DIR]    Include GNU gettext support])
    7: 
    8: if test "$PHP_GETTEXT" != "no"; then
    9:   for i in $PHP_GETTEXT /usr/local /usr; do
   10:     test -r $i/include/libintl.h && GETTEXT_DIR=$i && break
   11:   done
   12: 
   13:   if test -z "$GETTEXT_DIR"; then
   14:     AC_MSG_ERROR(Cannot locate header file libintl.h)
   15:   fi
   16: 
   17:   GETTEXT_LIBDIR=$GETTEXT_DIR/$PHP_LIBDIR
   18:   GETTEXT_INCDIR=$GETTEXT_DIR/include
   19:   
   20:   O_LDFLAGS=$LDFLAGS
   21:   LDFLAGS="$LDFLAGS -L$GETTEXT_LIBDIR"
   22:   AC_CHECK_LIB(intl, bindtextdomain, [
   23: 	GETTEXT_LIBS=intl
   24: 	GETTEXT_CHECK_IN_LIB=intl
   25: 	],
   26: 	AC_CHECK_LIB(c, bindtextdomain, [
   27: 		GETTEXT_LIBS=
   28: 		GETTEXT_CHECK_IN_LIB=c
   29: 	],[
   30: 		AC_MSG_ERROR(Unable to find required gettext library)
   31: 	])
   32:   )
   33:   LDFLAGS=$O_LDFLAGS
   34: 
   35:   AC_DEFINE(HAVE_LIBINTL,1,[ ])
   36:   PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared)
   37:   PHP_SUBST(GETTEXT_SHARED_LIBADD)
   38: 
   39:   if test -n "$GETTEXT_LIBS"; then
   40:     PHP_ADD_LIBRARY_WITH_PATH($GETTEXT_LIBS, $GETTEXT_LIBDIR, GETTEXT_SHARED_LIBADD)
   41:   fi
   42: 
   43:   PHP_ADD_INCLUDE($GETTEXT_INCDIR)
   44: 
   45:   AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, ngettext,  [AC_DEFINE(HAVE_NGETTEXT, 1, [ ])])
   46:   AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext,  [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
   47:   AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext,  [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
   48:   AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset,  [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
   49:   
   50: fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>