File: configure.ac

package info (click to toggle)
audacity 1.3.12-6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 41,528 kB
  • ctags: 30,395
  • sloc: cpp: 166,518; ansic: 105,310; sh: 24,447; lisp: 7,842; makefile: 1,701; python: 240; perl: 31; xml: 8
file content (109 lines) | stat: -rw-r--r-- 2,838 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
#
# FileDialog
#

AC_INIT(FileDialog, 1.0, audacity.sourceforge.net, FileDialog)
AC_CONFIG_FILES([Makefile config.h])
AC_SUBST(EXTRADEPS)
AC_SUBST(EXTRAOBJS)
AC_SUBST(HAVE_GTK)

#
# Checks for programs.
#
AC_PROG_CXX
AC_PROG_RANLIB
AC_PATH_PROG(AR, ar, no)
if [[ $AR = "no" ]] ; then
    AC_MSG_ERROR("Could not find ar - needed to create a library");
fi

#
# Checks for libraries.
#
AC_HEADER_STDC

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


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

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

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

AC_ARG_WITH(wx-config,
            [AC_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

CPPFLAGS="$CPPFLAGS `$WX_CONFIG $static_preference $unicode_preference $debug_preference $wx_preference --cxxflags`"

dnl OS-specific configuration

AC_CANONICAL_HOST

case "${host_os}" in
   darwin*)
      dnl Mac OS X configuration
      EXTRADEPS="mac/FileDialogPrivate.h"
      EXTRAOBJS="mac/FileDialogPrivate.o"
   ;;      

   cygwin*)
      dnl Windows/CygWin configuration
      EXTRADEPS="win/FileDialogPrivate.h"
      EXTRAOBJS="win/FileDialogPrivate.o"
   ;;

   *)
      dnl Unix configuration
      AM_PATH_GTK_2_0(2.4.0,
            have_gtk="yes",
            have_gtk="no")
      if [[ "$have_gtk" = "yes" ]]
      then
         CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
         EXTRADEPS="gtk/FileDialogPrivate.h gtk/private.h"
         EXTRAOBJS="gtk/FileDialogPrivate.o"
         HAVE_GTK=1
      else
         EXTRADEPS="generic/FileDialogPrivate.h"
         EXTRAOBJS="generic/FileDialogPrivate.o"
         HAVE_GTK=0
      fi
   ;;
esac

#
# Write it all out
#
AC_OUTPUT