Commit 7e8e1761df141164d5d999de014486623810b403

Werner Lemberg 2012-11-30T13:45:47

[configure] Preserve customized `ftoption.h'. Problem reported by Del Merritt <del@alum.mit.edu>. * builds/unix/configure.raw <cpp computation of bit length>: Don't remove existing FreeType configuration files.

diff --git a/ChangeLog b/ChangeLog
index e9a722f..00da744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-11-30  Werner Lemberg  <wl@gnu.org>
+
+	[configure] Preserve customized `ftoption.h'.
+
+	Problem reported by Del Merritt <del@alum.mit.edu>.
+
+	* builds/unix/configure.raw <cpp computation of bit length>: Don't
+	remove existing FreeType configuration files.
+
 2012-11-29  Werner Lemberg  <wl@gnu.org>
 
 	[type1] Fix Savannah bug #37831.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index e8955b6..05a05a4 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -103,8 +103,14 @@ AC_CHECK_SIZEOF([long])
 AC_MSG_CHECKING([whether cpp computation of bit length in ftconfig.in works])
 orig_CPPFLAGS="${CPPFLAGS}"
 CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
-ac_clean_files="ft2build.h ftoption.h ftstdlib.h"
-touch ft2build.h ftoption.h ftstdlib.h
+
+ac_clean_files=
+for f in ft2build.h ftoption.h ftstdlib.h; do
+  if test ! -f $f; then
+    ac_clean_files="$ac_clean_files $f"
+    touch $f
+  fi
+done
 
 cat > conftest.c <<\_ACEOF
 #include <limits.h>
@@ -123,7 +129,7 @@ echo >> conftest.c "#endif"
 
 ${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh
 eval `cat conftest.sh`
-rm -f conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h
+rm -f conftest.* $ac_clean_files
 
 if test x != "x${ac_cpp_ft_sizeof_int}" \
    -a x != x"${ac_cpp_ft_sizeof_long}"; then