configure.ac
author J. Ali Harlow <ali@juiblex.co.uk>
Fri May 20 11:20:22 2016 +0100 (2016-05-20)
changeset 18 30dd8888a271
parent 16 579831f324c7
child 20 07699c96ba7b
permissions -rw-r--r--
catalog subsystem should cope with being called with different lua states

whelk 0.3.2 was assuming that lua state would always be the same. If it
wasn't then there would be no cat admin metatable registered in the second
lua state but whelk would just assume that there was causing things to go
wrong. We now use luaL_newmetatable() to test for whether a metatable was
already registered and take the appropriate actions if it wasn't.
ali@0
     1
#                                               -*- Autoconf -*-
ali@0
     2
# Process this file with autoconf to produce a configure script.
ali@0
     3
ali@18
     4
AC_INIT([whelk],[0.3.3],[ali@juiblex.co.uk])
ali@0
     5
AC_PREREQ(2.59)
ali@0
     6
AC_CONFIG_AUX_DIR([config])
ali@0
     7
AC_CONFIG_SRCDIR([whelk/whelk.c])
ali@0
     8
AC_CONFIG_HEADER([config.h])
ali@0
     9
AC_CONFIG_FILES([Makefile
ali@0
    10
whelk.pc
ali@0
    11
whelk/Makefile
ali@0
    12
])
ali@0
    13
AM_INIT_AUTOMAKE(no-define)
ali@0
    14
AC_CANONICAL_HOST
ali@0
    15
case $host_os in
ali@0
    16
    mingw*)
ali@0
    17
        host_mingw="yes"
ali@0
    18
        ;;
ali@0
    19
    *)
ali@0
    20
        host_mingw=""
ali@0
    21
        ;;
ali@0
    22
esac
ali@0
    23
AM_CONDITIONAL(WHELK_MINGW,[test -n "$host_mingw"])
ali@0
    24
ali@3
    25
# libtool versioning - this applies to all libraries in this package
ali@3
    26
#
ali@3
    27
# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
ali@3
    28
#
ali@9
    29
LT_CURRENT=2
ali@18
    30
LT_REVISION=1
ali@9
    31
LT_AGE=2
ali@3
    32
AC_SUBST(LT_CURRENT)
ali@3
    33
AC_SUBST(LT_REVISION)
ali@3
    34
AC_SUBST(LT_AGE)
ali@3
    35
ali@0
    36
##################################################
ali@0
    37
# Checks for programs.
ali@0
    38
##################################################
ali@0
    39
AC_PROG_CC
ali@0
    40
AC_LIBTOOL_WIN32_DLL
ali@0
    41
AC_PROG_LIBTOOL
ali@0
    42
PKG_PROG_PKG_CONFIG
ali@0
    43
ali@0
    44
##################################################
ali@0
    45
# Checks for header files.
ali@0
    46
##################################################
ali@0
    47
AC_HEADER_STDC
ali@16
    48
case $host_os in
ali@16
    49
    mingw*)
ali@16
    50
	AC_CHECK_HEADERS([softpub.h],[],[],
ali@16
    51
	  [#include <windows.h>
ali@16
    52
	  ])
ali@16
    53
	AC_CHECK_HEADERS([mscat.h],[],[],
ali@16
    54
	  [#include <windows.h>
ali@16
    55
	  ])
ali@16
    56
	;;
ali@16
    57
esac
ali@0
    58
ali@0
    59
##################################################
ali@0
    60
# Checks for typedefs, structures, and compiler characteristics.
ali@0
    61
##################################################
ali@0
    62
ali@0
    63
##################################################
ali@0
    64
# Checks for libraries.
ali@0
    65
##################################################
ali@0
    66
case $host_os in
ali@0
    67
    mingw*)
ali@10
    68
	EXTRA_LIBS="-lole32 -lsetupapi"
ali@0
    69
	EXTRA_BUILD_LIBS="-Wl,-luuid"
ali@0
    70
	EXTRA_PRIVATE_LIBS="-luuid"
ali@0
    71
        ;;
ali@0
    72
    *)
ali@0
    73
	EXTRA_LIBS=""
ali@0
    74
	EXTRA_BUILD_LIBS=""
ali@0
    75
	EXTRA_PRIVATE_LIBS=""
ali@0
    76
        ;;
ali@0
    77
esac
ali@0
    78
AC_SUBST(EXTRA_LIBS)
ali@0
    79
AC_SUBST(EXTRA_BUILD_LIBS)
ali@0
    80
AC_SUBST(EXTRA_PRIVATE_LIBS)
ali@0
    81
PKG_CHECK_MODULES(LUA,[lua])
ali@0
    82
lua_binary_version=`$PKG_CONFIG --variable V lua`
ali@0
    83
AC_SUBST([LUA_BINARY_VERSION],[$lua_binary_version])
ali@0
    84
ali@0
    85
##################################################
ali@0
    86
# Checks for library functions.
ali@0
    87
##################################################
ali@10
    88
case $host_os in
ali@10
    89
    mingw*)
ali@10
    90
	save_libs="$LIBS"
ali@10
    91
	LIBS="-lsetupapi $LIBS"
ali@10
    92
	AC_CHECK_FUNCS_ONCE([SetupUninstallOEMInfW])
ali@10
    93
	LIBS="$save_libs"
ali@10
    94
	;;
ali@10
    95
esac
ali@0
    96
ali@0
    97
##################################################
ali@0
    98
# Checks for processor independent files.
ali@0
    99
##################################################
ali@0
   100
ali@0
   101
##################################################
ali@0
   102
# Generate the various configured files
ali@0
   103
##################################################
ali@0
   104
AC_OUTPUT