File: configure.ac

package info (click to toggle)
cluster3 1.59+ds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, sid
  • size: 3,616 kB
  • sloc: ansic: 9,948; python: 2,018; perl: 1,566; makefile: 132
file content (62 lines) | stat: -rw-r--r-- 2,132 bytes parent folder | download | duplicates (2)
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
# Process this file with autoconf to produce a configure script.
AC_INIT(cluster, 1.59)
AC_CONFIG_SRCDIR(src/cluster.c)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(config.h)

# Checks for programs.
AC_PROG_CC

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER(float.h)
AC_CHECK_HEADER(math.h)
AC_CHECK_HEADER(stdio.h)
AC_CHECK_HEADER(stdlib.h)
AC_CHECK_HEADER(string.h)
AC_CHECK_HEADER(time.h)

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_LIB([m],[sqrt,exp,log])

# Check if we are building the GUI version or the command line version
AC_CONFIG_FILES([Makefile src/Makefile])
if test "$with_x" = no; then
  AC_MSG_NOTICE([Building command-line version of Cluster 3.0])
  AM_CONDITIONAL(MOTIF, false)
else
  AC_MSG_NOTICE([Building GUI version of Cluster 3.0 using Motif])
  AC_PROG_RANLIB
  AC_PATH_XTRA
  if test "$no_x" = "yes"; then
    AC_MSG_ERROR([Failed to locate the X11 include files and libraries.
Use --without-x if you want to build the command-line version of Cluster 3.0.])
  fi
  LIBS="$X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIB $LIBS"
  CPPFLAGS="$X_CFLAGS $CPPFLAGS"
  AC_CHECK_LIB(Xext, XShapeQueryVersion, [],
    [AC_MSG_ERROR([Failed to locate the Xext library.
Use --without-x if you want to build the command-line version of Cluster 3.0.])])
  AC_CHECK_LIB(Xt, XtMalloc, [],
    [AC_MSG_ERROR([Failed to locate the Xt library.
Use --without-x if you want to build the command-line version of Cluster 3.0.])])
  AC_CHECK_LIB(Xm, XmStringCreateSimple, [],
    [AC_MSG_ERROR([Failed to locate the Motif library.
Use --without-x if you want to build the command-line version of Cluster 3.0.])])
  AC_CHECK_HEADER(Xm/Xm.h, [],
    [AC_MSG_ERROR([Failed to locate the Motif header files.
Use --without-x if you want to build the command-line version of Cluster 3.0.
Otherwise, use CPPFLAGS to add the Motif header directory to the path.
For example, if Xm.h is in /usr/X11R6/include/Xm, use
./configure CPPFLAGS=-I/usr/X11R6/include
])])
  AM_CONDITIONAL(MOTIF, true)
  AC_CONFIG_FILES([X11/Makefile])
fi

AC_OUTPUT