#!/bin/sh # Run this to generate all the initial makefiles, etc. # Ripped off from Mono, which ripped off from GNOME macros version DIE=0 srcdir=`dirname $0` test -z "$srcdir" && srcdir=. if [ -n "$MONO_PATH" ]; then # from -> /mono/lib:/another/mono/lib # to -> /mono /another/mono for i in `echo ${MONO_PATH} | tr ":" " "`; do i=`dirname ${i}` if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" fi if [ -n "{i}" -a -d "${i}/bin" ]; then PATH="${i}/bin:$PATH" fi done export PATH fi (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed to compile Mono." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if [ -z "$LIBTOOL" ]; then LIBTOOL=`which glibtool 2>/dev/null` if [ ! -x "$LIBTOOL" ]; then LIBTOOL=`which libtool` fi fi (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed to compile Mono." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`gettext' installed to compile Mono." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed to compile Mono." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$NOCONFIGURE"; then if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi fi case $CC in xlc ) am_opt=--include-deps;; esac if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." ${LIBTOOL}ize --force --copy fi fi echo "Running aclocal $ACLOCAL_FLAGS ..." aclocal $ACLOCAL_FLAGS || { echo echo "**Error**: aclocal failed. This may mean that you have not" echo "installed all of the packages you need, or you may need to" echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" echo "for the prefix where you installed the packages whose" echo "macros were not found" exit 1 } if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then echo "Running autoheader..." autoheader || { echo "**Error**: autoheader failed."; exit 1; } fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt || { echo "**Error**: automake failed."; exit 1; } echo "Running autoconf ..." autoconf || { echo "**Error**: autoconf failed."; exit 1; } conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile $PKG_NAME || exit 1 else echo Skipping configure process. fi AC_INIT([],[]) AC_PREREQ(2.60) AC_CANONICAL_SYSTEM AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) AM_MAINTAINER_MODE dnl AC_PROG_INTLTOOL([0.25]) AC_PROG_INSTALL ASSEMBLY_NAME= PROJECT_NAME= PROJECT_VERSION=$VERSION PROJECT_DESCRIPTION="" PROJECT_TYPE="" AC_SUBST(ASSEMBLY_NAME) AC_SUBST(PROJECT_NAME) AC_SUBST(PROJECT_VERSION) AC_SUBST(DESCRIPTION) AC_MSG_CHECKING([assembly type]) case $PROJECT_TYPE in *Exe) ASSEMBLY_EXTENSION=exe ;; *Library) ASSEMBLY_EXTENSION=dll ;; *) AC_MSG_ERROR([*** Please add support for project type $PROJECT_TYPE to configure.ac checks!]) ;; esac AC_MSG_RESULT([$PROJECT_TYPE]) AC_SUBST(ASSEMBLY_EXTENSION) AC_MSG_CHECKING([whether we're compiling from an RCS]) if test -f "$srcdir/.cvs_version" ; then from_rcs=cvs else if test -f "$srcdir/.svn/entries" ; then from_rcs=svn else from_rcs=no fi fi AC_MSG_RESULT($from_rcs) MONO_REQUIRED_VERSION=1.1 PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) if test "x$has_mono" = "xtrue"; then AC_PATH_PROG(RUNTIME, mono, no) AC_PATH_PROG(CSC, gmcs, no) AC_PATH_PROG(RESGEN, resgen2, no) if test `uname -s` = "Darwin"; then LIB_PREFIX= LIB_SUFFIX=.dylib else LIB_PREFIX=.so LIB_SUFFIX= fi else AC_PATH_PROG(CSC, csc.exe, no) if test x$CSC = "xno"; then AC_MSG_ERROR([You need to install either mono or .Net]) else RUNTIME= LIB_PREFIX= LIB_SUFFIX= fi fi AC_PATH_PROG(GACUTIL, gacutil) if test "x$GACUTIL" = "xno" ; then AC_MSG_ERROR([No gacutil tool found]) fi GACUTIL_FLAGS='/package /gacdir $(DESTDIR)$(prefix)/lib' AC_SUBST(GACUTIL_FLAGS) AC_SUBST(PATH) AC_SUBST(LD_LIBRARY_PATH) AC_SUBST(LIB_PREFIX) AC_SUBST(LIB_SUFFIX) AC_SUBST(RUNTIME) AC_SUBST(CSC) AC_SUBST(RESGEN) AC_SUBST(GACUTIL) AC_SUBST(BASE_DEPENDENCIES_CFLAGS) AC_SUBST(BASE_DEPENDENCIES_LIBS) dnl Find monodoc MONODOC_REQUIRED_VERSION=1.0 AC_SUBST(MONODOC_REQUIRED_VERSION) PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no) if test "x$enable_monodoc" = "xyes"; then AC_PATH_PROG(MONODOC, monodoc, no) if test x$MONODOC = xno; then enable_monodoc=no fi else MONODOC= fi AC_SUBST(MONODOC) AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") winbuild=no case "$host" in *-*-mingw*|*-*-cygwin*) winbuild=yes ;; esac AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes) AC_CONFIG_FILES() AC_CONFIG_FILES(.pc) AC_CONFIG_FILES(Makefile) AC_OUTPUT echo "===" echo "" echo "Project configuration summary" echo "" echo " * Installation prefix: $prefix" echo " * compiler: $CSC" echo " * Documentation: $enable_monodoc ($MONODOC)" echo " * Project Name: $PROJECT_NAME" echo " * Version: $PROJECT_VERSION" echo "" echo "===" ASSEMBLY=$(ASSEMBLY_NAME).$(ASSEMBLY_EXTENSION) dir = $(prefix)/lib/ _DATA = $(ASSEMBLY) $(ASSEMBLY).config bin_SCRIPTS= pkgconfigdir = $(prefix)/lib/pkgconfig pkgconfig_DATA = .pc dir = $(prefix)/lib/mono/ _DATA = $(ASSEMBLY).config noinst_DATA = $(ASSEMBLY) PACKAGES = BINARY_LIBS = SYSTEM_LIBS = RESOURCES_SRC = RESOURCES = $(RESOURCES_SRC:.resx=.resources) SOURCES = EXTRA_DIST=$(SOURCES) $(BINARY_LIBS) $(RESOURCES_SRC) install-sh missing CLEANFILES=$(ASSEMBLY) /$(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response $(RESOURCES) $(SOURCES) $(BINARY_LIBS) mkdir -p doc && mkdir -p && $(CSC) /out:$@ \ /target: \ $(addprefix /resource:$(srcdir)/, $(RESOURCES)) \ $(addprefix /pkg:, $(PACKAGES)) \ $(addprefix /r:, $(SYSTEM_LIBS)) \ $(addprefix /r:$(srcdir)/, $(BINARY_LIBS)) \ @$(srcdir)/$(ASSEMBLY).response \ /doc:doc/ \ /keyfile:$(srcdir)/ \ /unsafe \ && rm -f $(ASSEMBLY) \ && ln $@ $(ASSEMBLY) CLEANFILES+=/$(ASSEMBLY) EXTRA_DIST+= : /$(ASSEMBLY) rm -f $(ASSEMBLY) \ && ln /$(ASSEMBLY) $(ASSEMBLY) _install-data-local: /$(ASSEMBLY) echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; _uninstall-local: if [`gacutil -l | grep "Number" | awk -F= '{print $$2}'` -gt "0" ] ; \ then \ echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ fi noinst__dir = $(prefix)/lib/mono/ noinst___DATA = /$(ASSEMBLY) $(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response: $(srcdir)/Makefile echo "$(addprefix $(srcdir)/, $(SOURCES))" > $@ all: $(ASSEMBLY) # rule to compile .resx files to .resources %.resources: %.resx $(RESGEN) /useSourcePath /compile $(@:.resources=.resx) install-data-local: _install-data-local uninstall-local: _uninstall-local #dir+=$(noinst__dir) #_DATA+=$(noinst___DATA) prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib/mono/@PROJECT_NAME@ Name: Description: Version: @PROJECT_VERSION@ Requires: Libs: -r:${libdir}/@PROJECT_NAME@.dll #!/bin/sh # Run this to generate all the initial makefiles, etc. # Ripped off from Mono, which ripped off from GNOME macros version DIE=0 srcdir=`dirname $0` test -z "$srcdir" && srcdir=. if [ -n "$MONO_PATH" ]; then # from -> /mono/lib:/another/mono/lib # to -> /mono /another/mono for i in `echo ${MONO_PATH} | tr ":" " "`; do i=`dirname ${i}` if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" fi if [ -n "{i}" -a -d "${i}/bin" ]; then PATH="${i}/bin:$PATH" fi done export PATH fi (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed to compile Mono." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if [ -z "$LIBTOOL" ]; then LIBTOOL=`which glibtool 2>/dev/null` if [ ! -x "$LIBTOOL" ]; then LIBTOOL=`which libtool` fi fi (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed to compile Mono." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ (gettext --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`gettext' installed to compile Mono." echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" echo "(or a newer version if it is available)" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed to compile Mono." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" echo "(or a newer version if it is available)" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi case $CC in xlc ) am_opt=--include-deps;; esac if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." ${LIBTOOL}ize --force --copy fi fi echo "Running aclocal $ACLOCAL_FLAGS ..." aclocal $ACLOCAL_FLAGS || { echo echo "**Error**: aclocal failed. This may mean that you have not" echo "installed all of the packages you need, or you may need to" echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" echo "for the prefix where you installed the packages whose" echo "macros were not found" exit 1 } if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then echo "Running autoheader..." autoheader || { echo "**Error**: autoheader failed."; exit 1; } fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt || { echo "**Error**: automake failed."; exit 1; } echo "Running autoconf ..." autoconf || { echo "**Error**: autoconf failed."; exit 1; } echo Running /autogen.sh ... (cd $srcdir/ ; NOCONFIGURE=1 /bin/sh ./autogen.sh "$@") echo Done running /autogen.sh ... conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile $PKG_NAME || exit 1 else echo Skipping configure process. fi AC_INIT([]-solution,[]) AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) EXTRA_DIST="install-sh missing" SOLUTION_NAME= SOLUTION_VERSION=$VERSION SOLUTION_DESCRIPTION="" AC_SUBST(DESCRIPTION) AM_MAINTAINER_MODE dnl AC_PROG_INTLTOOL([0.25]) AC_PROG_INSTALL AC_MSG_CHECKING([whether we're building from an RCS]) if test -f "$srcdir/.cvs_version" ; then from_rcs=cvs else if test -f "$srcdir/.svn/entries" ; then from_rcs=svn else from_rcs=no fi fi AC_MSG_RESULT($from_rcs) CONFIG="Release" AC_SUBST(CONFIG) AC_CONFIG_SUBDIRS( ) AC_OUTPUT([ Makefile ]) echo "===" echo "" echo "Solution configuration summary" echo "" echo " * Solution Name: $SOLUTION_NAME" echo " * Version: $SOLUTION_VERSION" echo " * Packages:" echo " - " echo "" echo "===" SUBDIRS = #! /bin/sh PACKAGE= prefix=@prefix@ exec_prefix=@exec_prefix@ # %%$@%$# why oh why isn't it $sharedir/ # Day changed to 30 Mar 2007 # ... # 07:50 < cj> why are we installing .exe assemblies to $prefix/lib/$package/ and # not $prefix/share/$package ? # 07:50 < jonp> momentum. # 07:50 < jonp> and it's hard to say that a .exe isn't platform specific # 07:50 < jonp> as it can still contain DllImport's which make platform # assumptions packagedir=$prefix/lib/ export MONO_PATH=$MONO_PATH exec @RUNTIME@ $packagedir/$PACKAGE.exe "$@"