File: configure.ac

package info (click to toggle)
audacity 2.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 80,076 kB
  • sloc: cpp: 192,859; ansic: 158,072; sh: 34,021; python: 24,248; lisp: 7,495; makefile: 3,667; xml: 573; perl: 31; sed: 16
file content (130 lines) | stat: -rw-r--r-- 3,530 bytes parent folder | download
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
#
# FileDialog
#

AC_PREREQ([2.59])
AC_INIT([FileDialog],[1.0],[audacity.sourceforge.net],[FileDialog])
AC_CONFIG_AUX_DIR([autotools])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([1.11 dist-xz foreign no-dist-gzip subdir-objects -Wall])
AM_MAINTAINER_MODE([disable])

#
# Checks for programs.
#
AC_PROG_CXX
AM_PROG_AR

LT_INIT

#
# Checks for libraries.
#
AC_HEADER_STDC

#
# Check for debug
#
AC_ARG_ENABLE(static-wx,
            [AS_HELP_STRING([--enable-static-wx],[link wx statically (default=no)])],
            static_wx_preference="--static=$enableval",
            static_wx_preference="")

AC_ARG_ENABLE(unicode,
            [AS_HELP_STRING([--enable-unicode],[enable unicode support (default=no)])],
            unicode_preference="--unicode=$enableval",
            unicode_preference="")

AC_ARG_ENABLE(debug,
            [AS_HELP_STRING([--enable-debug],[enable debug support (default=none)])],
            debug_preference="--debug=$enableval",
            debug_preference="")

AC_ARG_WITH(wx-version,
            [AS_HELP_STRING([--with-wx-version],[override default wxWidgets version [2.8, 3.0]])],
            wx_preference="--version=$withval",
            wx_preference="")

AC_ARG_WITH(wx-config,
            [AS_HELP_STRING([--with-wx-config],[override default wxWidgets config script])],
            wx_config="$withval",
            wx_config="")

dnl wxWidgets -- we assume that if wx-config is found, wxWidgets is successfully installed.
AC_PATH_PROG(WX_CONFIG, wx-config, no, $PATH:/usr/local/bin )
if [[ "$WX_CONFIG" = "no" ]] ; then
   AC_MSG_ERROR("Could not find wx-config: is wxWidgets installed? is wx-config in your path?")
fi

dnl Gather wx arguments

wxconfigargs="$static_wx_preference $unicode_preference $debug_preference $wx_preference"
WX_CXXFLAGS=$($WX_CONFIG $wxconfigargs --cxxflags)
WX_LIBS=""
AC_SUBST([WX_CXXFLAGS])
AC_SUBST([WX_LIBS])

PKG_CHECK_MODULES(GTK, gtk+-2.0, have_gtk="yes", have_gtk="no")

dnl Get wx version
wx_version=`${WX_CONFIG} $wxconfigargs --version`

dnl OS- and wx-version-specific configuration

AC_CANONICAL_HOST

IMPLEMENTATION="generic"
case "${wx_version}" in
   2.8.*)
      case "${host_os}" in
         darwin*)
            dnl Mac OS X configuration
            IMPLEMENTATION="mac"
         ;;

         cygwin*)
            dnl Windows/CygWin configuration
            IMPLEMENTATION="win"
         ;;

         *)
            if test "$have_gtk" = "yes"; then
               AC_DEFINE(HAVE_GTK, 1, [Define to 1 if GTK+ is available.])
               IMPLEMENTATION="gtk"
            fi
         ;;
      esac
   ;;

   3.0.*)
      dnl wx3.0 version for all platforms
      IMPLEMENTATION="wx30"
   ;;

   *)
      wx_list=`${WX_CONFIG} --list`
      AC_MSG_ERROR([Unable to locate a suitable configuration of wxWidgets v2.8.x
      or v3.0.x. The currently available configurations are listed below. If
      necessary, either install the package for your distribution or download a
      suitable version of wxWidgets from http://wxwidgets.org.
      ${wx_list}])
   ;;
esac

AC_SUBST([IMPLEMENTATION])
AM_CONDITIONAL([GENERIC], test "$IMPLEMENTATION" = "generic")
AM_CONDITIONAL([GTK], test "$IMPLEMENTATION" = "gtk")
AM_CONDITIONAL([MAC], test "$IMPLEMENTATION" = "mac")
AM_CONDITIONAL([WINDOWS], test "$IMPLEMENTATION" = "win")
AM_CONDITIONAL([WX30], test "$IMPLEMENTATION" = "wx30")

echo "Implementation to use: $IMPLEMENTATION"

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([FileDialogPrivate.h Makefile])

#
# Write it all out
#
AC_OUTPUT