Update of /cvsroot/ufraw/ufraw
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31680

Modified Files:
        configure.ac 
Log Message:
Reorder configure.ac to make latest version of MXE (with GCC 4.7.2) work for 
cross-compiling. Make the -mno-cygwin flag configurable since it is not valid 
in GCC 4.6+.

Index: configure.ac
===================================================================
RCS file: /cvsroot/ufraw/ufraw/configure.ac,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- configure.ac        18 Mar 2013 04:45:21 -0000      1.171
+++ configure.ac        18 Mar 2013 15:45:22 -0000      1.172
@@ -20,6 +20,16 @@
     echo cannot execute: pod2man], $PATH)
 AC_FUNC_FSEEKO
 
+# Ensure that getopt_long is available.  It is included in GNU libc and
+# in at least most BSD libcs.  If not found, search for it in libgnugetopt.
+AC_SEARCH_LIBS(getopt_long, gnugetopt, ,
+  AC_MSG_ERROR(can not build UFRaw without getopt_long))
+
+# Make sure that pow is available, trying libm if necessary.
+AC_SEARCH_LIBS(pow, m)
+AC_CHECK_FUNCS(canonicalize_file_name)
+AC_CHECK_FUNCS(memmem)
+
 # For binary package creation, adjusting for the build CPU is not appropriate.
 case $host_cpu in
   i686)
@@ -45,49 +55,6 @@
 CFLAGS="$CFLAGS $OPENMP_CFLAGS"
 CXXFLAGS="$CXXFLAGS $OPENMP_CFLAGS"
 
-# Windows and Darwin (Mac OS X) will require some special attention.
-case $host_os in
-  *mingw* )
-    ufraw_win32=yes
-    ufraw_darwin=no
-    ;;
-  *darwin* )
-    ufraw_win32=no
-    ufraw_darwin=yes
-    ;;
-  * )
-    ufraw_win32=no
-    ufraw_darwin=no
-    ;;
-esac
-AM_CONDITIONAL(UFRAW_WIN32, test x$ufraw_win32 = xyes)
-
-if test $ufraw_win32 = yes; then
-  CFLAGS="$CFLAGS -mno-cygwin -mwindows -mms-bitfields"
-  CXXFLAGS="$CXXFLAGS -mno-cygwin -mwindows -mms-bitfields"
-  CONSOLE="-mconsole"
-else
-  CONSOLE=
-fi
-AC_SUBST(CONSOLE)
-
-# Check for the Apple Carbon framework (needed for GDK_WINDOWING_QUARTZ). 
-CARBON_LIBS=
-if test $ufraw_darwin = yes; then
-  carbon_ok=no
-  AC_MSG_CHECKING([for Mac OS X Carbon support])
-  AC_TRY_CPP([
-  #include <Carbon/Carbon.h>
-  #include <ApplicationServices/ApplicationServices.h>
-  #include <CoreServices/CoreServices.h>
-  ], carbon_ok=yes)
-  AC_MSG_RESULT($carbon_ok)
-  if test "x$carbon_ok" = "xyes"; then
-    CARBON_LIBS="-framework Carbon -framework Cocoa"
-  fi
-fi
-AC_SUBST(CARBON_LIBS)
-
 # point to programs/libraries installed in a non-default place
 AC_ARG_WITH(prefix,
   [  --with-prefix=PREFIX    use also PREFIX as an input prefix for the build],
@@ -99,12 +66,6 @@
   ],
   [ with_prefix=NONE ] )
 
-AC_ARG_WITH(dosprefix,
-  [  --with-dosprefix=PREFIX PREFIX is the prefix in dos format
-                          (needed only in windows) ],
-  [ with_dosprefix=$withval],
-  [ with_dosprefix=NONE ] )
-
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.12 gthread-2.0)
 PKG_CHECK_MODULES(LCMS, lcms >= 1.14)
 
@@ -210,21 +171,6 @@
 AC_SUBST(CINEPAINT_LIBS)
 AC_SUBST(CINEPAINT_PROGRAMPLUGINDIR)
 
-# Ensure that getopt_long is available.  It is included in GNU libc and
-# in at least most BSD libcs.  If not found, search for it in libgnugetopt.
-AC_SEARCH_LIBS(getopt_long, gnugetopt, ,
-  AC_MSG_ERROR(can not build UFRaw without getopt_long))
-
-# The ws2_32 library is required for the ntohs symbol on win32.
-if test $ufraw_win32 = yes; then
-  LIBS="$LIBS -lws2_32"
-fi
-
-# Make sure that pow is available, trying libm if necessary.
-AC_SEARCH_LIBS(pow, m)
-AC_CHECK_FUNCS(canonicalize_file_name)
-AC_CHECK_FUNCS(memmem)
-
 # Check for zlib.
 AC_CHECK_LIB(z, deflate)
 have_zlib=${ac_cv_lib_z_deflate:-no}
@@ -278,6 +224,18 @@
   [ have_lensfun=no
     AC_MSG_RESULT($LENSFUN_PKG_ERRORS) ] )
 
