You may found this link on the top result of Google search, http://pete.akeo.ie/2010/12/that-darn-libtoolize-acconfigmacrodirm4.html. It still confusing, adding .gitattributes doesnt seem fix it, but it does if we do in this sequences :
- Create a dir and enter it
git init
- Create the .gitattributes file as told above
git remote add origin repoaddress
git fetch origin
git checkout origin/master
autoreconf -fi
- Done!
That is not really the solution, the problem is the following:
When you try for the first time execute autoreconf -fi the problem appears but somefiles are generated, so if you delete those new file with help of Git and you add the .gitattributes files with the content of:
*.sh -crlf
*.ac -crlf
*.am -crlf
as http://pete.akeo.ie/2010/12/that-darn-libtoolize-acconfigmacrodirm4.html explain, you will get it work
Those files are in a way a cache of the previews execution that autoreconf -fi things is not