Re: [Gimp-print-devel] FreeBSD/Gimp-Print still not compiling



This is really ugly, but the point is to forcibly use the included
GNU gettext for building genppd.  This permits us to use the LANGUAGE
variable, which Andy has observed working correctly.  It turns out to
be remarkably tricky to actually pull in the stuff from libintl.a; I
had to forcibly pull in gettext.o in order to get things from it.  I'm
concerned that what I did will not prove portable.

I would like Christian, Roger, and Mike (at a minimum) to review this
change, and I'd like Andy and Jacob to test it.  It should also be
tested on other operating systems.

Index: configure.in.in
===================================================================
RCS file: /cvsroot/gimp-print/print/configure.in.in,v
retrieving revision 1.88
diff -c -r1.88 configure.in.in
*** configure.in.in     2001/10/27 17:16:37     1.88
--- configure.in.in     2001/10/27 23:54:51
***************
*** 611,616 ****
--- 611,619 ----
      cups_sysconfdir="${cups_prefix}/etc"
    fi
  fi
+ 
+ AM_CONDITIONAL(USE_NLS, test x${USE_NLS} = xyes)
+ 
  dnl @-@-@-@-@ YES-GIMP @-@-@-@-@
  
  dnl Define LTLIBOBJS
Index: src/cups/Makefile.am
===================================================================
RCS file: /cvsroot/gimp-print/print/src/cups/Makefile.am,v
retrieving revision 1.39
diff -c -r1.39 Makefile.am
*** src/cups/Makefile.am        2001/10/24 00:55:00     1.39
--- src/cups/Makefile.am        2001/10/27 23:54:52
***************
*** 46,51 ****
--- 46,54 ----
  INCLUDES = @INCLUDES@ $(LIBGIMPPRINT_CFLAGS)
  LIBS = @LIBS@ ../../lib/libprintut.la $(INTLLIBS) ../../lib/libprintut.la
  
+ if USE_NLS
+ EXTRA_GENPPD_LIBS = ../../intl/gettext.o ../../intl/libintl.a
+ endif
  
  ## Programs
  
***************
*** 74,85 ****
  epson_LDADD = $(CUPS_LIBS)
  
  genppd_SOURCES = genppd.c
! genppd_LDADD = $(CUPS_LIBS) $(LIBGIMPPRINT_LIBS)
! genppd_DEPENDENCIES = $(LIBGIMPPRINT_LIBS)
  
  rastertoprinter_SOURCES = rastertoprinter.c
! rastertoprinter_LDADD = $(CUPS_LIBS) $(LIBGIMPPRINT_LIBS)
! rastertoprinter_DEPENDENCIES = $(LIBGIMPPRINT_LIBS)
  
  
  ## Data
--- 77,88 ----
  epson_LDADD = $(CUPS_LIBS)
  
  genppd_SOURCES = genppd.c
! genppd_LDADD = $(EXTRA_GENPPD_LIBS) $(CUPS_LIBS) $(LIBGIMPPRINT_LIBS)
! genppd_DEPENDENCIES = $(LIBGIMPPRINT_LIBS) $(EXTRA_GENPPD_LIBS)
  
  rastertoprinter_SOURCES = rastertoprinter.c
! rastertoprinter_LDADD = $(CUPS_LIBS) $(LIBGIMPPRINT_LIBS) $(EXTRA_GENPPD_LIBS)
! rastertoprinter_DEPENDENCIES = $(LIBGIMPPRINT_LIBS) $(EXTRA_GENPPD_LIBS)
  
  
  ## Data
***************
*** 172,178 ****
        -mkdir ppd
        for language in C $(ALL_LINGUAS) ; do \
          mkdir ppd/$$language ; \
!         LC_ALL=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \
        done
        $(RM) -r catalog
        touch ppd-stamp
--- 175,181 ----
        -mkdir ppd
        for language in C $(ALL_LINGUAS) ; do \
          mkdir ppd/$$language ; \
!         LANGUAGE=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \
        done
        $(RM) -r catalog
        touch ppd-stamp
***************
*** 195,200 ****
--- 198,206 ----
  
  clean-local:
        -$(RM) -r ppd
+ 
+ ../../intl/libintl.a ../../intl/gettext.o:
+       cd $(top_builddir)/intl; make libintl.a
  
  
  ## Clean
Index: src/cups/genppd.c
===================================================================
RCS file: /cvsroot/gimp-print/print/src/cups/genppd.c,v
retrieving revision 1.31
diff -c -r1.31 genppd.c
*** src/cups/genppd.c   2001/10/27 17:16:38     1.31
--- src/cups/genppd.c   2001/10/27 23:54:53
***************
*** 62,67 ****
--- 62,78 ----
  #else
  #include <gimp-print/gimp-print.h>
  #endif
+ #ifdef ENABLE_NLS
+ 
+ #ifdef INCLUDE_LOCALE_H
+ INCLUDE_LOCALE_H
+ #else
+ #include <locale.h>
+ #endif
+ 
+ #include "libgnuintl.h"
+ #endif
+ 
  #include <gimp-print/gimp-print-intl.h>
  #include "../../lib/libprintut.h"
  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]