File: configure.ac

package info (click to toggle)
aumix 2.9.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,232 kB
  • ctags: 578
  • sloc: sh: 4,682; ansic: 2,582; makefile: 60
file content (216 lines) | stat: -rw-r--r-- 6,933 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# $Aumix: aumix/configure.ac,v 1.21 2010/05/04 23:49:22 trevor Exp $
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_INIT([aumix],[2.9.1],[aumix-general@gna.org])

AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE
AC_PREREQ(2.61)
AC_CONFIG_SRCDIR([src/common.c])
AC_CONFIG_HEADERS([config.h])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB

# Checks for libraries.
dnl for NetBSD and OpenBSD
AC_CHECK_LIB(ossaudio, _oss_ioctl)

# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
	argz.h \
	fcntl.h \
	libintl.h \
	limits.h \
	locale.h \
	malloc.h \
	nl_types.h \
	stddef.h \
	stdlib.h \
	string.h \
	strings.h \
	sys/ioctl.h \
	sys/param.h \
	sys/time.h \
	unistd.h \
	sys/soundcard.h \
	soundcard.h \
	machine/soundcard.h \
	ncursesw/ncurses.h \
	ncursesw/curses.h])

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

# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify alarm getcwd mempcpy memset munmap putenv select setenv setlocale stpcpy strcasecmp strchr strdup])

