mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 18:44:17 +00:00
Cleanup Cygwin builds.
* windows/Makefile.am (loaddrv_LDFLAGS): remove, the -mno-cygwin flag is supposed to be set in CFLAGS by ./configure * configure.ac: add a check for the presence of usleep(), add a check whether the linker accepts -static * avrdude.h: protect prototype for usleep by !defined(HAVE_USLEEP) * ppwin.c (usleep): protect by !defined(HAVE_USLEEP) * main.c: silence "array subscript of type char" compiler warnings by casting all arguments to tolower()/toupper() and isspace()/ isdigit()/ispunct() to "int" * butterfly.c: (Dito.) * avr910.c: (Dito.) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@936 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
25
configure.ac
25
configure.ac
@@ -77,7 +77,7 @@ AC_C_CONST
|
||||
AC_HEADER_TIME
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday])
|
||||
AC_CHECK_FUNCS([memset select strcasecmp strdup strerror strncasecmp strtol strtoul gettimeofday usleep])
|
||||
|
||||
AC_MSG_CHECKING([for a Win32 HID libray])
|
||||
SAVED_LIBS="${LIBS}"
|
||||
@@ -273,7 +273,7 @@ case $target in
|
||||
# does this compiler support -mno-cygwin?
|
||||
AC_MSG_CHECKING([if $CC accepts -mno-cygwin])
|
||||
|
||||
safe_CFLAGS=$CFLAGS
|
||||
safe_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$ENABLE_WARNINGS -mno-cygwin"
|
||||
|
||||
AC_TRY_COMPILE(, [ int main () { return 0 ; } ], [
|
||||
@@ -283,7 +283,7 @@ case $target in
|
||||
no_cygwin=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
CFLAGS=$safe_CFLAGS
|
||||
CFLAGS="$safe_CFLAGS"
|
||||
|
||||
if test x$no_cygwin = xyes; then
|
||||
CFLAGS="${CFLAGS} -mno-cygwin"
|
||||
@@ -295,9 +295,26 @@ case $target in
|
||||
AC_MSG_NOTICE([])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if linker accepts -static])
|
||||
|
||||
safe_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="${LDFLAGS} -static"
|
||||
AC_TRY_LINK(, [ int main () { return 0 ; } ], [
|
||||
can_link_static=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
can_link_static_cygwin=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
LDFLAGS="$safe_LDFLAGS"
|
||||
|
||||
if test x$can_link_static = xyes; then
|
||||
LDFLAGS="${LDFLAGS} -static"
|
||||
fi
|
||||
|
||||
WINDOWS_DIRS="windows"
|
||||
CFLAGS="${CFLAGS} -DWIN32NATIVE"
|
||||
LDFLAGS="${LDFLAGS} -static"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
|
||||
|
||||
Reference in New Issue
Block a user