Add realclean target
[jelmer/ptabtools.git] / configure.in
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.53)
4 AC_INIT(ptabtools, 0.4.2, [jelmer@samba.org])
5 AC_CONFIG_SRCDIR([ptb.c])
6 AC_CONFIG_HEADER([config.h])
7
8 # Checks for programs.
9 AC_PROG_CC
10 AC_PROG_INSTALL
11
12 AC_MINGW32
13 AC_EXEEXT
14 AC_OBJEXT
15
16 TARGET_BINS=""
17 TARGET_LIBS=""
18 POPT_LIBS=""
19 AC_SUBST(POPT_LIBS)
20
21 # Checks for libraries.
22 AC_CHECK_LIB([popt], [poptGetArg], [ 
23           POPT_LIBS="-lpopt"
24           TARGET_BINS="$TARGET_BINS ptbdict$EXEEXT ptb2ly$EXEEXT ptb2ascii$EXEEXT ptbinfo$EXEEXT gp2ly$EXEEXT" 
25           ] , AC_MSG_WARN([Popt is required for command-line utilities]))
26 PKG_CHECK_MODULES(LIBXML, libxml-2.0, [
27 if test $ac_cv_lib_popt_poptGetArg = yes; then  
28         TARGET_BINS="$TARGET_BINS ptb2xml$EXEEXT" 
29 fi
30 ] , AC_MSG_WARN([libxml not found: not building ptb2xml]))
31 PKG_CHECK_MODULES(LIBXSLT, libxslt, AC_DEFINE(HAVE_XSLT, 1, [whether libxslt is available]) , AC_MSG_WARN([libxslt not found: ptb2xml will not support musicxml]))
32
33 if test "$MINGW32" = "yes"; then 
34         TARGET_BINS="$TARGET_BINS ptb.dll" 
35 else
36         TARGET_LIBS="$TARGET_LIBS libptb.so.$PACKAGE_VERSION libptb.a"
37 fi
38
39 AC_SUBST(DLLFLAGS)
40 AC_SUBST(TARGET_BINS)
41 AC_SUBST(TARGET_LIBS)
42
43 # Checks for header files.
44 AC_HEADER_STDC
45 AC_HEADER_TIME
46 AC_CHECK_HEADERS([stdlib.h string.h unistd.h popt.h sys/time.h ctype.h])
47
48 # Checks for typedefs, structures, and compiler characteristics.
49 AC_C_CONST
50 AC_TYPE_SIZE_T
51
52 AC_CONFIG_FILES([Makefile.settings ptabtools.spec])
53 AC_OUTPUT