]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Added the code to copy setup0.h to setup.h if setup.h does not exist (due to checkout...
[wxWidgets.git] / configure.in
index dc9e74345ebee81fe82c36d21d706d5f8aadfd2f..1d3f5e5ab351e8a0294cf4365ee8d5d20795cc60 100644 (file)
@@ -1964,12 +1964,6 @@ else
     dnl distribute only wxBase sources/headers
     GUIDIST="BASE_DIST"
     DISTDIR="wxBase"
-
-    dnl Apple MAC OS X specific extras
-    if test "$USE_UNIX" = 1 ; then
-       ALL_OBJECTS="${ALL_OBJECTS} dl_macosx.o"
-       ALL_DEPFILES="${ALL_DEPFILES} dl_macosx.d"
-    fi
 fi
 
 dnl the name of the (libtool) library
@@ -2333,6 +2327,11 @@ dnl end...
 dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what
 dnl we'll find under MSW if it exists.
 
+dnl final note: AC_TRY_COMPILE will only be executed if there is nothing in
+dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside
+dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure
+dnl runs
+
 dnl check for vsnprintf() - a safe version of vsprintf()
 AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
 [
@@ -2355,7 +2354,6 @@ AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
                     vsnprintf(s, 42, fmt, argp);
                     va_end(argp);
                  ], [
-                    AC_DEFINE(HAVE_VSNPRINTF)
                     wx_cv_func_vsnprintf=yes
                  ], [
                     AC_TRY_COMPILE([
@@ -2377,15 +2375,19 @@ AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
                                       _vsnprintf(s, 42, fmt, argp);
                                       va_end(argp);
                                    ], [
-                                      AC_DEFINE(HAVE_VSNPRINTF)
                                       wx_cv_func_vsnprintf=yes
                                    ], [
-                                      AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
                                       wx_cv_func_vsnprintf=no
                                    ])
                  ])
 ])
 
+if test "$wx_cv_func_vsnprintf" = yes; then
+    AC_DEFINE(HAVE_VSNPRINTF)
+else
+    AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
+fi
+
 dnl check for vsscanf()
 AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
 [
@@ -2406,13 +2408,16 @@ AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
                     vsscanf("42", fmt, argp);
                     va_end(argp);
                 ], [
-                    AC_DEFINE(HAVE_VSSCANF)
                     wx_cv_func_vsscanf=yes
                 ], [
                     wx_cv_func_vsscanf=no
                 ])
 ])
 
+if test "$wx_cv_func_vsscanf" = yes; then
+    AC_DEFINE(HAVE_VSSCANF)
+fi
+
 AC_LANG_RESTORE
 
 dnl the following tests are for Unix(like) systems only
@@ -4047,7 +4052,7 @@ AC_OUTPUT([
               mkdir lib/wx/include/wx/${TOOLKIT_NAME}
             fi
             if test -f setup.h; then
-                cp -f setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h
+                cp -fp setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h
             fi
 
             dnl *move* setup.h to its final place
@@ -4062,7 +4067,7 @@ AC_OUTPUT([
               mkdir include/wx/${TOOLKIT_DIR}
             fi
             if test -f setup.h; then
-                mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h
+                cp -fp setup.h include/wx/${TOOLKIT_DIR}/setup.h
             fi
             
           ],