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

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Sep 1, 2022

Use the functions from the respective library instead of using main
function which is not part of library

Upstream-Status: Pending
Signed-off-by: Khem Raj [email protected]

@mattes
Copy link
Owner

mattes commented Mar 31, 2023

@francois-random Does this look good to you?

@francois-random
Copy link
Contributor

francois-random commented Apr 4, 2023

there misses a dependency to -lm in AC_CHECK_LIB in case libexif is a static lib (at least for the latest version of libexif, perhaps it wasnt needed before).

it should be
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])

@kraj
Copy link
Contributor Author

kraj commented Apr 4, 2023

there misses a dependency to -lm in AC_CHECK_LIB in case libexif is a static lib (at least for the latest version of libexif, perhaps it wasnt needed before).

it should be 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])

done

@francois-random
Copy link
Contributor

francois-random commented Apr 4, 2023

great!
to build successfully the command line tool and the shared libraries, there needs 2 more lines to reference -lm:

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_CHECK_LIB([m], [log], [], [echo "invalid libm. log not found"])

my_includes=""
my_libs="-ljpeg -lexif -lm"

its because now there are references to log, log10 and pow in the latest version of libexif

Use the functions from the respective library instead of using main
function which is not part of library

Signed-off-by: Khem Raj <[email protected]>
@kraj
Copy link
Contributor Author

kraj commented Apr 4, 2023

great! to build successfully the command line tool and the shared libraries, there needs 2 more lines to reference -lm:

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_CHECK_LIB([m], [log], [], [echo "invalid libm. log not found"])

my_includes=""
my_libs="-ljpeg -lexif -lm"

its because now there are references to log, log10 and pow in the latest version of libexif

I have gone a step further to get rid of my_includes and my_libs they will be automatically added when configure checks for these libs succeed so no need to have them. They were making the libs appear twice on linker cmdline

@francois-random
Copy link
Contributor

@kraj this is perfect, thanks
@mattes I confirm it works for me

@mattes
Copy link
Owner

mattes commented Apr 5, 2023

Amazing team work! Thank you @francois-random and @kraj

@mattes mattes merged commit 17bbae0 into mattes:master Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants