From: Stephane Glondu <steph@glondu.net>
Date: Mon, 3 May 2010 20:20:46 +0200
Subject: [PATCH] Use OCaml version to guess str stubs link options
Closes: #580093.
---
configure | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 8fe0dbf..8ed9e36 100755
--- a/configure
+++ b/configure
@@ -680,6 +680,15 @@ if [ $enable_apache -gt 0 ]; then
exit 1
fi
+ case `ocamlc -version` in
+ 3.12*)
+ str_stubs=-lcamlstr
+ ;;
+ *)
+ str_stubs=-lstr
+ ;;
+ esac
+
fi
######################################################################
@@ -786,7 +795,7 @@ AUTHDHREQS = $adh_reqs
# For -enable-apache
APACHE_MAJOR = $apache_major
APACHE_LIBDIR = $apache_libdir
-APACHE_OCAMLLIBS = -lcamlrun -ltermcap -lunix -lstr
+APACHE_OCAMLLIBS = -lcamlrun -ltermcap -lunix $str_stubs
APACHE_INCDIR = $apache_incdir
APACHE_CONFDIR = $apache_confdir
APACHE_LDFLAGS_SHLIB = $apache_ldflags_shlib
--