[FFmpeg-devel] [PATCH] build: fix MSVC under cygwin

James Darnley james.darnley at gmail.com
Sun Jan 24 00:24:13 CET 2016


On 2016-01-24 00:10, Hendrik Leppkes wrote:
> On Sun, Jan 24, 2016 at 12:06 AM, James Darnley <james.darnley at gmail.com> wrote:
>> On 2016-01-23 23:48, charlie.arnold at gmail.com wrote:
>>> From: Charles Arnold <charles.arnold at gisinc.com>
>>>
>>> Use cygpath -w when running under cygwin, and pwd -W under mingw
>>> ---
>>>  configure | 12 +++++++++++-
>>>  1 file changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index f7d1000..94a694a 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6234,7 +6234,17 @@ enabled stripping || strip="echo skipping strip"
>>>  config_files="$TMPH config.mak doc/config.texi"
>>>
>>>  if enabled msvc; then
>>> -    dst_path=$(pwd -W)
>>> +    case $host_os in
>>> +    mingw32*|mingw64*)
>>> +        dst_path=$(pwd -W)
>>> +    ;;
>>> +    cygwin*)
>>> +        dst_path=$(cygpath -w $(pwd))
>>> +    ;;
>>> +    *)
>>> +        dst_path=$(pwd)
>>> +    ;;
>>> +    esac
>>>  else
>>>      dst_path=$(pwd)
>>>  fi
>>>
>>
>> Maybe.  The backslashes might cause problems.  Let me try and force test
>> it with cygwin gcc.

As I thought.  When calling gcc from make the backslashes are dropped
meaning gcc can't find the files.  I don't know whether msvc would
suffer the same.

> cygpath has a "-m" (--mixed) option for Windows paths with forward slashes.
> Don't ask me if all versions of cygpath have it, however.

A decent compromise.  It works when I force it on cygwin programs.
Though I can't say whether it is guaranteed that all Windows programs
will understand the forward slash.  (I guess it depends how they use the
string.)

I will try and find out how old the option is.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160124/92727cd8/attachment.sig>


More information about the ffmpeg-devel mailing list