Author: molinaro
Date: Mon Sep 27 17:22:17 2010
New Revision: 1001823
URL: http://svn.apache.org/viewvc?rev=1001823&view=rev
Log:
THRIFT-905: hook haskell into autoconf
Added:
incubator/thrift/trunk/lib/hs/Makefile.am
Modified:
incubator/thrift/trunk/configure.ac
incubator/thrift/trunk/lib/Makefile.am
incubator/thrift/trunk/lib/hs/ (props changed)
Modified: incubator/thrift/trunk/configure.ac
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=1001823&r1=1001822&r2=1001823&view=diff
==============================================================================
--- incubator/thrift/trunk/configure.ac (original)
+++ incubator/thrift/trunk/configure.ac Mon Sep 27 17:22:17 2010
@@ -61,6 +61,12 @@ AC_ARG_VAR([PERL_PREFIX], [Prefix for in
Default = "/usr/local/lib"])
AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"])
+AC_ARG_VAR([CABAL_CONFIGURE_FLAGS],
+ [Extra flags to pass to cabal: "cabal Setup.lhs configure
$CABAL_CONFIGURE_FLAGS".
+ (Typically used to set --user or force --global.)])
+
+AC_SUBST(CABAL_CONFIGURE_FLAGS)
+
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
@@ -191,6 +197,19 @@ fi
AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"])
AM_CONDITIONAL(HAVE_RSPEC, [test "x$RSPEC" != "x"])
+AX_THRIFT_LIB(haskell, [Haskell], yes)
+have_haskell=no
+RUNHASKELL=true
+if test "$with_haskell" = "yes"; then
+ AC_PATH_PROG([RUNHASKELL], [runhaskell])
+ if test "x$RUNHASKELL" != "x"; then
+ have_haskell="yes"
+ else
+ RUNHASKELL=true
+ fi
+fi
+AC_SUBST(RUNHASKELL)
+AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"])
AC_C_CONST
AC_C_INLINE
@@ -335,6 +354,7 @@ AC_CONFIG_FILES([
lib/csharp/Makefile
lib/erl/Makefile
lib/erl/src/Makefile
+ lib/hs/Makefile
lib/java/Makefile
lib/perl/Makefile
lib/perl/test/Makefile
@@ -359,6 +379,7 @@ echo "Building Java Library ........ : $
echo "Building C# Library .......... : $have_csharp"
echo "Building Python Library ...... : $have_python"
echo "Building Ruby Library ........ : $have_ruby"
+echo "Building Haskell Library ..... : $have_haskell"
echo "Building Perl Library ........ : $have_perl"
echo "Building PHP Library ......... : $have_php"
echo "Building Erlang Library ...... : $have_erlang"
@@ -386,6 +407,10 @@ if test "$have_ruby" = "yes" ; then
echo "Using Ruby ................... : $RUBY"
echo "Using rspec .................. : $RSPEC"
fi
+if test "$have_haskell" = "yes" ; then
+ echo
+ echo "Using Haskell ................ : $RUNHASKELL"
+fi
if test "$have_perl" = "yes" ; then
echo
echo "Using Perl ................... : $PERL"
Modified: incubator/thrift/trunk/lib/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/Makefile.am?rev=1001823&r1=1001822&r2=1001823&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/Makefile.am (original)
+++ incubator/thrift/trunk/lib/Makefile.am Mon Sep 27 17:22:17 2010
@@ -43,6 +43,10 @@ if WITH_RUBY
SUBDIRS += rb
endif
+if WITH_HASKELL
+SUBDIRS += hs
+endif
+
if WITH_PERL
SUBDIRS += perl
endif
@@ -55,7 +59,6 @@ endif
# so they will end up in our release tarballs.
EXTRA_DIST = \
cocoa \
- hs \
ocaml \
php \
erl \
Propchange: incubator/thrift/trunk/lib/hs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Sep 27 17:22:17 2010
@@ -1 +1,3 @@
dist
+Makefile
+Makefile.in
Added: incubator/thrift/trunk/lib/hs/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/hs/Makefile.am?rev=1001823&view=auto
==============================================================================
--- incubator/thrift/trunk/lib/hs/Makefile.am (added)
+++ incubator/thrift/trunk/lib/hs/Makefile.am Mon Sep 27 17:22:17 2010
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+EXTRA_DIST = \
+ README \
+ Setup.lhs \
+ TODO \
+ Thrift.cabal \
+ src
+
+all-local:
+ $(RUNHASKELL) Setup.lhs configure $(CABAL_CONFIGURE_FLAGS)
+ $(RUNHASKELL) Setup.lhs build
+
+install-exec-hook:
+ $(RUNHASKELL) Setup.lhs install
+
+# Make sure this doesn't fail if Haskell is not configured.
+clean-local:
+ $(RUNHASKELL) Setup.lhs clean
+
+maintainer-clean-local:
+ $(RUNHASKELL) Setup.lhs clean