aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-10-17 14:22:29 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-10-17 14:22:29 +0000
commitdf7b68225101966051f8b592a27127bf789eb81e (patch)
treea063e97ed58d0bdb2cbb5a95c3e8c1bcce54aa00 /configure
parente7dbfef4d8aa528d9245424e9c372e900a774c90 (diff)
downloadpandoc-df7b68225101966051f8b592a27127bf789eb81e.tar.gz
initial import
git-svn-id: https://pandoc.googlecode.com/svn/trunk@2 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'configure')
-rw-r--r--configure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100644
index 000000000..064cd719a
--- /dev/null
+++ b/configure
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# GHC does not recognize any environment variable, unlike with GCC which honors
+# CFLAGS. This hook is a workaround for this flaw and introduces an HCFLAGS
+# variable.
+
+CABAL=Pandoc.cabal
+BUILDINFO=${CABAL%%.cabal}.buildinfo
+
+[ -f $BUILDINFO.in ] || {
+ echo >&2 "==> No $BUILDINFO.in exists; skipping $BUILDINFO creation."
+ exit 0
+}
+
+if [ "${HCFLAGS-UNDEFINED}" = "UNDEFINED" ]; then
+ echo >&2 "==> No HCFLAGS defined; skipping $BUILDINFO creation."
+ exit 0
+fi
+
+sed -e "s#@HCFLAGS@#$HCFLAGS#g" $BUILDINFO.in >$BUILDINFO