forked from HyDROSLab/EF5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·66 lines (65 loc) · 2.06 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
AC_INIT([Ensemble Framework For Flash Flood Forecasting], [0.1], [[email protected]],
[ef5], [http://hydro.ou.edu/])
AC_PREREQ([2.62])
AC_PROG_CXX
AC_OPENMP
AC_SUBST(OPENMP_CFLAGS)
AC_CANONICAL_HOST
case $host_os in
*mingw*)
CFLAGS="-static -static-libgcc -I/usr/x86_64-w64-mingw32/sys-root/mingw/include $CFLAGS"
CXXFLAGS="-static -static-libgcc -I/usr/x86_64-w64-mingw32/sys-root/mingw/include $CXXFLAGS"
CPPFLAGS="-static -static-libgcc -I/usr/x86_64-w64-mingw32/sys-root/mingw/include $CPPFLAGS"
LDFLAGS="-static -static-libgcc -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib $LDFLAGS"
WINDOWS=yes
AC_CHECK_TOOL(WINDRES, windres, no)
;;
*)
;;
esac
AM_CONDITIONAL(WINDOWS, test x$WINDOWS = xyes)
#AX_CHECK_COMPILE_FLAG([-Wall], [$WALL="-Wall"])
WALL=-Wall;
OMP=-lgomp
case $CXX in
pgc++)
WALL=
OMP=
;;
*)
;;
esac
AC_SUBST(WALL, $WALL)
#AC_CHECK_LIB([z], [gzread], [],[
# echo "z library is required for this EF5"
# exit -1])
#AC_CHECK_LIB([tiff], [TIFFReadScanline], [],[
# echo "Tiff library is required for this EF5"
# exit -1])
#AC_CHECK_LIB([geotiff], [GTIFNew], [],[
# echo "GeoTiff library is required for this EF5"
# exit -1])
#if test x$WINDOWS != xyes; then
#AC_CHECK_LIB([gomp], [omp_get_wtime], [],[
# echo "gomp library is required for this EF5"
# exit -1])
#fi;
LIBS=-lz -ltiff -lgeotiff
AC_CHECK_HEADERS(xtiffio.h)
AC_CHECK_HEADERS(geotiff/xtiffio.h)
AC_CHECK_HEADERS(libgeotiff/xtiffio.h)
if test x"$ac_cv_header_geotiff_xtiffio_h" = x"yes"; then
CPPFLAGS="-I/usr/include/geotiff $CPPFLAGS";
else
if test x"$ac_cv_header_libgeotiff_xtiffio_h" = x"yes"; then
CPPFLAGS="-I/usr/include/libgeotiff $CPPFLAGS";
else
if test x"$ac_cv_header_xtiffio_h" != x"yes"; then
AC_MSG_ERROR([xtiffio.h header not found]);
fi;
fi;
fi;
AM_INIT_AUTOMAKE([1.9.6 -Wall -Werror no-define foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT