Removed inlines
[liblqr.git] / configure.ac
blob309c40db67d30709141dbde6b7a44c9bd17bcc2d
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.63)
5 dnl remember to edit the .pc file name
6 dnl and lqr/Makefile.am if you change these 
7 m4_define([library_base_name], [lqr])
8 m4_define([api_version], [1])
10 dnl Name of library
11 m4_define([library_sname], [library_base_name-api_version])
12 m4_define([library_name], [liblqr-api_version])
15 dnl These three define the library version number
16 m4_define([package_major_version], [0])
17 m4_define([package_minor_version], [5])
18 m4_define([package_micro_version], [0git])
20 m4_define([package_version],
21           [package_major_version.package_minor_version.package_micro_version])
23 m4_define([ltversion_current], [4])
24 m4_define([ltversion_revision], [0])
25 m4_define([ltversion_age], [4])
27 AC_INIT([library_name], [package_version])
29 AC_PREFIX_DEFAULT([/usr])
31 AC_DEFINE(LIBRARY_NAME, PACKAGE_NAME, [Library name])
33 AC_DEFINE(PACKAGE_MAJOR_VERSION, package_major_version, [Package major version])
34 AC_DEFINE(PACKAGE_MINOR_VERSION, package_minor_version, [Package minor version])
35 AC_DEFINE(PACKAGE_MICRO_VERSION, package_micro_version, [Package micro version])
37 AC_DEFINE(LTVERSION_CURRENT, ltversion_current, [Library current version])
38 AC_DEFINE(LTVERSION_REVISON, ltversion_revision, [Library revision])
39 AC_DEFINE(LTVERSION_AGE, ltversion_age, [Library age])
41 LIBRARY_BASE_NAME=library_base_name
42 AC_SUBST(LIBRARY_BASE_NAME)
43 API_VERSION=api_version
44 AC_SUBST(API_VERSION)
45 LIBRARY_NAME=library_name
46 AC_SUBST(LIBRARY_NAME)
47 LIBRARY_SNAME=library_sname
48 AC_SUBST(LIBRARY_SNAME)
50 PACKAGE_VERSION=package_major_version.package_minor_version.package_micro_version
51 AC_SUBST(PACKAGE_VERSION)
53 LTVERSION=ltversion_current:ltversion_revision:ltversion_age
54 AC_SUBST(LTVERSION)
56 AC_CONFIG_SRCDIR([lqr/lqr_carver.c])
57 AC_CONFIG_HEADERS([config.h])
59 AC_CONFIG_MACRO_DIR([m4])
61 AM_INIT_AUTOMAKE([-Wall -Werror])
63 AC_ISC_POSIX
64 AC_PROG_CC
65 AC_PROG_CXX
66 AM_PROG_CC_STDC
67 AC_PROG_INSTALL
68 AC_PROG_LN_S
69 AC_PROG_MAKE_SET
70 AC_PROG_RANLIB
71 AC_HEADER_STDC
73 AC_C_INLINE
74 AC_C_VOLATILE
76 AC_DISABLE_STATIC
77 LT_INIT([win32-dll])
79 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
81 AM_MAINTAINER_MODE
83 dnl Use -Wall if we have gcc.
84 changequote(,)dnl
85 if test "x$GCC" = "xyes"; then
86   case " $CFLAGS " in
87   *[\ \ ]-Wall[\ \      ]*) ;;
88   *) CFLAGS="$CFLAGS -Wall" ;;
89   esac
91 changequote([,])dnl
93 GLIB_REQUIRED_VERSION=2.8.0
95 PKG_CHECK_MODULES(GLIB,
96   glib-2.0 >= $GLIB_REQUIRED_VERSION)
98 GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0`
99 AC_SUBST(GLIB_CFLAGS)
101 GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0`
102 AC_SUBST(GLIB_LIBS)
104 GLIB_DIR=`$PKG_CONFIG --variable=libdir glib-2.0`
105 AC_SUBST(GLIB_DIR)
107 AC_CHECK_FUNCS(bind_textdomain_codeset)
109 DATADIR="${datadir}/library_name"
110 AC_SUBST(DATADIR)
112 AC_ARG_ENABLE([install-man],
113      [AS_HELP_STRING([--enable-install-man], [Install man pages])],
114      [AS_CASE(["${enableval}"],
115           [yes], [install_man=true],
116           [no], [install_man=false],
117           [AC_MSG_ERROR([bad value ${enableval} for --enable-install-man])]
118           )],
119      [install_man=false])
120 AM_CONDITIONAL([INSTMAN], [test x$install_man = xtrue])
122 AC_ARG_ENABLE([legacy-macros],
123      [AS_HELP_STRING([--disable-legacy-macros], [Disable legacy macros])],
124      [AS_CASE([["${enableval}"]],
125           [yes], [legacy_macros=true],
126           [no], [legacy_macros=false],
127           [AC_MSG_ERROR([bad value ${enableval} for --enable-legacy-macros])]
128           )],
129      [legacy_macros=true])
130 AS_IF([test "x$legacy_macros" = "xfalse"],
131       [AC_DEFINE([LQR_DISABLE_LEGACY_MACROS],[],[Disable legacy macros])],
132       [:]
133       )
135 AC_ARG_ENABLE([declspec],
136      [AS_HELP_STRING([--disable-declspec], [Disable Win32 __declspec directives (only meaningful for building static library on MinGW)])],
137      [AS_CASE([["${enableval}"]],
138           [yes], [declspec=true],
139           [no], [declspec=false],
140           [AC_MSG_ERROR([bad value ${enableval} for --enable-declspec])]
141           )],
142      [declspec=true])
143 AS_IF([test "x$declspec" = "xfalse"],
144       [AC_DEFINE([LQR_DISABLE_DECLSPEC],[],[Disable __declspec directives])],
145       [:]
146       )
149 AC_MSG_CHECKING([[if we are on Win32]])
150 AC_LANG([C])
151 AC_PREPROC_IFELSE([[
152                    #ifndef WIN32
153                    #errrrrrrrrorrrrr
154                    #endif
155                    ]],
156                    [[is_win32=true]],
157                    [[is_win32=false]]
158                    )
159 AS_IF([test "x$is_win32" = "xtrue"],
160       [AC_MSG_RESULT([yes]); LT_NOUNDEF_FLAG="-no-undefined"; FVISIBILITY_FLAG=""],
161       [AC_MSG_RESULT([no]); LT_NOUNDEF_FLAG=""; FVISIBILITY_FLAG="-fvisibility=\"hidden\""],
162       )
164 AC_SUBST(LT_NOUNDEF_FLAG)
165 AC_SUBST(FVISIBILITY_FLAG)
167 AC_DEFINE([LQR_EXPORTS],[],[Flag for Windows DLL creation])
169 AC_CONFIG_FILES([
170 Makefile
171 lqr/Makefile
172 man/Makefile
173 lqr-1.pc
177 AC_OUTPUT