#!/usr/bin/make -f

# Build MPI version
ifeq (,$(findstring mpi,$(DEB_BUILD_OPTIONS)))
        COND_CC:= "CC=mpicc"
else
        COND_CC:=
endif
	
export SUPPLIBS=/usr
DEB_CONFIGURE_EXTRA_FLAGS := " --with-gui  --with-readline --with-printim --with-x --with-grib2 --with-netcdf --with-hdf5 -with-geotiff --with-sdf --with-gadap $(COND_CC)"


override_dh_auto_configure:
	autoreconf -fi
	dh_auto_configure
	( cd data ; tar zxpf ../../grads_2.0.a9.orig-data.tar.gz )
	( cd doc ; tar zxpf ../../grads_2.0.a9.orig-example.tar.gz )

# The magic debhelper rule:
%:
	dh $@