+# Make sure MSGFMT_OPTS is defined for all combinations of autoconf and glib.
+MSGFMT_OPTS=
+ALL_LINGUAS="ca cs da de es fr it ja ko nb nl pl pt ru sr sr@latin sv zh_CN 
zh_TW"
+AM_GLIB_GNU_GETTEXT
+LIBS="$LIBS $INTLLIBS"
+# The following might not work with some combinations of autoconf and glib due
+# to a missing update of the glib-gettext.m4 file.
+#AM_GLIB_DEFINE_LOCALEDIR(UFRAW_LOCALEDIR)
+GETTEXT_PACKAGE=ufraw
+AC_SUBST(GETTEXT_PACKAGE)
+AC_SUBST(MSGFMT_OPTS)
+
 # UFRAW_CPPFLAGS is added to the preprocessor flags AM_CPPFLAGS,
 # affecting also the C and C++ compilers.
 UFRAW_CPPFLAGS="$UFRAW_CPPFLAGS $EXIV2_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS 
$LCMS_CFLAGS $LENSFUN_CFLAGS $LIBTIFF_CFLAGS $LIBPNG_CFLAGS $CFITSIO_CFLAGS"
@@ -286,6 +244,69 @@
 UFRAW_LDADD="$UFRAW_LDADD $EXIV2_LIBS $GLIB_LIBS $LCMS_LIBS $LENSFUN_LIBS 
$LIBTIFF_LIBS $LIBPNG_LIBS $CFITSIO_LIBS $CARBON_LIBS"
 AC_SUBST(UFRAW_LDADD)
 
+# Windows and Darwin (Mac OS X) will require some special attention.
+case $host_os in
+  *mingw* )
+    ufraw_win32=yes
+    ufraw_darwin=no
+    ;;
+  *darwin* )
+    ufraw_win32=no
+    ufraw_darwin=yes
+    ;;
+  * )
+    ufraw_win32=no
+    ufraw_darwin=no
+    ;;
+esac
+AM_CONDITIONAL(UFRAW_WIN32, test x$ufraw_win32 = xyes)
+
+if test $ufraw_win32 = yes; then
+  CFLAGS="$CFLAGS -mwindows -mms-bitfields"
+  CXXFLAGS="$CXXFLAGS -mwindows -mms-bitfields"
+  CONSOLE="-mconsole"
+  AC_MSG_CHECKING(whether to add the -mno-cygwin flag to CFLAGS and CXXFLAGS)
+  AC_ARG_ENABLE(no_cygwin,
+    [  --enable-no-cygwin      add the -mno-cygwin flag to CFLAGS and 
CXXFLAGS],
+    , enable_no_cygwin=no)
+  AC_MSG_RESULT($enable_no_cygwin)
+  if test $enable_no_cygwin = yes; then
+    CFLAGS="$CFLAGS -mno-cygwin" 
+    CXXFLAGS="$CXXFLAGS -mno-cygwin" 
+  fi
+else
+  CONSOLE=
+fi
+AC_SUBST(CONSOLE)
+
+# Check for the Apple Carbon framework (needed for GDK_WINDOWING_QUARTZ). 
+CARBON_LIBS=
+if test $ufraw_darwin = yes; then
+  carbon_ok=no
+  AC_MSG_CHECKING([for Mac OS X Carbon support])
+  AC_TRY_CPP([
+  #include <Carbon/Carbon.h>
+  #include <ApplicationServices/ApplicationServices.h>
+  #include <CoreServices/CoreServices.h>
+  ], carbon_ok=yes)
+  AC_MSG_RESULT($carbon_ok)
+  if test "x$carbon_ok" = "xyes"; then
+    CARBON_LIBS="-framework Carbon -framework Cocoa"
+  fi
+fi
+AC_SUBST(CARBON_LIBS)
+
+AC_ARG_WITH(dosprefix,
+  [  --with-dosprefix=PREFIX PREFIX is the prefix in dos format
+                          (needed only in windows) ],
+  [ with_dosprefix=$withval],
+  [ with_dosprefix=NONE ] )
+
+# The ws2_32 library is required for the ntohs symbol on win32.
+if test $ufraw_win32 = yes; then
+  LIBS="$LIBS -lws2_32"
+fi
+
 if test $ufraw_win32 = yes; then
   AC_CHECK_PROGS(WINDRES, $host_alias-windres $target_alias-windres windres, , 
$PATH)
   AC_SUBST(WINDRES)
@@ -313,18 +334,6 @@
   AC_SUBST(COMMENT_ICON)
 fi
 
-# Make sure MSGFMT_OPTS is defined for all combinations of autoconf and glib.
-MSGFMT_OPTS=
-ALL_LINGUAS="ca cs da de es fr it ja ko nb nl pl pt ru sr sr@latin sv zh_CN 
zh_TW"
-AM_GLIB_GNU_GETTEXT
-LIBS="$LIBS $INTLLIBS"
-# The following might not work with some combinations of autoconf and glib due
-# to a missing update of the glib-gettext.m4 file.
-#AM_GLIB_DEFINE_LOCALEDIR(UFRAW_LOCALEDIR)
-GETTEXT_PACKAGE=ufraw
-AC_SUBST(GETTEXT_PACKAGE)
-AC_SUBST(MSGFMT_OPTS)
-
 AC_MSG_CHECKING(whether to install mime types)
 AC_ARG_ENABLE(mime,
   [  --enable-mime           install mime files, see README for more 
information],


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
ufraw-cvs mailing list
ufraw-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to