Changeset 5e274bfeb156957175ef2f26cdd0ad45abf4806d for m4
- Timestamp:
- 06/15/08 22:10:14 (4 years ago)
- Children:
- 663f21d9b78fec0adc1059a9991055395645ce98
- Parents:
- 7ac816be36549bf563542b5505c34892ded445eb
- git-committer:
- Lincoln de Sousa <lincoln@…> (06/15/08 22:10:14)
- Files:
-
- 1 modified
-
m4/intltool.m4 (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
m4/intltool.m4
rd27e9e8 r5e274bf 24 24 25 25 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) 26 # serial 36IT_PROG_INTLTOOL26 # serial 40 IT_PROG_INTLTOOL 27 27 AC_DEFUN([IT_PROG_INTLTOOL], 28 28 [AC_PREREQ([2.50])dnl … … 40 40 41 41 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` 42 INTLTOOL_APPLIED_VERSION=` awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`43 [INTLTOOL_APPLIED_VERSION_AS_INT=` awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`42 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` 43 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` 44 44 ] 45 45 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) 46 46 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || 47 47 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) 48 fi 49 50 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) 51 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) 52 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) 53 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then 54 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) 48 55 fi 49 56 … … 102 109 fi 103 110 104 # Use the tools built into the package, not the ones that are installed. 105 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') 106 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') 107 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') 108 109 AC_PATH_PROG(INTLTOOL_PERL, perl) 111 AC_PATH_PROG(INTLTOOL_PERL, [perl]) 110 112 if test -z "$INTLTOOL_PERL"; then 111 113 AC_MSG_ERROR([perl not found; required for intltool]) … … 152 154 153 155 IT_PO_SUBDIR([po]) 154 155 dnl The following is very similar to156 dnl157 dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])158 dnl159 dnl with the following slight differences:160 dnl - the *.in files are in ac_aux_dir,161 dnl - if the file haven't changed upon reconfigure, it's not touched,162 dnl - the evaluation of the third parameter enables a hack which computes163 dnl the actual value of $libdir,164 dnl - the user sees "executing intltool commands", instead of165 dnl "creating intltool-extract" and such.166 dnl167 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were168 dnl a reason for it.169 170 AC_CONFIG_COMMANDS([intltool], [171 172 for file in intltool-extract intltool-merge intltool-update; do173 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \174 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \175 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \176 < ${ac_aux_dir}/${file}.in > ${file}.out177 if cmp -s ${file} ${file}.out 2>/dev/null; then178 rm -f ${file}.out179 else180 mv -f ${file}.out ${file}181 fi182 chmod ugo+x ${file}183 chmod u+w ${file}184 done185 186 ],187 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'188 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"189 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])190 156 191 157 ])