icon.repo
[tfs.git] / configure.in
blobdd384aabe45912f73340b1ad976f3a54f352c4d3
1 AC_INIT(opentf, [0.5.3])
3 PKG_PROG_PKG_CONFIG
5 AC_ARG_ENABLE(gtk, 
6         [  --disable-gtk           disable gtk gui support],
7         HAVE_GTK=no,
8   PKG_CHECK_EXISTS(gtk-sharp-2.0, HAVE_GTK=yes, HAVE_GTK=no)
11 PKG_CHECK_EXISTS(monodevelop, HAVE_MD=yes, HAVE_MD=no)
13 HAVE_DOC_TOOLS=no
14 AC_CHECK_PROG(ASCIIDOC, [asciidoc], yes)
15 AC_CHECK_PROG(XMLTO, [xmlto], yes)
17 if test "x$ASCIIDOC" = "xyes"; then 
18   if test "x$XMLTO" = "xyes"; then 
19          HAVE_DOC_TOOLS=yes
20   fi
23 AC_ARG_ENABLE(highlight, 
24         [  --enable-highlight      enable syntax highlighting support],
25   PKG_CHECK_EXISTS(gtksourceview-sharp-2.0, HAVE_GTK_SOURCEVIEW=yes, HAVE_GTK_SOURCEVIEW=no)
26   PKG_CHECK_EXISTS(gnome-vfs-sharp-2.0, HAVE_GNOME_VFS=yes, HAVE_GNOME_VFS=no)
29 AC_ARG_ENABLE(keyring, 
30         [  --disable-keyring       disable gnome keyring support],
31         HAVE_GNOME_KEYRING=no,
32         PKG_CHECK_EXISTS(gnome-keyring-sharp, HAVE_GNOME_KEYRING=yes, HAVE_GNOME_KEYRING=no)
35 AC_ARG_WITH(mslibs, 
36         [  --with-mslibs=<dir>     location of Microsoft's Team Foundation Assemblies],
37         HAVE_MSLIBS=$withval,
38         HAVE_MSLIBS=no
41 MONO_VERSION=`pkg-config --modversion mono`
42 HAVE_ATLEAST_GTK_210=`pkg-config --atleast-version=2.10 gtk-sharp-2.0 && echo 1`
43 MD_LIBPATH=`pkg-config monodevelop --variable libdir`
45 HAVE_MAGIC=maybe
47 AC_ARG_ENABLE(magic, 
48         [  --disable-magic         disable libmagic file attributes],
49         HAVE_MAGIC=no,
52 if test "x$HAVE_MAGIC" = "xmaybe"; then 
53   AC_CHECK_LIB(magic, magic_open, HAVE_MAGIC=yes, HAVE_MAGIC=no) 
56 if test "x$prefix" = "xNONE"; then 
57          prefix=/usr/local
60 # assume on windows for now
61 if test "x$MONO_VERSION" = "x"; then 
62          MONO_VERSION=csc-2.0
65 HAVE_SYNTAX_HIGHLIGHTING=no
66 if test "x$HAVE_GNOME_VFS" = "xyes" && test "x$HAVE_GTK_SOURCEVIEW" = "xyes"; then
67   HAVE_SYNTAX_HIGHLIGHTING=yes
70 echo "prefix=$prefix" > build/config.make
71 echo "exec_prefix=\${prefix}" >> build/config.make
72 echo "mono_libdir=\${exec_prefix}/lib" >> build/config.make
73 echo "RUNTIME=mono" >> build/config.make
74 echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> build/config.make
75 echo "MONO_VERSION=$MONO_VERSION" >> build/config.make
76 echo "MONODEVELOP_LIBPATH=$MD_LIBPATH" >> build/config.make
77 echo "MCS_FLAGS=-debug+" >> build/config.make
78 echo "HAVE_GTK=$HAVE_GTK" >> build/config.make
79 echo "HAVE_SYNTAX_HIGHLIGHTING=$HAVE_SYNTAX_HIGHLIGHTING" >> build/config.make
80 echo "HAVE_ATLEAST_GTK_210=$HAVE_ATLEAST_GTK_210" >> build/config.make
81 echo "HAVE_MAGIC=$HAVE_MAGIC" >> build/config.make
82 echo "HAVE_MONODEVELOP=$HAVE_MD" >> build/config.make
83 echo "HAVE_GNOME_KEYRING=$HAVE_GNOME_KEYRING" >> build/config.make
84 echo "HAVE_DOC_TOOLS=$HAVE_DOC_TOOLS" >> build/config.make
85 echo "HAVE_MSLIBS=$HAVE_MSLIBS" >> build/config.make
87 AC_CONFIG_FILES([
88   tools/opentf/tf.sh
89   tools/wit/wit.sh
90         tfs.spec
93 AC_OUTPUT
95 echo
96 echo "Configuration Summary"
97 echo "----------------------------------"
98 echo 
99 echo "     File Type Support: " $HAVE_MAGIC
100 echo "   Man Page Generation: " $HAVE_DOC_TOOLS
101 echo "     MonoDevelop Addin: " $HAVE_MD
102 echo " Gnome Keyring Support: " $HAVE_GNOME_KEYRING
103 echo "           Gui Support: " $HAVE_GTK
104 echo "   Syntax Highlighting: " $HAVE_SYNTAX_HIGHLIGHTING
105 echo 
107 if test "${enable_highlight+set}" = set; then
108   if test "x$HAVE_SYNTAX_HIGHLIGHTING" = "xno"; then
109           echo Note: install libgnome-vfs2.0-cil and libgtksourceview2.0-cil
110           echo       for syntax highlighting support in the "explore" command
111   fi
114 if test "x$HAVE_MAGIC" = "xno"; then
115   echo Note: Team Foundation does not natively track file attributes.
116         echo       Install libmagic on debian-based systems, or file-devel on suse-based
117         echo       for automagic file attribute support.
118   echo
121 if test "x$HAVE_DOC_TOOLS" = "xno"; then
122   echo Note: install asciidoc and xmlto for man page generation.
123         echo