File: configure.in

package info (click to toggle)
gamix 1.99.p14.debian1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,512 kB
  • ctags: 1,498
  • sloc: ansic: 13,418; sh: 7,929; makefile: 326; yacc: 316; sed: 16
file content (120 lines) | stat: -rw-r--r-- 2,752 bytes parent folder | download | duplicates (3)
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

dnl Process this file with autoconf to produce a configure script.
AC_INIT()
AM_INIT_AUTOMAKE(gamix, 1.99.p14)
AC_PREFIX_DEFAULT(/usr)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_ISC_POSIX

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC

CFLAGS_ORIG="$CFLAGS"
LIBS_ORIG="$LIBS"

AM_PATH_ALSA(0.5.0)

CFLAGS="$CFLAGS_ORIG"
LIBS="$LIBS_ORIG"
AC_PATH_PROG(PKGC,pkg-config,no)
if test ! "$PKGC" = "no" ; then
  if ! $PKGC gtk+ ; then
    PKGC="no"
  fi
fi

if test "$PKGC" = "no" ; then
  AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR([*** GLIB >= 1.2.0 not installed - please install first ***]))
  CFLAGS="$CFLAGS_ORIG"
  LIBS="$LIBS_ORIG"

  AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([*** GTK+ >= 1.2.0 not installed - please install first ***]),gthread)

  dnl G_CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS"
  dnl G_LIBS="$GLIB_LIBS $GTK_LIBS"
else
  AC_ARG_WITH(gtk-target, [  --with-gtk-target target gtk [default=gtk+]],
	[gtktarget="gtk+$withval"],[gtktarget="gtk+"])
  PKG_CHECK_MODULES(GTK, $gtktarget > 1.2.0)
  if pkg-config "$gtktarget > 2.0.0" ; then
    GTK2=1
    AC_DEFINE([GTK2],1,[Define if use gtk+2.0])
  fi
  dnl G_CFLAGS="`$PKG_CONFIG --cflags $gtktarget`"
  dnl G_LIBS="`$PKG_CONFIG --libs $gtktarget`"
fi

CFLAGS="$CFLAGS_ORIG"
LIBS="$LIBS_ORIG"

dnl Checks for library functions.
AC_CHECK_FUNCS(mkdir)

ALL_LINGUAS="ja de"
AM_GNU_GETTEXT(use-libtool)
dnl AM_GNU_GETTEXT([no-libtool], [need-ngettext])

CFLAGS="$CFLAGS_ORIG $ALSA_CFLAGS"
LIBS="$LIBS_ORIG $LIBS"
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <sys/asoundlib.h>

int main( int argc , char **argv ) {
#if SND_LIB_VERSION >= SND_PROTOCOL_VERSION(0,6,0)
  exit(1));
#else
  exit(0);
#endif
}

],
gamix_src=gamix,
gamix_src=gamix2,
gamix_src=gamix)
AC_SUBST(gamix_src)

AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <sys/asoundlib.h>

int main( int argc , char **argv ) {
	snd_ctl_t *handle;
	snd_ctl_open(&handle,"hw:0");
	exit(0);
}

],
sndctl=yes,
sndctl=no,
sndctl=no)
if test "x$sndctl" = "xyes" ; then
  AC_DEFINE([SNDCTLOPEN2],1,[Define if snd_ctl_open need 2 argment])
fi

if test "x$gamix_src" = "gamix" ; then
  echo "Warning: gamix $VERSION is for ALSA 0.9.0 betaX."
  echo "         if you comipe under ALSA 0.5.x, gamix version is 1.11."
fi

AC_ARG_ENABLE(addconfhost,
  [  --enable-addconfhost    Add hostname to Config file name [default=no]],
  [ enable_addconfhost=yes ])
if test "$enable_addconfhost" = "yes" ; then
  AC_DEFINE([ADD_CONFHOSTNAME],1,[Define if add hostname to config file])
fi

CFLAGS="$CFLAGS_ORIG $ALSA_CFLAGS $GTK_CFLAGS"
LIBS="$LIBS_ORIG $ALSA_LIBS $GTK_LIBS"

AC_OUTPUT(Makefile gamix/Makefile gamix2/Makefile m4/Makefile intl/Makefile po/Makefile.in)