PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/configure.ac

http://github.com/hbons/SparkleShare
m4 | 134 lines | 109 code | 25 blank | 0 comment | 0 complexity | b4d3d3bbcc08dd3d8f728572b6804336 MD5 | raw file
  1dnl Process this file with autoconf to produce a configure script.
  2m4_define([sparkleshare_version], [2.0])
  3
  4AC_PREREQ([2.54])
  5AC_INIT([SparkleShare], sparkleshare_version)
  6AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-zip foreign tar-pax])
  7AM_MAINTAINER_MODE
  8
  9dnl Export Version Info
 10AC_SUBST([ASM_VERSION], [sparkleshare_version])
 11
 12dnl pkg-config
 13AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 14if test "x$PKG_CONFIG" = "xno"; then
 15        AC_MSG_ERROR([pkg-config is not installed])
 16fi
 17
 18AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave \${ACLOCAL_FLAGS}"])
 19
 20SHAMROCK_EXPAND_LIBDIR
 21SHAMROCK_EXPAND_BINDIR
 22SHAMROCK_EXPAND_DATADIR
 23
 24AC_PROG_INSTALL
 25
 26dnl Mono and gmcs
 27SHAMROCK_CHECK_MONO_MODULE(2.8)
 28SHAMROCK_FIND_MONO_RUNTIME
 29    
 30PKG_CHECK_EXISTS([mono >= 2.8],
 31[SHAMROCK_FIND_MONO_4_0_COMPILER
 32SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES([
 33    System
 34])]
 35)
 36
 37AC_ARG_ENABLE(debug,
 38	AC_HELP_STRING([--enable-debug],
 39		[Use 'DEBUG' Configuration [default=YES]]),
 40		enable_debug=yes, enable_debug=no)
 41AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
 42if test "x$enable_debug" = "xyes" ; then
 43	CONFIG_REQUESTED="yes"
 44fi
 45AC_ARG_ENABLE(release,
 46	AC_HELP_STRING([--enable-release],
 47		[Use 'RELEASE' Configuration [default=NO]]),
 48		enable_release=yes, enable_release=no)
 49AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
 50if test "x$enable_release" = "xyes" ; then
 51	CONFIG_REQUESTED="yes"
 52fi
 53if test -z "$CONFIG_REQUESTED" ; then
 54	AM_CONDITIONAL(ENABLE_DEBUG, true)
 55	enable_debug=yes
 56fi
 57
 58AC_ARG_ENABLE(appindicator,
 59	AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators ]),
 60	[enable_appindicator=$enableval],
 61	[enable_appindicator="auto"])
 62
 63GUISUBDIRS=
 64
 65OSNAME=`uname -s`
 66if test "$OSNAME" = "Linux" ; then
 67	SPARKLESHARE_CHECK_GTK_SHARP
 68	PKG_CHECK_MODULES(NOTIFY_SHARP, notify-sharp-3.0)
 69
 70	dnl check for webkit2-sharp
 71	PKG_CHECK_MODULES(WEBKIT2_SHARP, webkit2-sharp-4.0, have_webkit2_sharp=yes, have_webkit2_sharp=no)
 72	if test "x$have_webkit2_sharp" = "xno" ; then
 73		AC_MSG_ERROR([webkit2-sharp-4.0 is not installed])
 74	        AC_SUBST(WEBKIT2_SHARP_LIBS)
 75	fi
 76
 77	APPINDICATOR_REQUIRED=0.1
 78
 79	if test x$enable_appindicator = xauto ; then
 80		PKG_CHECK_EXISTS([appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED],
 81			enable_appindicator="yes", enable_appindicator="no")
 82	fi
 83
 84	if test x$enable_appindicator = xyes ; then
 85		PKG_CHECK_EXISTS([appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED],,
 86			AC_MSG_ERROR([appindicator3-sharp-0.1 is not installed]))
 87
 88		PKG_CHECK_MODULES(APP_INDICATOR, appindicator3-sharp-0.1 >= $APPINDICATOR_REQUIRED)
 89		AC_SUBST(APP_INDICATOR_CFLAGS)
 90		AC_SUBST(APP_INDICATOR_LIBS)
 91		AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
 92	fi
 93
 94	GUISUBDIRS=SparkleShare
 95fi
 96
 97AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
 98AM_CONDITIONAL(BUILD_XDG_APP, test x"$prefix" = "/app")
 99
100AC_SUBST([GUISUBDIRS])
101SHAMROCK_CHECK_NUNIT
102SHAVE_INIT([build/m4/shave], [enable])
103
104AC_OUTPUT([
105Makefile
106build/Makefile
107build/m4/Makefile
108build/m4/shave/shave
109build/m4/shave/shave-libtool
110Sparkles/InstallationInfo.Directory.cs
111Sparkles/Makefile
112Sparkles/Git/Makefile
113SparkleShare/Makefile
114SparkleShare/Common/Makefile
115SparkleShare/Common/HTML/Makefile
116SparkleShare/Common/Presets/Makefile
117SparkleShare/Common/Pixmaps/Makefile
118SparkleShare/Linux/Makefile
119SparkleShare/Linux/Pixmaps/Makefile
120SparkleShare/Linux/Pixmaps/icons/Makefile
121SparkleShare/Linux/Pixmaps/icons/hicolor/Makefile
122SparkleShare/Linux/Pixmaps/icons/ubuntu-mono-dark/Makefile
123SparkleShare/Linux/Pixmaps/icons/ubuntu-mono-light/Makefile
124SparkleShare/Linux/sparkleshare
125])
126
127echo "
128SparkleShare ${VERSION}
129
130Configuration:
131       Prefix: ${prefix}
132
133"
134