build: remove autotools

parent c8880227
Pipeline #99852 passed with stage
in 2 minutes and 25 seconds
......@@ -30,29 +30,6 @@ cache:
- ninja -C _build
- ninja -C _build test
.autotools-build:
extends: .build
artifacts:
when: always
paths:
- _build/*.log
- _build/*/*.log
- _build/*/*/*.log
script:
- mkdir _build
- cd _build
- ../autogen.sh
--enable-docs
--enable-f16c
--enable-mmx
--enable-sse
--enable-sse2
--enable-sse3
--enable-sse4_1
${LCMS_OPTION}
- make
- make check
latest-meson-lcms:
extends: .meson-build
variables:
......@@ -64,14 +41,3 @@ latest-meson-nolcms:
variables:
LCMS_OPTION : "-Dwith-lcms=false"
EXTRA_PKGS: "meson"
latest-autotools-lcms:
extends: .autotools-build
variables:
LCMS_OPTION : "--with-lcms"
EXTRA_PKGS: "lcms2"
latest-autotools-nolcms:
extends: .autotools-build
variables:
LCMS_OPTION : "--without-lcms"
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = \
babl \
extensions \
tools \
tests
if ENABLE_DOCS
SUBDIRS+= docs
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = babl.pc
built_dist_files = README
EXTRA_DIST = \
$(built_dist_files) \
AUTHORS \
COPYING \
INSTALL \
NEWS \
TODO \
autogen.sh \
babl.pc.in \
export-symbols \
meson_options.txt \
meson.build
DISTCLEANFILES = \
$(built_dist_files) \
babl.pc
.PHONY: snapshot
if HAVE_W3M
README: all docs/index.html
$(W3M) -cols 72 -dump docs/index.html > $@
else
README:
@echo "*** w3m must be available in order to make dist"
@false
endif
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"`
snapcheck:
$(MAKE) distcheck distdir=$(PACKAGE)-`date +"%Y%m%d"`
distclean-local:
if test $(srcdir) = .; then :; else \
rm -f $(BUILT_EXTRA_DIST); \
fi
dnl BABL_DETECT_CFLAGS(RESULT, FLAGSET)
dnl Detect if the compiler supports a set of flags
AC_DEFUN([BABL_DETECT_CFLAGS],
[
$1=
for flag in $2; do
if test -z "[$]$1"; then
$1_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $flag"
AC_MSG_CHECKING([whether [$]CC understands [$]flag])
AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no])
AC_MSG_RESULT([$]$1_works)
CFLAGS="[$]$1_save_CFLAGS"
if test "x[$]$1_works" = "xyes"; then
$1="$flag"
fi
fi
done
])
# BABL_VARIADIC_MACROS
# --------------------
# check for flavours of variadic macros
AC_DEFUN([BABL_VARIADIC_MACROS],
[AC_BEFORE([$0], [AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CPP])
AC_CACHE_CHECK([for GNUC variadic macros],
[babl_cv_prog_gnuc_variadic_macros],
[# gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
# is passed ISO vararg support is turned off, and there is no work
# around to turn it on, so we unconditionally turn it off.
{ echo '#if __GNUC__ == 2 && __GNUC_MINOR__ == 95'
echo ' yes '
echo '#endif'; } > conftest.c
if ${CPP} conftest.c | grep yes > /dev/null; then
babl_cv_prog_c_variadic_macros=no
babl_cv_prog_cxx_variadic_macros=no
fi
AC_TRY_COMPILE([],[int a(int p1, int p2, int p3);
#define call_a(params...) a(1,params)
call_a(2,3);
],
babl_cv_prog_gnuc_variadic_macros=yes,
babl_cv_prog_gnuc_variadic_macros=no)
])
if test x$babl_cv_prog_gnuc_variadic_macros = xyes; then
AC_DEFINE(BABL_GNUC_VARIADIC_MACROS, 1, [Define if the C pre-processor supports GNU style variadic macros])
fi
AC_CACHE_CHECK([for ISO C99 variadic macros in C],
[babl_cv_prog_c_variadic_macros],
[AC_TRY_COMPILE([],[int a(int p1, int p2, int p3);
#define call_a(...) a(1,__VA_ARGS__)
call_a(2,3);
],
babl_cv_prog_c_variadic_macros=yes,
babl_cv_prog_c_variadic_macros=no)
])
if test x$babl_cv_prog_c_variadic_macros = xyes ; then
AC_DEFINE(BABL_ISO_VARIADIC_MACROS, 1, [Define if the C pre-processor supports variadic macros])
fi
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[AC_CACHE_CHECK([for ISO C99 variadic macros in C++],
[babl_cv_prog_cxx_variadic_macros],
[AC_LANG_PUSH(C++)
AC_TRY_COMPILE([],[int a(int p1, int p2, int p3);
#define call_a(...) a(1,__VA_ARGS__)
call_a(2,3);
],
babl_cv_prog_cxx_variadic_macros=yes,
babl_cv_prog_cxx_variadic_macros=no)
AC_LANG_POP])],
[# No C++ compiler
babl_cv_prog_cxx_variadic_macros=no])
if test x$babl_cv_prog_cxx_variadic_macros = xyes ; then
AC_DEFINE(BABL_ISO_CXX_VARIADIC_MACROS, 1, [Define if the C++ pre-processor supports variadic macros])
fi
])
## Source directory
if PLATFORM_WIN32
win32_no_undefined = -no-undefined
endif
SUBDIRS = base
c_sources = \
babl.c \
babl-cache.c \
babl-component.c \
babl-conversion.c \
babl-core.c \
babl-db.c \
babl-extension.c \
babl-fish-path.c \
babl-fish-reference.c \
babl-fish-simple.c \
babl-fish.c \
babl-format.c \
babl-hash-table.c \
babl-icc.c \
babl-image.c \
babl-internal.c \
babl-introspect.c \
babl-list.c \
babl-memory.c \
babl-model.c \
babl-mutex.c \
babl-palette.c \
babl-polynomial.c \
babl-ref-pixels.c \
babl-sampling.c \
babl-sanity.c \
babl-space.c \
babl-trc.c \
babl-type.c \
babl-util.c \
babl-cpuaccel.c \
babl-version.c
h_sources = \
babl.h \
babl-class.h \
babl-classes.h \
babl-component.h \
babl-conversion.h \
babl-cpuaccel.h \
babl-db.h \
babl-extension.h \
babl-fish.h \
babl-format.h \
babl-hash-table.h \
babl-ids.h \
babl-image.h \
babl-internal.h \
babl-introspect.h \
babl-list.h \
babl-macros.h \
babl-memory.h \
babl-model.h \
babl-matrix.h \
babl-mutex.h \
babl-polynomial.h \
babl-ref-pixels.h \
babl-sampling.h \
babl-space.h \
babl-trc.h \
babl-type.h \
babl-types.h \
babl-util.h
library_includedir=$(includedir)/babl-$(BABL_API_VERSION)/babl
libinc_hdrs = \
babl-introspect.h \
babl-macros.h \
babl-types.h \
babl.h
libinc_generated_hdrs = \
babl-version.h
library_include_HEADERS = \
$(libinc_hdrs) $(libinc_generated_hdrs)
AM_CPPFLAGS = \
-DLIBDIR=\""$(libdir)"\" \
-I$(top_srcdir) \
-I$(top_srcdir)/babl/base
lib_LTLIBRARIES= libbabl-@BABL_API_VERSION@.la
libbabl_@BABL_API_VERSION@_la_SOURCES= $(h_sources) $(c_sources)
libbabl_@BABL_API_VERSION@_la_CFLAGS= $(SSE2_EXTRA_CFLAGS) $(LCMS_CFLAGS)
libbabl_@BABL_API_VERSION@_la_LIBADD= \
base/libbase.la \
@LTLIBOBJS@
libbabl_@BABL_API_VERSION@_la_LDFLAGS= \
${win32_no_undefined} \
$(MATH_LIB) $(THREAD_LIB) $(LOG_LIB) \
$(LCMS_LIBS) \
-export-symbols $(top_srcdir)/export-symbols \
-version-info $(BABL_LIBRARY_VERSION)
EXTRA_DIST = \
babl-ref-pixels.inc \
meson.build
# If git is available, always check if git-version.h should be
# updated. If git is not available, don't do anything if git-version.h
# already exists because then we are probably working with a tarball
# in which case the git-version.h we ship is correct.
libbabl_generated_sources = git-version.h
BUILT_SOURCES = git-version.h
CLEANFILES = git-version.h
git-version.h: update-git-version-header
@if test -d "$(top_srcdir)/.git"; then \
git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
elif test ! -f "$@"; then \
git_version="Unknown, shouldn't happen"; \
git_last_commit_timestamp=-1; \
git_last_commit_year="`date -u '+%Y'`"; \
fi; \
if test -n "$$git_version"; then \
echo "#ifndef __GIT_VERSION_H__" > "$@.tmp"; \
echo "#define __GIT_VERSION_H__" >> "$@.tmp"; \
echo "#define BABL_GIT_VERSION \"$$git_version\"" >> "$@.tmp"; \
echo "#define BABL_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "$@.tmp"; \
echo "#endif /* __GIT_VERSION_H__ */" >> "$@.tmp"; \
fi
@if ( test -f "$@.tmp" && test -f "$@" && cmp "$@.tmp" "$@" > /dev/null ); then \
rm -f "$@.tmp"; \
elif test -f "$@.tmp"; then \
mv "$@.tmp" "$@"; \
echo " git HEAD changed: $@ regenerated"; \
fi
.PHONY: update-git-version-header
h_sources = \
babl-base.h
c_sources = \
babl-base.c \
formats.c \
pow-24.c \
type-float.c \
type-half.c \
type-u8.c \
type-u15.c \
type-u16.c \
type-u32.c \
model-rgb.c \
model-gray.c \
model-cmyk.c \
model-ycbcr.c
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl $(LCMS_CFLAGS)
noinst_LTLIBRARIES= libbase.la
libbase_la_SOURCES= $(h_sources) $(c_sources)
libbase_la_LIBADD = $(MATH_LIB)
EXTRA_DIST = \
util.h \
pow-24.h \
meson.build
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.54)
# Making releases on the stable branch:
# BABL_MICRO_VERSION += 1;
# BABL_INTERFACE_AGE += 1;
# BABL_BINARY_AGE += 1;
# if any functions have been added,
# set BABL_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set BABL_BINARY_AGE _and_ BABL_INTERFACE_AGE to 0.
m4_define([babl_major_version], [0])
m4_define([babl_minor_version], [1])
m4_define([babl_micro_version], [69])
m4_define([babl_real_version],
[babl_major_version.babl_minor_version.babl_micro_version])
m4_define([babl_version], [babl_real_version])
dnl Number of releases since we've added interfaces
m4_define([babl_interface_age], [1])
m4_define([babl_binary_age],
[m4_eval(100 * babl_minor_version + babl_micro_version)])
# This is the X.Y used in -lbabl-X.Y
m4_define([babl_api_version], [babl_major_version.babl_minor_version])
m4_define([stability_version_number],
m4_if(m4_eval(babl_major_version || babl_minor_version), [0],
[babl_micro_version], [babl_minor_version]))
m4_define([babl_unstable],
m4_if(m4_eval(stability_version_number % 2), [1], [yes], [no]))
m4_define([babl_stable],
m4_if(m4_eval(stability_version_number % 2), [0], [yes], [no]))
AC_INIT(babl, babl_major_version.babl_minor_version.babl_micro_version)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR(babl/babl.h)
AC_CONFIG_MACRO_DIR([m4])
BABL_MAJOR_VERSION=babl_major_version
BABL_MINOR_VERSION=babl_minor_version
BABL_MICRO_VERSION=babl_micro_version
BABL_INTERFACE_AGE=babl_interface_age
BABL_BINARY_AGE=babl_binary_age
BABL_VERSION=babl_version
BABL_REAL_VERSION=babl_real_version
BABL_API_VERSION=babl_api_version
AC_SUBST(BABL_MAJOR_VERSION)
AC_SUBST(BABL_MINOR_VERSION)
AC_SUBST(BABL_MICRO_VERSION)
AC_SUBST(BABL_INTERFACE_AGE)
AC_SUBST(BABL_BINARY_AGE)
AC_SUBST(BABL_VERSION)
AC_SUBST(BABL_REAL_VERSION)
AC_SUBST(BABL_API_VERSION)
BABL_RELEASE=babl_api_version
AC_SUBST(BABL_RELEASE)
dnl The symbol BABL_UNSTABLE is defined above for substitution in
dnl Makefiles and conditionally defined here as a preprocessor symbol
dnl and automake conditional.
BABL_UNSTABLE=babl_unstable
if test "x$BABL_UNSTABLE" = "xyes"; then
AC_DEFINE(BABL_UNSTABLE, 1,
[Define to 1 if this is an unstable version of BABL])
fi
AM_CONDITIONAL(BABL_UNSTABLE, test "x$BABL_UNSTABLE" = "xyes")
AC_SUBST(BABL_UNSTABLE)
# libtool versioning
m4_define([lt_current], [m4_eval(100 * babl_minor_version + babl_micro_version - babl_interface_age)])
m4_define([lt_revision], [babl_interface_age])
m4_define([lt_age], [m4_eval(babl_binary_age - babl_interface_age)])
BABL_LIBRARY_VERSION="lt_current:lt_revision:lt_age"
BABL_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
AC_SUBST(BABL_LIBRARY_VERSION)
AC_SUBST(BABL_CURRENT_MINUS_AGE)
dnl ==========================================================================
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.11 foreign no-define dist-bzip2 no-dist-gzip -Wno-portability])
# Enable silent build rules by default, requires at least
# Automake-1.11. Disable by either passing --disable-silent-rules to
# configure or passing V=1 to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Prefer clang on OSX, because GCC isn't updated
case "$build_os" in
darwin10.* | darwin9.* | darwin8.*)
;;
darwin*)
prefered_cc="clang"
prefered_cxx="clang++"
;;
*)
;;
esac
if test -z "$CC" && test -n "$prefered_cc"; then
AC_MSG_NOTICE([setting CC to $prefered_cc for $build_os])
CC=$prefered_cc
fi
if test -z "$CXX" && test -n "$prefered_cc"; then
AC_MSG_NOTICE([setting CXX to $prefered_cxx for $build_os])
CXX=$prefered_cxx
fi
# Check for programs
AC_PROG_CC
AC_PROG_CC_C99
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static win32-dll])
BABL_VARIADIC_MACROS
dnl Initialize maintainer mode
AM_MAINTAINER_MODE([enable])
AC_HEADER_STDC
AM_SANITY_CHECK
WEBSITE_HOST=pippin.gimp.org
AC_SUBST(WEBSITE_HOST)
WEBSITE_LOCATION=public_html/babl/
AC_SUBST(WEBSITE_LOCATION)
if eval "test x$GCC = xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
BABL_DETECT_CFLAGS(extra_warnings, '-Wdeclaration-after-statement')
CFLAGS="$CFLAGS $extra_warnings"
BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-prototypes')
CFLAGS="$CFLAGS $extra_warnings"
BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-declarations')
CFLAGS="$CFLAGS $extra_warnings"
BABL_DETECT_CFLAGS(extra_warnings, '-Winit-self')
CFLAGS="$CFLAGS $extra_warnings"
BABL_DETECT_CFLAGS(extra_warnings, '-Wpointer-arith')
CFLAGS="$CFLAGS $extra_warnings"
BABL_DETECT_CFLAGS(extra_warnings, '-Wold-style-definition')
CFLAGS="$CFLAGS $extra_warnings"
#BABL_DETECT_CFLAGS(extra_warnings, '-Ofast' )
#CFLAGS="$CFLAGS $extra_warnings"
fi
AC_PATH_PROG(RSVG, rsvg-convert, no)
AM_CONDITIONAL(HAVE_RSVG, test "x$RSVG" != "xno")
AC_PATH_PROG(W3M, w3m, no)
AM_CONDITIONAL(HAVE_W3M, test "x$W3M" != "xno")
dnl disable docs generation.
AC_ARG_ENABLE([docs],
[ --disable-docs disable docs generation (default=no)],,
enable_docs="yes")
AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = "xyes")
###########################
# Check target architecture
###########################
AC_MSG_CHECKING([for target architecture])
case x"$target" in
xNONE | x)
target_or_host="$host" ;;
*)
target_or_host="$target" ;;
esac
AC_MSG_RESULT([$target_or_host])
case "$target_or_host" in
i*86-*-*)
have_x86=yes
AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
;;
x86_64-*-*)
have_x86=yes
AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
AC_DEFINE(ARCH_X86_64, 1, [Define to 1 if you are compiling for amd64.])
;;
ppc-*-* | powerpc-*)
have_ppc=yes
AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
;;
ppc64-*-* | powerpc64-*)
have_ppc=yes
AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
AC_DEFINE(ARCH_PPC64, 1, [Define to 1 if you are compiling for PowerPC64.])
;;
*)
;;
esac
################
# Check for lcms
################
AC_ARG_WITH(lcms, [ --without-lcms build without lcms support])
have_lcms="no (lcms support disabled)"
if test "x$with_lcms" != xno; then
have_lcms=yes
PKG_CHECK_MODULES(LCMS, lcms2 >= lcms_required_version,
AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
LCMS='lcms$(EXEEXT)',
have_lcms="no (lcms not found or unusable)")
fi
AC_SUBST(LCMS)
AM_CONDITIONAL(HAVE_LCMS, test "x$have_lcms" = xyes)
############################
# Check how to find plug-ins
############################
AC_MSG_CHECKING([the extension for shared libraries])
case "$target_or_host" in
hppa*-hpux*) # HP/UX
shrext=.sl
;;
*-*-mingw* | *-*-cygwin*) # windows
shrext=.dll
;;
*) # linux (and BSD?)
shrext=.so
;;
esac
SHREXT=$shrext
AC_SUBST(SHREXT)
AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries])
AC_MSG_RESULT([$shrext])
dnl ===========================================================================
#################
# Check for Win32
#################
AC_MSG_CHECKING([for some Win32 platform])
case "$target_or_host" in
*-*-mingw* | *-*-cygwin*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
MATH_LIB=-lm
THREAD_LIB=-lpthread
LOG_LIB=
AC_MSG_CHECKING([for native Win32])
case "$target_or_host" in
*-*-mingw*)
os_win32=yes
PATH_SEP=';'
DIR_SEP='\\'
MATH_LIB=
THREAD_LIB=
;;
*-*-android*)
os_win32=no
PATH_SEP=':'
DIR_SEP='/'
THREAD_LIB=
LOG_LIB='-llog'
;;
*)
os_win32=no
PATH_SEP=':'
DIR_SEP='/'
;;
esac
AC_MSG_RESULT([$os_win32])
AC_SUBST(PATH_SEP)
AC_SUBST(DIR_SEP)
AC_SUBST(MATH_LIB)
AC_SUBST(THREAD_LIB)
AC_SUBST(LOG_LIB)
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
dnl ===========================================================================
#################
# Check for some not-so-common features
#################
# babl_fish_reference(), create_name() would like this