dnl Additional configure options
AC_ARG_WITH(ncurses,
   [  --without-ncurses       compile with no ncurses or mouse support],
  AC_MSG_RESULT([Compiling without ncurses support]),[
  dnl Checks for ncurses library.
  AC_CHECK_LIB(ncursesw, initscr, initscr=on, initscr=off)
  if test $initscr = on; then
    CURSLIB="ncursesw"
    AC_DEFINE(HAVE_LIBNCURSES, 1,
      [Define this if you have the ncurses library and want to use it.])
  else
    AC_CHECK_LIB(curses, initscr, initscr=on, initscr=off)
    if test $initscr = on; then
      CURSLIB="curses"
      AC_DEFINE(HAVE_LIBCURSES, 1,
        [Define this if you have the curses library and want to use it.])
    fi
  fi
  if test x$CURSLIB != x; then
    LIBS="-l$CURSLIB $LIBS"
    AC_DEFINE(HAVE_CURSES, 1,
      [Define this if you have (n)curses and want to use it.])
    AC_CHECK_LIB($CURSLIB, getmouse,
      [AC_DEFINE(HAVE_GETMOUSE, 1,
	[Define this if your ncurses library has the getmouse routine.])])
    AC_CHECK_LIB($CURSLIB, use_default_colors,
      [AC_DEFINE(HAVE_USEDEFAULT, 1,
	[Define this if your ncurses library contains the use_default_colors
	routine and your terminal can use transparent colors.])])
    AC_CACHE_CHECK([for private member _use_keypad in WINDOW],
      aumix_cv_struct_window_usekeypad,
      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NCURSES_H
#include <ncursesw/ncurses.h>
#else
#include <ncursesw/curses.h>
#endif]], [[WINDOW w; w._use_keypad;]])],[aumix_cv_struct_window_usekeypad=yes],[aumix_cv_struct_window_usekeypad=no])])
    if test $aumix_cv_struct_window_usekeypad = yes; then
      AC_DEFINE(HAVE_USEKEYPAD, 1,
	[Define this if your ncurses library has the member _use_keypad
	in structure WINDOW.])
    fi
  fi
  AC_ARG_WITH(gpm,
    [  --without-gpm           Compile only without GPM support],
    AC_MSG_RESULT([Compiling without GPM support]),
    dnl Checks for GPM library.
    AC_CHECK_LIB(gpm, Gpm_Repeat)
  )
  AC_ARG_WITH(sysmouse,
    [  --without-sysmouse      Compile only without sysmouse support],
    AC_MSG_RESULT([Compiling without sysmouse support]),
    dnl Checks for sysmouse availability.
    AC_CACHE_CHECK([for CONS_MOUSECTL],
      aumix_cv_cons_mousectl,
      [AC_EGREP_CPP([A mouse is a mouse is a mouse],
      [#ifdef HAVE_MACHINE_CONSOLE_H
#include <machine/console.h>
#endif
#ifdef HAVE_SYS_CONSIO_H
#include <sys/consio.h>
#endif
#ifdef CONS_MOUSECTL
A mouse is a mouse is a mouse
#endif], aumix_cv_cons_mousectl=yes, aumix_cv_cons_mousectl=no)])
    if test $aumix_cv_cons_mousectl = yes; then
      AC_DEFINE(HAVE_SYSMOUSE, 1,
	[Define this if you have sysmouse console mouse support and
	want to use it.])
    fi
  )
])
AM_CONDITIONAL(CURSES, test "x$CURSLIB" != "x")
AC_SUBST(CURSLIB)

dnl The built-in labels may not match up to the actual sound driver, so
dnl turning this off is the most conservative thing.
AC_MSG_CHECKING([whether built-in label text is requested])
AC_ARG_ENABLE(own-labels,
  [  --enable-own-labels     use built-in label text (may not match system) ],
  own_labels=$enableval, own_labels=no)
AC_MSG_RESULT($own_labels)
if test $own_labels = yes; then
  AC_DEFINE(USE_OWN_LABELS, 1,
    [Define this to use built-in label text.])
fi

AC_ARG_WITH(gtk,
  [  --without-gtk           compile without GTK+ 2.0 interface],
  gtk_must=off, gtk_must=on)
if test $gtk_must = on; then
  dnl from gftp 
  AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes, no)
  if test "$PKG_CONFIG" = "no"; then
    echo "pkg-config not found--compiling without GTK+ 2.0." ; 
  else
    echo "pkg-config found--compiling with GTK+ 2.0." ; 
    AC_DEFINE(HAVE_GTK, 1,
      [Define this if you want to compile with support for GTK+ 2.0.])
    dnl from GIMP 1.1.6
    dnl Check for GTK+ 2.0
    AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
    dnl Evil stuff to extract GLIB stuff from pkg-config output
    dnl (we want to make sure it matches with the gtk we're using)
    GLIB_CFLAGS=`echo $GTK_CFLAGS | sed 's/^.*\(-I[^ ]*glib[^ ]*  *-I[^ ]*\).*$/\1/'`
    GLIB_LDFLAGS=`echo $GTK_LIBS | sed -e 's/^.*-lgdk[^ ]* *\(-L[^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'`
    if test -z "$GLIB_LDFLAGS" ; then
      GLIB_LDFLAGS=`echo $GTK_LIBS | sed 's/^ *\(-L[^ ]*\) .*$/\1/'`
    fi
    GLIB_LIBS="$GLIB_LDFLAGS `echo $GTK_LIBS | sed 's/^.*\(-lglib[^ ]*\).*$/\1/'`"
    AC_SUBST(GLIB_CFLAGS)
    AC_SUBST(GLIB_LIBS)
    LDFLAGS="$LDFLAGS `echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`"
    LIBS="$LIBS $GTK_LIBS"
  fi
else
  AC_MSG_RESULT([Compiling without GTK+ 2.0.])
fi
AM_CONDITIONAL(GTK, test "$gtk_must" = on && test "$PKG_CONFIG" != "no")

AC_MSG_CHECKING([whether dummy mixer is requested])
AC_ARG_ENABLE(dummy-mixer,
  [  --enable-dummy-mixer	  emulate mixer device internally, for debugging ],
  dummy_mixer=$enableval, dummy_mixer=no)
AC_MSG_RESULT($dummy_mixer)
if test $dummy_mixer = yes; then
  AC_DEFINE(DUMMY_MIXER, 1,
    [Define if you want built-in emulation of a sound driver, for debugging.])
fi

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME

dnl Checks for library functions.
AC_FUNC_ALLOCA 
AC_FUNC_MMAP  
dnl	recommended by autoscan, but gives a warning
dnl	AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(getcwd getwd putenv select)

AC_CONFIG_FILES([Makefile
                 data/Makefile
                 doc/Makefile
                 po/Makefile.in
                 src/Makefile])
AC_OUTPUT