~drizzle-trunk/drizzle/development

1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
1
dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
dnl   
4
dnl pandora-build: A pedantic build system
5
dnl Copyright (C) 2009 Sun Microsystems, Inc.
6
dnl This file is free software; Sun Microsystems
7
dnl gives unlimited permission to copy and/or distribute it,
8
dnl with or without modifications, as long as this notice is preserved.
9
dnl
10
dnl From Monty Taylor
11
12
AC_DEFUN([PANDORA_WITH_GETTEXT],[
13
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
14
  
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
15
  m4_syscmd([if test -d po ; then
16
    echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
17
    PACKAGE=$(grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d])
18
    for f in $(find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort)
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
19
    do
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
20
      if grep gettext.h "$f" | grep include >/dev/null 2>&1
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
21
      then
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
22
        echo "$f" >> po/POTFILES.in.stamp
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
23
      fi
24
    done
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
25
    if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
26
    then
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
27
      rm po/POTFILES.in.stamp
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
28
    else
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
29
      mv po/POTFILES.in.stamp po/POTFILES.in
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
30
    fi
1192.3.15 by Monty Taylor
Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.
31
  fi])
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
32
1273.12.8 by Monty Taylor
Fixed m4 on solaris. Urg.
33
  m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [
1273.12.1 by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA.
34
    AM_GNU_GETTEXT(external, need-formatstring-macros)
35
    AM_GNU_GETTEXT_VERSION([0.17])
36
    AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
37
      AM_PATH_PROG_WITH_TEST([GMSGMERGE], gmsgmerge,
38
        [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
39
      MSGMERGE="${GMSGMERGE}"
40
    ])
41
    AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
1192.3.7 by Monty Taylor
Added code necessary for building plugins dynamically.
42
  ])
43
44
])