File: configure.in

package info (click to toggle)
gimp-plugin-registry 5.20120621
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 56,020 kB
  • sloc: ansic: 46,068; lisp: 20,560; python: 14,495; sh: 3,294; cpp: 2,528; makefile: 1,041; xml: 546
file content (110 lines) | stat: -rw-r--r-- 2,909 bytes parent folder | download | duplicates (4)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
dnl Process this file with autoconf to produce a configure script.

AC_INIT(README)

AM_INIT_AUTOMAKE(refocus, 0.9.0)

AC_PROG_CC
AC_CHECK_PROG(GCC3, gcc3, gcc3)

if test "$GCC3" ; then
   CC=$GCC3
   AC_MSG_RESULT([using $CC as compiler])
fi

AC_STDC_HEADERS
AC_PROG_RANLIB

# Check if the user has ATLAS installed in ./lib-atlas
fw_save_LIBS=$LIBS
LIBS=-L./lib-atlas/lib ${LDFLAGS}
AC_CHECK_LIB(lapack, clapack_dgesv, 
AC_MSG_RESULT([using atlas in lib-atlas/lib])
AC_DEFINE(HAVE_ATLAS)
have_atlas=yes
LAPACK_LIB_DIR='${top_srcdir}/lib-atlas/lib'
LAPACK_INCLUDE_DIR='${top_srcdir}/lib-atlas/include'
,
AC_MSG_RESULT([using unoptimized lapack in lib])
have_atlas=no
LAPACK_LIB_DIR='${top_srcdir}/lib'
LAPACK_INCLUDE_DIR='${top_srcdir}/lib'
,
[-lcblas -latlas])
LIBS=$fw_save_LIBS
AC_SUBST(LAPACK_LIB_DIR)
AC_SUBST(LAPACK_INCLUDE_DIR)
AM_CONDITIONAL(HAVE_ATLAS, test x${have_atlas} = xyes)

AM_PATH_GIMP(1.2.0)
AM_PATH_GTK_2_0(2.0.0)
AM_PATH_GLIB_2_0(2.0.0)

# This is a check for gtk-doc which you can insert into your configure.in.
# You shouldn't need to change it at all.


##################################################
# Check for gtk-doc.
##################################################

AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])

if test "x$with_html_dir" = "x" ; then
  HTML_DIR='${datadir}/gtk-doc/html'
else
  HTML_DIR=$with_html_dir
fi

AC_SUBST(HTML_DIR)

AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)

gtk_doc_min_version=0.6
if $GTKDOC ; then 
    gtk_doc_version=`gtkdoc-mkdb --version`
    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
    if perl <<EOF ; then
      exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
EOF
      AC_MSG_RESULT(yes)
   else
      AC_MSG_RESULT(no)
      GTKDOC=false
   fi
fi

dnl Let people enable the gtk-doc stuff.
AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        Use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no)

if test x$enable_gtk_doc = xyes ; then
  if test x$GTKDOC = xtrue ; then
    enable_gtk_doc=yes
  else
    enable_gtk_doc=no 
  fi
fi

AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
# End of gtk-doc stuff.

AC_ARG_ENABLE(debug, [  --enable-debug          Show debugging output [default=no]], enable_debug=yes, enable_debug=no)

if test x$enable_debug = xyes ; then
   AC_DEFINE(RF_DEBUG)
   AC_DEFINE(PREVIEW_DEBUG)
fi

# If we have gcc set the CFLAGS
# This is done here because otherwise configure would use
# these flags for compiling test-programs.
if test "$GCC" = yes; then
   CFLAGS="-Wall -ansi -pedantic -ggdb -fomit-frame-pointer -O3 -funroll-all-loops"
fi

#Check if erf is defined in the mathlibrary
AC_CHECK_LIB(m, erf, AC_DEFINE(HAVE_ERF))

AC_OUTPUT([Makefile src/Makefile lib/Makefile doc/Makefile gtk-doc/Makefile ])