From 2e0bceb668d2f3908d96ab9074b6ae293fde1bbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Mon, 8 Mar 1999 14:13:56 +0000 Subject: [PATCH] Fixed checking for libjpeg and linking against it which were broken. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 95 +++++++++++++++++++++++------------------------ configure.in | 2 +- setup/maketmpl.in | 6 ++- 3 files changed, 51 insertions(+), 52 deletions(-) diff --git a/configure b/configure index d3a12310bd..346bebf61d 100755 --- a/configure +++ b/configure @@ -6922,9 +6922,9 @@ if test "$wxUSE_LIBJPEG" = 1 ; then #define wxUSE_LIBJPEG $wxUSE_LIBJPEG EOF - echo $ac_n "checking for in -ljpeg""... $ac_c" 1>&6 -echo "configure:6927: checking for in -ljpeg" >&5 -ac_lib_var=`echo jpeg'_' | sed 'y%./+-%__p_%'` + echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6 +echo "configure:6927: checking for main in -ljpeg" >&5 +ac_lib_var=`echo jpeg'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6933,16 +6933,12 @@ LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6967,8 +6963,9 @@ EOF else echo "$ac_t""no" 1>&6 +{ echo "configure: error: "libjpeg is not available."" 1>&2; exit 1; } fi - + JPEG_LINK="-ljpeg" fi @@ -7032,12 +7029,12 @@ if test "$wxUSE_DYNLIB_CLASS" = "1"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7036: checking for $ac_func" >&5 +echo "configure:7033: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7085,7 +7082,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:7089: checking for dlopen in -ldl" >&5 +echo "configure:7086: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7093,7 +7090,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7133,12 +7130,12 @@ done for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7137: checking for $ac_func" >&5 +echo "configure:7134: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7335,7 +7332,7 @@ UNIX_THREAD="" if test "$wxUSE_THREADS" = "1"; then echo $ac_n "checking for pthread_create in -lpthread-0.7""... $ac_c" 1>&6 -echo "configure:7339: checking for pthread_create in -lpthread-0.7" >&5 +echo "configure:7336: checking for pthread_create in -lpthread-0.7" >&5 ac_lib_var=`echo pthread-0.7'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7343,7 +7340,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread-0.7 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7378,17 +7375,17 @@ else ac_safe=`echo "sys/prctl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/prctl.h""... $ac_c" 1>&6 -echo "configure:7382: checking for sys/prctl.h" >&5 +echo "configure:7379: checking for sys/prctl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7414,7 +7411,7 @@ fi echo $ac_n "checking for pthread_setcanceltype in -lpthread""... $ac_c" 1>&6 -echo "configure:7418: checking for pthread_setcanceltype in -lpthread" >&5 +echo "configure:7415: checking for pthread_setcanceltype in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_setcanceltype | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7422,7 +7419,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7462,7 +7459,7 @@ fi if test "x$THREADS_LINK" = "x"; then echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:7466: checking for pthread_create in -lc_r" >&5 +echo "configure:7463: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7470,7 +7467,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7525,17 +7522,17 @@ if test "$wxUSE_THREADS" = "1"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7529: checking for $ac_hdr" >&5 +echo "configure:7526: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -7563,7 +7560,7 @@ done echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7567: checking for sched_yield in -l$THREADS_LINK" >&5 +echo "configure:7564: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7571,7 +7568,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7604,7 +7601,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -l"posix4"""... $ac_c" 1>&6 -echo "configure:7608: checking for sched_yield in -l"posix4"" >&5 +echo "configure:7605: checking for sched_yield in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7612,7 +7609,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7653,7 +7650,7 @@ fi echo $ac_n "checking for sched_get_priority_min in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7657: checking for sched_get_priority_min in -l$THREADS_LINK" >&5 +echo "configure:7654: checking for sched_get_priority_min in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_min | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7661,7 +7658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7694,7 +7691,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_min in -l"posix4"""... $ac_c" 1>&6 -echo "configure:7698: checking for sched_get_priority_min in -l"posix4"" >&5 +echo "configure:7695: checking for sched_get_priority_min in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_get_priority_min | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7702,7 +7699,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7743,7 +7740,7 @@ fi echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7747: checking for pthread_cancel in -l$THREADS_LINK" >&5 +echo "configure:7744: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7751,7 +7748,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index 8fc21ef771..648518d1d8 100644 --- a/configure.in +++ b/configure.in @@ -1226,7 +1226,7 @@ AC_SUBST(PNG_C_SRC) JPEG_LINK="" if test "$wxUSE_LIBJPEG" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_LIBJPEG,$wxUSE_LIBJPEG) - AC_CHECK_LIB(jpeg) + AC_CHECK_LIB(jpeg,main,,AC_MSG_ERROR("libjpeg is not available.")) JPEG_LINK="-ljpeg" fi AC_SUBST(JPEG_LINK) diff --git a/setup/maketmpl.in b/setup/maketmpl.in index de91877e83..69556cc603 100644 --- a/setup/maketmpl.in +++ b/setup/maketmpl.in @@ -88,6 +88,7 @@ WX_LINK = @WX_LINK@ THREADS_LINK = @THREADS_LINK@ EXTRA_LINK = @EXTRA_LINK@ +JPEG_LINK = @JPEG_LINK@ # INCLUDES WX_INCLUDES = \ @@ -110,8 +111,9 @@ LINK_LIBS= \ $(X_EXTRA_LIBS) \ $(X_PRE_LIBS) \ $(THREADS_LINK) \ - $(EXTRA_LINK) - + $(EXTRA_LINK) \ + $(JPEG_LINK) + # Don't include $(OPENGL_LIBS) in LINK_LIBS; they # can be conveniently added to BIN_LINK in Makefile.in. -- 2.45.2