Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: Fix checks for libjpeg and libexif #27

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ AC_SUBST(version_info)
dnl AC_CHECK_FUNCS(fmemopen)
dnl AC_CHECK_FUNCS(open_memstream)

AC_CHECK_LIB([jpeg], [main], [], [echo "libjpeg library not found. Please install it before proceeding"; exit -1])
AC_CHECK_LIB([exif], [main], [], [echo "libexif library not found. Please install it before proceeding"; exit -1])

my_includes=""
my_libs="-ljpeg -lexif"
AC_SUBST(my_includes)
AC_SUBST(my_libs)
AC_CHECK_LIB([m], [log], [], [echo "invalid libm. log not found"])
AC_CHECK_LIB([jpeg], [jpeg_simple_progression], [], [echo "libjpeg library not found. Please install it before proceeding"; exit -1])
AC_CHECK_LIB([exif], [exif_data_new_from_file], [], [echo "libexif library not found. Please install it before proceeding"; exit -1], [-lm])

AC_OUTPUT([
Makefile
Expand Down
3 changes: 1 addition & 2 deletions src/bin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in

AM_CPPFLAGS = \
-I../lib \
-I$(top_srcdir)/src/lib \
@my_includes@
-I$(top_srcdir)/src/lib

bin_PROGRAMS = epeg

Expand Down
3 changes: 0 additions & 3 deletions src/lib/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

MAINTAINERCLEANFILES = Makefile.in

AM_CPPFLAGS = @my_includes@

lib_LTLIBRARIES = libepeg.la
include_HEADERS = Epeg.h
libepeg_la_SOURCES = \
epeg_main.c \
epeg_private.h

libepeg_la_LIBADD = @my_libs@
libepeg_la_DEPENDENCIES = $(top_builddir)/config.h
libepeg_la_LDFLAGS = -version-info @version_info@