(file) Return to aclocal.m4 CVS log (file) (dir) Up to [RizwankCVS] / testProject / source / src

  1 rizwank 1.1 dnl aclocal.m4 generated automatically by aclocal 1.4
  2             
  3             dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  4             dnl This file is free software; the Free Software Foundation
  5             dnl gives unlimited permission to copy and/or distribute it,
  6             dnl with or without modifications, as long as this notice is preserved.
  7             
  8             dnl This program is distributed in the hope that it will be useful,
  9             dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 10             dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 11             dnl PARTICULAR PURPOSE.
 12             
 13             # Do all the work for Automake.  This macro actually does too much --
 14             # some checks are only needed if your package does certain things.
 15             # But this isn't really a big deal.
 16             
 17             # serial 1
 18             
 19             dnl Usage:
 20             dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 21             
 22 rizwank 1.1 AC_DEFUN(AM_INIT_AUTOMAKE,
 23             [AC_REQUIRE([AC_PROG_INSTALL])
 24             PACKAGE=[$1]
 25             AC_SUBST(PACKAGE)
 26             VERSION=[$2]
 27             AC_SUBST(VERSION)
 28             dnl test to see if srcdir already configured
 29             if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 30               AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 31             fi
 32             ifelse([$3],,
 33             AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 34             AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 35             AC_REQUIRE([AM_SANITY_CHECK])
 36             AC_REQUIRE([AC_ARG_PROGRAM])
 37             dnl FIXME This is truly gross.
 38             missing_dir=`cd $ac_aux_dir && pwd`
 39             AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
 40             AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 41             AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
 42             AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 43 rizwank 1.1 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 44             AC_REQUIRE([AC_PROG_MAKE_SET])])
 45             
 46             #
 47             # Check to make sure that the build environment is sane.
 48             #
 49             
 50             AC_DEFUN(AM_SANITY_CHECK,
 51             [AC_MSG_CHECKING([whether build environment is sane])
 52             # Just in case
 53             sleep 1
 54             echo timestamp > conftestfile
 55             # Do `set' in a subshell so we don't clobber the current shell's
 56             # arguments.  Must try -L first in case configure is actually a
 57             # symlink; some systems play weird games with the mod time of symlinks
 58             # (eg FreeBSD returns the mod time of the symlink's containing
 59             # directory).
 60             if (
 61                set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
 62                if test "[$]*" = "X"; then
 63                   # -L didn't work.
 64 rizwank 1.1       set X `ls -t $srcdir/configure conftestfile`
 65                fi
 66                if test "[$]*" != "X $srcdir/configure conftestfile" \
 67                   && test "[$]*" != "X conftestfile $srcdir/configure"; then
 68             
 69                   # If neither matched, then we have a broken ls.  This can happen
 70                   # if, for instance, CONFIG_SHELL is bash and it inherits a
 71                   # broken ls alias from the environment.  This has actually
 72                   # happened.  Such a system could not be considered "sane".
 73                   AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 74             alias in your environment])
 75                fi
 76             
 77                test "[$]2" = conftestfile
 78                )
 79             then
 80                # Ok.
 81                :
 82             else
 83                AC_MSG_ERROR([newly created file is older than distributed files!
 84             Check your system clock])
 85 rizwank 1.1 fi
 86             rm -f conftest*
 87             AC_MSG_RESULT(yes)])
 88             
 89             dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 90             dnl The program must properly implement --version.
 91             AC_DEFUN(AM_MISSING_PROG,
 92             [AC_MSG_CHECKING(for working $2)
 93             # Run test in a subshell; some versions of sh will print an error if
 94             # an executable is not found, even if stderr is redirected.
 95             # Redirect stdin to placate older versions of autoconf.  Sigh.
 96             if ($2 --version) < /dev/null > /dev/null 2>&1; then
 97                $1=$2
 98                AC_MSG_RESULT(found)
 99             else
100                $1="$3/missing $2"
101                AC_MSG_RESULT(missing)
102             fi
103             AC_SUBST($1)])
104             
105             # Like AC_CONFIG_HEADER, but automatically create stamp file.
106 rizwank 1.1 
107             AC_DEFUN(AM_CONFIG_HEADER,
108             [AC_PREREQ([2.12])
109             AC_CONFIG_HEADER([$1])
110             dnl When config.status generates a header, we must update the stamp-h file.
111             dnl This file resides in the same directory as the config header
112             dnl that is generated.  We must strip everything past the first ":",
113             dnl and everything past the last "/".
114             AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
115             ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
116             <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
117             <<am_indx=1
118             for am_file in <<$1>>; do
119               case " <<$>>CONFIG_HEADERS " in
120               *" <<$>>am_file "*<<)>>
121                 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
122                 ;;
123               esac
124               am_indx=`expr "<<$>>am_indx" + 1`
125             done<<>>dnl>>)
126             changequote([,]))])
127 rizwank 1.1 
128             
129             # serial 1
130             
131             AC_DEFUN(AM_C_PROTOTYPES,
132             [AC_REQUIRE([AM_PROG_CC_STDC])
133             AC_REQUIRE([AC_PROG_CPP])
134             AC_MSG_CHECKING([for function prototypes])
135             if test "$am_cv_prog_cc_stdc" != no; then
136               AC_MSG_RESULT(yes)
137               AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
138               U= ANSI2KNR=
139             else
140               AC_MSG_RESULT(no)
141               U=_ ANSI2KNR=./ansi2knr
142               # Ensure some checks needed by ansi2knr itself.
143               AC_HEADER_STDC
144               AC_CHECK_HEADERS(string.h)
145             fi
146             AC_SUBST(U)dnl
147             AC_SUBST(ANSI2KNR)dnl
148 rizwank 1.1 ])
149             
150             
151             # serial 1
152             
153             # @defmac AC_PROG_CC_STDC
154             # @maindex PROG_CC_STDC
155             # @ovindex CC
156             # If the C compiler in not in ANSI C mode by default, try to add an option
157             # to output variable @code{CC} to make it so.  This macro tries various
158             # options that select ANSI C on some system or another.  It considers the
159             # compiler to be in ANSI C mode if it handles function prototypes correctly.
160             #
161             # If you use this macro, you should check after calling it whether the C
162             # compiler has been set to accept ANSI C; if not, the shell variable
163             # @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
164             # code in ANSI C, you can make an un-ANSIfied copy of it by using the
165             # program @code{ansi2knr}, which comes with Ghostscript.
166             # @end defmac
167             
168             AC_DEFUN(AM_PROG_CC_STDC,
169 rizwank 1.1 [AC_REQUIRE([AC_PROG_CC])
170             AC_BEFORE([$0], [AC_C_INLINE])
171             AC_BEFORE([$0], [AC_C_CONST])
172             dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
173             dnl a magic option to avoid problems with ANSI preprocessor commands
174             dnl like #elif.
175             dnl FIXME: can't do this because then AC_AIX won't work due to a
176             dnl circular dependency.
177             dnl AC_BEFORE([$0], [AC_PROG_CPP])
178             AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
179             AC_CACHE_VAL(am_cv_prog_cc_stdc,
180             [am_cv_prog_cc_stdc=no
181             ac_save_CC="$CC"
182             # Don't try gcc -ansi; that turns off useful extensions and
183             # breaks some systems' header files.
184             # AIX			-qlanglvl=ansi
185             # Ultrix and OSF/1	-std1
186             # HP-UX			-Aa -D_HPUX_SOURCE
187             # SVR4			-Xc -D__EXTENSIONS__
188             for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
189             do
190 rizwank 1.1   CC="$ac_save_CC $ac_arg"
191               AC_TRY_COMPILE(
192             [#include <stdarg.h>
193             #include <stdio.h>
194             #include <sys/types.h>
195             #include <sys/stat.h>
196             /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
197             struct buf { int x; };
198             FILE * (*rcsopen) (struct buf *, struct stat *, int);
199             static char *e (p, i)
200                  char **p;
201                  int i;
202             {
203               return p[i];
204             }
205             static char *f (char * (*g) (char **, int), char **p, ...)
206             {
207               char *s;
208               va_list v;
209               va_start (v,p);
210               s = g (p, va_arg (v,int));
211 rizwank 1.1   va_end (v);
212               return s;
213             }
214             int test (int i, double x);
215             struct s1 {int (*f) (int a);};
216             struct s2 {int (*f) (double a);};
217             int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
218             int argc;
219             char **argv;
220             ], [
221             return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
222             ],
223             [am_cv_prog_cc_stdc="$ac_arg"; break])
224             done
225             CC="$ac_save_CC"
226             ])
227             if test -z "$am_cv_prog_cc_stdc"; then
228               AC_MSG_RESULT([none needed])
229             else
230               AC_MSG_RESULT($am_cv_prog_cc_stdc)
231             fi
232 rizwank 1.1 case "x$am_cv_prog_cc_stdc" in
233               x|xno) ;;
234               *) CC="$CC $am_cv_prog_cc_stdc" ;;
235             esac
236             ])
237             
238             
239             dnl AM_PROG_LEX
240             dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
241             AC_DEFUN(AM_PROG_LEX,
242             [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
243             AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
244             AC_PROG_LEX
245             AC_DECL_YYTEXT])
246             
247             # Macro to add for using GNU gettext.
248             # Ulrich Drepper <drepper@cygnus.com>, 1995.
249             #
250             # This file can be copied and used freely without restrictions.  It can
251             # be used in projects which are not available under the GNU Public License
252             # but which still want to provide support for the GNU gettext functionality.
253 rizwank 1.1 # Please note that the actual code is *not* freely available.
254             
255             # serial 5
256             
257             AC_DEFUN(AM_WITH_NLS,
258               [AC_MSG_CHECKING([whether NLS is requested])
259                 dnl Default is enabled NLS
260                 AC_ARG_ENABLE(nls,
261                   [  --disable-nls           do not use Native Language Support],
262                   USE_NLS=$enableval, USE_NLS=yes)
263                 AC_MSG_RESULT($USE_NLS)
264                 AC_SUBST(USE_NLS)
265             
266                 USE_INCLUDED_LIBINTL=no
267             
268                 dnl If we use NLS figure out what method
269                 if test "$USE_NLS" = "yes"; then
270                   AC_DEFINE(ENABLE_NLS)
271                   AC_MSG_CHECKING([whether included gettext is requested])
272                   AC_ARG_WITH(included-gettext,
273                     [  --with-included-gettext use the GNU gettext library included here],
274 rizwank 1.1         nls_cv_force_use_gnu_gettext=$withval,
275                     nls_cv_force_use_gnu_gettext=no)
276                   AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
277             
278                   nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
279                   if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
280                     dnl User does not insist on using GNU NLS library.  Figure out what
281                     dnl to use.  If gettext or catgets are available (in this order) we
282                     dnl use this.  Else we have to fall back to GNU NLS library.
283             	dnl catgets is only used if permitted by option --with-catgets.
284             	nls_cv_header_intl=
285             	nls_cv_header_libgt=
286             	CATOBJEXT=NONE
287             
288             	AC_CHECK_HEADER(libintl.h,
289             	  [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
290             	    [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
291             	       gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
292             
293             	   if test "$gt_cv_func_gettext_libc" != "yes"; then
294             	     AC_CHECK_LIB(intl, bindtextdomain,
295 rizwank 1.1 	       [AC_CACHE_CHECK([for gettext in libintl],
296             		 gt_cv_func_gettext_libintl,
297             		 [AC_CHECK_LIB(intl, gettext,
298             		  gt_cv_func_gettext_libintl=yes,
299             		  gt_cv_func_gettext_libintl=no)],
300             		 gt_cv_func_gettext_libintl=no)])
301             	   fi
302             
303             	   if test "$gt_cv_func_gettext_libc" = "yes" \
304             	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
305             	      AC_DEFINE(HAVE_GETTEXT)
306             	      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
307             		[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
308             	      if test "$MSGFMT" != "no"; then
309             		AC_CHECK_FUNCS(dcgettext)
310             		AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
311             		AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
312             		  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
313             		AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
314             			       return _nl_msg_cat_cntr],
315             		  [CATOBJEXT=.gmo
316 rizwank 1.1 		   DATADIRNAME=share],
317             		  [CATOBJEXT=.mo
318             		   DATADIRNAME=lib])
319             		INSTOBJEXT=.mo
320             	      fi
321             	    fi
322             	])
323             
324                     if test "$CATOBJEXT" = "NONE"; then
325             	  AC_MSG_CHECKING([whether catgets can be used])
326             	  AC_ARG_WITH(catgets,
327             	    [  --with-catgets          use catgets functions if available],
328             	    nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
329             	  AC_MSG_RESULT($nls_cv_use_catgets)
330             
331             	  if test "$nls_cv_use_catgets" = "yes"; then
332             	    dnl No gettext in C library.  Try catgets next.
333             	    AC_CHECK_LIB(i, main)
334             	    AC_CHECK_FUNC(catgets,
335             	      [AC_DEFINE(HAVE_CATGETS)
336             	       INTLOBJS="\$(CATOBJS)"
337 rizwank 1.1 	       AC_PATH_PROG(GENCAT, gencat, no)dnl
338             	       if test "$GENCAT" != "no"; then
339             		 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
340             		 if test "$GMSGFMT" = "no"; then
341             		   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
342             		    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
343             		 fi
344             		 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
345             		   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
346             		 USE_INCLUDED_LIBINTL=yes
347             		 CATOBJEXT=.cat
348             		 INSTOBJEXT=.cat
349             		 DATADIRNAME=lib
350             		 INTLDEPS='$(top_builddir)/intl/libintl.a'
351             		 INTLLIBS=$INTLDEPS
352             		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
353             		 nls_cv_header_intl=intl/libintl.h
354             		 nls_cv_header_libgt=intl/libgettext.h
355             	       fi])
356             	  fi
357                     fi
358 rizwank 1.1 
359                     if test "$CATOBJEXT" = "NONE"; then
360             	  dnl Neither gettext nor catgets in included in the C library.
361             	  dnl Fall back on GNU gettext library.
362             	  nls_cv_use_gnu_gettext=yes
363                     fi
364                   fi
365             
366                   if test "$nls_cv_use_gnu_gettext" = "yes"; then
367                     dnl Mark actions used to generate GNU NLS library.
368                     INTLOBJS="\$(GETTOBJS)"
369                     AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
370             	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
371                     AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
372                     AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
373             	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
374                     AC_SUBST(MSGFMT)
375             	USE_INCLUDED_LIBINTL=yes
376                     CATOBJEXT=.gmo
377                     INSTOBJEXT=.mo
378                     DATADIRNAME=share
379 rizwank 1.1 	INTLDEPS='$(top_builddir)/intl/libintl.a'
380             	INTLLIBS=$INTLDEPS
381             	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
382                     nls_cv_header_intl=intl/libintl.h
383                     nls_cv_header_libgt=intl/libgettext.h
384                   fi
385             
386                   dnl Test whether we really found GNU xgettext.
387                   if test "$XGETTEXT" != ":"; then
388             	dnl If it is no GNU xgettext we define it as : so that the
389             	dnl Makefiles still can work.
390             	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
391             	  : ;
392             	else
393             	  AC_MSG_RESULT(
394             	    [found xgettext program is not GNU xgettext; ignore it])
395             	  XGETTEXT=":"
396             	fi
397                   fi
398             
399                   # We need to process the po/ directory.
400 rizwank 1.1       POSUB=po
401                 else
402                   DATADIRNAME=share
403                   nls_cv_header_intl=intl/libintl.h
404                   nls_cv_header_libgt=intl/libgettext.h
405                 fi
406                 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
407                 AC_OUTPUT_COMMANDS(
408                  [case "$CONFIG_FILES" in *po/Makefile.in*)
409                     sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
410                   esac])
411             
412             
413                 # If this is used in GNU gettext we have to set USE_NLS to `yes'
414                 # because some of the sources are only built for this goal.
415                 if test "$PACKAGE" = gettext; then
416                   USE_NLS=yes
417                   USE_INCLUDED_LIBINTL=yes
418                 fi
419             
420                 dnl These rules are solely for the distribution goal.  While doing this
421 rizwank 1.1     dnl we only have to keep exactly one list of the available catalogs
422                 dnl in configure.in.
423                 for lang in $ALL_LINGUAS; do
424                   GMOFILES="$GMOFILES $lang.gmo"
425                   POFILES="$POFILES $lang.po"
426                 done
427             
428                 dnl Make all variables we use known to autoconf.
429                 AC_SUBST(USE_INCLUDED_LIBINTL)
430                 AC_SUBST(CATALOGS)
431                 AC_SUBST(CATOBJEXT)
432                 AC_SUBST(DATADIRNAME)
433                 AC_SUBST(GMOFILES)
434                 AC_SUBST(INSTOBJEXT)
435                 AC_SUBST(INTLDEPS)
436                 AC_SUBST(INTLLIBS)
437                 AC_SUBST(INTLOBJS)
438                 AC_SUBST(POFILES)
439                 AC_SUBST(POSUB)
440               ])
441             
442 rizwank 1.1 AC_DEFUN(AM_GNU_GETTEXT,
443               [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
444                AC_REQUIRE([AC_PROG_CC])dnl
445                AC_REQUIRE([AC_PROG_RANLIB])dnl
446                AC_REQUIRE([AC_ISC_POSIX])dnl
447                AC_REQUIRE([AC_HEADER_STDC])dnl
448                AC_REQUIRE([AC_C_CONST])dnl
449                AC_REQUIRE([AC_C_INLINE])dnl
450                AC_REQUIRE([AC_TYPE_OFF_T])dnl
451                AC_REQUIRE([AC_TYPE_SIZE_T])dnl
452                AC_REQUIRE([AC_FUNC_ALLOCA])dnl
453                AC_REQUIRE([AC_FUNC_MMAP])dnl
454             
455                AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
456             unistd.h sys/param.h])
457                AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
458             strdup __argz_count __argz_stringify __argz_next])
459             
460                if test "${ac_cv_func_stpcpy+set}" != "set"; then
461                  AC_CHECK_FUNCS(stpcpy)
462                fi
463 rizwank 1.1    if test "${ac_cv_func_stpcpy}" = "yes"; then
464                  AC_DEFINE(HAVE_STPCPY)
465                fi
466             
467                AM_LC_MESSAGES
468                AM_WITH_NLS
469             
470                if test "x$CATOBJEXT" != "x"; then
471                  if test "x$ALL_LINGUAS" = "x"; then
472                    LINGUAS=
473                  else
474                    AC_MSG_CHECKING(for catalogs to be installed)
475                    NEW_LINGUAS=
476                    for lang in ${LINGUAS=$ALL_LINGUAS}; do
477                      case "$ALL_LINGUAS" in
478                       *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
479                      esac
480                    done
481                    LINGUAS=$NEW_LINGUAS
482                    AC_MSG_RESULT($LINGUAS)
483                  fi
484 rizwank 1.1 
485                  dnl Construct list of names of catalog files to be constructed.
486                  if test -n "$LINGUAS"; then
487                    for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
488                  fi
489                fi
490             
491                dnl The reference to <locale.h> in the installed <libintl.h> file
492                dnl must be resolved because we cannot expect the users of this
493                dnl to define HAVE_LOCALE_H.
494                if test $ac_cv_header_locale_h = yes; then
495                  INCLUDE_LOCALE_H="#include <locale.h>"
496                else
497                  INCLUDE_LOCALE_H="\
498             /* The system does not provide the header <locale.h>.  Take care yourself.  */"
499                fi
500                AC_SUBST(INCLUDE_LOCALE_H)
501             
502                dnl Determine which catalog format we have (if any is needed)
503                dnl For now we know about two different formats:
504                dnl   Linux libc-5 and the normal X/Open format
505 rizwank 1.1    test -d intl || mkdir intl
506                if test "$CATOBJEXT" = ".cat"; then
507                  AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
508             
509                  dnl Transform the SED scripts while copying because some dumb SEDs
510                  dnl cannot handle comments.
511                  sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
512                fi
513                dnl po2tbl.sed is always needed.
514                sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
515                  $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
516             
517                dnl In the intl/Makefile.in we have a special dependency which makes
518                dnl only sense for gettext.  We comment this out for non-gettext
519                dnl packages.
520                if test "$PACKAGE" = "gettext"; then
521                  GT_NO="#NO#"
522                  GT_YES=
523                else
524                  GT_NO=
525                  GT_YES="#YES#"
526 rizwank 1.1    fi
527                AC_SUBST(GT_NO)
528                AC_SUBST(GT_YES)
529             
530                dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
531                dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
532                dnl Try to locate is.
533                MKINSTALLDIRS=
534                if test -n "$ac_aux_dir"; then
535                  MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
536                fi
537                if test -z "$MKINSTALLDIRS"; then
538                  MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
539                fi
540                AC_SUBST(MKINSTALLDIRS)
541             
542                dnl *** For now the libtool support in intl/Makefile is not for real.
543                l=
544                AC_SUBST(l)
545             
546                dnl Generate list of files to be processed by xgettext which will
547 rizwank 1.1    dnl be included in po/Makefile.
548                test -d po || mkdir po
549                if test "x$srcdir" != "x."; then
550                  if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
551                    posrcprefix="$srcdir/"
552                  else
553                    posrcprefix="../$srcdir/"
554                  fi
555                else
556                  posrcprefix="../"
557                fi
558                rm -f po/POTFILES
559                sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
560             	< $srcdir/po/POTFILES.in > po/POTFILES
561               ])
562             
563             # Search path for a program which passes the given test.
564             # Ulrich Drepper <drepper@cygnus.com>, 1996.
565             #
566             # This file can be copied and used freely without restrictions.  It can
567             # be used in projects which are not available under the GNU Public License
568 rizwank 1.1 # but which still want to provide support for the GNU gettext functionality.
569             # Please note that the actual code is *not* freely available.
570             
571             # serial 1
572             
573             dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
574             dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
575             AC_DEFUN(AM_PATH_PROG_WITH_TEST,
576             [# Extract the first word of "$2", so it can be a program name with args.
577             set dummy $2; ac_word=[$]2
578             AC_MSG_CHECKING([for $ac_word])
579             AC_CACHE_VAL(ac_cv_path_$1,
580             [case "[$]$1" in
581               /*)
582               ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
583               ;;
584               *)
585               IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
586               for ac_dir in ifelse([$5], , $PATH, [$5]); do
587                 test -z "$ac_dir" && ac_dir=.
588                 if test -f $ac_dir/$ac_word; then
589 rizwank 1.1       if [$3]; then
590             	ac_cv_path_$1="$ac_dir/$ac_word"
591             	break
592                   fi
593                 fi
594               done
595               IFS="$ac_save_ifs"
596             dnl If no 4th arg is given, leave the cache variable unset,
597             dnl so AC_PATH_PROGS will keep looking.
598             ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
599             ])dnl
600               ;;
601             esac])dnl
602             $1="$ac_cv_path_$1"
603             if test -n "[$]$1"; then
604               AC_MSG_RESULT([$]$1)
605             else
606               AC_MSG_RESULT(no)
607             fi
608             AC_SUBST($1)dnl
609             ])
610 rizwank 1.1 
611             # Check whether LC_MESSAGES is available in <locale.h>.
612             # Ulrich Drepper <drepper@cygnus.com>, 1995.
613             #
614             # This file can be copied and used freely without restrictions.  It can
615             # be used in projects which are not available under the GNU Public License
616             # but which still want to provide support for the GNU gettext functionality.
617             # Please note that the actual code is *not* freely available.
618             
619             # serial 1
620             
621             AC_DEFUN(AM_LC_MESSAGES,
622               [if test $ac_cv_header_locale_h = yes; then
623                 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
624                   [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
625                    am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
626                 if test $am_cv_val_LC_MESSAGES = yes; then
627                   AC_DEFINE(HAVE_LC_MESSAGES)
628                 fi
629               fi])
630             

Rizwan Kassim
Powered by
ViewCVS 0.9.2