configure.ac 4.6 KB
Newer Older
1
AC_PREREQ([2.54])
2

3 4
# PACKAGE_VERSION variable comes from here (e.g. to show it to the user,
# distribution package names, etc.)
5
AC_INIT([chronojump], [m4_esyscmd_s([git describe])])
6

7 8
# This is used in AssemblyInfo.cs.in: it can only be major.minor.release format
AC_SUBST([PACKAGE_SIMPLIFIED_VERSION], [m4_esyscmd_s([git describe --abbrev=0])])
9 10 11 12

# Date of the last commit
AC_SUBST([BUILD_CHRONOJUMP_LAST_COMMIT_TIMESTAMP], [m4_esyscmd_s([git log -1 --format=%ct])])

13 14 15 16
# GIT_BRANCH is used by cerbero to know which branch needs to be build (on OSX)
AC_SUBST([GIT_BRANCH], [m4_esyscmd_s([git symbolic-ref --short HEAD])])


17 18
AM_INIT_AUTOMAKE([foreign])

19 20 21 22 23 24 25 26
AC_CONFIG_MACRO_DIR([build/m4])
AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/shamrock -I build/m4/shave \${ACLOCAL_FLAGS}"])

AM_PROG_CC_STDC
AC_ISC_POSIX
AC_PROG_CC
AC_C_CONST
AC_HEADER_STDC
27
AM_PROG_LIBTOOL
28
AM_PATH_PYTHON
29
LT_INIT
30

31
dnl Check for pkg-config
32 33 34 35 36
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
        AC_MSG_ERROR([You need to install pkg-config])
fi

37 38 39 40 41
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR


42 43
AC_PROG_INSTALL

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#*******************************************************************************
# Internationalization
#*******************************************************************************
GETTEXT_PACKAGE=chronojump
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])

dnl Check for gettext utils
AC_PATH_PROG(MSGFMT, msgfmt, no)
if test "x$MSGFMT" = "xno"; then
	AC_MSG_ERROR([gettext not found])
else 
	AC_SUBST(MSGFMT,[msgfmt])
fi

IT_PROG_INTLTOOL([0.40.0])
AM_GLIB_GNU_GETTEXT


63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
dnl Mono and C# compiler
dnl Check first for a 4.0 compiler or than fallback to 2.0
SHAMROCK_CHECK_MONO_MODULE(2.4.0)
PKG_CHECK_EXISTS([mono >= 2.8],
		[SHAMROCK_FIND_MONO_4_0_COMPILER
		SHAMROCK_CHECK_MONO_4_0_GAC_ASSEMBLIES([
			System.Data
			Mono.Cairo
			Mono.Posix
			Mono.Data.Sqlite
		])]
,
		[SHAMROCK_FIND_MONO_2_0_COMPILER
		SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
			System.Data
			Mono.Cairo
			Mono.Posix
			Mono.Data.Sqlite
		])])
AC_SUBST(MCS, ["$MCS"])
SHAMROCK_FIND_MONO_RUNTIME
84

85
dnl Check for gettext utils
86 87 88 89 90 91
AC_PATH_PROG(MSGFMT, msgfmt, no)
if test "x$MSGFMT" = "xno"; then
	AC_MSG_ERROR([gettext not found])
else 
	AC_SUBST(MSGFMT,[msgfmt])
fi
92

93 94 95 96 97 98 99
AC_MSG_CHECKING([for the OS type])
ostype=""

case "$host" in
  *-*-mingw*|*-*-cygwin*)
    ostype=Windows
    AC_DEFINE(OSTYPE_WINDOWS)
100
    GMCS_FLAGS="$GMCS_FLAGS -define:OSTYPE_WINDOWS"
101 102 103 104 105 106 107 108 109 110 111 112 113
    ;;
  *-*-darwin*)
    AC_DEFINE(OSTYPE_OS_X)
    ostype=OS_X
    ;;
  *-*-linux*)
    AC_DEFINE(OSTYPE_LINUX)
    ostype=Linux
    ;;
esac
AM_CONDITIONAL(OSTYPE_WINDOWS, test x$ostype = xWindows)
AM_CONDITIONAL(OSTYPE_OS_X, test x$ostype = xOS_X)
AM_CONDITIONAL(OSTYPE_LINUX, test x$ostype = xLinux)
114
AC_SUBST(GMCS_FLAGS, ["$GMCS_FLAGS"])
115 116
AC_MSG_RESULT($ostype)

117

118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
AC_ARG_ENABLE(debug,
	AC_HELP_STRING([--enable-debug],
		[Use 'DEBUG' Configuration [default=NO]]),
		enable_debug=yes, enable_debug=no)
AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
if test "x$enable_debug" = "xyes" ; then
	CONFIG_REQUESTED="yes"
fi
AC_ARG_ENABLE(release,
	AC_HELP_STRING([--enable-release],
		[Use 'RELEASE' Configuration [default=YES]]),
		enable_release=yes, enable_release=no)
AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
if test "x$enable_release" = "xyes" ; then
	CONFIG_REQUESTED="yes"
fi
if test -z "$CONFIG_REQUESTED" ; then
	AM_CONDITIONAL(ENABLE_RELEASE, true)
	enable_release=yes
fi

139 140 141
dnl Disable tests
AM_CONDITIONAL(ENABLE_TESTS, test x = y)

142 143 144 145 146 147

dnl package checks, common for all configs
PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0])
PKG_CHECK_MODULES([GLADE_SHARP_20], [glade-sharp-2.0])

148
PKG_CHECK_MODULES(CESARPLAYER, [gtk+-2.0 >= 2.8 gdk-2.0 gio-2.0 glib-2.0 gobject-2.0])
149 150 151
AC_SUBST(CESARPLAYER_CFLAGS)
AC_SUBST(CESARPLAYER_LIBS)

152 153
AC_CONFIG_FILES([
Makefile
Andoni Morales's avatar
Andoni Morales committed
154 155
build/Makefile
build/m4/Makefile
156 157
build/m4/shave/shave
build/m4/shave/shave-libtool
158 159 160 161
chronopic-firmware/Makefile
chronopic-firmware/chronopic-firmwarecord/Makefile
chronopic-firmware/chronopic-firmwarecord/libIris/Makefile
chronopic-firmware/chronopic-firmwarecord/chronopic-firmwarecord
162
chronopic-tests/Makefile
163
ffmpegBinariesMac/Makefile
164
src/Makefile
165
src/Mini/Makefile
166
src/chronojump-importer/Makefile
Xavier de Blas's avatar
Xavier de Blas committed
167
rfid/Makefile
Andoni Morales's avatar
Andoni Morales committed
168
po/Makefile.in
169
encoder/Makefile
Xavier de Blas's avatar
Xavier de Blas committed
170
r-scripts/Makefile
Andoni Morales's avatar
Andoni Morales committed
171
manual/Makefile
172
src/AssemblyInfo.cs
173
src/buildInfo.cs
174 175
src/chronojump
src/chronojump.desktop
176
src/Mini/chronojump_mini
177 178
win32/chronojump_innosetup.iss
win32/Makefile
179 180 181
data/Makefile
data/theme/Makefile
data/icons/Makefile
182 183
])

184 185
AC_CONFIG_FILES([deb-pkg.sh], [chmod +x deb-pkg.sh])

186
AC_OUTPUT