| OLD | NEW |
| (Empty) |
| 1 #!/bin/sh | |
| 2 | |
| 3 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 set -ex | |
| 8 | |
| 9 GENERATED_DIR="${CONFIGURATION_TEMP_DIR}/generated" | |
| 10 | |
| 11 PACKAGE=libxslt | |
| 12 VERSION_MAJOR=1 | |
| 13 VERSION_MINOR=1 | |
| 14 VERSION_MICRO=24 | |
| 15 VERSION_STRING="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}" | |
| 16 | |
| 17 # Generate config.h the same way that "sh configure" would | |
| 18 CONFIG_H="${GENERATED_DIR}/config.h" | |
| 19 sed -e s/'^#undef WITH_DEBUGGER$'/"#define WITH_DEBUGGER 1"/ \ | |
| 20 -e s/'^#undef HAVE_ASCTIME'/"#define HAVE_ASCTIME 1"/ \ | |
| 21 -e s/'^#undef HAVE_DLFCN_H$'/"#define HAVE_DLFCN_H 1"/ \ | |
| 22 -e s/'^#undef HAVE_FLOAT_H$'/"#define HAVE_FLOAT_H 1"/ \ | |
| 23 -e s/'^#undef HAVE_FPRINTF$'/"#define HAVE_FPRINTF 1"/ \ | |
| 24 -e s/'^#undef HAVE_FTIME$'/"#define HAVE_FTIME 1"/ \ | |
| 25 -e s/'^#undef HAVE_GETTIMEOFDAY$'/"#define HAVE_GETTIMEOFDAY 1"/ \ | |
| 26 -e s/'^#undef HAVE_GMTIME_R$'/"#define HAVE_GMTIME_R 1"/ \ | |
| 27 -e s/'^#undef HAVE_INTTYPES_H$'/"#define HAVE_INTTYPES_H 1"/ \ | |
| 28 -e s/'^#undef HAVE_LOCALTIME$'/"#define HAVE_LOCALTIME 1"/ \ | |
| 29 -e s/'^#undef HAVE_LOCALTIME_R$'/"#define HAVE_LOCALTIME_R 1"/ \ | |
| 30 -e s/'^#undef HAVE_MATH_H$'/"#define HAVE_MATH_H 1"/ \ | |
| 31 -e s/'^#undef HAVE_MEMORY_H$'/"#define HAVE_MEMORY_H 1"/ \ | |
| 32 -e s/'^#undef HAVE_MKTIME$'/"#define HAVE_MKTIME 1"/ \ | |
| 33 -e s/'^#undef HAVE_PRINTF$'/"#define HAVE_PRINTF 1"/ \ | |
| 34 -e s/'^#undef HAVE_SNPRINTF$'/"#define HAVE_SNPRINTF 1"/ \ | |
| 35 -e s/'^#undef HAVE_SPRINTF$'/"#define HAVE_SPRINTF 1"/ \ | |
| 36 -e s/'^#undef HAVE_SSCANF$'/"#define HAVE_SSCANF 1"/ \ | |
| 37 -e s/'^#undef HAVE_STAT$'/"#define HAVE_STAT 1"/ \ | |
| 38 -e s/'^#undef HAVE_STDARG_H$'/"#define HAVE_STDARG_H 1"/ \ | |
| 39 -e s/'^#undef HAVE_STDINT_H$'/"#define HAVE_STDINT_H 1"/ \ | |
| 40 -e s/'^#undef HAVE_STDLIB_H$'/"#define HAVE_STDLIB_H 1"/ \ | |
| 41 -e s/'^#undef HAVE_STRINGS_H$'/"#define HAVE_STRINGS_H 1"/ \ | |
| 42 -e s/'^#undef HAVE_STRING_H$'/"#define HAVE_STRING_H 1"/ \ | |
| 43 -e s/'^#undef HAVE_SYS_SELECT_H$'/"#define HAVE_SYS_SELECT_H 1"/ \ | |
| 44 -e s/'^#undef HAVE_SYS_STAT_H$'/"#define HAVE_SYS_STAT_H 1"/ \ | |
| 45 -e s/'^#undef HAVE_SYS_TIMEB_H$'/"#define HAVE_SYS_TIMEB_H 1"/ \ | |
| 46 -e s/'^#undef HAVE_SYS_TIME_H$'/"#define HAVE_SYS_TIME_H 1"/ \ | |
| 47 -e s/'^#undef HAVE_SYS_TYPES_H$'/"#define HAVE_SYS_TYPES_H 1"/ \ | |
| 48 -e s/'^#undef HAVE_TIME$'/"#define HAVE_TIME 1"/ \ | |
| 49 -e s/'^#undef HAVE_TIME_H$'/"#define HAVE_TIME_H 1"/ \ | |
| 50 -e s/'^#undef HAVE_UNISTD_H$'/"#define HAVE_UNISTD_H 1"/ \ | |
| 51 -e s/'^#undef HAVE_VFPRINTF$'/"#define HAVE_VFPRINTF 1"/ \ | |
| 52 -e s/'^#undef HAVE_VSNPRINTF$'/"#define HAVE_VSNPRINTF 1"/ \ | |
| 53 -e s/'^#undef HAVE_VSPRINTF$'/"#define HAVE_VSPRINTF 1"/ \ | |
| 54 -e s/'^#undef PACKAGE$'/"#define PACKAGE \"libxslt\""/ \ | |
| 55 -e s/'^#undef PACKAGE_BUGREPORT$'/"#define PACKAGE_BUGREPORT \"\""/ \ | |
| 56 -e s/'^#undef PACKAGE_NAME$'/"#define PACKAGE_NAME \"\""/ \ | |
| 57 -e s/'^#undef PACKAGE_STRING$'/"#define PACKAGE_STRING \"\""/ \ | |
| 58 -e s/'^#undef PACKAGE_TARNAME$'/"#define PACKAGE_TARNAME \"\""/ \ | |
| 59 -e s/'^#undef PACKAGE_VERSION$'/"#define PACKAGE_VERSION \"\""/ \ | |
| 60 -e s/'^#undef STDC_HEADERS$'/"#define STDC_HEADERS 1"/ \ | |
| 61 -e s/'^#undef VERSION$'/"#define VERSION \"${VERSION_STRING}\""/ \ | |
| 62 -e s@'^\(#undef .*\)$'@'/* \1 */'@ \ | |
| 63 < config.h.in \ | |
| 64 > "${CONFIG_H}.new" | |
| 65 | |
| 66 # Only use the new file if it's different from the existing file (if any), | |
| 67 # preserving the existing file's timestamp when there are no changes to | |
| 68 # minimize unnecessary build activity. | |
| 69 if ! diff -q "${CONFIG_H}.new" "${CONFIG_H}" >& /dev/null ; then | |
| 70 mv "${CONFIG_H}.new" "${CONFIG_H}" | |
| 71 else | |
| 72 rm "${CONFIG_H}.new" | |
| 73 fi | |
| OLD | NEW |