Subject: Re: emacsclient.c fails to compile

From: Paul Eggert <[email-masked]>
Date: Tue, 18 Jun 2013 00:59:19 -0700

Perhaps "make clean; ./configure; make" will fix whatever
state your build is wedge in....

Anyway, I'm surprised that lib/getopt.h is built on your platform,
as the stock getopt.h should be OK.
Could you please send the part of
config.log that talks about getopt?
Mine says the following (Fedora 17):

configure:9297: checking for getopt.h
configure:9297: gcc -std=gnu99 -c -g3 -O2    conftest.c >&5
configure:9297: $? = 0
configure:9297: result: yes
...
configure:18980: checking for getopt_long_only
configure:18980: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:18980: $? = 0
configure:18980: result: yes
configure:18994: checking whether getopt is POSIX compatible
configure:19036: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19036: $? = 0
configure:19036: ./conftest
configure:19036: $? = 0
configure:19095: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19095: $? = 0
configure:19095: ./conftest
configure:19095: $? = 0
configure:19137: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19137: $? = 0
configure:19137: ./conftest
program: option requires an argument -- 'b'
configure:19137: $? = 0
configure:19155: result: yes
configure:19163: checking for working GNU getopt function
configure:19384: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19384: $? = 0
configure:19384: ./conftest
configure:19384: $? = 0
configure:19400: result: yes
configure:19405: checking for working GNU getopt_long function
configure:19450: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19450: $? = 0
configure:19450: ./conftest
configure:19450: $? = 0
configure:19461: result: yes