Skip to content

Commit

Permalink
Merge pull request #27 from kraj/master
Browse files Browse the repository at this point in the history
configure: Fix checks for libjpeg and libexif
  • Loading branch information
mattes authored Apr 5, 2023
2 parents 91bae0d + d152897 commit 17bbae0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
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@

0 comments on commit 17bbae0

Please sign in to comment.