summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 0b2ba97106dd24308355bd17efe04ffefb12c238 (plain)
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
67
68
69
70
71
72
73
74
dnl -*- Autoconf -*-

AC_INIT(Sly, 0.1)
AC_CONFIG_SRCDIR(sly)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign])
AM_SILENT_RULES([yes])

AC_PATH_PROG([GUILE], [guile])
AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile data/Makefile])
AC_CONFIG_FILES([sly/config.scm])
AC_CONFIG_FILES([sandbox], [chmod +x sandbox])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])

GUILE_PROGS([2.0.11])
GUILE_MODULE_REQUIRED([sdl sdl])
GUILE_MODULE_REQUIRED([sdl mixer])
GUILE_MODULE_REQUIRED([sdl ttf])
GUILE_MODULE_REQUIRED([gl])

dnl Freeimage doesn't have a pkg-config file, so use this primitive
dnl test instead.
AC_CHECK_LIB([freeimage], [FreeImage_GetVersion],,
  [AC_MSG_ERROR([freeimage not found.])])

LIBFREEIMAGE="libfreeimage"
LIBFREEIMAGE_LIBDIR="no"
LIBFREEIMAGE_PREFIX="no"

AC_ARG_WITH([libfreeimage-prefix],
  [AS_HELP_STRING([--with-libfreeimage-prefix=DIR], [search for FreeImage in DIR])],
  [case "$withval" in
    yes|no)
      ;;
    *)
      LIBFREEIMAGE="$withval/lib/libfreeimage"
      LIBFREEIMAGE_PREFIX="$withval"
      LIBFREEIMAGE_LIBDIR="$withval/lib"
      ;;
   esac])

dnl Library name suitable for `dynamic-link'.
AC_MSG_CHECKING([for libfreeimage shared library name])
AC_MSG_RESULT([$LIBFREEIMAGE])
AC_SUBST([LIBFREEIMAGE])
AC_SUBST([LIBFREEIMAGE_PREFIX])
AC_SUBST([LIBFREEIMAGE_LIBDIR])

LIBGSLCBLAS="libgslcblas"
LIBGSLCBLAS_LIBDIR="no"
LIBGSLCBLAS_PREFIX="no"

AC_ARG_WITH([libgslcblas-prefix],
  [AS_HELP_STRING([--with-libgslcblas-prefix=DIR], [search for GSL CBLAS in DIR])],
  [case "$withval" in
    yes|no)
      ;;
    *)
      LIBGSLCBLAS="$withval/lib/libgslcblas"
      LIBGSLCBLAS_PREFIX="$withval"
      LIBGSLCBLAS_LIBDIR="$withval/lib"
      ;;
   esac])

dnl Library name suitable for `dynamic-link'.
AC_MSG_CHECKING([for libgslcblas shared library name])
AC_MSG_RESULT([$LIBGSLCBLAS])
AC_SUBST([LIBGSLCBLAS])
AC_SUBST([LIBGSLCBLAS_PREFIX])
AC_SUBST([LIBGSLCBLAS_LIBDIR])

PKG_CHECK_MODULES([GSL], [gsl])

AC_OUTPUT